SAP SDOK_PHIO_STORE_NEW_VERSION Function Module for Save Internal Tables as New Version of a Physical Document









SDOK_PHIO_STORE_NEW_VERSION is a standard sdok phio store new version SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Save Internal Tables as New Version of a Physical Document 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 store new version FM, simply by entering the name SDOK_PHIO_STORE_NEW_VERSION 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_STORE_NEW_VERSION 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_STORE_NEW_VERSION'"Save Internal Tables as New Version of a Physical Document
EXPORTING
OBJECT_ID = "
* NEW_OBJECT_UNIQUE_ID = "
* NEW_STOR_CAT = "Category for New PHIO
* X_ENQUEUE = "Flag for Locking New Document
* CLIENT = SY-MANDT "Client
* TEXT_AS_STREAM = "'X' --> Compact Text Display with CR-LF
* ALLOW_STORE_BY_URL = "'X' --> Content Retrieval via External URLs Allowed
* VSCAN_PROFILE = '/SCMS/KPRO_CREATE' "Virus Scan Profile

IMPORTING
NEW_OBJECT_ID = "New Version of a Physical Document

TABLES
* FILE_ACCESS_INFO = "Information for Data Access
* FILE_ACCESS_URL = "Component Properties and Access URL (Alternative to FILE_ACCESS_INFO)
* FILE_CONTENT_ASCII = "Content of Text Documents
* FILE_CONTENT_BINARY = "Content of Binary Documents

EXCEPTIONS
NOT_EXISTING = 1 NOT_ALLOWED = 2 NOT_AUTHORIZED = 3 NO_CONTENT = 4 BAD_STORAGE_TYPE = 5 ENQUEUE_FAILURE = 6 EXCEPTION_IN_EXIT = 7 BLOCKED_BY_POLICY = 8
.



IMPORTING Parameters details for SDOK_PHIO_STORE_NEW_VERSION

OBJECT_ID -

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

NEW_OBJECT_UNIQUE_ID -

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

NEW_STOR_CAT - Category for New PHIO

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

X_ENQUEUE - Flag for Locking New Document

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

CLIENT - Client

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

TEXT_AS_STREAM - 'X' --> Compact Text Display with CR-LF

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

ALLOW_STORE_BY_URL - 'X' --> Content Retrieval via External URLs Allowed

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

VSCAN_PROFILE - Virus Scan Profile

Data type: VSCAN_PROFILE
Default: '/SCMS/KPRO_CREATE'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SDOK_PHIO_STORE_NEW_VERSION

NEW_OBJECT_ID - New Version of a Physical Document

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

TABLES Parameters details for SDOK_PHIO_STORE_NEW_VERSION

FILE_ACCESS_INFO - Information for Data Access

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

FILE_ACCESS_URL - Component Properties and Access URL (Alternative to FILE_ACCESS_INFO)

Data type: SDOKCOMPRU
Optional: Yes
Call by Reference: Yes

FILE_CONTENT_ASCII - Content of Text Documents

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

FILE_CONTENT_BINARY - Content of Binary Documents

Data type: SDOKCNTBIN
Optional: 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_ALLOWED - Save Not Allowed

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)

ENQUEUE_FAILURE - Locking error

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

EXCEPTION_IN_EXIT - Exception in application exit

Data type:
Optional: No
Call by Reference: Yes

BLOCKED_BY_POLICY -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SDOK_PHIO_STORE_NEW_VERSION 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, "   
lv_new_object_id  TYPE SDOKOBJECT, "   
lt_file_access_info  TYPE STANDARD TABLE OF SDOKFILACI, "   
lv_not_allowed  TYPE SDOKFILACI, "   
lt_file_access_url  TYPE STANDARD TABLE OF SDOKCOMPRU, "   
lv_new_object_unique_id  TYPE SDOKPHIO-PHIO_ID, "   
lv_new_stor_cat  TYPE SDOKPHIO-STOR_CAT, "   
lv_not_authorized  TYPE SDOKPHIO, "   
lt_file_content_ascii  TYPE STANDARD TABLE OF SDOKCNTASC, "   
lv_x_enqueue  TYPE SY-DATAR, "   
lv_no_content  TYPE SY, "   
lt_file_content_binary  TYPE STANDARD TABLE OF SDOKCNTBIN, "   
lv_client  TYPE SY-MANDT, "   SY-MANDT
lv_bad_storage_type  TYPE SY, "   
lv_text_as_stream  TYPE SY-DATAR, "   
lv_enqueue_failure  TYPE SY, "   
lv_exception_in_exit  TYPE SY, "   
lv_allow_store_by_url  TYPE SY-DATAR, "   
lv_vscan_profile  TYPE VSCAN_PROFILE, "   '/SCMS/KPRO_CREATE'
lv_blocked_by_policy  TYPE VSCAN_PROFILE. "   

  CALL FUNCTION 'SDOK_PHIO_STORE_NEW_VERSION'  "Save Internal Tables as New Version of a Physical Document
    EXPORTING
         OBJECT_ID = lv_object_id
         NEW_OBJECT_UNIQUE_ID = lv_new_object_unique_id
         NEW_STOR_CAT = lv_new_stor_cat
         X_ENQUEUE = lv_x_enqueue
         CLIENT = lv_client
         TEXT_AS_STREAM = lv_text_as_stream
         ALLOW_STORE_BY_URL = lv_allow_store_by_url
         VSCAN_PROFILE = lv_vscan_profile
    IMPORTING
         NEW_OBJECT_ID = lv_new_object_id
    TABLES
         FILE_ACCESS_INFO = lt_file_access_info
         FILE_ACCESS_URL = lt_file_access_url
         FILE_CONTENT_ASCII = lt_file_content_ascii
         FILE_CONTENT_BINARY = lt_file_content_binary
    EXCEPTIONS
        NOT_EXISTING = 1
        NOT_ALLOWED = 2
        NOT_AUTHORIZED = 3
        NO_CONTENT = 4
        BAD_STORAGE_TYPE = 5
        ENQUEUE_FAILURE = 6
        EXCEPTION_IN_EXIT = 7
        BLOCKED_BY_POLICY = 8
. " SDOK_PHIO_STORE_NEW_VERSION




ABAP code using 7.40 inline data declarations to call FM SDOK_PHIO_STORE_NEW_VERSION

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 PHIO_ID FROM SDOKPHIO INTO @DATA(ld_new_object_unique_id).
 
"SELECT single STOR_CAT FROM SDOKPHIO INTO @DATA(ld_new_stor_cat).
 
 
 
"SELECT single DATAR FROM SY INTO @DATA(ld_x_enqueue).
 
 
 
"SELECT single MANDT FROM SY INTO @DATA(ld_client).
DATA(ld_client) = SY-MANDT.
 
 
"SELECT single DATAR FROM SY INTO @DATA(ld_text_as_stream).
 
 
 
"SELECT single DATAR FROM SY INTO @DATA(ld_allow_store_by_url).
 
DATA(ld_vscan_profile) = '/SCMS/KPRO_CREATE'.
 
 


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!