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 -> position within material

Former Member
0 Likes
573

Hi guys,

i use the function BAPI_GOODSMVT_CREATE for gm_code = '05'.

i fill the fields:

on header level:

bapigmhead-pstng_date = ls_post_date-pstng_date.

bapigmhead-doc_date = ls_post_date-pstng_date.

bapigmcode = '05'.

and then on item level:

ls_bapiitem-material = ls_items-material.

ls_bapiitem-plant = ls_items-plant.

ls_bapiitem-stge_loc = ls_items-stock.

ls_bapiitem-move_type = ls_items-move_type.

ls_bapiitem-entry_qnt = ls_items-quantity.

ls_bapiitem-amount_lc = ls_items-value.

ls_bapiitem-orderid = l_orderid. "l_orderid is the same for all items

my question is:

how do i get the position in material document for every item?

thanks,

emilia

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
492

Check MKPF(header details) and MSEG(item details) for material document details.

Regards,

Priyanka

Hi guys,

i use the function BAPI_GOODSMVT_CREATE for gm_code = '05'.

i fill the fields:

on header level:

bapigmhead-pstng_date = ls_post_date-pstng_date.

bapigmhead-doc_date = ls_post_date-pstng_date.

bapigmcode = '05'.

and then on item level:

ls_bapiitem-material = ls_items-material.

ls_bapiitem-plant = ls_items-plant.

ls_bapiitem-stge_loc = ls_items-stock.

ls_bapiitem-move_type = ls_items-move_type.

ls_bapiitem-entry_qnt = ls_items-quantity.

ls_bapiitem-amount_lc = ls_items-value.

ls_bapiitem-orderid = l_orderid. "l_orderid is the same for all items

my question is:

how do i get the position in material document for every item?

thanks,

emilia

2 REPLIES 2
Read only

Former Member
0 Likes
493

Check MKPF(header details) and MSEG(item details) for material document details.

Regards,

Priyanka

Read only

former_member212713
Contributor
0 Likes
492

Hi Emilia-Maria ,

If your process success finished, you get export parameters (MATERIALDOCUMENT, MATDOCUMENTYEAR) from bapi

and then write select statement for mkpf (for header) , mseg (for detail) tables with export parameters (MATERIALDOCUMENT, MATDOCUMENTYEAR).

Best regards.