SAP OCS_PATCH_DISASSEMBLER Function Module for
OCS_PATCH_DISASSEMBLER is a standard ocs patch disassembler 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 ocs patch disassembler FM, simply by entering the name OCS_PATCH_DISASSEMBLER into the relevant SAP transaction such as SE37 or SE38.
Function Group: OCS_CORE
Program Name: SAPLOCS_CORE
Main Program: SAPLOCS_CORE
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function OCS_PATCH_DISASSEMBLER 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 'OCS_PATCH_DISASSEMBLER'".
EXPORTING
IV_PATCH = "
* IV_CREATE_DF = 'X' "
* IV_EPS_DIR = ' ' "
* IV_FULL_PARCEL_NAME = ' ' "
EXCEPTIONS
CANNOT_DETERMINE_EPS_PARCEL = 1 CANNOT_BUILD_ALLOW_FILE_NAME = 10 UNKNOWN_SEQ_TYPE = 11 PATCH_FILE_READ_ERROR = 12 XML_TRANSFORMATION_ERROR = 13 MISSING_AUTHORIZATION = 14 EPS_FILE_TOO_OLD = 15 CANNOT_DETERMINE_DATA_FILES = 2 FILE_OPEN_ERROR = 3 CANNOT_DISASSEMBLE_R_DATA_FILE = 4 CANNOT_DISASSEMBLE_D_DATA_FILE = 5 CANNOT_DISASSEMBLE_ALLOW_FILE = 6 UNKNOWN_BLOCK = 7 CANNOT_CREATE_COFILE = 8 PATCH_FILE_ERROR = 9
IMPORTING Parameters details for OCS_PATCH_DISASSEMBLER
IV_PATCH -
Data type: PAT03-PATCHOptional: No
Call by Reference: No ( called with pass by value option)
IV_CREATE_DF -
Data type: PAT05-CREATE_DFDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_EPS_DIR -
Data type: EPSF-EPSDIRNAMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_FULL_PARCEL_NAME -
Data type: EPSF-EPSPATHDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CANNOT_DETERMINE_EPS_PARCEL - Package not found
Data type:Optional: No
Call by Reference: Yes
CANNOT_BUILD_ALLOW_FILE_NAME -
Data type:Optional: No
Call by Reference: Yes
UNKNOWN_SEQ_TYPE -
Data type:Optional: No
Call by Reference: Yes
PATCH_FILE_READ_ERROR -
Data type:Optional: No
Call by Reference: Yes
XML_TRANSFORMATION_ERROR -
Data type:Optional: No
Call by Reference: Yes
MISSING_AUTHORIZATION -
Data type:Optional: No
Call by Reference: Yes
EPS_FILE_TOO_OLD -
Data type:Optional: No
Call by Reference: Yes
CANNOT_DETERMINE_DATA_FILES -
Data type:Optional: No
Call by Reference: Yes
FILE_OPEN_ERROR - Could not open file
Data type:Optional: No
Call by Reference: Yes
CANNOT_DISASSEMBLE_R_DATA_FILE -
Data type:Optional: No
Call by Reference: Yes
CANNOT_DISASSEMBLE_D_DATA_FILE -
Data type:Optional: No
Call by Reference: Yes
CANNOT_DISASSEMBLE_ALLOW_FILE -
Data type:Optional: No
Call by Reference: Yes
UNKNOWN_BLOCK -
Data type:Optional: No
Call by Reference: Yes
CANNOT_CREATE_COFILE - Error when generating cofile
Data type:Optional: No
Call by Reference: Yes
PATCH_FILE_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for OCS_PATCH_DISASSEMBLER 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_iv_patch | TYPE PAT03-PATCH, " | |||
| lv_cannot_determine_eps_parcel | TYPE PAT03, " | |||
| lv_cannot_build_allow_file_name | TYPE PAT03, " | |||
| lv_unknown_seq_type | TYPE PAT03, " | |||
| lv_patch_file_read_error | TYPE PAT03, " | |||
| lv_xml_transformation_error | TYPE PAT03, " | |||
| lv_missing_authorization | TYPE PAT03, " | |||
| lv_eps_file_too_old | TYPE PAT03, " | |||
| lv_iv_create_df | TYPE PAT05-CREATE_DF, " 'X' | |||
| lv_cannot_determine_data_files | TYPE PAT05, " | |||
| lv_iv_eps_dir | TYPE EPSF-EPSDIRNAM, " SPACE | |||
| lv_file_open_error | TYPE EPSF, " | |||
| lv_iv_full_parcel_name | TYPE EPSF-EPSPATH, " SPACE | |||
| lv_cannot_disassemble_r_data_file | TYPE EPSF, " | |||
| lv_cannot_disassemble_d_data_file | TYPE EPSF, " | |||
| lv_cannot_disassemble_allow_file | TYPE EPSF, " | |||
| lv_unknown_block | TYPE EPSF, " | |||
| lv_cannot_create_cofile | TYPE EPSF, " | |||
| lv_patch_file_error | TYPE EPSF. " |
|   CALL FUNCTION 'OCS_PATCH_DISASSEMBLER' " |
| EXPORTING | ||
| IV_PATCH | = lv_iv_patch | |
| IV_CREATE_DF | = lv_iv_create_df | |
| IV_EPS_DIR | = lv_iv_eps_dir | |
| IV_FULL_PARCEL_NAME | = lv_iv_full_parcel_name | |
| EXCEPTIONS | ||
| CANNOT_DETERMINE_EPS_PARCEL = 1 | ||
| CANNOT_BUILD_ALLOW_FILE_NAME = 10 | ||
| UNKNOWN_SEQ_TYPE = 11 | ||
| PATCH_FILE_READ_ERROR = 12 | ||
| XML_TRANSFORMATION_ERROR = 13 | ||
| MISSING_AUTHORIZATION = 14 | ||
| EPS_FILE_TOO_OLD = 15 | ||
| CANNOT_DETERMINE_DATA_FILES = 2 | ||
| FILE_OPEN_ERROR = 3 | ||
| CANNOT_DISASSEMBLE_R_DATA_FILE = 4 | ||
| CANNOT_DISASSEMBLE_D_DATA_FILE = 5 | ||
| CANNOT_DISASSEMBLE_ALLOW_FILE = 6 | ||
| UNKNOWN_BLOCK = 7 | ||
| CANNOT_CREATE_COFILE = 8 | ||
| PATCH_FILE_ERROR = 9 | ||
| . " OCS_PATCH_DISASSEMBLER | ||
ABAP code using 7.40 inline data declarations to call FM OCS_PATCH_DISASSEMBLER
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 PATCH FROM PAT03 INTO @DATA(ld_iv_patch). | ||||
| "SELECT single CREATE_DF FROM PAT05 INTO @DATA(ld_iv_create_df). | ||||
| DATA(ld_iv_create_df) | = 'X'. | |||
| "SELECT single EPSDIRNAM FROM EPSF INTO @DATA(ld_iv_eps_dir). | ||||
| DATA(ld_iv_eps_dir) | = ' '. | |||
| "SELECT single EPSPATH FROM EPSF INTO @DATA(ld_iv_full_parcel_name). | ||||
| DATA(ld_iv_full_parcel_name) | = ' '. | |||
Search for further information about these or an SAP related objects