SAP L_TO_CREATE_SINGLE Function Module for Create a transfer order with one item









L_TO_CREATE_SINGLE is a standard l to create single SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Create a transfer order with one item processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for l to create single FM, simply by entering the name L_TO_CREATE_SINGLE into the relevant SAP transaction such as SE37 or SE38.

Function Group: L03B
Program Name: SAPLL03B
Main Program: SAPLL03B
Appliation area: L
Release date: 19-Apr-1995
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function L_TO_CREATE_SINGLE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'L_TO_CREATE_SINGLE'"Create a transfer order with one item
EXPORTING
I_LGNUM = "Warehouse number
* I_SOBKZ = ' ' "Special stock indicator
* I_SONUM = ' ' "Special stock number
* I_LETYP = ' ' "Storage unit type
I_ANFME = "Requested Qty
I_ALTME = "Unit of measure
* I_WDATU = INIT_DATUM "Goods receipt date
* I_VFDAT = INIT_DATUM "Expiration date
* I_ZEUGN = ' ' "Certificate number
* I_LZNUM = ' ' "Additional ref.number
* I_SQUIT = ' ' "Immed.confirmat.
I_BWLVS = "Movement type
* I_NIDRU = ' ' "Do not print
* I_DRUKZ = ' ' "Print code
* I_LDEST = ' ' "Printer
* I_WEMPF = ' ' "Goods Recipient
* I_ABLAD = ' ' "Unload.point
* I_VLTYP = ' ' "Source storage type
* I_VLBER = ' ' "Source storage section
* I_VLPLA = ' ' "Source storage bin
* I_VPPOS = ' ' "Position in source storage bin
* I_VLENR = ' ' "Source storage unit
* I_BETYP = ' ' "Requirement Type
* I_VLQNR = ' ' "Src.quant
* I_NLTYP = ' ' "Destination storage type
* I_NLBER = ' ' "Destination storage section
* I_NLPLA = ' ' "Destination Storage Bin
* I_NPPOS = ' ' "Position in destionation storage bin
* I_NLENR = ' ' "Dest.storage unit
* I_NLQNR = ' ' "Dest.quant
* I_RLTYP = ' ' "Return storage type
* I_RLBER = ' ' "Return storage area
* I_RLPLA = ' ' "Return storage bin
* I_BENUM = ' ' "Requirement Number
* I_RLQNR = ' ' "Return quant
* I_UPDATE_TASK = ' ' "Indicator: update via update task
* I_COMMIT_WORK = 'X' "Indicator whether COMMIT WORK in function module
* I_BNAME = SY-UNAME "User who is generating the TO
* I_KOMPL = 'X' "Only generate TO if requested amount supplied
* I_SOLEX = 0 "Planned Transfer Order Processing Time from External System
* I_PERNR = 0 "Personnel Number
* I_AUSFB = ' ' "
I_MATNR = "Material no.
I_WERKS = "Plant
* I_LGORT = ' ' "Storage Location
* I_CHARG = ' ' "Batch
* I_BESTQ = ' ' "Stock category

IMPORTING
E_TANUM = "Transfer order number
E_LTAP = "Transfer order item

TABLES
* T_LTAK = "
* T_LTAP_VB = "

EXCEPTIONS
NO_TO_CREATED = 1 NLTYP_WRONG = 10 NLPLA_WRONG = 11 NLTYP_MISSING = 12 RLTYP_WRONG = 13 RLPLA_WRONG = 14 RLTYP_MISSING = 15 SQUIT_FORBIDDEN = 16 MANUAL_TO_FORBIDDEN = 17 LETYP_WRONG = 18 VLPLA_MISSING = 19 BWLVS_WRONG = 2 NLPLA_MISSING = 20 SOBKZ_WRONG = 21 SOBKZ_MISSING = 22 SONUM_MISSING = 23 BESTQ_WRONG = 24 LGBER_WRONG = 25 XFELD_WRONG = 26 DATE_WRONG = 27 DRUKZ_WRONG = 28 LDEST_WRONG = 29 BETYP_WRONG = 3 UPDATE_WITHOUT_COMMIT = 30 NO_AUTHORITY = 31 MATERIAL_NOT_FOUND = 32 LENUM_WRONG = 33 BENUM_MISSING = 4 BETYP_MISSING = 5 FOREIGN_LOCK = 6 VLTYP_WRONG = 7 VLPLA_WRONG = 8 VLTYP_MISSING = 9
.



