Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BDC call

Former Member
0 Likes
739

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

5 REPLIES 5
Read only

Former Member
0 Likes
703

Hi,

see the sample code for VA01..

http://wiki.sdn.sap.com/wiki/display/Snippets/BDCFOROpenSalesOrder

Prabhudas

Read only

Former Member
0 Likes
703

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.

Read only

Former Member
0 Likes
703

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

Read only

Former Member
0 Likes
703

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.

Read only

Former Member
0 Likes
703

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 .