SAP CS_QU_VARIABLE_SIZED_ITEM Function Module for Variable-size item data









CS_QU_VARIABLE_SIZED_ITEM is a standard cs qu variable sized item SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Variable-size item data 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 cs qu variable sized item FM, simply by entering the name CS_QU_VARIABLE_SIZED_ITEM into the relevant SAP transaction such as SE37 or SE38.

Function Group: CSQU
Program Name: SAPLCSQU
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CS_QU_VARIABLE_SIZED_ITEM 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 'CS_QU_VARIABLE_SIZED_ITEM'"Variable-size item data
EXPORTING
* AKTTP = 'V' "Activity type (A,H,V)
* CUA_TITLE = ' ' "Title
* DIAFL = 'X' "Flag: with dialog
ECSINR = "Item and material data

IMPORTING
ABRFL = "Flag: Process was terminated
ACSINR = "Item and material data

EXCEPTIONS
ME_WRONG = 1 NO_DIAFL = 2 NO_MATERIAL = 3 NO_MATERIAL_DATA = 4 POSTP_NOT_EXIST = 5 POSTP_WRONG = 6
.



IMPORTING Parameters details for CS_QU_VARIABLE_SIZED_ITEM

AKTTP - Activity type (A,H,V)

Data type: T185F-AKTYP
Default: 'V'
Optional: Yes
Call by Reference: No ( called with pass by value option)

CUA_TITLE - Title

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

DIAFL - Flag: with dialog

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

ECSINR - Item and material data

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

EXPORTING Parameters details for CS_QU_VARIABLE_SIZED_ITEM

ABRFL - Flag: Process was terminated

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

ACSINR - Item and material data

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

EXCEPTIONS details

ME_WRONG - ME cannot be converted to LME or AME

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

NO_DIAFL - Activity is display, but without dialog

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

NO_MATERIAL - Items material is missing

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

NO_MATERIAL_DATA - Material data missing

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

POSTP_NOT_EXIST - Item category is not planned

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

POSTP_WRONG - Item category is no variable-sized item

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

Copy and paste ABAP code example for CS_QU_VARIABLE_SIZED_ITEM 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_abrfl  TYPE CSDATA-XFELD, "   
lv_akttp  TYPE T185F-AKTYP, "   'V'
lv_me_wrong  TYPE T185F, "   
lv_acsinr  TYPE CSINR, "   
lv_no_diafl  TYPE CSINR, "   
lv_cua_title  TYPE CSINR, "   SPACE
lv_diafl  TYPE CSDATA-XFELD, "   'X'
lv_no_material  TYPE CSDATA, "   
lv_ecsinr  TYPE CSINR, "   
lv_no_material_data  TYPE CSINR, "   
lv_postp_not_exist  TYPE CSINR, "   
lv_postp_wrong  TYPE CSINR. "   

  CALL FUNCTION 'CS_QU_VARIABLE_SIZED_ITEM'  "Variable-size item data
    EXPORTING
         AKTTP = lv_akttp
         CUA_TITLE = lv_cua_title
         DIAFL = lv_diafl
         ECSINR = lv_ecsinr
    IMPORTING
         ABRFL = lv_abrfl
         ACSINR = lv_acsinr
    EXCEPTIONS
        ME_WRONG = 1
        NO_DIAFL = 2
        NO_MATERIAL = 3
        NO_MATERIAL_DATA = 4
        POSTP_NOT_EXIST = 5
        POSTP_WRONG = 6
. " CS_QU_VARIABLE_SIZED_ITEM




ABAP code using 7.40 inline data declarations to call FM CS_QU_VARIABLE_SIZED_ITEM

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 XFELD FROM CSDATA INTO @DATA(ld_abrfl).
 
"SELECT single AKTYP FROM T185F INTO @DATA(ld_akttp).
DATA(ld_akttp) = 'V'.
 
 
 
 
DATA(ld_cua_title) = ' '.
 
"SELECT single XFELD FROM CSDATA INTO @DATA(ld_diafl).
DATA(ld_diafl) = '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!