IMPORTING Parameters details for L_TO_CREATE_SINGLE

I_LGNUM - Warehouse number

Data type: LTAK-LGNUM
Optional: No
Call by Reference: No ( called with pass by value option)

I_SOBKZ - Special stock indicator

Data type: LTAP-SOBKZ
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SONUM - Special stock number

Data type: LTAP-SONUM
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LETYP - Storage unit type

Data type: LTAP-LETYP
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ANFME - Requested Qty

Data type: RL03T-ANFME
Optional: No
Call by Reference: No ( called with pass by value option)

I_ALTME - Unit of measure

Data type: LTAP-ALTME
Optional: No
Call by Reference: No ( called with pass by value option)

I_WDATU - Goods receipt date

Data type: LTAP-WDATU
Default: INIT_DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VFDAT - Expiration date

Data type: LTAP-VFDAT
Default: INIT_DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ZEUGN - Certificate number

Data type: LTAP-ZEUGN
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LZNUM - Additional ref.number

Data type: LTAK-LZNUM
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SQUIT - Immed.confirmat.

Data type: RL03T-SQUIT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BWLVS - Movement type

Data type: LTAK-BWLVS
Optional: No
Call by Reference: No ( called with pass by value option)

I_NIDRU - Do not print

Data type: RL03A-NIDRU
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_DRUKZ - Print code

Data type: T329F-DRUKZ
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LDEST - Printer

Data type: LTAP-LDEST
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_WEMPF - Goods Recipient

Data type: LTAP-WEMPF
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ABLAD - Unload.point

Data type: LTAP-ABLAD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VLTYP - Source storage type

Data type: LTAP-VLTYP
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VLBER - Source storage section

Data type: LTAP-VLBER
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VLPLA - Source storage bin

Data type: LTAP-VLPLA
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VPPOS - Position in source storage bin

Data type: LTAP-VPPOS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VLENR - Source storage unit

Data type: LTAP-VLENR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BETYP - Requirement Type

Data type: LTAK-BETYP
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_VLQNR - Src.quant

Data type: LTAP-VLQNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NLTYP - Destination storage type

Data type: LTAP-NLTYP
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NLBER - Destination storage section

Data type: LTAP-NLBER
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NLPLA - Destination Storage Bin

Data type: LTAP-NLPLA
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NPPOS - Position in destionation storage bin

Data type: LTAP-NPPOS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NLENR - Dest.storage unit

Data type: LTAP-NLENR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NLQNR - Dest.quant

Data type: LTAP-NLQNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_RLTYP - Return storage type

Data type: LTAP-RLTYP
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_RLBER - Return storage area

Data type: LTAP-RLBER
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_RLPLA - Return storage bin

Data type: LTAP-RLPLA
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BENUM - Requirement Number

Data type: LTAK-BENUM
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_RLQNR - Return quant

Data type: LTAP-RLQNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_UPDATE_TASK - Indicator: update via update task

Data type: RL03A-VERBU
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_COMMIT_WORK - Indicator whether COMMIT WORK in function module

Data type: RL03B-COMIT
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BNAME - User who is generating the TO

Data type: LTAK-BNAME
Default: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_KOMPL - Only generate TO if requested amount supplied

Data type: RL03B-KOMPL
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SOLEX - Planned Transfer Order Processing Time from External System

Data type: LTAK-SOLEX
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_PERNR - Personnel Number

