SAP COCKPIT_GENERATE_FROM_DB Function Module for NOTRANSL: ProcessOperatorCockpit: Erzeugung der Laufzeitobjekte
COCKPIT_GENERATE_FROM_DB is a standard cockpit generate from db SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: ProcessOperatorCockpit: Erzeugung der Laufzeitobjekte 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 cockpit generate from db FM, simply by entering the name COCKPIT_GENERATE_FROM_DB into the relevant SAP transaction such as SE37 or SE38.
Function Group: POC_ENTRY
Program Name: SAPLPOC_ENTRY
Main Program: SAPLPOC_ENTRY
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function COCKPIT_GENERATE_FROM_DB 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 'COCKPIT_GENERATE_FROM_DB'"NOTRANSL: ProcessOperatorCockpit: Erzeugung der Laufzeitobjekte.
EXPORTING
COCKPIT_ID = "
PLANT = "Plant
* APPL_KEY = 'PI' "Application key
* SYNTAX_CHECK_ONLY = "
* SIMULATION = "Indicator: Simulation Mode
IMPORTING
O_PI_DOCUMENT = "
EXCEPTIONS
NOT_FOUND = 1 FAILED = 2
IMPORTING Parameters details for COCKPIT_GENERATE_FROM_DB
COCKPIT_ID -
Data type: CO_POCIDOptional: No
Call by Reference: Yes
PLANT - Plant
Data type: WERKS_DOptional: No
Call by Reference: Yes
APPL_KEY - Application key
Data type: CO_APPLKEYDefault: 'PI'
Optional: Yes
Call by Reference: Yes
SYNTAX_CHECK_ONLY -
Data type: FLAGOptional: Yes
Call by Reference: Yes
SIMULATION - Indicator: Simulation Mode
Data type: FLAGOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for COCKPIT_GENERATE_FROM_DB
O_PI_DOCUMENT -
Data type: CL_PI_DOCUMENT_POCOptional: No
Call by Reference: Yes
EXCEPTIONS details
NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
FAILED - Generation Failed
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for COCKPIT_GENERATE_FROM_DB 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_not_found | TYPE STRING, " | |||
lv_cockpit_id | TYPE CO_POCID, " | |||
lv_o_pi_document | TYPE CL_PI_DOCUMENT_POC, " | |||
lv_plant | TYPE WERKS_D, " | |||
lv_failed | TYPE WERKS_D, " | |||
lv_appl_key | TYPE CO_APPLKEY, " 'PI' | |||
lv_syntax_check_only | TYPE FLAG, " | |||
lv_simulation | TYPE FLAG. " |
  CALL FUNCTION 'COCKPIT_GENERATE_FROM_DB' "NOTRANSL: ProcessOperatorCockpit: Erzeugung der Laufzeitobjekte |
EXPORTING | ||
COCKPIT_ID | = lv_cockpit_id | |
PLANT | = lv_plant | |
APPL_KEY | = lv_appl_key | |
SYNTAX_CHECK_ONLY | = lv_syntax_check_only | |
SIMULATION | = lv_simulation | |
IMPORTING | ||
O_PI_DOCUMENT | = lv_o_pi_document | |
EXCEPTIONS | ||
NOT_FOUND = 1 | ||
FAILED = 2 | ||
. " COCKPIT_GENERATE_FROM_DB |
ABAP code using 7.40 inline data declarations to call FM COCKPIT_GENERATE_FROM_DB
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_appl_key) | = 'PI'. | |||
Search for further information about these or an SAP related objects