07-04-2008 9:29 AM
Hello Community,
Could you advice on the BAPI for creation of transfer orders in LT03?
Thanks in advance,
PT
07-04-2008 9:34 AM
Don't think that this is not a BAPI(but it is RFC) if you want to use this from external system.
use any one of the below..
L_TO_CREATE_MULTIPLE
L_TO_CREATE_SINGLE
I used one of my requirements it is working fine..
07-04-2008 9:44 AM
Hi developer,
Function Module 'L_TO_CREATE_DN' should do it.
Example:
DATA lt_ltak TYPE STANDARD TABLE OF ltak_vb WITH HEADER LINE.
"TO Header
DATA lt_ltap1 TYPE STANDARD TABLE OF ltap_vb WITH HEADER LINE.
"TO Items
DATA lt_msg TYPE STANDARD TABLE OF wmgrp_msg WITH HEADER LINE.
DATA lt_delit TYPE TABLE OF l03b_delit.
DATA lt_wa_delit TYPE l03b_delit.
"TO Items with Pallet data
DATA lv_tanum TYPE ltak-tanum. "TO Number
LOOP AT t_pallet.
MOVE t_pallet-posnr TO lt_wa_delit-posnr.
MOVE t_pallet-curr_qty TO lt_wa_delit-anfme.
MOVE t_pallet-vrkme TO lt_wa_delit-altme.
MOVE t_pallet-charg TO lt_wa_delit-charg.
MOVE t_pallet-lgtyp TO lt_wa_delit-vltyp.
MOVE t_pallet-lgpla TO lt_wa_delit-vlpla.
UNPACK t_pallet-lenum TO lt_wa_delit-vlenr.
APPEND lt_wa_delit TO lt_delit.
CLEAR lt_wa_delit.
ENDLOOP.
* Bapi to Create the TO
CALL FUNCTION 'L_TO_CREATE_DN'
EXPORTING
i_lgnum = t_user-lgnum
i_vbeln = zmilk_zlm26_str-vbeln
i_squit = c_true
it_delit = lt_delit
IMPORTING
e_tanum = lv_tanum
TABLES
t_ltak = lt_ltak
t_ltap_vb = lt_ltap1
t_wmgrp_msg = lt_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.
Regards
Anup.
03-24-2014 6:34 AM
Hi Anup,
I am doing RF programming & need to get data or create TO in background,
can u help me on that
thanks in advance its urgent
Regards
Tabrez
07-09-2008 1:01 PM
Hello,
I'm using 'L_TO_CREATE_DN' to create the delivery note as sugested but I need to pass the value of ZEUGN(Certificate field).
Do you know were to fill the field?
Thanks in advance,
PT
07-09-2008 1:07 PM
You can pass the info using the Below functions..
You need to pass that to LTAP structure.
L_TO_CREATE_MULTIPLE
L_TO_CREATE_SINGLE
07-09-2008 1:10 PM
TABLES
*" T_LTAP_CREAT
you can find the Parameter in the table T_LTAP_CREAT
you can fill that here.
07-09-2008 1:08 PM
Hi,
Try this coding
Function Module 'L_TO_CREATE_DN' should do it.
Example:
DATA lt_ltak TYPE STANDARD TABLE OF ltak_vb WITH HEADER LINE.
"TO Header
DATA lt_ltap1 TYPE STANDARD TABLE OF ltap_vb WITH HEADER LINE.
"TO Items
DATA lt_msg TYPE STANDARD TABLE OF wmgrp_msg WITH HEADER LINE.
DATA lt_delit TYPE TABLE OF l03b_delit.
DATA lt_wa_delit TYPE l03b_delit.
"TO Items with Pallet data
DATA lv_tanum TYPE ltak-tanum. "TO Number
LOOP AT t_pallet.
MOVE t_pallet-posnr TO lt_wa_delit-posnr.
MOVE t_pallet-curr_qty TO lt_wa_delit-anfme.
MOVE t_pallet-vrkme TO lt_wa_delit-altme.
MOVE t_pallet-charg TO lt_wa_delit-charg.
MOVE t_pallet-lgtyp TO lt_wa_delit-vltyp.
MOVE t_pallet-lgpla TO lt_wa_delit-vlpla.
UNPACK t_pallet-lenum TO lt_wa_delit-vlenr.
APPEND lt_wa_delit TO lt_delit.
CLEAR lt_wa_delit.
ENDLOOP.
Bapi to Create the TO
CALL FUNCTION 'L_TO_CREATE_DN'
EXPORTING
i_lgnum = t_user-lgnum
i_vbeln = zmilk_zlm26_str-vbeln
i_squit = c_true
it_delit = lt_delit
IMPORTING
e_tanum = lv_tanum
TABLES
t_ltak = lt_ltak
t_ltap_vb = lt_ltap1
t_wmgrp_msg = lt_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.
hope this helps you.
\[removed by moderator\]
Thanks & Regards,
Y.R.Prem Kumar
Edited by: Jan Stallkamp on Jul 30, 2008 4:24 PM
07-09-2008 1:12 PM
Hi Prem
You copied the same code posted by the above user, Did you notice that.
Please check before posting
07-09-2008 1:14 PM
07-09-2008 1:22 PM
you can make use of T_LATP_CREAT and T_LTAK to send the information
TABLES
*" T_LTAP_CREAT STRUCTURE LTAP_CREAT
*" T_LTAK STRUCTURE LTAK_VB OPTIONAL
09-28-2010 1:58 PM
You have to call L_TO_SET_SPECIAL before the FM L_TO_CREATE_MULTIPLE.
CALL FUNCTION 'L_TO_SET_SPECIAL'
EXPORTING
i_spezi = 'B'
i_vbeln = <your VBELN>
EXCEPTIONS
call_forbidden = 1
input_wrong = 2
OTHERS = 3.
Damiano
10-20-2010 3:16 PM
Hello Damiano,
I didn't succeed in applying your answer, could you please give a code example which is working ?
Tkanks
Blsap
07-29-2008 7:40 PM
were you able to solve this issue, i have the same issue and i tried to use the it_ltap table with certificate number but it doesnt update....
The table parameter of the FM also has the description , table for created TO items.
07-30-2008 9:43 AM
02-27-2009 1:29 PM
I am having the same issue that was discussed in this thread. I am able to create a TO for a delivery (like LT03) using L_TO_CREATE_DN. My issue is the ZEUGN field is not available in the table IT_DELIT. Creating entries in the L_LTAP_VB table doesn't seem to help.
Has anyone been able to use this function module and successfully get it to create the transfer order AND populate the ZEUGN field. Tried the L_TO_CREATE_SINGE and L_TO_CREATE_MULTIPLE, but these do not update the document flow, so sticking with trying to get the L_TO_CREATE_DN to work. I am open to any other options (other fm's, bapis,...).
Appreciate any feedback I can get on this.
thanks,
Chip
03-18-2009 1:29 PM
Hello, Clyde Sanders.
Have you solve the issue? I have the similar situation - trying to use L_TO_CREATE_MULTIPLE, but this function is not filling VBELN field of LTAK table, and after confirmation of TO there are no packs in delivery document flow.
Thanks,
Roman
04-13-2009 9:59 PM
Was unable to get past this. Tried using the table T_LTAP_VB but never could get it to recognize anything I put in there.
This is still an open issue for me.
04-13-2009 11:36 PM
Is this tip helps u? that, usage of EXPORT & IMPORT in user exits.
thanq