Data type: LTAK-PERNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_AUSFB -

Data type: LTAK-AUSFB
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MATNR - Material no.

Data type: LTAP-MATNR
Optional: No
Call by Reference: No ( called with pass by value option)

I_WERKS - Plant

Data type: LTAP-WERKS
Optional: No
Call by Reference: No ( called with pass by value option)

I_LGORT - Storage Location

Data type: LTAP-LGORT
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_CHARG - Batch

Data type: LTAP-CHARG
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_BESTQ - Stock category

Data type: LTAP-BESTQ
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for L_TO_CREATE_SINGLE

E_TANUM - Transfer order number

Data type: LTAK-TANUM
Optional: No
Call by Reference: No ( called with pass by value option)

E_LTAP - Transfer order item

Data type: LTAP
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for L_TO_CREATE_SINGLE

T_LTAK -

Data type: LTAK_VB
Optional: Yes
Call by Reference: No ( called with pass by value option)

T_LTAP_VB -

Data type: LTAP_VB
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NO_TO_CREATED - No TO generated

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NLTYP_WRONG - Destination storage type contradicts movement type

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NLPLA_WRONG - Destination storage bin contradicts movement type

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NLTYP_MISSING - Dest.storage bin required if bin is set

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

RLTYP_WRONG - Return storage type contradicts movement type

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

RLPLA_WRONG - Return storage bin contradicts movement type

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

RLTYP_MISSING - Ret.storage type required if bin is set

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SQUIT_FORBIDDEN - Immediate conf.not allowed for movement type

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MANUAL_TO_FORBIDDEN - Manual transfer order not allowed

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

LETYP_WRONG - Storage unit type does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

VLPLA_MISSING - Src.storage bin for item missing

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

BWLVS_WRONG - Mov.type incorrect

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NLPLA_MISSING - Dest.storage bin for item missing

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SOBKZ_WRONG - Special stock indicator does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SOBKZ_MISSING - Special stock indicator missing

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SONUM_MISSING - Special stock number is missing

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

BESTQ_WRONG - Stock category does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

LGBER_WRONG - Stor.section does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

XFELD_WRONG - Incorrect value for checkbox

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DATE_WRONG - Incorrect Date Entry

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DRUKZ_WRONG - Print code does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

LDEST_WRONG - Printer does not exist

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

BETYP_WRONG - Req.type does not match movement type

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

UPDATE_WITHOUT_COMMIT - Update via update task only using Commit

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_AUTHORITY - No authorization

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

MATERIAL_NOT_FOUND - Material not maintained for this process

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

LENUM_WRONG - SU number cannot be converted

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

BENUM_MISSING - Req.number missing

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

BETYP_MISSING - Req.type missing

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

FOREIGN_LOCK - An SAP block has been set by another user

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

VLTYP_WRONG - Source storage type contradicts movement type

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

VLPLA_WRONG - Source storage bin contradicts movement type

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

