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

Create a good moviment

former_member582701
Contributor
0 Likes
460

Hello!

I am using BAPI_GOODSMVT_CREATE to create a good moviment an bapi returns a material document number.

Now i need to create a Transfer Order. For this i need TBNUM from LTBK where mblnr = material document number that bapi returns.

The problem is that where condition never is successfull.

Bapi_goodmvt_create creates a material doc number? Is this value update to ltbk or other table? Do u have any idea how i can do this?

Best regards

Hello!

I am using BAPI_GOODSMVT_CREATE to create a good moviment an bapi returns a material document number.

Now i need to create a Transfer Order. For this i need TBNUM from LTBK where mblnr = material document number that bapi returns.

The problem is that where condition never is successfull.

Bapi_goodmvt_create creates a material doc number? Is this value update to ltbk or other table? Do u have any idea how i can do this?

Best regards

1 REPLY 1
Read only

former_member582701
Contributor
0 Likes
419

The problem was that all required fields were not filled.

For a good move you need to fill:

lwa_items-entry_uom_iso = lwa_lqua-meins.

lwa_items-mvt_ind = space.

lwa_items-material = lwa_lqua-matnr.

lwa_items-plant = lwa_lqua-werks.

lwa_items-stge_loc = lwa_lqua-lgort.

lwa_items-batch = lwa_lqua-charg.

lwa_items-move_type = move_type_261.

lwa_items-entry_qnt = lwa_lqua-verme.

lwa_items-entry_uom = lwa_lqua-meins.

lwa_items-orderid = process_order.

APPEND lwa_items TO li_items .

Also you need to use FM 'UNIT_OF_MEASURE_SAP_TO_ISO' to convert lwa_lqua-meins to ISO (required in lwa_items-entry_uom_iso).