SAP SDOK_PHIO_LOAD_CONTENT Function Module for Load Content of a Physical Object into an Internal Table
SDOK_PHIO_LOAD_CONTENT is a standard sdok phio load content SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Load Content of a Physical Object into an Internal Table 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 sdok phio load content FM, simply by entering the name SDOK_PHIO_LOAD_CONTENT into the relevant SAP transaction such as SE37 or SE38.
Function Group: SDCL
Program Name: SAPLSDCL
Main Program: SAPLSDCL
Appliation area: S
Release date: 29-Oct-2001
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function SDOK_PHIO_LOAD_CONTENT 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 'SDOK_PHIO_LOAD_CONTENT'"Load Content of a Physical Object into an Internal Table.
EXPORTING
OBJECT_ID = "Identify Physical Object
* CLIENT = SY-MANDT "Client
* AS_IS_MODE = "'X' --> Binary Test Transfer Allowed
* RAW_MODE = "'X' --> Text Components Requested in Binary Format
* TEXT_AS_STREAM = "'X' --> Compact Text Display with CR-LF
TABLES
* FILE_ACCESS_INFO = "Information for Data Access
* FILE_CONTENT_ASCII = "Content of Text Documents
* FILE_CONTENT_BINARY = "Content of Binary Documents
EXCEPTIONS
NOT_EXISTING = 1 NOT_AUTHORIZED = 2 NO_CONTENT = 3 BAD_STORAGE_TYPE = 4
IMPORTING Parameters details for SDOK_PHIO_LOAD_CONTENT
OBJECT_ID - Identify Physical Object
Data type: SDOKOBJECTOptional: No
Call by Reference: No ( called with pass by value option)
CLIENT - Client
Data type: SY-MANDTDefault: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)
AS_IS_MODE - 'X' --> Binary Test Transfer Allowed
Data type: SY-DATAROptional: Yes
Call by Reference: No ( called with pass by value option)
RAW_MODE - 'X' --> Text Components Requested in Binary Format
Data type: SY-DATAROptional: Yes
Call by Reference: No ( called with pass by value option)
TEXT_AS_STREAM - 'X' --> Compact Text Display with CR-LF
Data type: SY-DATAROptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for SDOK_PHIO_LOAD_CONTENT
FILE_ACCESS_INFO - Information for Data Access
Data type: SDOKFILACIOptional: Yes
Call by Reference: No ( called with pass by value option)
FILE_CONTENT_ASCII - Content of Text Documents
Data type: SDOKCNTASCOptional: Yes
Call by Reference: No ( called with pass by value option)
FILE_CONTENT_BINARY - Content of Binary Documents
Data type: SDOKCNTBINOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_EXISTING - Object does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_AUTHORIZED - No Authorization
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_CONTENT - No files for physical object
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
BAD_STORAGE_TYPE - Incorrect memory type
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for SDOK_PHIO_LOAD_CONTENT 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_object_id | TYPE SDOKOBJECT, " | |||
| lv_not_existing | TYPE SDOKOBJECT, " | |||
| lt_file_access_info | TYPE STANDARD TABLE OF SDOKFILACI, " | |||
| lv_client | TYPE SY-MANDT, " SY-MANDT | |||
| lv_not_authorized | TYPE SY, " | |||
| lt_file_content_ascii | TYPE STANDARD TABLE OF SDOKCNTASC, " | |||
| lv_as_is_mode | TYPE SY-DATAR, " | |||
| lv_no_content | TYPE SY, " | |||
| lt_file_content_binary | TYPE STANDARD TABLE OF SDOKCNTBIN, " | |||
| lv_raw_mode | TYPE SY-DATAR, " | |||
| lv_bad_storage_type | TYPE SY, " | |||
| lv_text_as_stream | TYPE SY-DATAR. " |
|   CALL FUNCTION 'SDOK_PHIO_LOAD_CONTENT' "Load Content of a Physical Object into an Internal Table |
| EXPORTING | ||
| OBJECT_ID | = lv_object_id | |
| CLIENT | = lv_client | |
| AS_IS_MODE | = lv_as_is_mode | |
| RAW_MODE | = lv_raw_mode | |
| TEXT_AS_STREAM | = lv_text_as_stream | |
| TABLES | ||
| FILE_ACCESS_INFO | = lt_file_access_info | |
| FILE_CONTENT_ASCII | = lt_file_content_ascii | |
| FILE_CONTENT_BINARY | = lt_file_content_binary | |
| EXCEPTIONS | ||
| NOT_EXISTING = 1 | ||
| NOT_AUTHORIZED = 2 | ||
| NO_CONTENT = 3 | ||
| BAD_STORAGE_TYPE = 4 | ||
| . " SDOK_PHIO_LOAD_CONTENT | ||
ABAP code using 7.40 inline data declarations to call FM SDOK_PHIO_LOAD_CONTENT
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 MANDT FROM SY INTO @DATA(ld_client). | ||||
| DATA(ld_client) | = SY-MANDT. | |||
| "SELECT single DATAR FROM SY INTO @DATA(ld_as_is_mode). | ||||
| "SELECT single DATAR FROM SY INTO @DATA(ld_raw_mode). | ||||
| "SELECT single DATAR FROM SY INTO @DATA(ld_text_as_stream). | ||||
Search for further information about these or an SAP related objects