VLTYP_MISSING - Src.storage type required if bin is set

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for L_TO_CREATE_SINGLE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lt_t_ltak  TYPE STANDARD TABLE OF LTAK_VB, "   
lv_e_tanum  TYPE LTAK-TANUM, "   
lv_i_lgnum  TYPE LTAK-LGNUM, "   
lv_no_to_created  TYPE LTAK, "   
lv_i_sobkz  TYPE LTAP-SOBKZ, "   SPACE
lv_nltyp_wrong  TYPE LTAP, "   
lv_i_sonum  TYPE LTAP-SONUM, "   SPACE
lv_nlpla_wrong  TYPE LTAP, "   
lv_i_letyp  TYPE LTAP-LETYP, "   SPACE
lv_nltyp_missing  TYPE LTAP, "   
lv_i_anfme  TYPE RL03T-ANFME, "   
lv_rltyp_wrong  TYPE RL03T, "   
lv_i_altme  TYPE LTAP-ALTME, "   
lv_rlpla_wrong  TYPE LTAP, "   
lv_i_wdatu  TYPE LTAP-WDATU, "   INIT_DATUM
lv_rltyp_missing  TYPE LTAP, "   
lv_i_vfdat  TYPE LTAP-VFDAT, "   INIT_DATUM
lv_squit_forbidden  TYPE LTAP, "   
lv_i_zeugn  TYPE LTAP-ZEUGN, "   SPACE
lv_manual_to_forbidden  TYPE LTAP, "   
lv_i_lznum  TYPE LTAK-LZNUM, "   SPACE
lv_letyp_wrong  TYPE LTAK, "   
lv_i_squit  TYPE RL03T-SQUIT, "   SPACE
lv_vlpla_missing  TYPE RL03T, "   
lv_e_ltap  TYPE LTAP, "   
lv_i_bwlvs  TYPE LTAK-BWLVS, "   
lt_t_ltap_vb  TYPE STANDARD TABLE OF LTAP_VB, "   
lv_bwlvs_wrong  TYPE LTAP_VB, "   
lv_i_nidru  TYPE RL03A-NIDRU, "   SPACE
lv_nlpla_missing  TYPE RL03A, "   
lv_i_drukz  TYPE T329F-DRUKZ, "   SPACE
lv_sobkz_wrong  TYPE T329F, "   
lv_i_ldest  TYPE LTAP-LDEST, "   SPACE
lv_sobkz_missing  TYPE LTAP, "   
lv_i_wempf  TYPE LTAP-WEMPF, "   SPACE
lv_sonum_missing  TYPE LTAP, "   
lv_i_ablad  TYPE LTAP-ABLAD, "   SPACE
lv_bestq_wrong  TYPE LTAP, "   
lv_i_vltyp  TYPE LTAP-VLTYP, "   SPACE
lv_lgber_wrong  TYPE LTAP, "   
lv_i_vlber  TYPE LTAP-VLBER, "   SPACE
lv_xfeld_wrong  TYPE LTAP, "   
lv_i_vlpla  TYPE LTAP-VLPLA, "   SPACE
lv_date_wrong  TYPE LTAP, "   
lv_i_vppos  TYPE LTAP-VPPOS, "   SPACE
lv_drukz_wrong  TYPE LTAP, "   
lv_i_vlenr  TYPE LTAP-VLENR, "   SPACE
lv_ldest_wrong  TYPE LTAP, "   
lv_i_betyp  TYPE LTAK-BETYP, "   SPACE
lv_betyp_wrong  TYPE LTAK, "   
lv_i_vlqnr  TYPE LTAP-VLQNR, "   SPACE
lv_update_without_commit  TYPE LTAP, "   
lv_i_nltyp  TYPE LTAP-NLTYP, "   SPACE
lv_no_authority  TYPE LTAP, "   
lv_i_nlber  TYPE LTAP-NLBER, "   SPACE
lv_material_not_found  TYPE LTAP, "   
lv_i_nlpla  TYPE LTAP-NLPLA, "   SPACE
lv_lenum_wrong  TYPE LTAP, "   
lv_i_nppos  TYPE LTAP-NPPOS, "   SPACE
lv_i_nlenr  TYPE LTAP-NLENR, "   SPACE
lv_i_nlqnr  TYPE LTAP-NLQNR, "   SPACE
lv_i_rltyp  TYPE LTAP-RLTYP, "   SPACE
lv_i_rlber  TYPE LTAP-RLBER, "   SPACE
lv_i_rlpla  TYPE LTAP-RLPLA, "   SPACE
lv_i_benum  TYPE LTAK-BENUM, "   SPACE
lv_benum_missing  TYPE LTAK, "   
lv_i_rlqnr  TYPE LTAP-RLQNR, "   SPACE
lv_i_update_task  TYPE RL03A-VERBU, "   SPACE
lv_i_commit_work  TYPE RL03B-COMIT, "   'X'
lv_i_bname  TYPE LTAK-BNAME, "   SY-UNAME
lv_i_kompl  TYPE RL03B-KOMPL, "   'X'
lv_i_solex  TYPE LTAK-SOLEX, "   0
lv_i_pernr  TYPE LTAK-PERNR, "   0
lv_i_ausfb  TYPE LTAK-AUSFB, "   SPACE
lv_i_matnr  TYPE LTAP-MATNR, "   
lv_betyp_missing  TYPE LTAP, "   
lv_i_werks  TYPE LTAP-WERKS, "   
lv_foreign_lock  TYPE LTAP, "   
lv_i_lgort  TYPE LTAP-LGORT, "   SPACE
lv_vltyp_wrong  TYPE LTAP, "   
lv_i_charg  TYPE LTAP-CHARG, "   SPACE
lv_vlpla_wrong  TYPE LTAP, "   
lv_i_bestq  TYPE LTAP-BESTQ, "   SPACE
lv_vltyp_missing  TYPE LTAP. "   

  CALL FUNCTION 'L_TO_CREATE_SINGLE'  "Create a transfer order with one item
    EXPORTING
         I_LGNUM = lv_i_lgnum
         I_SOBKZ = lv_i_sobkz
         I_SONUM = lv_i_sonum
         I_LETYP = lv_i_letyp
         I_ANFME = lv_i_anfme
         I_ALTME = lv_i_altme
         I_WDATU = lv_i_wdatu
         I_VFDAT = lv_i_vfdat
         I_ZEUGN = lv_i_zeugn
         I_LZNUM = lv_i_lznum
         I_SQUIT = lv_i_squit
         I_BWLVS = lv_i_bwlvs
         I_NIDRU = lv_i_nidru
         I_DRUKZ = lv_i_drukz
         I_LDEST = lv_i_ldest
         I_WEMPF = lv_i_wempf
         I_ABLAD = lv_i_ablad
         I_VLTYP = lv_i_vltyp
         I_VLBER = lv_i_vlber
         I_VLPLA = lv_i_vlpla
         I_VPPOS = lv_i_vppos
         I_VLENR = lv_i_vlenr
         I_BETYP = lv_i_betyp
         I_VLQNR = lv_i_vlqnr
         I_NLTYP = lv_i_nltyp
         I_NLBER = lv_i_nlber
         I_NLPLA = lv_i_nlpla
         I_NPPOS = lv_i_nppos
         I_NLENR = lv_i_nlenr
         I_NLQNR = lv_i_nlqnr
         I_RLTYP = lv_i_rltyp
         I_RLBER = lv_i_rlber
         I_RLPLA = lv_i_rlpla
         I_BENUM = lv_i_benum
         I_RLQNR = lv_i_rlqnr
         I_UPDATE_TASK = lv_i_update_task
         I_COMMIT_WORK = lv_i_commit_work
         I_BNAME = lv_i_bname
         I_KOMPL = lv_i_kompl
         I_SOLEX = lv_i_solex
         I_PERNR = lv_i_pernr
         I_AUSFB = lv_i_ausfb
         I_MATNR = lv_i_matnr
         I_WERKS = lv_i_werks
         I_LGORT = lv_i_lgort
         I_CHARG = lv_i_charg
         I_BESTQ = lv_i_bestq
    IMPORTING
         E_TANUM = lv_e_tanum
         E_LTAP = lv_e_ltap
    TABLES
         T_LTAK = lt_t_ltak
         T_LTAP_VB = lt_t_ltap_vb
    EXCEPTIONS
        NO_TO_CREATED = 1
        NLTYP_WRONG = 10
        NLPLA_WRONG = 11
        NLTYP_MISSING = 12
        RLTYP_WRONG = 13
        RLPLA_WRONG = 14
        RLTYP_MISSING = 15
        SQUIT_FORBIDDEN = 16
        MANUAL_TO_FORBIDDEN = 17
        LETYP_WRONG = 18
        VLPLA_MISSING = 19
        BWLVS_WRONG = 2
        NLPLA_MISSING = 20
        SOBKZ_WRONG = 21
        SOBKZ_MISSING = 22
        SONUM_MISSING = 23
        BESTQ_WRONG = 24
        LGBER_WRONG = 25
        XFELD_WRONG = 26
        DATE_WRONG = 27
        DRUKZ_WRONG = 28
        LDEST_WRONG = 29
        BETYP_WRONG = 3
        UPDATE_WITHOUT_COMMIT = 30
        NO_AUTHORITY = 31
        MATERIAL_NOT_FOUND = 32
        LENUM_WRONG = 33
        BENUM_MISSING = 4
        BETYP_MISSING = 5
        FOREIGN_LOCK = 6
        VLTYP_WRONG = 7
        VLPLA_WRONG = 8
        VLTYP_MISSING = 9
