‎2009 Apr 22 2:00 PM
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
‎2009 Apr 23 5:17 AM
See you are passing the price "the price is 212,07 a decimal sign is not included"
hence it will give a dump , what you need to do is to convert the 212,07 to 212.07
Use Replace , by . and pass it to your internal table
Hope this is helpful and i am sure this is the only reason for abap dump
Regards
Bhanu
‎2009 Apr 23 8:11 AM
Hello
my amount field code
perform bdc_field using 'CKI_MR21_0250-NEWVALPR(01)'
IT_FINAL-NEWVALPR.
is giving dump.
my declaration are like below :
Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record,
data element: BUDAT
BUDAT_001(010),
data element: WERKS_D
WERKS_002(004),
data element: SCREEN_VARIANT
SCREEN_VARIANT_003(030),
data element: SCREEN_VARIANT
SCREEN_VARIANT_004(030),
data element: MATNR
MATNR_01_005(018),
data element: BWTAR_D
BWTAR_01_006(010),
data element: VALPR
NEWVALPR_01_007(015),
data element: SCREEN_VARIANT
SCREEN_VARIANT_008(030),
end of record.
End generated data section ***
data: begin of it_final occurs 0,
BUDAT TYPE MR21HEAD-BUDAT,
WERKS TYPE MR21HEAD-WERKS,
SCREEN_VARIANT TYPE MR21HEAD-SCREEN_VARIANT,
SCREEN_VARIANT_004 TYPE MR21HEAD-SCREEN_VARIANT,
MATNR TYPE CKI_MR21_0250-MATNR,
BWTAR TYPE CKI_MR21_0250-BWTAR,
NEWVALPR TYPE CKI_MR21_0250-NEWVALPR,
SCREEN_VARIANT_008 TYPE MR21HEAD-SCREEN_VARIANT,
end of it_final.
please guide me.
thanks,
sujeet
Edited by: Sujeet Mishra on Apr 23, 2009 12:44 PM
‎2009 Apr 28 7:57 AM