Skip to Content
0
Apr 22, 2009 at 01:00 PM

Error in BDC session for tcode MR21

336 Views

Hello all,

I have to create one BDC session program for change in valuation price.

i have following input parameter :

Plant Article Price, Dec 2 Price unit

0690 000000000906671600 00000021207 00100

the price is 212,07 a decimal sign is not included

i have created one program but its not working.its giving runtime error CONVT_NO_NUMBER

Edited by: Sujeet Mishra on Apr 22, 2009 3:07 PM

LOOP AT it_final.

*perform open_dataset using dataset.

*perform open_dataset using p_file.

perform open_group.

*do.

*

*read dataset dataset into record.

*if sy-subrc <> 0. exit. endif.

perform bdc_dynpro using 'SAPRCKM_MR21' '0201'.

perform bdc_field using 'BDC_CURSOR'

'MR21HEAD-BUDAT'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

*perform bdc_field using 'MR21HEAD-BUDAT'

  • record-BUDAT_001.

perform bdc_field using 'MR21HEAD-WERKS'

IT_FINAL-WERKS.

*perform bdc_field using 'MR21HEAD-SCREEN_VARIANT'

  • record-SCREEN_VARIANT_003.

perform bdc_dynpro using 'SAPRCKM_MR21' '0201'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'BDC_CURSOR'

'CKI_MR21_0250-NEWVALPR(01)'.

*perform bdc_field using 'MR21HEAD-SCREEN_VARIANT'

  • record-SCREEN_VARIANT_004.

perform bdc_field using 'CKI_MR21_0250-MATNR(01)'

IT_FINAL-MATNR.

*perform bdc_field using 'CKI_MR21_0250-BWTAR(01)'

  • record-BWTAR_01_006.

*perform bdc_field using 'CKI_MR21_0250-NEWVALPR(01)'

  • IT_FINAL-PRICE.

perform bdc_dynpro using 'SAPRCKM_MR21' '0201'.

perform bdc_field using 'BDC_OKCODE'

'=SAVE'.

perform bdc_field using 'BDC_CURSOR'

'CKI_MR21_0250-MATNR(02)'.

*perform bdc_field using 'MR21HEAD-SCREEN_VARIANT'

  • record-SCREEN_VARIANT_008.

perform bdc_transaction using 'MR21'.

perform bdc_dynpro using 'SAPRCKM_MR21' '0201'.

*perform bdc_field using 'BDC_CURSOR'

  • 'MR21HEAD-BUDAT'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

*perform bdc_field using 'MR21HEAD-BUDAT'

  • record-BUDAT_009.

perform bdc_field using 'MR21HEAD-WERKS'

IT_FINAL-WERKS.

*perform bdc_field using 'MR21HEAD-SCREEN_VARIANT'

  • record-SCREEN_VARIANT_011.

perform bdc_dynpro using 'SAPRCKM_MR21' '0201'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'BDC_CURSOR'

'CKI_MR21_0250-NEWVALPR(01)'.

*perform bdc_field using 'MR21HEAD-SCREEN_VARIANT'

  • record-SCREEN_VARIANT_012.

perform bdc_field using 'CKI_MR21_0250-MATNR(01)'

IT_FINAL-MATNR.

*perform bdc_field using 'CKI_MR21_0250-BWTAR(01)'

  • record-BWTAR_01_014.

perform bdc_field using 'CKI_MR21_0250-NEWVALPR(01)'

IT_FINAL-PRICE.

perform bdc_dynpro using 'SAPRCKM_MR21' '0201'.

perform bdc_field using 'BDC_OKCODE'

'=SAVE'.

perform bdc_field using 'BDC_CURSOR'

'CKI_MR21_0250-MATNR(02)'.

*perform bdc_field using 'MR21HEAD-SCREEN_VARIANT'

  • record-SCREEN_VARIANT_016.

perform bdc_transaction using 'MR21'.

*enddo.

perform close_group.

*perform close_dataset using dataset.

*perform close_dataset using p_file.

ENDLOOP.

Edited by: Sujeet Mishra on Apr 22, 2009 3:09 PM

Edited by: Sujeet Mishra on Apr 23, 2009 5:56 AM