‎2010 Sep 22 11:49 AM
Hi Guys;
I have recorded a bdc for tansaction VA01 to create sales order. When I run the bdc my item, material, quantity and so on are not comming through but the rest is working can anyone help
‎2010 Sep 22 11:55 AM
Hi,
see the sample code for VA01..
http://wiki.sdn.sap.com/wiki/display/Snippets/BDCFOROpenSalesOrder
Prabhudas
‎2010 Sep 22 1:31 PM
did you subscript properly for the rows of the items. Why did you not use LSMW with direct input/standard load program or the BAPI...much friendlier than ancient BDC sessions.
‎2010 Sep 22 3:51 PM
hi
Check your recording again. See in the log whats the error there. Or the better will be using lsmw. why dont you use that. Much user friendly and nothing with coding.
Else check your recording, i think while recording you had used tab or enter improperly. Check it.
Regards
Vinodh
‎2010 Sep 23 9:04 AM
Hi,
check this .
LOOP AT it_sales_item INTO wa_sales_item WHERE bstkd = wa_sales_header-bstkd.
if count eq 5.
count = 1.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMV45A' '4001'.
endif.
count = count + 1.
MOVE count TO count_char.
CONCATENATE 'RV45A-MABNR(' count_char ')' INTO l_matnr.
CONCATENATE 'VBAP-POSNR(' count_char ')' INTO l_posnr.
CONCATENATE 'RV45A-KWMENG(' count_char ')' INTO l_kwmeng.
CONCATENATE 'VBAP-WERKS(' count_char ')' INTO l_werks.
CONCATENATE 'VBAP-LGORT(' count_char ')' INTO l_sloc.
PERFORM bdc_field USING 'VBKD-BSTKD'
wa_sales_header-bstkd.
PERFORM bdc_field USING 'KUAGV-KUNNR'
wa_sales_header-kunnr.
PERFORM bdc_field USING 'KUWEV-KUNNR'
wa_sales_header-kunnr.
PERFORM bdc_field USING l_matnr
wa_sales_item-matnr.
PERFORM bdc_field USING l_posnr
wa_sales_item-posnr.
PERFORM bdc_field USING l_kwmeng
wa_sales_item-kwmeng.
PERFORM bdc_field USING l_werks
wa_sales_item-werks.
PERFORM bdc_field USING l_sloc
wa_sales_item-lgort.
ENDLOOP.
‎2010 Sep 23 2:02 PM
hi
make CHAR type of value for item, material, quantity and then pass it in BDC .. it will work
always remeber once u r passing any value through BDC the safer side keep all values in CHAR
it will work .