SAP L_TO_CREATE_POSTING_CHANGE Function Module for Create transfer order for posting change









L_TO_CREATE_POSTING_CHANGE is a standard l to create posting change 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 transfer order for posting change 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 posting change FM, simply by entering the name L_TO_CREATE_POSTING_CHANGE into the relevant SAP transaction such as SE37 or SE38.

Function Group: L03B
Program Name: SAPLL03B
Main Program: SAPLL03B
Appliation area: L
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function L_TO_CREATE_POSTING_CHANGE 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_POSTING_CHANGE'"Create transfer order for posting change
EXPORTING
I_LGNUM = "Whse number
* I_BNAME = SY-UNAME "User who creates TO
* I_SOLEX = 0 "Planned Transfer Order Processing Time from External System
* I_PERNR = 0 "Personnel Number
* I_UBNUM = ' ' "Posting change number
* I_LUBUI = ' ' "Posting change notice
* I_SQUIT = ' ' "Immed.confirmat.
* I_NIDRU = ' ' "Do not print
* I_DRUKZ = ' ' "Print code
* I_LDEST = ' ' "Printer
* I_UPDATE_TASK = ' ' "Indicator: update via update task
* I_COMMIT_WORK = 'X' "Indicator whether COMMIT WORK in function module

IMPORTING
E_TANUM = "Transfer order number

TABLES
* T_LUBQU = "Table of quants for posting change
* T_LTAP_VB = "
* T_LTAK = "

EXCEPTIONS
FOREIGN_LOCK = 1 NO_AUTHORITY = 10 I_UBNUM_OR_I_LUBU = 11 BWLVS_WRONG = 12 MATERIAL_NOT_FOUND = 13 MANUAL_TO_FORBIDDEN = 14 BESTQ_WRONG = 15 SOBKZ_MISSING = 16 SOBKZ_WRONG = 17 MEINS_WRONG = 18 CONVERSION_NOT_FOUND = 19 TP_COMPLETED = 2 NO_QUANTS = 20 T_LUBQU_REQUIRED = 21 LE_BULK_QUANT_NOT_SELECTABLE = 22 QUANT_NOT_SELECTABLE = 23 QUANTNUMBER_INITIAL = 24 KZUAP_OR_BIN_LOCATION = 25 DATE_WRONG = 26 NLTYP_MISSING = 27 NLPLA_MISSING = 28 LGBER_WRONG = 29 XFELD_WRONG = 3 LENUM_WRONG = 30 MENGE_WRONG = 31 MENGE_TO_BIG = 32 OPEN_TR_KZUAP = 33 LOCK_EXISTS = 34 DOUBLE_QUANT = 35 QUANTITY_WRONG = 36 LDEST_WRONG = 4 DRUKZ_WRONG = 5 TP_WRONG = 6 SQUIT_FORBIDDEN = 7 NO_TO_CREATED = 8 UPDATE_WITHOUT_COMMIT = 9
.



IMPORTING Parameters details for L_TO_CREATE_POSTING_CHANGE

I_LGNUM - Whse number

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

I_BNAME - User who creates TO

Data type: LTAK-BNAME
Default: SY-UNAME
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_UBNUM - Posting change number

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

I_LUBUI - Posting change notice

Data type: LUBUI
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_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_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)

EXPORTING Parameters details for L_TO_CREATE_POSTING_CHANGE

E_TANUM - Transfer order number

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

TABLES Parameters details for L_TO_CREATE_POSTING_CHANGE

T_LUBQU - Table of quants for posting change

Data type: LUBQU
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)

T_LTAK -

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

EXCEPTIONS details

FOREIGN_LOCK - SAP block by other user

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)

I_UBNUM_OR_I_LUBU - Posting change number or implicit posting change notice

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)

MATERIAL_NOT_FOUND - Material not maintained for this process

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)

BESTQ_WRONG - Stock category 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)

SOBKZ_WRONG - Special stock indicator does not exist

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

MEINS_WRONG - Base unit of measure incorrect

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

CONVERSION_NOT_FOUND - Conversion for units of measure not defined

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

TP_COMPLETED - Posting change already executed for posting change notice

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

