‎2008 Jan 16 10:24 AM
Hi Gurus!
Sorry friends lots of questions on this bdc, in my RFC , i have Sales Order BDC , while running this bdc there are warming messages for eg - Credit Check ( maximim percentage for open items ). when this warming messages comes , the order should not be saved and display this message to user.
********************************************
perform bdc_dynpro using 'SAPMV45A' '0101'.
perform bdc_field using 'BDC_CURSOR'
'VBAK-VKGRP'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'VBAK-AUART'
SDTYPE. " 'ZFDS'.
perform bdc_field using 'VBAK-VKORG'
SDORG. " 'fr00'.
perform bdc_field using 'VBAK-VTWEG'
DISTCHANNEL. " 'de'.
perform bdc_field using 'VBAK-SPART'
DIVISION. " 'cd'.
perform bdc_field using 'VBAK-VKBUR'
SALESOFF. " 'PU01'.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'VBKD-BSTKD'
PO_NO. " '32211'.
perform bdc_field using 'VBKD-BSTDK'
PO_DATE. " '15.01.2007'.
perform bdc_field using 'KUAGV-KUNNR'
SOLDTOPARTY. " '700209'.
perform bdc_field using 'KUWEV-KUNNR'
SHPTOPARTY. " '702037'.
perform bdc_field using 'RV45A-KETDAT'
DELDATE. " '15.01.2008'.
*perform bdc_field using 'RV45A-KPRGBZ'
'D'.
perform bdc_field using 'VBKD-PRSDT'
PRICEDATE. " '15.01.2008'.
perform bdc_field using 'VBKD-ZTERM'
PAYTERM. " 'X009'.
perform bdc_field using 'VBKD-INCO1'
INCOTERMS. " 'FOL'.
perform bdc_field using 'VBKD-INCO2'
INCOTERMS1. " 'ASURLE PORLE'.
move 1 to I.
loop at it_item.
CONCATENATE 'RV45A-MABNR(' I ')' INTO FNAM.
perform bdc_field using FNAM
it_item-MATERIAL.
CONCATENATE 'RV45A-KWMENG(' I ')' INTO FNAM.
perform bdc_field using FNAM
it_item-QTY.
CONCATENATE 'VBAP-VRKME(' I ')' INTO FNAM.
perform bdc_field using FNAM
it_item-UNIT.
I = I + 1.
ENDLOOP.
perform bdc_dynpro using 'SAPMV45A' '4001'.
perform bdc_field using 'BDC_OKCODE'
'=PDE2'.
perform bdc_field using 'BDC_CURSOR'
'VBAP-POSNR(01)'.
perform bdc_field using 'RV45A-VBAP_SELKZ(01)'
'X'.
perform bdc_dynpro using 'SAPMV45A' '4003'.
perform bdc_field using 'BDC_OKCODE'
'=SICH'.
perform bdc_field using 'BDC_CURSOR'
'VBAP-LGORT'.
perform bdc_field using 'VBAP-WERKS'
PLANT. " 'DFTP'.
perform bdc_field using 'VBAP-LGORT'
SLOC. " 'npgd'.
perform bdc_dynpro using 'SAPLSPO2' '0101'.
perform bdc_field using 'BDC_OKCODE'
'=OPT1'.
perform bdc_dynpro using 'SAPLRHRD' '0100'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'BDC_CURSOR'
'SPOP-TEXTLINE1'.
*********************************************
call transaction 'VA01' using bdcdata mode 'A'
update 'A'
MESSAGES INTO ZBAPI_MESSTAB .
‎2008 Jan 16 4:06 PM
Hi,
When a BDC session is run in the background, warning messages are ignored and the transaction continues without informing the user. If you want the transaction to stop, you can change the warning to an error which will terminate the update.
Regards,
Mike