SAP CDESK_SRV_MBOM_READ_API Function Module for Read single MBOM API









CDESK_SRV_MBOM_READ_API is a standard cdesk srv mbom read api SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read single MBOM API 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 cdesk srv mbom read api FM, simply by entering the name CDESK_SRV_MBOM_READ_API into the relevant SAP transaction such as SE37 or SE38.

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



Function CDESK_SRV_MBOM_READ_API 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 'CDESK_SRV_MBOM_READ_API'"Read single MBOM API
EXPORTING
IV_MATERIAL = "Material No
* IV_PLANT = "Plant
* IV_BOM_USAGE = "BOM usage
* IV_ALTERNATIVE = "BOM alt
* IV_VALID_FROM = "Change No
* IV_VALID_TO = "Flag
* IV_CHANGE_NO = "Change No
* IV_REVISION_LEVEL = "Revision level

TABLES
* ET_STPO = "API Structure for BOM Item: All Fields
* ET_STKO = "API structure for BOM header: all fields
* ET_RETURN_MESSAGES = "Structure for Return Messages
* ET_RUNTIME = "Structure for Runtime
.



IMPORTING Parameters details for CDESK_SRV_MBOM_READ_API

IV_MATERIAL - Material No

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

IV_PLANT - Plant

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

IV_BOM_USAGE - BOM usage

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

IV_ALTERNATIVE - BOM alt

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

IV_VALID_FROM - Change No

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

IV_VALID_TO - Flag

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

IV_CHANGE_NO - Change No

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

IV_REVISION_LEVEL - Revision level

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

TABLES Parameters details for CDESK_SRV_MBOM_READ_API

ET_STPO - API Structure for BOM Item: All Fields

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

ET_STKO - API structure for BOM header: all fields

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

ET_RETURN_MESSAGES - Structure for Return Messages

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

ET_RUNTIME - Structure for Runtime

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

Copy and paste ABAP code example for CDESK_SRV_MBOM_READ_API 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:
lt_et_stpo  TYPE STANDARD TABLE OF CDESK_SRV_S_STPO_API03, "   
lv_iv_material  TYPE CSAP_MBOM-MATNR, "   
lt_et_stko  TYPE STANDARD TABLE OF STKO_API02, "   
lv_iv_plant  TYPE CSAP_MBOM-WERKS, "   
lv_iv_bom_usage  TYPE CSAP_MBOM-STLAN, "   
lt_et_return_messages  TYPE STANDARD TABLE OF CDESK_SRV_S_RETURN_MESSAGES, "   
lt_et_runtime  TYPE STANDARD TABLE OF CDESK_SRV_S_RUNTIME, "   
lv_iv_alternative  TYPE CSAP_MBOM-STLAL, "   
lv_iv_valid_from  TYPE CSAP_MBOM-DATUV, "   
lv_iv_valid_to  TYPE CSAP_MBOM-DATUB, "   
lv_iv_change_no  TYPE CSAP_MBOM-AENNR, "   
lv_iv_revision_level  TYPE CSAP_MBOM-REVLV. "   

  CALL FUNCTION 'CDESK_SRV_MBOM_READ_API'  "Read single MBOM API
    EXPORTING
         IV_MATERIAL = lv_iv_material
         IV_PLANT = lv_iv_plant
         IV_BOM_USAGE = lv_iv_bom_usage
         IV_ALTERNATIVE = lv_iv_alternative
         IV_VALID_FROM = lv_iv_valid_from
         IV_VALID_TO = lv_iv_valid_to
         IV_CHANGE_NO = lv_iv_change_no
         IV_REVISION_LEVEL = lv_iv_revision_level
    TABLES
         ET_STPO = lt_et_stpo
         ET_STKO = lt_et_stko
         ET_RETURN_MESSAGES = lt_et_return_messages
         ET_RUNTIME = lt_et_runtime
. " CDESK_SRV_MBOM_READ_API




ABAP code using 7.40 inline data declarations to call FM CDESK_SRV_MBOM_READ_API

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 MATNR FROM CSAP_MBOM INTO @DATA(ld_iv_material).
 
 
"SELECT single WERKS FROM CSAP_MBOM INTO @DATA(ld_iv_plant).
 
"SELECT single STLAN FROM CSAP_MBOM INTO @DATA(ld_iv_bom_usage).
 
 
 
"SELECT single STLAL FROM CSAP_MBOM INTO @DATA(ld_iv_alternative).
 
"SELECT single DATUV FROM CSAP_MBOM INTO @DATA(ld_iv_valid_from).
 
"SELECT single DATUB FROM CSAP_MBOM INTO @DATA(ld_iv_valid_to).
 
"SELECT single AENNR FROM CSAP_MBOM INTO @DATA(ld_iv_change_no).
 
"SELECT single REVLV FROM CSAP_MBOM INTO @DATA(ld_iv_revision_level).
 


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!