‎2006 Nov 12 5:29 PM
hi ,
I am new to BDC ,can any one post me BDC material with examples just like "abap in 21 days " step by step guide.
I tried many sites .But i didnt understand them,
thanks in advance
‎2006 Nov 12 7:06 PM
Here is the example code of changing sales order using BDC.
REPORT ZVA02 .
data : bdcmsg like bdcmsgcoll occurs 0 with header line.
data : bdcdata like bdcdata occurs 0 with header line.
data : v_msg(200).
perform va02 using :
'SAPMV45A' '0102' 'X' '' '',
'SAPMV45A' '0102' '' 'BDC_CURSOR' 'VBAK-VBELN',
'SAPMV45A' '0102' '' 'VBAK-VBELN' '30000044',
'SAPMV45A' '0102' '' 'BDC_OKCODE' '/00',
'SAPMV45A' '4001' 'X' '' '',
'SAPMV45A' '4001' '' 'BDC_OKCODE' '=POPO',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_CURSOR' 'RV45A-MABNR(01)',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '0251' 'X' '' '',
'SAPMV45A' '0251' '' 'BDC_CURSOR' 'RV45A-POSNR',
'SAPMV45A' '0251' '' 'BDC_OKCODE' '=POSI',
'SAPMV45A' '0251' '' 'RV45A-POSNR' '20',
'SAPMV45A' '4001' 'X' '' '',
'SAPMV45A' '4001' '' 'BDC_OKCODE' '=ITEM',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_CURSOR' 'RV45A-MABNR(01)',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4003' 'X' '' '',
'SAPMV45A' '4003' '' 'BDC_OKCODE' '=T05',
'SAPMV45A' '4003' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4003' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4003' '' 'BDC_CURSOR' 'RV45A-KWMENG',
'SAPLV60F' '4001' 'X' '' '',
'SAPLV60F' '4001' '' 'BDC_OKCODE' '=SBACK',
'SAPLV60F' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPLV60F' '4001' '' 'BDC_SUBSCR' 'SAPLV60F',
'SAPLV60F' '4001' '' 'BDC_CURSOR' 'FPLT-AFDAT(01)',
'SAPLV60F' '4001' '' 'FPLT-AFDAT(01)' '21.04.2004',
'SAPMV45A' '4001' 'X' '' '',
'SAPMV45A' '4001' '' 'BDC_OKCODE' '=SICH',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_CURSOR' 'RV45A-MABNR(01)',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A'.
call transaction 'VA02' using bdcdata mode 'N' update 'A' messages into
bdcmsg.
if sy-subrc ne 0.
loop at bdcmsg where msgtyp = 'E'.
Write: ' Sale Order is being Processed by' , bdcmsg-msgv2.
endloop.
endif.
form va02 using prg dyn beg fname fvalue.
bdcdata-program = prg.
bdcdata-DYNPRO = dyn.
bdcdata-DYNBEGIN = beg.
bdcdata-FNAM = fname.
bdcdata-FVAL = fvalue.
append bdcdata.
endform.Raja T
‎2006 Nov 12 7:07 PM
Here is the example code of changing sales order using BDC.
REPORT ZVA02 .
data : bdcmsg like bdcmsgcoll occurs 0 with header line.
data : bdcdata like bdcdata occurs 0 with header line.
data : v_msg(200).
perform va02 using :
'SAPMV45A' '0102' 'X' '' '',
'SAPMV45A' '0102' '' 'BDC_CURSOR' 'VBAK-VBELN',
'SAPMV45A' '0102' '' 'VBAK-VBELN' '30000044',
'SAPMV45A' '0102' '' 'BDC_OKCODE' '/00',
'SAPMV45A' '4001' 'X' '' '',
'SAPMV45A' '4001' '' 'BDC_OKCODE' '=POPO',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_CURSOR' 'RV45A-MABNR(01)',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '0251' 'X' '' '',
'SAPMV45A' '0251' '' 'BDC_CURSOR' 'RV45A-POSNR',
'SAPMV45A' '0251' '' 'BDC_OKCODE' '=POSI',
'SAPMV45A' '0251' '' 'RV45A-POSNR' '20',
'SAPMV45A' '4001' 'X' '' '',
'SAPMV45A' '4001' '' 'BDC_OKCODE' '=ITEM',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_CURSOR' 'RV45A-MABNR(01)',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4003' 'X' '' '',
'SAPMV45A' '4003' '' 'BDC_OKCODE' '=T05',
'SAPMV45A' '4003' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4003' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4003' '' 'BDC_CURSOR' 'RV45A-KWMENG',
'SAPLV60F' '4001' 'X' '' '',
'SAPLV60F' '4001' '' 'BDC_OKCODE' '=SBACK',
'SAPLV60F' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPLV60F' '4001' '' 'BDC_SUBSCR' 'SAPLV60F',
'SAPLV60F' '4001' '' 'BDC_CURSOR' 'FPLT-AFDAT(01)',
'SAPLV60F' '4001' '' 'FPLT-AFDAT(01)' '21.04.2004',
'SAPMV45A' '4001' 'X' '' '',
'SAPMV45A' '4001' '' 'BDC_OKCODE' '=SICH',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A',
'SAPMV45A' '4001' '' 'BDC_CURSOR' 'RV45A-MABNR(01)',
'SAPMV45A' '4001' '' 'BDC_SUBSCR' 'SAPMV45A'.
call transaction 'VA02' using bdcdata mode 'N' update 'A' messages into
bdcmsg.
if sy-subrc ne 0.
loop at bdcmsg where msgtyp = 'E'.
Write: ' Sale Order is being Processed by' , bdcmsg-msgv2.
endloop.
endif.
form va02 using prg dyn beg fname fvalue.
bdcdata-program = prg.
bdcdata-DYNPRO = dyn.
bdcdata-DYNBEGIN = beg.
bdcdata-FNAM = fname.
bdcdata-FVAL = fvalue.
append bdcdata.
endform.Raja T