SAP SO_INITFILE_GET Function Module for









SO_INITFILE_GET is a standard so initfile get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 so initfile get FM, simply by entering the name SO_INITFILE_GET into the relevant SAP transaction such as SE37 or SE38.

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



Function SO_INITFILE_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 'SO_INITFILE_GET'"
EXPORTING
DOCTYPE = "Document Class
* NO_CONTENT = "

IMPORTING
CANCELLED = "
OBJECT_HD_DISPLAY = "
FOLDER_ID = "
OBJECT_ID = "

TABLES
* OBJCONT = "Document Contents
* OBJHEAD = "Specific header
* OBJPARA = "Execution parameters
* OBJPARB = "Execution parameters

EXCEPTIONS
ERROR_SOPR_SELECT = 1 ERROR_SO_NAME_CONVERT = 2 ERROR_SO_TSOPA_CHECK = 3 ERROR_SO_USER_READ = 4 ERROR_SO_OBJECT_READ_OLD = 5 ERROR_SO_OBJECT_READ = 6 ERROR_SO_FOLDER_READ = 7
.



IMPORTING Parameters details for SO_INITFILE_GET

DOCTYPE - Document Class

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

NO_CONTENT -

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

EXPORTING Parameters details for SO_INITFILE_GET

CANCELLED -

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

OBJECT_HD_DISPLAY -

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

FOLDER_ID -

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

OBJECT_ID -

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

TABLES Parameters details for SO_INITFILE_GET

OBJCONT - Document Contents

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

OBJHEAD - Specific header

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

OBJPARA - Execution parameters

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

OBJPARB - Execution parameters

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

EXCEPTIONS details

ERROR_SOPR_SELECT -

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

ERROR_SO_NAME_CONVERT -

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

ERROR_SO_TSOPA_CHECK -

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

ERROR_SO_USER_READ -

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

ERROR_SO_OBJECT_READ_OLD -

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

ERROR_SO_OBJECT_READ -

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

ERROR_SO_FOLDER_READ -

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

Copy and paste ABAP code example for SO_INITFILE_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_doctype  TYPE TSOTD-OBJTP, "   
lt_objcont  TYPE STANDARD TABLE OF SOLI, "   
lv_cancelled  TYPE SONV-FLAG, "   
lv_error_sopr_select  TYPE SONV, "   
lt_objhead  TYPE STANDARD TABLE OF SOLI, "   
lv_no_content  TYPE SONV-FLAG, "   
lv_object_hd_display  TYPE SOOD2, "   
lv_error_so_name_convert  TYPE SOOD2, "   
lt_objpara  TYPE STANDARD TABLE OF SELC, "   
lv_folder_id  TYPE SOODK, "   
lv_error_so_tsopa_check  TYPE SOODK, "   
lt_objparb  TYPE STANDARD TABLE OF SOOP1, "   
lv_object_id  TYPE SOODK, "   
lv_error_so_user_read  TYPE SOODK, "   
lv_error_so_object_read_old  TYPE SOODK, "   
lv_error_so_object_read  TYPE SOODK, "   
lv_error_so_folder_read  TYPE SOODK. "   

  CALL FUNCTION 'SO_INITFILE_GET'  "
    EXPORTING
         DOCTYPE = lv_doctype
         NO_CONTENT = lv_no_content
    IMPORTING
         CANCELLED = lv_cancelled
         OBJECT_HD_DISPLAY = lv_object_hd_display
         FOLDER_ID = lv_folder_id
         OBJECT_ID = lv_object_id
    TABLES
         OBJCONT = lt_objcont
         OBJHEAD = lt_objhead
         OBJPARA = lt_objpara
         OBJPARB = lt_objparb
    EXCEPTIONS
        ERROR_SOPR_SELECT = 1
        ERROR_SO_NAME_CONVERT = 2
        ERROR_SO_TSOPA_CHECK = 3
        ERROR_SO_USER_READ = 4
        ERROR_SO_OBJECT_READ_OLD = 5
        ERROR_SO_OBJECT_READ = 6
        ERROR_SO_FOLDER_READ = 7
. " SO_INITFILE_GET




ABAP code using 7.40 inline data declarations to call FM SO_INITFILE_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 OBJTP FROM TSOTD INTO @DATA(ld_doctype).
 
 
"SELECT single FLAG FROM SONV INTO @DATA(ld_cancelled).
 
 
 
"SELECT single FLAG FROM SONV INTO @DATA(ld_no_content).
 
 
 
 
 
 
 
 
 
 
 
 


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!