cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI to create a transfer order using material document number

former_member594288
Participant
0 Kudos
1,759

Hi,

I want to create a transfer order using material document number. I want to pass storage type and bin as well to the BAPI. Could you please suggest bapi with sample code. I know this fn module L_TO_CREATE_SINGLE to create a transfer order but where to pass material document number and year to this fn module.

Regards,

Ravi


Accepted Solutions (0)

Answers (1)

Answers (1)

VeselinaPeykova
Active Contributor
0 Kudos

I am not aware of FMs where you pass a material document+ year and you create a transfer order. Still, this does not mean that what you ask is impossible, you just need to do a bit more work than you expected.

There are 2 scenarios for creating transfer orders which involve material document creation- you can have a transfer requirement or you can have posting change. You can find out whether a material document generated transfer requirement from the value of MSEG-TBNUUM. If there is posting change the relevant field is MSEG-UBNUM. For each of these scenarios there are separate FM.

For transfer requirements this is L_TO_CREATE_TR and for posting changes this is L_TO_CREATE_POSTING_CHANGE.

So you need first to check for the material document which of these cases you need to handle and then use the corresponding FM to create the transfer order.

former_member594288
Participant
0 Kudos

Hi Veselina,

I have created a GR that means i have a material document number. Now i need to pass material document number with storage type and bin to the bapi to create a transfer order. which bapi is suitable?

VeselinaPeykova
Active Contributor
0 Kudos

ravi_sdn please read my answer again 🙂

By the way, there are no standard BAPIs for this purpose (from what I know). If you really need one - you have to develop it yourself.