Using L_TO_CREATE_DN to split TO to multiple based on Certificate and Length.

Hi Experts,

I am new here with TO creations, I need help with multiple TO creation, based on different Certificate and Length.
Here I am picking a TO based on the delivery no. and warehouse inputs. Then we are taking a list(s) of certificates and length as inputs.
Firstly we are cancelling the picked TO and creating multiple new ones using same data but different certificate and length.

Please provide an insight whether this FM could achieve it and how.

 

CALL FUNCTION ‘L_TO_CREATE_DN’
EXPORTING
i_lgnum = wa_ltap-lgnum
i_vbeln = wa_ltap-vbeln
i_commit_work = ‘X’
i_bname = sy-uname
* IMPORTING
* e_tanum = l_tanum
* TABLES
* t_ltak = t_ltak
* t_ltap_vb = t_ltap1
* t_wmgrp_msg = t_wmgrp_msg
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
input_error = 15
OTHERS = 16.

 

Thanks

Scroll to Top