. " L_TO_CREATE_SINGLE




ABAP code using 7.40 inline data declarations to call FM L_TO_CREATE_SINGLE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single TANUM FROM LTAK INTO @DATA(ld_e_tanum).
 
"SELECT single LGNUM FROM LTAK INTO @DATA(ld_i_lgnum).
 
 
"SELECT single SOBKZ FROM LTAP INTO @DATA(ld_i_sobkz).
DATA(ld_i_sobkz) = ' '.
 
 
"SELECT single SONUM FROM LTAP INTO @DATA(ld_i_sonum).
DATA(ld_i_sonum) = ' '.
 
 
"SELECT single LETYP FROM LTAP INTO @DATA(ld_i_letyp).
DATA(ld_i_letyp) = ' '.
 
 
"SELECT single ANFME FROM RL03T INTO @DATA(ld_i_anfme).
 
 
"SELECT single ALTME FROM LTAP INTO @DATA(ld_i_altme).
 
 
"SELECT single WDATU FROM LTAP INTO @DATA(ld_i_wdatu).
DATA(ld_i_wdatu) = INIT_DATUM.
 
 
"SELECT single VFDAT FROM LTAP INTO @DATA(ld_i_vfdat).
DATA(ld_i_vfdat) = INIT_DATUM.
 
 
"SELECT single ZEUGN FROM LTAP INTO @DATA(ld_i_zeugn).
DATA(ld_i_zeugn) = ' '.
 
 
"SELECT single LZNUM FROM LTAK INTO @DATA(ld_i_lznum).
DATA(ld_i_lznum) = ' '.
 
 
"SELECT single SQUIT FROM RL03T INTO @DATA(ld_i_squit).
DATA(ld_i_squit) = ' '.
 
 
 
