Code Listing For: ZPY - UPLOAD - 0001 Description: BDC For Uploading IT-0001
Code Listing For: ZPY - UPLOAD - 0001 Description: BDC For Uploading IT-0001
Code Listing For: ZPY - UPLOAD - 0001 Description: BDC For Uploading IT-0001
REPORT ZPY_UPLOAD_0001 .
INCLUDE BDCRECX1.
PERNR(8),
begda(10),
plans(8),
END OF IT_MAIN.
START-OF-SELECTION.
PERFORM EXCEL_TO_INTERNAL_TABLE.
PERFORM FINAL_TRANS_IT_TAB.
PERFORM OPEN_GROUP.
LOOP AT IT_MAIN.
perform bdc_dynpro using 'SAPMP50A' '2000'.
perform bdc_field using 'BDC_CURSOR'
'RP50G-PERNR'.
perform bdc_field using 'BDC_OKCODE'
'=P++'.
perform bdc_field using 'RP50G-PERNR'
IT_MAIN-PERNR.
perform bdc_dynpro using 'SAPMP50A' '2000'.
perform bdc_field using 'BDC_CURSOR'
'RP50G-PERNR'.
perform bdc_field using 'BDC_OKCODE'
'=P++'.
perform bdc_field using 'RP50G-PERNR'
IT_MAIN-PERNR.
perform bdc_dynpro using 'SAPMP50A' '2000'.
perform bdc_field using 'BDC_CURSOR'
'T529T-MNTXT(15)'.
perform bdc_field using 'BDC_OKCODE'
'=PICK'.
**perform bdc_field using 'RP50G-PERNR'
** record-PERNR_003.
perform bdc_field using 'RP50G-SELEC(15)'
'X'.
ENDLOOP.
PERFORM CLOSE_GROUP.
*&---------------------------------------------------------------------*
*& Form GET_FILE_NAME
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM GET_FILE_NAME .
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
CHANGING
FILE_NAME = P_FILE.
IF SY-SUBRC <> 0.
ENDIF.
AT END OF ROW.
APPEND IT_MAIN.
CLEAR IT_MAIN.
ENDAT.
ENDLOOP.
endform.
*Text elements
*----------------------------------------------------------
* E00 Error opening dataset, return code:
* I01 Session name
* I02 Open session
* I03 Insert transaction
* I04 Close Session
* I05 Return code =
* I06 Error session created
* S01 Session name
* S02 User
* S03 Keep session
* S04 Lock date
* S05 Processing Mode
* S06 Update Mode
* S07 Generate session
* S08 Call transaction
* S09 Error sessn
* S10 Nodata indicator
*Selection texts
*----------------------------------------------------------
* CTU
* CTUMODE
* CUPDATE
* E_GROUP
* E_HDATE
* E_KEEP
* E_USER
* GROUP
* HOLDDATE
* KEEP
* NODATA
* P_FILE SELECT FILE
* SESSION
* SMALLLOG SMALL LOG
* USER
*Messages
*----------------------------------------------------------
*
* Message class: MS
*613 Please enter a session name and user name
Extracted by Direct Download Enterprise version 1.2 - E.G.Mellodew. 1998-2004 UK.