NO_QUANTS - No quants exist for posting changes

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

T_LUBQU_REQUIRED - Table T_LUBUQ must be passed on

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

LE_BULK_QUANT_NOT_SELECTABLE - Block storage quants not allowed for posting change

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

QUANT_NOT_SELECTABLE - Quant not allowed for posting change

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

QUANTNUMBER_INITIAL - Quant number must not have initial value

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

KZUAP_OR_BIN_LOCATION - Posting change either at bin or destination storage bin

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)

NLTYP_MISSING - Destination storage type is missing

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

NLPLA_MISSING - Destination storage bin is missing

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)

LENUM_WRONG - SU number cannot be converted

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

MENGE_WRONG - Posting change quantity does not correspond to quants

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

MENGE_TO_BIG - Posting change quantity is too large

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

OPEN_TR_KZUAP - With open TRs, posting change must take place in bin

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

LOCK_EXISTS - SAP block by other user

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

DOUBLE_QUANT - Quant may only be in Table T_LUBQU once

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

QUANTITY_WRONG - Quantity for posting change is incorrect

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)

DRUKZ_WRONG - Print code does not exist

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

TP_WRONG - Posting change notice does not exist

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)

NO_TO_CREATED - No TO generated

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)

Copy and paste ABAP code example for L_TO_CREATE_POSTING_CHANGE 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:
lv_e_tanum  TYPE LTAK-TANUM, "   
lv_i_lgnum  TYPE LTAK-LGNUM, "   
lt_t_lubqu  TYPE STANDARD TABLE OF LUBQU, "   
lv_foreign_lock  TYPE LUBQU, "   
lv_i_bname  TYPE LTAK-BNAME, "   SY-UNAME
lv_no_authority  TYPE LTAK, "   
lv_i_solex  TYPE LTAK-SOLEX, "   0
lv_i_ubnum_or_i_lubu  TYPE LTAK, "   
lv_i_pernr  TYPE LTAK-PERNR, "   0
lv_bwlvs_wrong  TYPE LTAK, "   
lv_material_not_found  TYPE LTAK, "   
lv_manual_to_forbidden  TYPE LTAK, "   
lv_bestq_wrong  TYPE LTAK, "   
lv_sobkz_missing  TYPE LTAK, "   
lv_sobkz_wrong  TYPE LTAK, "   
lv_meins_wrong  TYPE LTAK, "   
lv_conversion_not_found  TYPE LTAK, "   
lv_i_ubnum  TYPE LTAK-UBNUM, "   SPACE
lt_t_ltap_vb  TYPE STANDARD TABLE OF LTAP_VB, "   
lv_tp_completed  TYPE LTAP_VB, "   
lv_no_quants  TYPE LTAP_VB, "   
lv_t_lubqu_required  TYPE LTAP_VB, "   
lv_le_bulk_quant_not_selectable  TYPE LTAP_VB, "   
lv_quant_not_selectable  TYPE LTAP_VB, "   
lv_quantnumber_initial  TYPE LTAP_VB, "   
lv_kzuap_or_bin_location  TYPE LTAP_VB, "   
lv_date_wrong  TYPE LTAP_VB, "   
lv_nltyp_missing  TYPE LTAP_VB, "   
lv_nlpla_missing  TYPE LTAP_VB, "   
lv_lgber_wrong  TYPE LTAP_VB, "   
lt_t_ltak  TYPE STANDARD TABLE OF LTAK_VB, "   
lv_i_lubui  TYPE LUBUI, "   SPACE
lv_xfeld_wrong  TYPE LUBUI, "   
lv_lenum_wrong  TYPE LUBUI, "   
lv_menge_wrong  TYPE LUBUI, "   
lv_menge_to_big  TYPE LUBUI, "   
lv_open_tr_kzuap  TYPE LUBUI, "   
lv_lock_exists  TYPE LUBUI, "   
lv_double_quant  TYPE LUBUI, "   
lv_quantity_wrong  TYPE LUBUI, "   
lv_i_squit  TYPE RL03T-SQUIT, "   SPACE
lv_ldest_wrong  TYPE RL03T, "   
lv_i_nidru  TYPE RL03A-NIDRU, "   SPACE
lv_drukz_wrong  TYPE RL03A, "   
lv_i_drukz  TYPE T329F-DRUKZ, "   SPACE
lv_tp_wrong  TYPE T329F, "   
lv_i_ldest  TYPE LTAP-LDEST, "   SPACE
lv_squit_forbidden  TYPE LTAP, "   
lv_i_update_task  TYPE RL03A-VERBU, "   SPACE
lv_no_to_created  TYPE RL03A, "   
lv_i_commit_work  TYPE RL03B-COMIT, "   'X'
lv_update_without_commit  TYPE RL03B. "   

  CALL FUNCTION 'L_TO_CREATE_POSTING_CHANGE'  "Create transfer order for posting change
    EXPORTING
         I_LGNUM = lv_i_lgnum
         I_BNAME = lv_i_bname
         I_SOLEX = lv_i_solex
         I_PERNR = lv_i_pernr
         I_UBNUM = lv_i_ubnum
         I_LUBUI = lv_i_lubui
         I_SQUIT = lv_i_squit
         I_NIDRU = lv_i_nidru
         I_DRUKZ = lv_i_drukz
         I_LDEST = lv_i_ldest
         I_UPDATE_TASK = lv_i_update_task
         I_COMMIT_WORK = lv_i_commit_work
    IMPORTING
         E_TANUM = lv_e_tanum
    TABLES
         T_LUBQU = lt_t_lubqu
         T_LTAP_VB = lt_t_ltap_vb
         T_LTAK = lt_t_ltak
    EXCEPTIONS
        FOREIGN_LOCK = 1
        NO_AUTHORITY = 10
        I_UBNUM_OR_I_LUBU = 11
        BWLVS_WRONG = 12
        MATERIAL_NOT_FOUND = 13
        MANUAL_TO_FORBIDDEN = 14
        BESTQ_WRONG = 15
        SOBKZ_MISSING = 16
        SOBKZ_WRONG = 17
        MEINS_WRONG = 18
        CONVERSION_NOT_FOUND = 19
        TP_COMPLETED = 2
        NO_QUANTS = 20
        T_LUBQU_REQUIRED = 21
        LE_BULK_QUANT_NOT_SELECTABLE = 22
        QUANT_NOT_SELECTABLE = 23
        QUANTNUMBER_INITIAL = 24
        KZUAP_OR_BIN_LOCATION = 25
        DATE_WRONG = 26
        NLTYP_MISSING = 27
        NLPLA_MISSING = 28
        LGBER_WRONG = 29
        XFELD_WRONG = 3
        LENUM_WRONG = 30
        MENGE_WRONG = 31
        MENGE_TO_BIG = 32
        OPEN_TR_KZUAP = 33
        LOCK_EXISTS = 34
        DOUBLE_QUANT = 35
        QUANTITY_WRONG = 36
        LDEST_WRONG = 4
        DRUKZ_WRONG = 5
        TP_WRONG = 6
        SQUIT_FORBIDDEN = 7
        NO_TO_CREATED = 8
        UPDATE_WITHOUT_COMMIT = 9
. " L_TO_CREATE_POSTING_CHANGE




ABAP code using 7.40 inline data declarations to call FM L_TO_CREATE_POSTING_CHANGE

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 BNAME FROM LTAK INTO @DATA(ld_i_bname).
DATA(ld_i_bname) = SY-UNAME.
 
 
"SELECT single SOLEX FROM LTAK INTO @DATA(ld_i_solex).
 
 
"SELECT single PERNR FROM LTAK INTO @DATA(ld_i_pernr).
 
 
 
 
 
 
 
 
 
"SELECT single UBNUM FROM LTAK INTO @DATA(ld_i_ubnum).
DATA(ld_i_ubnum) = ' '.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_i_lubui) = ' '.
 
 
 
 
 
 
 
 
 
"SELECT single SQUIT FROM RL03T INTO @DATA(ld_i_squit).
DATA(ld_i_squit) = ' '.
 
 
"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 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'.
 
 


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!