"SELECT single BWLVS FROM LTAK INTO @DATA(ld_i_bwlvs).
 
 
 
"SELECT single NIDRU FROM RL03A INTO @DATA(ld_i_nidru).
DATA(ld_i_nidru) = ' '.
 
 
"SELECT single DRUKZ FROM T329F INTO @DATA(ld_i_drukz).
DATA(ld_i_drukz) = ' '.
 
 
"SELECT single LDEST FROM LTAP INTO @DATA(ld_i_ldest).
DATA(ld_i_ldest) = ' '.
 
 
"SELECT single WEMPF FROM LTAP INTO @DATA(ld_i_wempf).
DATA(ld_i_wempf) = ' '.
 
 
"SELECT single ABLAD FROM LTAP INTO @DATA(ld_i_ablad).
DATA(ld_i_ablad) = ' '.
 
 
"SELECT single VLTYP FROM LTAP INTO @DATA(ld_i_vltyp).
DATA(ld_i_vltyp) = ' '.
 
 
"SELECT single VLBER FROM LTAP INTO @DATA(ld_i_vlber).
DATA(ld_i_vlber) = ' '.
 
 
"SELECT single VLPLA FROM LTAP INTO @DATA(ld_i_vlpla).
DATA(ld_i_vlpla) = ' '.
 
 
"SELECT single VPPOS FROM LTAP INTO @DATA(ld_i_vppos).
DATA(ld_i_vppos) = ' '.
 
 
"SELECT single VLENR FROM LTAP INTO @DATA(ld_i_vlenr).
DATA(ld_i_vlenr) = ' '.
 
 
"SELECT single BETYP FROM LTAK INTO @DATA(ld_i_betyp).
DATA(ld_i_betyp) = ' '.
 
 
"SELECT single VLQNR FROM LTAP INTO @DATA(ld_i_vlqnr).
DATA(ld_i_vlqnr) = ' '.
 
 
"SELECT single NLTYP FROM LTAP INTO @DATA(ld_i_nltyp).
DATA(ld_i_nltyp) = ' '.
 
 
"SELECT single NLBER FROM LTAP INTO @DATA(ld_i_nlber).
DATA(ld_i_nlber) = ' '.
 
 
"SELECT single NLPLA FROM LTAP INTO @DATA(ld_i_nlpla).
DATA(ld_i_nlpla) = ' '.
 
 
"SELECT single NPPOS FROM LTAP INTO @DATA(ld_i_nppos).
DATA(ld_i_nppos) = ' '.
 
