SAP Function Modules

RPY_BOM_READ SAP Function module - Read Business Object Model of a Component







RPY_BOM_READ is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name RPY_BOM_READ into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SIBM
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM RPY_BOM_READ - RPY BOM READ





CALL FUNCTION 'RPY_BOM_READ' "Read Business Object Model of a Component
  EXPORTING
    comp_id =                   " df14l-fctr_id  Component whose bo-model is to be read
*   langu = SY-LANGU            " sy-langu      Language of the texts and docu to be read
*   with_objdef = 'X'           " rpybogf-flag  Requires attrib., meth., events, keys, interf.
*   with_form_docu = 'X'        " rpybogf-flag  Requires formatted documentation
*   with_sapscript_docu = 'X'   " rpybogf-flag  Requires SAPScript documentation
  IMPORTING
    error_occured =             " rpygsgf-err_exist  Tells whether an error has occured
    processing_status =         " rpygsgf-proc_stat  Tells what has been done
  TABLES
    bom_nodes =                 " rpybom140     Business Object Model
    bom_connections =           " rpyborl       Type of connections between the objects
    errors =                    " rpygser       Info-structure upon possible errors
    bo_type_info =              " rpybobs       Object spec (from table TOJTB)
*   bo_interfaces =             " rpyboif       ifparams required (i.e. with_verbs = 'X')
*   bo_keyfields =              " rpyboke       if verbs required (i.e. with_verbs = 'X')
*   bo_attributes =             " rpyboat       if verbs required (i.e. with_verbs = 'X')
*   bo_methods =                " rpybome       if verbs required (i.e. with_verbs = 'X')
*   bo_mparams =                " rpybomp       if parameters required (i.e. with_params = 'X')
    bo_mexceptions =            " rpyboex       if method exceptions required
*   bo_events =                 " rpyboev       if verbs required (i.e. with_verbs = 'X')
*   bo_evparams =               " rpyboep       if paramters required (i.e. with_params = 'X')
*   bo_formdocu =               " rpybofd       if formatted docu required (with_formdodu = 'X')
*   bo_sapscriptdocu =          " rpybosd       if SAPScript-docu required
  EXCEPTIONS
    NOT_FOUND = 1               "
    PERMISSION_ERROR = 2        "
    .  "  RPY_BOM_READ

ABAP code example for Function Module RPY_BOM_READ





The ABAP code below is a full code listing to execute function module RPY_BOM_READ including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_error_occured  TYPE RPYGSGF-ERR_EXIST ,
ld_processing_status  TYPE RPYGSGF-PROC_STAT ,
it_bom_nodes  TYPE STANDARD TABLE OF RPYBOM140,"TABLES PARAM
wa_bom_nodes  LIKE LINE OF it_bom_nodes ,
it_bom_connections  TYPE STANDARD TABLE OF RPYBORL,"TABLES PARAM
wa_bom_connections  LIKE LINE OF it_bom_connections ,
it_errors  TYPE STANDARD TABLE OF RPYGSER,"TABLES PARAM
wa_errors  LIKE LINE OF it_errors ,
it_bo_type_info  TYPE STANDARD TABLE OF RPYBOBS,"TABLES PARAM
wa_bo_type_info  LIKE LINE OF it_bo_type_info ,
it_bo_interfaces  TYPE STANDARD TABLE OF RPYBOIF,"TABLES PARAM
wa_bo_interfaces  LIKE LINE OF it_bo_interfaces ,
it_bo_keyfields  TYPE STANDARD TABLE OF RPYBOKE,"TABLES PARAM
wa_bo_keyfields  LIKE LINE OF it_bo_keyfields ,
it_bo_attributes  TYPE STANDARD TABLE OF RPYBOAT,"TABLES PARAM
wa_bo_attributes  LIKE LINE OF it_bo_attributes ,
it_bo_methods  TYPE STANDARD TABLE OF RPYBOME,"TABLES PARAM
wa_bo_methods  LIKE LINE OF it_bo_methods ,
it_bo_mparams  TYPE STANDARD TABLE OF RPYBOMP,"TABLES PARAM
wa_bo_mparams  LIKE LINE OF it_bo_mparams ,
it_bo_mexceptions  TYPE STANDARD TABLE OF RPYBOEX,"TABLES PARAM
wa_bo_mexceptions  LIKE LINE OF it_bo_mexceptions ,
it_bo_events  TYPE STANDARD TABLE OF RPYBOEV,"TABLES PARAM
wa_bo_events  LIKE LINE OF it_bo_events ,
it_bo_evparams  TYPE STANDARD TABLE OF RPYBOEP,"TABLES PARAM
wa_bo_evparams  LIKE LINE OF it_bo_evparams ,
it_bo_formdocu  TYPE STANDARD TABLE OF RPYBOFD,"TABLES PARAM
wa_bo_formdocu  LIKE LINE OF it_bo_formdocu ,
it_bo_sapscriptdocu  TYPE STANDARD TABLE OF RPYBOSD,"TABLES PARAM
wa_bo_sapscriptdocu  LIKE LINE OF it_bo_sapscriptdocu .


