SAP QPSD_SETCODE_SINGLE_READ Function Module for Reading a code in the selection set









QPSD_SETCODE_SINGLE_READ is a standard qpsd setcode single read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Reading a code in the selection set 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 qpsd setcode single read FM, simply by entering the name QPSD_SETCODE_SINGLE_READ into the relevant SAP transaction such as SE37 or SE38.

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



Function QPSD_SETCODE_SINGLE_READ 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 'QPSD_SETCODE_SINGLE_READ'"Reading a code in the selection set
EXPORTING
AUSWAHLMENGE = "Selected set
CODE = "allocated code
CODEGRUPPE = "allocated code group
KATALOGART = "Catalog type
VERSIONAM = "Version of the selection set
WERK = "Plant

IMPORTING
BEWERTUNG = "Valuation of the selected set
FEHLKLASSE = "Defect class of the selected set
MUSSTEXTKZ = "ID, whether text to the characteristic should be entered

EXCEPTIONS
NO_CODE_IN_GROUP = 1
.



IMPORTING Parameters details for QPSD_SETCODE_SINGLE_READ

AUSWAHLMENGE - Selected set

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

CODE - allocated code

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

CODEGRUPPE - allocated code group

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

KATALOGART - Catalog type

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

VERSIONAM - Version of the selection set

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

WERK - Plant

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

EXPORTING Parameters details for QPSD_SETCODE_SINGLE_READ

BEWERTUNG - Valuation of the selected set

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

FEHLKLASSE - Defect class of the selected set

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

MUSSTEXTKZ - ID, whether text to the characteristic should be entered

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

EXCEPTIONS details

NO_CODE_IN_GROUP - No selected set code found

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

Copy and paste ABAP code example for QPSD_SETCODE_SINGLE_READ 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_bewertung  TYPE QPAC-BEWERTUNG, "   
lv_auswahlmenge  TYPE QPAC-AUSWAHLMGE, "   
lv_no_code_in_group  TYPE QPAC, "   
lv_code  TYPE QPAC-CODE, "   
lv_fehlklasse  TYPE QPAC-FEHLKLASSE, "   
lv_codegruppe  TYPE QPAC-CODEGRUPPE, "   
lv_musstextkz  TYPE QPAC-MUSSTEXTKZ, "   
lv_katalogart  TYPE QPAC-KATALOGART, "   
lv_versionam  TYPE QPAC-VERSIONAM, "   
lv_werk  TYPE QPAC-WERKS. "   

  CALL FUNCTION 'QPSD_SETCODE_SINGLE_READ'  "Reading a code in the selection set
    EXPORTING
         AUSWAHLMENGE = lv_auswahlmenge
         CODE = lv_code
         CODEGRUPPE = lv_codegruppe
         KATALOGART = lv_katalogart
         VERSIONAM = lv_versionam
         WERK = lv_werk
    IMPORTING
         BEWERTUNG = lv_bewertung
         FEHLKLASSE = lv_fehlklasse
         MUSSTEXTKZ = lv_musstextkz
    EXCEPTIONS
        NO_CODE_IN_GROUP = 1
. " QPSD_SETCODE_SINGLE_READ




ABAP code using 7.40 inline data declarations to call FM QPSD_SETCODE_SINGLE_READ

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 BEWERTUNG FROM QPAC INTO @DATA(ld_bewertung).
 
"SELECT single AUSWAHLMGE FROM QPAC INTO @DATA(ld_auswahlmenge).
 
 
"SELECT single CODE FROM QPAC INTO @DATA(ld_code).
 
"SELECT single FEHLKLASSE FROM QPAC INTO @DATA(ld_fehlklasse).
 
"SELECT single CODEGRUPPE FROM QPAC INTO @DATA(ld_codegruppe).
 
"SELECT single MUSSTEXTKZ FROM QPAC INTO @DATA(ld_musstextkz).
 
"SELECT single KATALOGART FROM QPAC INTO @DATA(ld_katalogart).
 
"SELECT single VERSIONAM FROM QPAC INTO @DATA(ld_versionam).
 
"SELECT single WERKS FROM QPAC INTO @DATA(ld_werk).
 


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!