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

TO and Material Document

Former Member
0 Likes
928

Hi gurus,

After creating transfer order, i need a way, it might be a BAPI or FM in order to create a material document.

I am using call transaction LT06 for creation of TO then BAPI_GOODSMVT_CREATE for the material document, but I have been encountering an error saying that "No Material Document Created".

I hope you can help me gurus..

Thanks so much..

Hi gurus,

After creating transfer order, i need a way, it might be a BAPI or FM in order to create a material document.

I am using call transaction LT06 for creation of TO then BAPI_GOODSMVT_CREATE for the material document, but I have been encountering an error saying that "No Material Document Created".

I hope you can help me gurus..

Thanks so much..

6 REPLIES 6
Read only

Former Member
0 Likes
839

Hi,

Use commit work or BAPI_TRANSACTION_COMIT after creating transfer order.

Read only

0 Likes
839

Hi,

I already used BAPI_TRANSACTION_COMIT but I still encouter the same problem.

Is there other way?Hope you can help me.

THanks a lot.

Read only

Former Member
0 Likes
839

Maybe some of the function module parameter is wrong.

Please post source code of BAPI function calling and all the BAPI return error messages for analysis.

Read only

Former Member
0 Likes
839

Hai,

Iam sending example code. Check where you made mistake.

DATA: wa_grdata TYPE t_grdata,

wa_gmvt_head TYPE bapi2017_gm_head_01,

wa_gmvt_code TYPE bapi2017_gm_code,

wa_gmvt_hret TYPE bapi2017_gm_head_ret.

DATA: lv_testrun TYPE bapi2017_gm_gen-testrun,

li_gmvmt_item TYPE TABLE OF bapi2017_gm_item_create WITH HEADER LINE,

li_gmvmt_serl TYPE TABLE OF bapi2017_gm_serialnumber WITH HEADER LINE,

li_gmt_itm_cwm TYPE TABLE OF /cwm/bapi2017_gm_item_create.

MOVE: wa_grdata-pstng_date TO wa_gmvt_head-pstng_date,

wa_grdata-doc_date TO wa_gmvt_head-doc_date,

wa_grdata-deliv_numb TO wa_gmvt_head-ref_doc_no.

CLEAR i_gmvmt_item.

MOVE-CORRESPONDING wa_grdata TO i_gmvmt_item.

i_gmvmt_item-mvt_ind = c_b.

i_gmvmt_item-move_type = c_101. "Movmnt type 101 GR goods receipt

APPEND i_gmvmt_item.

CLEAR i_gmt_itm_cwm.

i_gmt_itm_cwm-entry_qnt_pme = wa_grdata-cwm_erfmg.

i_gmt_itm_cwm-entry_uom_pme = wa_grdata-cwm_erfme.

APPEND i_gmt_itm_cwm.

wa_gmvt_code-gm_code = '01'.

CLEAR: li_gmvmt_item, li_gmvmt_serl, li_gmt_itm_cwm, wa_gmvt_hret, lv_testrun.

REFRESH: li_gmvmt_item, li_gmvmt_serl, li_gmt_itm_cwm.

wa_gmvt_head-pr_uname = sy-uname.

li_gmvmt_item[] = i_gmvmt_item[].

li_gmvmt_serl[] = i_gmvmt_serl[].

li_gmt_itm_cwm[] = i_gmt_itm_cwm[].

lv_testrun = p_simu.

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = wa_gmvt_head

goodsmvt_code = wa_gmvt_code

testrun = lv_testrun

IMPORTING

goodsmvt_headret = wa_gmvt_hret

TABLES

goodsmvt_item = li_gmvmt_item

goodsmvt_serialnumber = li_gmvmt_serl

return = i_return

goodsmvt_item_cwm = li_gmt_itm_cwm.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

WAIT = 'X'.

Read only

0 Likes
839

Maybe the following parameters are missing:

wa_gmvt_head-header_txt

i_gmvmt_item-move_reas

Also please post all the error messages from BAPI execution.

Hope it helps.

Read only

0 Likes
839

Hi All,

I am encountering an error saying that "Deficit of BA Unrestricted-use 1.000 KG : 110 E040 1001 3010_8 ".

How can I make a remedy on this?..

Thanks a lot..