SELECT single FCTR_ID
FROM DF14L
INTO @DATA(ld_comp_id).

DATA(ld_langu) = 'Check type of data required'.

DATA(ld_with_objdef) = some text here

DATA(ld_with_form_docu) = some text here

DATA(ld_with_sapscript_docu) = some text here

"populate fields of struture and append to itab
append wa_bom_nodes to it_bom_nodes.

"populate fields of struture and append to itab
append wa_bom_connections to it_bom_connections.

"populate fields of struture and append to itab
append wa_errors to it_errors.

"populate fields of struture and append to itab
append wa_bo_type_info to it_bo_type_info.

"populate fields of struture and append to itab
append wa_bo_interfaces to it_bo_interfaces.

"populate fields of struture and append to itab
append wa_bo_keyfields to it_bo_keyfields.

"populate fields of struture and append to itab
append wa_bo_attributes to it_bo_attributes.

"populate fields of struture and append to itab
append wa_bo_methods to it_bo_methods.

"populate fields of struture and append to itab
append wa_bo_mparams to it_bo_mparams.

"populate fields of struture and append to itab
append wa_bo_mexceptions to it_bo_mexceptions.

"populate fields of struture and append to itab
append wa_bo_events to it_bo_events.

"populate fields of struture and append to itab
append wa_bo_evparams to it_bo_evparams.

"populate fields of struture and append to itab
append wa_bo_formdocu to it_bo_formdocu.

