SAP RANGE_STRUCTURED_ARTICLE_GET Function Module for NOTRANSL: Ermitteln der Komponenten eines strukturierten Artikels









RANGE_STRUCTURED_ARTICLE_GET is a standard range structured article get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Ermitteln der Komponenten eines strukturierten Artikels 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 range structured article get FM, simply by entering the name RANGE_STRUCTURED_ARTICLE_GET into the relevant SAP transaction such as SE37 or SE38.

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



Function RANGE_STRUCTURED_ARTICLE_GET 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 'RANGE_STRUCTURED_ARTICLE_GET'"NOTRANSL: Ermitteln der Komponenten eines strukturierten Artikels
EXPORTING
ST_MATNR = "Material data of the structured material
KEY = "Key for identifying the transaction
* PRICE_KZ = 'X' "Price determination indicator
* XSPCO = ' ' "

IMPORTING
PE_MARA_LOG_VARIANT = "

TABLES
BILL_OF_MATERIAL = "Bill of material of the structured material

EXCEPTIONS
NO_HEAD_FOUND = 1 NO_COMPONENTS_FOUND = 2 NO_RANGE_FOUND = 3 NO_RETAIL_MAT = 4 NO_LISTING_AS_COMPONENT = 5 NO_TWZLA_FOUND = 6 NO_KEY = 7 DO_NOTHING = 8
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLWSOS_001 Function Module Exit for Calculating Header Material PO Quantity

IMPORTING Parameters details for RANGE_STRUCTURED_ARTICLE_GET

ST_MATNR - Material data of the structured material

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

KEY - Key for identifying the transaction

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

PRICE_KZ - Price determination indicator

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

XSPCO -

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

EXPORTING Parameters details for RANGE_STRUCTURED_ARTICLE_GET

PE_MARA_LOG_VARIANT -

Data type: MARA
Optional: No
Call by Reference: Yes

TABLES Parameters details for RANGE_STRUCTURED_ARTICLE_GET

BILL_OF_MATERIAL - Bill of material of the structured material

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

EXCEPTIONS details

NO_HEAD_FOUND - No header data

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

NO_COMPONENTS_FOUND - No component data

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

NO_RANGE_FOUND - No listing conditions found

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

NO_RETAIL_MAT - Not an R/3 Retail material

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

NO_LISTING_AS_COMPONENT - No listing as component

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

NO_TWZLA_FOUND - No assignment of structured material to transaction

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

NO_KEY - No transaction key

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

DO_NOTHING - Do nothing

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

Copy and paste ABAP code example for RANGE_STRUCTURED_ARTICLE_GET 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_st_matnr  TYPE WSOS_MATNR, "   
lv_no_head_found  TYPE WSOS_MATNR, "   
lt_bill_of_material  TYPE STANDARD TABLE OF WSOS_STULI, "   
lv_pe_mara_log_variant  TYPE MARA, "   
lv_key  TYPE TWZLA-KEYTR, "   
lv_no_components_found  TYPE TWZLA, "   
lv_price_kz  TYPE WTDY-TYP01, "   'X'
lv_no_range_found  TYPE WTDY, "   
lv_xspco  TYPE WTDY-TYP01, "   SPACE
lv_no_retail_mat  TYPE WTDY, "   
lv_no_listing_as_component  TYPE WTDY, "   
lv_no_twzla_found  TYPE WTDY, "   
lv_no_key  TYPE WTDY, "   
lv_do_nothing  TYPE WTDY. "   

  CALL FUNCTION 'RANGE_STRUCTURED_ARTICLE_GET'  "NOTRANSL: Ermitteln der Komponenten eines strukturierten Artikels
    EXPORTING
         ST_MATNR = lv_st_matnr
         KEY = lv_key
         PRICE_KZ = lv_price_kz
         XSPCO = lv_xspco
    IMPORTING
         PE_MARA_LOG_VARIANT = lv_pe_mara_log_variant
    TABLES
         BILL_OF_MATERIAL = lt_bill_of_material
    EXCEPTIONS
        NO_HEAD_FOUND = 1
        NO_COMPONENTS_FOUND = 2
        NO_RANGE_FOUND = 3
        NO_RETAIL_MAT = 4
        NO_LISTING_AS_COMPONENT = 5
        NO_TWZLA_FOUND = 6
        NO_KEY = 7
        DO_NOTHING = 8
. " RANGE_STRUCTURED_ARTICLE_GET




ABAP code using 7.40 inline data declarations to call FM RANGE_STRUCTURED_ARTICLE_GET

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 KEYTR FROM TWZLA INTO @DATA(ld_key).
 
 
"SELECT single TYP01 FROM WTDY INTO @DATA(ld_price_kz).
DATA(ld_price_kz) = 'X'.
 
 
"SELECT single TYP01 FROM WTDY INTO @DATA(ld_xspco).
DATA(ld_xspco) = ' '.
 
 
 
 
 
 


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!