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 transfer order for consignment stock

giancarla_aguilar
Participant
0 Likes
2,936

Hello.

We have a custom RF program in our ERP EHP7 that creates transfer orders using FM L_TO_CREATE_TR and L_TO_CREATE_DN.  But we use these FMs with defined SUs to be used, as scanned by the user.  When the SU scanned is a consignment stock, the function modules return an error L3 037 "Storage type & does not allow negative stock figures".  The material has available stock in that particular storage but all are consignment only.

When I debugged the FMs, in routine VONQUANT_BESTIMMEN of include LL03AF1C, at the time the selection from LQUA is made using the LTAP structure, consignment values (SOBKZ and SONUM) of the SU is not yet assigned to structure LTAP.  The values of LTAP-SOBKZ and LTAP-SONUM are blank, therefore no row was selected from LQUA, hence, the error message.  There are no other quant or consignment fields in the parameters of the function modules.

I validated with business and in both cases, transfer in reference of a TR and an outbound delivery, consignment stock can be used, especially when there are no own stock available (posting to own stock done in the background after picking). And using LT04 and LT03 with the particular consignment SUs are creating the TO successfully because the SU number is assigned before the trigger to create the TO.

Additional: Reason why it does not consider consignment stock is because the reference documents (TR and DN) do not have the consignment values.  At the time they were created, where to get the stock is not determined yet.

So my question is, has anybody encountered this? Do you have any recommendations how to go about this? Why is the consignment stock not considered?  Should I open an OSS message? =D

Thanks in advance!

Message was edited by: Giancarla Aguilar

1 ACCEPTED SOLUTION
Read only

giancarla_aguilar
Participant
0 Likes
2,011

In case anybody is interested, our issue was resolved by the ff.:

Create TO for TR - since a colleague already made a custom version of L_TO_CREATE_TR, I just added a routine to check and fill consignment fields

Create TO for DN - batch input of LT03

Hello.

We have a custom RF program in our ERP EHP7 that creates transfer orders using FM L_TO_CREATE_TR and L_TO_CREATE_DN.  But we use these FMs with defined SUs to be used, as scanned by the user.  When the SU scanned is a consignment stock, the function modules return an error L3 037 "Storage type & does not allow negative stock figures".  The material has available stock in that particular storage but all are consignment only.

When I debugged the FMs, in routine VONQUANT_BESTIMMEN of include LL03AF1C, at the time the selection from LQUA is made using the LTAP structure, consignment values (SOBKZ and SONUM) of the SU is not yet assigned to structure LTAP.  The values of LTAP-SOBKZ and LTAP-SONUM are blank, therefore no row was selected from LQUA, hence, the error message.  There are no other quant or consignment fields in the parameters of the function modules.

I validated with business and in both cases, transfer in reference of a TR and an outbound delivery, consignment stock can be used, especially when there are no own stock available (posting to own stock done in the background after picking). And using LT04 and LT03 with the particular consignment SUs are creating the TO successfully because the SU number is assigned before the trigger to create the TO.

Additional: Reason why it does not consider consignment stock is because the reference documents (TR and DN) do not have the consignment values.  At the time they were created, where to get the stock is not determined yet.

So my question is, has anybody encountered this? Do you have any recommendations how to go about this? Why is the consignment stock not considered?  Should I open an OSS message? =D

Thanks in advance!

Message was edited by: Giancarla Aguilar

4 REPLIES 4
Read only

Former Member
0 Likes
2,011

The function module L_TO_CREATE_DN reads the SONUM value from the delivery (LIPS table) in the include LV05AFMO. So I think you need an enhancement if you want to use special stock in deliveries without specific special stock assignment.

Regards,

Read only

0 Likes
2,011

Thanks for your suggestion, Arturo.

But as much as possible, we want to avoid modifying the standard.

For now, the solution we chose was a batch input to LT03.  Not the best solution but it handles the consignment issue.

Just so anybody's wondering, why didn't we consider this earlier?

1) We would liked to avoid batch input.

2) In LT03, you can not suppress TO printing (our workaround is a flag check in the TO print program user-exit)

Read only

giancarla_aguilar
Participant
0 Likes
2,012

In case anybody is interested, our issue was resolved by the ff.:

Create TO for TR - since a colleague already made a custom version of L_TO_CREATE_TR, I just added a routine to check and fill consignment fields

Create TO for DN - batch input of LT03

Read only

jaroslav_hrbacek
Participant
0 Likes
2,011

In case anybody is still interested, there is another way to solve this issue. Before calling the FM L_TO_CREATE_TR you can change the transfer requirement using FM L_TB_VERAENDERN or L_TR_CHANGE. In this way you can add/change a position to position with a assignment stock.