BDC by Batch input session is not iterating to next record.
Hi all,
I have written a BDC for PA30 transaction. It inserts all rows is bdcdata table but when I process the session it stops at the first record.
Code is mentioned below. Can anyone please help me.
FORM fill_bdcitab.
REFRESH bdcitab.
CLEAR bdcitab.
CLEAR begda.
CLEAR endda.
WRITE inrec-begda TO begda USING EDIT MASK '__.__.____'.
WRITE inrec-endda TO endda USING EDIT MASK '__.__.____'.
perform populate_bdcitab using :
'1' 'SAPMP50A' '1000',
' ' 'RP50G-PERNR' inrec-pernr,
' ' 'BDC_OKCODE' '/00',
' ' 'RP50G-TIMRD' 'X',
' ' 'RP50G-CHOIC' '0021',
'1' 'SAPMP50A' '1000',
' ' 'BDC_OKCODE' '=LIST',
'1' 'MP002100' '3000',
' ' 'BDC_OKCODE' '/00',
' ' 'RP50M-BEGDA' begda,
' ' 'RP50M-ENDDA' endda,
' ' 'RP50M-SUBTY' inrec-subty,
'1' 'MP002100' '3000',
' ' 'RP50M-SELE2(01)' 'X',
' ' 'BDC_OKCODE' '=DEL',
'1' 'MP002100' '2040',
' ' 'BDC_OKCODE' '=UPDL'.
ENDFORM. " FILL_BDCITAB
FORM populate_bdcitab USING flag
var1
var2.
CLEAR bdcitab.
IF flag = '1'.
bdcitab-program = var1.
bdcitab-dynpro = var2.
bdcitab-dynbegin = 'X'.
ELSE.
bdcitab-fnam = var1.
bdcitab-fval = var2.
ENDIF.
APPEND bdcitab.
ENDFORM. " POPULATE_BDCITAB
Try creating it as a real BDC session, run it in SM35 and see what screen / field you are missing
_________________
Only sheep and Tuly Idiots
need a leader
You don't show how you are looping and calling fill_itab. If the first record is being processed and then no more, then there must be something wrong with the loop. Do you call transaction or create a batch? If you create a batch, how many transactions show up in SM35?
Michael