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

BAPI_GOODSMVT_CREATE for production orders

Former Member
0 Likes
2,455

Hello,

I´m trying to post good issues with BAPI BAPI_GOODSMVT_CREATE for production orders as reference (trans. MB1A) and just can´t make it work. I get the following error message:

"No valid order items exist for order" (Class C6 Number 008)

Can anyone see something wrong in my code or can it be that there´s some special or wrong configuration in MM: ??

  • Header data:

header-pstng_date = sy-datum.

header-doc_date = sy-datum.

header-pr_uname = sy-uname.

header-header_txt = 'BAPI Movements Create'.

header-ver_gr_gi_slip = '2'.

header-ver_gr_gi_slipx = ' '.

  • Code:

code-gm_code = '03'. "Goods Issue

LOOP AT t_ltap_vb.

REFRESH: tab_ztlop01, items, serials, return.

CLEAR: mymessage, aufnr, cont.

  • Order Number with the correct length:

MOVE i_ltak_vb-benum TO aufnr.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = aufnr

IMPORTING

output = aufnr.

  • Items:

CLEAR wa_items.

wa_items-material = t_ltap_vb-matnr.

wa_items-plant = t_ltap_vb-werks.

wa_items-stge_loc = t_ltap_vb-lgort.

wa_items-move_type = '261'.

wa_items-mvt_ind = 'F'. "Movement type

wa_items-stck_type = 'F'. "Unrestricted-use

wa_items-entry_qnt = t_ltap_vb-vsola.

wa_items-entry_uom = t_ltap_vb-meins.

wa_items-orderid = aufnr.

wa_items-reserv_no = i_ltak_vb-rsnum.

wa_items-res_item = t_ltap_vb-rspos.

wa_items-UNLOAD_PT = t_ltap_vb-ABLAD.

APPEND wa_items TO items.

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = header

goodsmvt_code = code

TABLES

goodsmvt_item = items

return = return.

ENDLOOP.

Thanks a lot.

Hello,

I´m trying to post good issues with BAPI BAPI_GOODSMVT_CREATE for production orders as reference (trans. MB1A) and just can´t make it work. I get the following error message:

"No valid order items exist for order" (Class C6 Number 008)

Can anyone see something wrong in my code or can it be that there´s some special or wrong configuration in MM: ??

  • Header data:

header-pstng_date = sy-datum.

header-doc_date = sy-datum.

header-pr_uname = sy-uname.

header-header_txt = 'BAPI Movements Create'.

header-ver_gr_gi_slip = '2'.

header-ver_gr_gi_slipx = ' '.

  • Code:

code-gm_code = '03'. "Goods Issue

LOOP AT t_ltap_vb.

REFRESH: tab_ztlop01, items, serials, return.

CLEAR: mymessage, aufnr, cont.

  • Order Number with the correct length:

MOVE i_ltak_vb-benum TO aufnr.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = aufnr

IMPORTING

output = aufnr.

  • Items:

CLEAR wa_items.

wa_items-material = t_ltap_vb-matnr.

wa_items-plant = t_ltap_vb-werks.

wa_items-stge_loc = t_ltap_vb-lgort.

wa_items-move_type = '261'.

wa_items-mvt_ind = 'F'. "Movement type

wa_items-stck_type = 'F'. "Unrestricted-use

wa_items-entry_qnt = t_ltap_vb-vsola.

wa_items-entry_uom = t_ltap_vb-meins.

wa_items-orderid = aufnr.

wa_items-reserv_no = i_ltak_vb-rsnum.

wa_items-res_item = t_ltap_vb-rspos.

wa_items-UNLOAD_PT = t_ltap_vb-ABLAD.

APPEND wa_items TO items.

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = header

goodsmvt_code = code

TABLES

goodsmvt_item = items

return = return.

ENDLOOP.

Thanks a lot.

2 REPLIES 2
Read only

Former Member
0 Likes
1,058

done

Read only

0 Likes
1,058

Can you please Explain how did u solve the issue . I am also facing the same issue.??

Thanx in advance,

Vivekannamalai