04-01-2009 3:10 PM
Hi all,
I have developed a bdc to update condition records data via vk12.
Here some times when the validity period of condition record is changed, I am getting a warning message "The validity period is being changed" after this when I press enter (while running in forground mode) the condition record gets saved. But, when I run it in back ground mode, the condition record is not saved.
Please see the below code snippet of BDC recording.
perform bdc_dynpro using 'SAPMV13A' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RV13A-KSCHL'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RV13A-KSCHL'
'ZPN1'.
perform bdc_dynpro using 'RV13A625' '1000'.
perform bdc_field using 'BDC_CURSOR'
'F001'.
perform bdc_field using 'BDC_OKCODE'
'=ONLI'.
perform bdc_field using 'F001'
'G50'.
perform bdc_field using 'F002-LOW'
it_upl_price-kdgrp. " '11'.
perform bdc_field using 'F003-LOW'
it_upl_price-zzsfam. " '102'.
perform bdc_field using 'F004-LOW'
it_upl_price-zzcdcol. " '000'.
perform bdc_field using 'F005-LOW'
it_upl_price-zzcodcoat. " '000'.
perform bdc_field using 'F006-LOW'
it_upl_price-ZZEPAISCOM. " '000'.
perform date_conv using valdat.
perform bdc_field using 'SEL_DATE'
bdc_date. " '31.03.2009'.
perform bdc_dynpro using 'SAPMV13A' '1625'.
perform bdc_field using 'BDC_CURSOR'
'RV13A-DATBI(01)'.
perform bdc_field using 'BDC_OKCODE'
'SICH'.
perform bdc_field using 'KOMG-VKORG'
'G50'.
perform bdc_field using 'KOMG-KDGRP(01)'
it_upl_price-kdgrp. " '11'.
perform bdc_field using 'KOMG-ZZSFAM(01)'
it_upl_price-zzsfam. " '102'.
perform bdc_field using 'KOMG-ZZCDCOL(01)'
it_upl_price-zzcdcol. " '000'.
perform bdc_field using 'KOMG-ZZCODCOAT(01)'
it_upl_price-zzcodcoat. " '000'.
perform bdc_field using 'KOMG-ZZEPAISCOM(01)'
it_upl_price-zzepaiscom. " '120'.
perform price_conversion using it_upl_price-new_price.
perform bdc_field using 'KONP-KBETR(01)'
bdc_price. " ' 4500'.
perform bdc_field using 'KONP-KONWA(01)'
'INR'.
perform bdc_field using 'KONP-KPEIN(01)'
' 1'.
perform bdc_field using 'KONP-KMEIN(01)'
'M2'.
perform date_conv using it_upl_price-fdat .
perform bdc_field using 'RV13A-DATAB(01)'
bdc_date. " '25.03.2009'.
perform date_conv using it_upl_price-tdat.
perform bdc_field using 'RV13A-DATBI(01)'
bdc_date. " '23.05.2009'.
Thanks,
Rajan
04-01-2009 3:15 PM
HI,
If you are using the CALL TRANSACTION then use the OPTIONS statement with Call transaction passing RACOMMIT = 'X'.
CTU_PARAMS-DISMODE = 'N'.
CTU_PARAMS-UPDMODE = 'S'.
CTU_PARAMS-RACOMMIT = 'X'. --> This triggers the commit in backgroud
CTU_PARAMS-DEFSIZE = 'X'.
CALL TRANSACTION 'VK12' USING T_BDCDATA OPTIONS FROM CTU_PARAMS
MESSAGES INTO T_BDCMSGCOLL.
04-01-2009 5:58 PM
Hi avinash,
The problem persists........
Thanks,
Rajan
04-01-2009 9:20 PM
problem solved
I should have commented out the following codes from BDC recording.
perform bdc_field using 'KOMG-KDGRP(01)'
it_upl_price-kdgrp. " '11'.
perform bdc_field using 'KOMG-ZZSFAM(01)'
it_upl_price-zzsfam. " '102'.
perform bdc_field using 'KOMG-ZZCDCOL(01)'
it_upl_price-zzcdcol. " '000'.
perform bdc_field using 'KOMG-ZZCODCOAT(01)'
it_upl_price-zzcodcoat. " '000'.
perform bdc_field using 'KOMG-ZZEPAISCOM(01)'
it_upl_price-zzepaiscom. " '120'.
perform price_conversion using it_upl_price-new_price.
perform bdc_field using 'KONP-KBETR(01)'
bdc_price. " ' 4500'.
perform bdc_field using 'KONP-KONWA(01)'
'INR'.
perform bdc_field using 'KONP-KPEIN(01)'
' 1'.
perform bdc_field using 'KONP-KMEIN(01)'
'M2'.