"SELECT single NLENR FROM LTAP INTO @DATA(ld_i_nlenr).
DATA(ld_i_nlenr) = ' '.
 
"SELECT single NLQNR FROM LTAP INTO @DATA(ld_i_nlqnr).
DATA(ld_i_nlqnr) = ' '.
 
"SELECT single RLTYP FROM LTAP INTO @DATA(ld_i_rltyp).
DATA(ld_i_rltyp) = ' '.
 
"SELECT single RLBER FROM LTAP INTO @DATA(ld_i_rlber).
DATA(ld_i_rlber) = ' '.
 
"SELECT single RLPLA FROM LTAP INTO @DATA(ld_i_rlpla).
DATA(ld_i_rlpla) = ' '.
 
"SELECT single BENUM FROM LTAK INTO @DATA(ld_i_benum).
DATA(ld_i_benum) = ' '.
 
 
"SELECT single RLQNR FROM LTAP INTO @DATA(ld_i_rlqnr).
DATA(ld_i_rlqnr) = ' '.
 
"SELECT single VERBU FROM RL03A INTO @DATA(ld_i_update_task).
DATA(ld_i_update_task) = ' '.
 
"SELECT single COMIT FROM RL03B INTO @DATA(ld_i_commit_work).
DATA(ld_i_commit_work) = 'X'.
 
"SELECT single BNAME FROM LTAK INTO @DATA(ld_i_bname).
DATA(ld_i_bname) = SY-UNAME.
 
"SELECT single KOMPL FROM RL03B INTO @DATA(ld_i_kompl).
DATA(ld_i_kompl) = 'X'.
 
"SELECT single SOLEX FROM LTAK INTO @DATA(ld_i_solex).
 
"SELECT single PERNR FROM LTAK INTO @DATA(ld_i_pernr).
 
"SELECT single AUSFB FROM LTAK INTO @DATA(ld_i_ausfb).
DATA(ld_i_ausfb) = ' '.
 
"SELECT single MATNR FROM LTAP INTO @DATA(ld_i_matnr).
 
 
"SELECT single WERKS FROM LTAP INTO @DATA(ld_i_werks).
 
 
"SELECT single LGORT FROM LTAP INTO @DATA(ld_i_lgort).
DATA(ld_i_lgort) = ' '.
 
 
"SELECT single CHARG FROM LTAP INTO @DATA(ld_i_charg).
DATA(ld_i_charg) = ' '.
 
 
"SELECT single BESTQ FROM LTAP INTO @DATA(ld_i_bestq).
DATA(ld_i_bestq) = ' '.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!