"populate fields of struture and append to itab
append wa_bo_sapscriptdocu to it_bo_sapscriptdocu. . CALL FUNCTION 'RPY_BOM_READ' EXPORTING comp_id = ld_comp_id * langu = ld_langu * with_objdef = ld_with_objdef * with_form_docu = ld_with_form_docu * with_sapscript_docu = ld_with_sapscript_docu IMPORTING error_occured = ld_error_occured processing_status = ld_processing_status TABLES bom_nodes = it_bom_nodes bom_connections = it_bom_connections errors = it_errors bo_type_info = it_bo_type_info * bo_interfaces = it_bo_interfaces * bo_keyfields = it_bo_keyfields * bo_attributes = it_bo_attributes * bo_methods = it_bo_methods * bo_mparams = it_bo_mparams bo_mexceptions = it_bo_mexceptions * bo_events = it_bo_events * bo_evparams = it_bo_evparams * bo_formdocu = it_bo_formdocu * bo_sapscriptdocu = it_bo_sapscriptdocu EXCEPTIONS NOT_FOUND = 1 PERMISSION_ERROR = 2 . " RPY_BOM_READ
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_error_occured  TYPE RPYGSGF-ERR_EXIST ,
ld_comp_id  TYPE DF14L-FCTR_ID ,
it_bom_nodes  TYPE STANDARD TABLE OF RPYBOM140 ,
wa_bom_nodes  LIKE LINE OF it_bom_nodes,
ld_processing_status  TYPE RPYGSGF-PROC_STAT ,
ld_langu  TYPE SY-LANGU ,
it_bom_connections  TYPE STANDARD TABLE OF RPYBORL ,
wa_bom_connections  LIKE LINE OF it_bom_connections,
ld_with_objdef  TYPE RPYBOGF-FLAG ,
it_errors  TYPE STANDARD TABLE OF RPYGSER ,
wa_errors  LIKE LINE OF it_errors,
ld_with_form_docu  TYPE RPYBOGF-FLAG ,
it_bo_type_info  TYPE STANDARD TABLE OF RPYBOBS ,
wa_bo_type_info  LIKE LINE OF it_bo_type_info,
it_bo_interfaces  TYPE STANDARD TABLE OF RPYBOIF ,
wa_bo_interfaces  LIKE LINE OF it_bo_interfaces,
ld_with_sapscript_docu  TYPE RPYBOGF-FLAG ,
it_bo_keyfields  TYPE STANDARD TABLE OF RPYBOKE ,
wa_bo_keyfields  LIKE LINE OF it_bo_keyfields,
it_bo_attributes  TYPE STANDARD TABLE OF RPYBOAT ,
wa_bo_attributes  LIKE LINE OF it_bo_attributes,
it_bo_methods  TYPE STANDARD TABLE OF RPYBOME ,
wa_bo_methods  LIKE LINE OF it_bo_methods,
it_bo_mparams  TYPE STANDARD TABLE OF RPYBOMP ,
wa_bo_mparams  LIKE LINE OF it_bo_mparams,
it_bo_mexceptions  TYPE STANDARD TABLE OF RPYBOEX ,
wa_bo_mexceptions  LIKE LINE OF it_bo_mexceptions,
it_bo_events  TYPE STANDARD TABLE OF RPYBOEV ,
wa_bo_events  LIKE LINE OF it_bo_events,
it_bo_evparams  TYPE STANDARD TABLE OF RPYBOEP ,
wa_bo_evparams  LIKE LINE OF it_bo_evparams,
it_bo_formdocu  TYPE STANDARD TABLE OF RPYBOFD ,
wa_bo_formdocu  LIKE LINE OF it_bo_formdocu,
it_bo_sapscriptdocu  TYPE STANDARD TABLE OF RPYBOSD ,
wa_bo_sapscriptdocu  LIKE LINE OF it_bo_sapscriptdocu.


SELECT single FCTR_ID
FROM DF14L
INTO ld_comp_id.


"populate fields of struture and append to itab
append wa_bom_nodes to it_bom_nodes.
ld_langu = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_bom_connections to it_bom_connections.

ld_with_objdef = some text here

"populate fields of struture and append to itab
append wa_errors to it_errors.

ld_with_form_docu = some text here

"populate fields of struture and append to itab
append wa_bo_type_info to it_bo_type_info.

"populate fields of struture and append to itab
append wa_bo_interfaces to it_bo_interfaces.

ld_with_sapscript_docu = some text here

"populate fields of struture and append to itab
append wa_bo_keyfields to it_bo_keyfields.

"populate fields of struture and append to itab
append wa_bo_attributes to it_bo_attributes.

"populate fields of struture and append to itab
append wa_bo_methods to it_bo_methods.

"populate fields of struture and append to itab
append wa_bo_mparams to it_bo_mparams.

"populate fields of struture and append to itab
append wa_bo_mexceptions to it_bo_mexceptions.

"populate fields of struture and append to itab
append wa_bo_events to it_bo_events.

"populate fields of struture and append to itab
append wa_bo_evparams to it_bo_evparams.

"populate fields of struture and append to itab
append wa_bo_formdocu to it_bo_formdocu.

"populate fields of struture and append to itab
append wa_bo_sapscriptdocu to it_bo_sapscriptdocu.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name RPY_BOM_READ or its description.