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

Split Transfer Order(TO) using L_TO_CREATE_DN

Former Member
0 Likes
3,883

Cheers everyone.

I'm trying to use the function L_TO_CREATE_DN to simulate the following from LT03(4.6C):

For a certain Delivery line, split the material quantity during picking to have multiple TO lines for 1 Delivery line.

This works in LT03.

In function L_TO_CREATE_DN, there's a table (T_LTAP_VB) that seems to make this possible. Problem is, this function calls L_TO_CREATE_INT (LT03 also calls this function), but this internal function ignores table T_LTAP_VB. It uses instead a table in it's function group's global memory. I am not able to find another function to set this table separately.

Has anyone done this using these functions? I would like to keep away from doing a Call Transaction.

Thanks.

Jester

Cheers everyone.

I'm trying to use the function L_TO_CREATE_DN to simulate the following from LT03(4.6C):

For a certain Delivery line, split the material quantity during picking to have multiple TO lines for 1 Delivery line.

This works in LT03.

In function L_TO_CREATE_DN, there's a table (T_LTAP_VB) that seems to make this possible. Problem is, this function calls L_TO_CREATE_INT (LT03 also calls this function), but this internal function ignores table T_LTAP_VB. It uses instead a table in it's function group's global memory. I am not able to find another function to set this table separately.

Has anyone done this using these functions? I would like to keep away from doing a Call Transaction.

Thanks.

Jester

15 REPLIES 15
Read only

Former Member
0 Likes
2,630

Hi,

You can try the following piece of code:

DATA: i_ltap TYPE STANDARD TABLE OF ltap_vb

INITIAL SIZE 0 WITH HEADER LINE,

l_tanum TYPE tanum.

CLEAR:i_return,i_message.

REFRESH: i_return,i_message.

EXPORT i_lenum TO MEMORY ID 'YPD_SSCC_LIST'.

CALL FUNCTION 'L_TO_CREATE_DN'

EXPORTING

i_lgnum = v_lgnum

i_vbeln = v_vbeln

i_squit = c_x

i_commit_work = space

IMPORTING

e_tanum = l_tanum

TABLES

t_ltap_vb = i_ltap

EXCEPTIONS

foreign_lock = 1

dn_completed = 2

partial_delivery_forbidden = 3

xfeld_wrong = 4

ldest_wrong = 5

drukz_wrong = 6

dn_wrong = 7

squit_forbidden = 8

no_to_created = 9

teilk_wrong = 10

update_without_commit = 11

no_authority = 12

no_picking_allowed = 13

dn_hu_not_choosable = 14

error_message = 99

OTHERS = 15.

IF sy-subrc <> 0.

  • Error Creating --> TO

PERFORM set_error_message USING text-019.

flg_error = c_x.

v_msgid = sy-msgid.

v_msgno = sy-msgno.

v_msgty = sy-msgty.

v_msgv1 = sy-msgv1.

v_msgv2 = sy-msgv2.

v_msgv3 = sy-msgv3.

v_msgv4 = sy-msgv4.

PERFORM populate_return_message.

APPEND i_return.

APPEND i_message.

ELSE.

  • TO successfully created with No:

v_msgid = c_msgclass.

v_msgno = c_message_no.

v_msgty = c_s.

v_msgv1 = text-015. "TO successfully created with No:

v_msgv2 = l_tanum.

CLEAR:v_msgv3,v_msgv4.

PERFORM populate_return_message.

APPEND i_message.

APPEND i_return.

ENDIF.

Read only

0 Likes
2,630

Hi Aveek, and thanks, but creating a TO from a Delivery works fine. My problem is i need to split a Delivery Line into multiple TO lines.

This function has table T_LTAP_VB, which it passes to L_TO_CREATE_INT, but does not seem to use it.

Read only

0 Likes
2,630

Hi Aveek,

I was wondering if i can get some information on the process of splitting the Transfer order by line Item of the Inbound delivery, or i can have Tr for each line Item.

Thank you

Raj

Read only

0 Likes
2,630

In the function module you have an internal table IT_DELIT which can be used to split the TO in whatever quantity you want. If you are unable to resolve it let me know.

hith

Sunil Achyut

Read only

0 Likes
2,630

Hi Sunil,

Can i split the TO for receiving by Delivery to each line item. In other words can i have N To's for N number of Line Item in One delivery.

I would appreciate your help.

Thanks.

Read only

0 Likes
2,630

Yes you can have any number of TO's for a delivery. It need not be a line item, infact you can create a TO for quantity 1 even if the delivery is for 1000. If you have any trouble in the FM I can provide examples.

Also since this thread is answered it would be better if you can create a new thread, will enable other SDNers to answer if they have had similar experience.

hith

Sunil Achyut

Read only

0 Likes
2,630

Hello. I have the same problem. I need to create TO on a position of entering delivery on a part of quantity (for quantity 1 even if the delivery is for 1000).

Can you provide examples, please?

Olga

Read only

0 Likes
2,630

Achyut,

Can you send me any sample code for TO split.

Thanks

Vinod

Read only

0 Likes
2,630

Hello Aveek,

Could you please tell me how you found following statement and if you have tested it :

"EXPORT i_lenum TO MEMORY ID 'YPD_SSCC_LIST'."

Could you also give the i_lenum structure declaration statement ?

Thanks,

Blsap

Read only

0 Likes
2,630

Hi Aveek,

I am confused in code. can you please send me the total code including data declarations.

Regards,

Suresh Redy

Read only

Former Member
0 Likes
2,630

Hi,

You can try this option:

CALL FUNCTION 'L_TO_CREATE_MULTIPLE'

EXPORTING

i_lgnum = i_ltak1-lgnum

i_bwlvs = c_bwlvs1

IMPORTING

e_tanum = v_tanum

TABLES

t_ltap_creat = i_ltap_creat

t_ltap_vb = i_ltap_vb

Exceptions

......

regards

Aveek

Read only

0 Likes
2,630

Hi Aveek.

Sorry for taking so long in responding.

Thanks for the advice.

I had tried that one and it did split the TO appropriately, but did not provide the necessary link to the Delivery document.

I ended up having to use a Call Transaction + user-exit to solve this one.

Thanks again.

Read only

0 Likes
2,630

Greetings,

I found these postings about Splitting a TO. We have a similar requirement and, if possible, I like to learn more about the eventual solution mentioned by the 'Guest' contributor (i.e. using a Call Transaction and a user exit). I assume the called txn was LT03 (right?) but which user exit (MWMTO012?). A paste of the code would also be great.

We need to know how to influence the TO creation during Picking for Delivery in a non-SUM warehouse so we get TO line items broken up by LE Quantity.

Example:

WH is non-SUM / Pick Strategy is stringent FIFO.

Delivery Line 010 has reqired qty of 94.

LE Qty is 25/pallet.

Assume 1 material/batch in one bin can satisfy the req'mt of 94.

Currently, we get 1 TO Line Itme for 94.

What we want is 4 TO Line Items for 25, 25, 25 and 19.

Thanks in advance for any help!

Mike D / Coca-Cola

Read only

0 Likes
2,630

Mr. Guest,

Can you explain me briefly what you did to acheive the TO split.

Thanks

Read only

Former Member
0 Likes
2,630

You may need to check your customzing. I noticed the same effect when using L_TO_CREATE_DN, but was able to post it using LT03.

Go into SPRO under Shipping Control per Warehouse Number (LE -> WM -> Interfaces -> Shipping -> Define Shipping Control) and select the 'Partial Picking OK' checkbox for your warehouse number. This may (or may not) fix it.

Cheers,

Patrick