Google Search - Blog...........

HR ABAP - BDC To Upload The OM Relations Through T-code PO13

report ZHR_OM_REL
no standard page heading line-size 255.

include bdcrecx1.
*--Create an internal tables
DATA : BEGIN OF RECORD OCCURS 0,
SEARK(12),
SOBID(45),
END OF RECORD.

start-of-selection.

*---upload the data into the internal table
Perform upload_file.

*---Create a session
perform open_group.

*---Process and post the data into the transaction

loop at record.
perform bdc_dynpro using 'SAPMH5A0' '5100'.
perform bdc_field using 'BDC_CURSOR'
'PM0D1-SEARK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'PPHDR-PLVAR'
'01'.
perform bdc_field using 'PM0D1-SEARK'
record-seark.
perform bdc_field using 'PM0D1-TIMR6'
'X'.
perform bdc_field using 'PPHDR-BEGDA'
'01.08.2009'.
perform bdc_field using 'PPHDR-ENDDA'
'31.12.9999'.
perform bdc_dynpro using 'SAPMH5A0' '5100'.
perform bdc_field using 'BDC_OKCODE'
'=INSE'.
perform bdc_field using 'PPHDR-PLVAR'
'01'.
perform bdc_field using 'PM0D1-SEARK'
record-seark.
perform bdc_field using 'BDC_CURSOR'
'TT_T777T-ITEXT(02)'.
perform bdc_field using 'PM0D1-TIMR6'
'X'.
perform bdc_field using 'PPHDR-BEGDA'
'01.08.2009'.
perform bdc_field using 'PPHDR-ENDDA'
'31.12.9999'.
perform bdc_field using 'MARKFELD(02)'
'X'.
perform bdc_dynpro using 'MP100100' '2000'.
perform bdc_field using 'BDC_CURSOR'
'P1001-SOBID'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'P1001-BEGDA'
'01.08.2009'.
perform bdc_field using 'P1001-ENDDA'
'31.12.9999'.
perform bdc_field using 'P1001-RSIGN'
'A'.
perform bdc_field using 'P1001-RELAT'
'003'.
perform bdc_field using 'P1001-SCLAS'
'O'.
perform bdc_field using 'P1001-SOBID'
record-sobid.
perform bdc_dynpro using 'MP100100' '2000'.
perform bdc_field using 'BDC_CURSOR'
'P1001-BEGDA'.
perform bdc_field using 'BDC_OKCODE'
'=UPD'.
perform bdc_field using 'P1001-BEGDA'
'01.08.2009'.
perform bdc_field using 'P1001-ENDDA'
'31.12.9999'.
perform bdc_field using 'P1001-RSIGN'
'A'.
perform bdc_field using 'P1001-RELAT'
'003'.
perform bdc_field using 'P1001-SCLAS'
'O'.
perform bdc_field using 'P1001-SOBID'
record-sobid.
perform bdc_dynpro using 'SAPMH5A0' '5100'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_field using 'PPHDR-PLVAR'
'01'.
perform bdc_field using 'PM0D1-SEARK'
record-seark.

perform bdc_transaction using 'PO13'.


endloop.
perform close_group.
*&---------------------------------------------------------------------*
*& Form UPLOAD_FILE
*----------------------------------------------------------------------*
FORM UPLOAD_FILE .

CALL FUNCTION 'UPLOAD'
EXPORTING
FILENAME = 'C:\'
FILETYPE = 'DAT'
TABLES
DATA_TAB = RECORD
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3
NO_BATCH = 4
UNKNOWN_ERROR = 5
GUI_REFUSE_FILETRANSFER = 6
OTHERS = 7
.

ENDFORM. " UPLOAD_FILE


ALSO READ:

- Function Modules To Read Benefits Data In HR ABAP.

- Sample Code For Do Varying In HR ABAP.

- Get Family Data In HR ABAP.

- Net Salary Report In HR ABAP.

- Cumulative Amount Report in HR ABAP.

- HR ABAP - BDC Upload For The Org Unit Relationship Through T-Code PO10.

- HR ABAP - BDC For The Action Transfer Of Location.

- HR ABAP - BDC For Uploading Absence Data Into PA30 Transaction.

.....Back To Index On HR ABAP.

.....Back To MAIN INDEX.

No comments:

Post a Comment