L_TO_CREATE_TR is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name L_TO_CREATE_TR into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
L03B
Released Date:
19.04.1995
Processing type: Remote-Enabled
CALL FUNCTION 'L_TO_CREATE_TR' "Create a transfer order for transfer requirement
EXPORTING
i_lgnum = " ltak-lgnum Warehouse number
i_tbnum = " ltak-tbnum Transfer requirement number
* i_refnr = SPACE " ltak-refnr Reference number
* i_squit = SPACE " rl03t-squit Immed.confirmat.
* i_nidru = SPACE " rl03a-nidru Do not print
* i_drukz = SPACE " t329f-drukz Print code
* i_ldest = SPACE " ltap-ldest Printer
* i_tbeli = SPACE " rl03t-tbeli
* i_nospl = SPACE " rl03a-nospl No TO split
* i_update_task = SPACE " rl03a-verbu Indicator: update via update task
* i_commit_work = 'X' " rl03b-comit Indicator whether COMMIT WORK in function module
* i_bname = SY-UNAME " ltak-bname User who is generating the TO
* i_teilk = SPACE " t340d-teilv Partial picking allowed
* i_solex = 0 " ltak-solex Planned Transfer Order Processing Time from External System
* i_pernr = 0 " ltak-pernr Personnel Number
* i_rsnum = SPACE " ltak-rsnum Reservation
* i_ldest_lang = SPACE " tsp03l-lname Spool: Long device names
* it_trite = " l03b_trite_t
IMPORTING
e_tanum = " ltak-tanum Transfer order number
e_teilk = " t340d-teilv
* TABLES
* t_ltak = " ltak_vb
* t_ltap_vb = " ltap_vb
* t_wmgrp_msg = " wmgrp_msg
EXCEPTIONS
FOREIGN_LOCK = 1 " An SAP block has been set by another user
QM_RELEVANT = 2 " TR is resevant for QSS
TR_COMPLETED = 3 " TR is already fully supplied
XFELD_WRONG = 4 " Incorrect value for checkbox
LDEST_WRONG = 5 " Printer does not exist
DRUKZ_WRONG = 6 " Print code does not exist
TR_WRONG = 7 " TR does not exist
SQUIT_FORBIDDEN = 8 " Immediate conf.not allowed for movement type
NO_TO_CREATED = 9 " No TO generated
UPDATE_WITHOUT_COMMIT = 10 " Update via update task only using Commit
NO_AUTHORITY = 11 " No authorization
PREALLOCATED_STOCK = 12 " Material is pre-allocated
PARTIAL_TRANSFER_REQ_FORBIDDEN = 13 "
INPUT_ERROR = 14 "
. " L_TO_CREATE_TR
The ABAP code below is a full code listing to execute function module L_TO_CREATE_TR including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
| ld_e_tanum | TYPE LTAK-TANUM , |
| ld_e_teilk | TYPE T340D-TEILV , |
| it_t_ltak | TYPE STANDARD TABLE OF LTAK_VB,"TABLES PARAM |
| wa_t_ltak | LIKE LINE OF it_t_ltak , |
| it_t_ltap_vb | TYPE STANDARD TABLE OF LTAP_VB,"TABLES PARAM |
| wa_t_ltap_vb | LIKE LINE OF it_t_ltap_vb , |
| it_t_wmgrp_msg | TYPE STANDARD TABLE OF WMGRP_MSG,"TABLES PARAM |
| wa_t_wmgrp_msg | LIKE LINE OF it_t_wmgrp_msg . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_e_tanum | TYPE LTAK-TANUM , |
| ld_i_lgnum | TYPE LTAK-LGNUM , |
| it_t_ltak | TYPE STANDARD TABLE OF LTAK_VB , |
| wa_t_ltak | LIKE LINE OF it_t_ltak, |
| it_t_ltap_vb | TYPE STANDARD TABLE OF LTAP_VB , |
| wa_t_ltap_vb | LIKE LINE OF it_t_ltap_vb, |
| ld_i_tbnum | TYPE LTAK-TBNUM , |
| ld_e_teilk | TYPE T340D-TEILV , |
| ld_i_refnr | TYPE LTAK-REFNR , |
| it_t_wmgrp_msg | TYPE STANDARD TABLE OF WMGRP_MSG , |
| wa_t_wmgrp_msg | LIKE LINE OF it_t_wmgrp_msg, |
| ld_i_squit | TYPE RL03T-SQUIT , |
| ld_i_nidru | TYPE RL03A-NIDRU , |
| ld_i_drukz | TYPE T329F-DRUKZ , |
| ld_i_ldest | TYPE LTAP-LDEST , |
| ld_i_tbeli | TYPE RL03T-TBELI , |
| ld_i_nospl | TYPE RL03A-NOSPL , |
| ld_i_update_task | TYPE RL03A-VERBU , |
| ld_i_commit_work | TYPE RL03B-COMIT , |
| ld_i_bname | TYPE LTAK-BNAME , |
| ld_i_teilk | TYPE T340D-TEILV , |
| ld_i_solex | TYPE LTAK-SOLEX , |
| ld_i_pernr | TYPE LTAK-PERNR , |
| ld_i_rsnum | TYPE LTAK-RSNUM , |
| ld_i_ldest_lang | TYPE TSP03L-LNAME , |
| ld_it_trite | TYPE L03B_TRITE_T . |
With this function module you can create a transfer order for a
transfer requirement. For more information, refer to the detailed
...See here for full SAP fm documentation
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name L_TO_CREATE_TR or its description.
L_TO_CREATE_TR - Create a transfer order for transfer requirement L_TO_CREATE_STOCK_LIST_INT - L_TO_CREATE_SINGLE - Create a transfer order with one item L_TO_CREATE_POSTING_CHANGE - Create transfer order for posting change L_TO_CREATE_MULTIPLE - L_TO_CREATE_MOVE_SU - Create transfer order for moving storage units