SAP SASTRA_GET_OBJECTS_NUMBER Function Module for selecting number of objects









SASTRA_GET_OBJECTS_NUMBER is a standard sastra get objects number SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for selecting number of objects 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 sastra get objects number FM, simply by entering the name SASTRA_GET_OBJECTS_NUMBER into the relevant SAP transaction such as SE37 or SE38.

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



Function SASTRA_GET_OBJECTS_NUMBER 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 'SASTRA_GET_OBJECTS_NUMBER'"selecting number of objects
EXPORTING
* TAB_PACKAGES = "Table of package names
* TAB_SOFTW_COMP = "Table of Software components
* TAB_APPL_COMP = "Table of application components
* TAB_APPL_COMP_ID = "Table of application components (comprehensible name)
* REQUEST_DATE = SY-DATUM "Date when request is started
* WITHOUT_GENERATED = ' ' "X = Exclude generated objects

IMPORTING
RESULT_OBJECTS_NUMBER = "Table of SASTRA_OBJECT_NUMBER

EXCEPTIONS
WRONG_INPUT = 1
.



IMPORTING Parameters details for SASTRA_GET_OBJECTS_NUMBER

TAB_PACKAGES - Table of package names

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

TAB_SOFTW_COMP - Table of Software components

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

TAB_APPL_COMP - Table of application components

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

TAB_APPL_COMP_ID - Table of application components (comprehensible name)

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

REQUEST_DATE - Date when request is started

Data type: EU_DATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

WITHOUT_GENERATED - X = Exclude generated objects

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

EXPORTING Parameters details for SASTRA_GET_OBJECTS_NUMBER

RESULT_OBJECTS_NUMBER - Table of SASTRA_OBJECT_NUMBER

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

EXCEPTIONS details

WRONG_INPUT -

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

Copy and paste ABAP code example for SASTRA_GET_OBJECTS_NUMBER 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_wrong_input  TYPE STRING, "   
lv_tab_packages  TYPE TAB_PACKAGES, "   
lv_result_objects_number  TYPE SASTRA_TAB_OBJECT_NUMBER, "   
lv_tab_softw_comp  TYPE TAB_SOFTW_COMPONENT, "   
lv_tab_appl_comp  TYPE TAB_APPL_COMPONENT, "   
lv_tab_appl_comp_id  TYPE TAB_APPL_COMPONENT_ID, "   
lv_request_date  TYPE EU_DATUM, "   SY-DATUM
lv_without_generated  TYPE CHAR1. "   SPACE

  CALL FUNCTION 'SASTRA_GET_OBJECTS_NUMBER'  "selecting number of objects
    EXPORTING
         TAB_PACKAGES = lv_tab_packages
         TAB_SOFTW_COMP = lv_tab_softw_comp
         TAB_APPL_COMP = lv_tab_appl_comp
         TAB_APPL_COMP_ID = lv_tab_appl_comp_id
         REQUEST_DATE = lv_request_date
         WITHOUT_GENERATED = lv_without_generated
    IMPORTING
         RESULT_OBJECTS_NUMBER = lv_result_objects_number
    EXCEPTIONS
        WRONG_INPUT = 1
. " SASTRA_GET_OBJECTS_NUMBER




ABAP code using 7.40 inline data declarations to call FM SASTRA_GET_OBJECTS_NUMBER

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.

 
 
 
 
 
 
DATA(ld_request_date) = SY-DATUM.
 
DATA(ld_without_generated) = ' '.
 


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!