SAP Function Modules

RS_DETERMINE_OBJECT_SOURCE SAP Function module







RS_DETERMINE_OBJECT_SOURCE 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 RS_DETERMINE_OBJECT_SOURCE into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SEDA
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM RS_DETERMINE_OBJECT_SOURCE - RS DETERMINE OBJECT SOURCE





CALL FUNCTION 'RS_DETERMINE_OBJECT_SOURCE' "
  EXPORTING
    object_name =               "               Object Name
    object_type =               "               Object Type
*   object_incl =               "
*   object_key =                " smodi_src_key
*   mod_struc_significant = 'X'  "
  IMPORTING
    first_stmnt_beg =           " sy-index
    first_stmnt_end =           " sy-index
    first_stmnt_line =          " sy-index
    last_stmnt_line =           " sy-index
    last_stmnt_beg =            " sy-index
    last_stmnt_end =            " sy-index
    start_line =                " sy-index
    end_line =                  " sy-index
    deleted_anchor =            "
  TABLES
    object_source =             "
    complete_source =           "               Source of Include
    complete_object_source =    "
*   inf_tab =                   " edmodtab
*   smodilog_abap =             " smodilog
*   corr_tab =                  " sedi_korr_tab
  EXCEPTIONS
    OBJECT_NOT_FOUND = 1        "
    .  "  RS_DETERMINE_OBJECT_SOURCE

ABAP code example for Function Module RS_DETERMINE_OBJECT_SOURCE





The ABAP code below is a full code listing to execute function module RS_DETERMINE_OBJECT_SOURCE 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_first_stmnt_beg  TYPE SY-INDEX ,
ld_first_stmnt_end  TYPE SY-INDEX ,
ld_first_stmnt_line  TYPE SY-INDEX ,
ld_last_stmnt_line  TYPE SY-INDEX ,
ld_last_stmnt_beg  TYPE SY-INDEX ,
ld_last_stmnt_end  TYPE SY-INDEX ,
ld_start_line  TYPE SY-INDEX ,
ld_end_line  TYPE SY-INDEX ,
ld_deleted_anchor  TYPE STRING ,
it_object_source  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_object_source  LIKE LINE OF it_object_source ,
it_complete_source  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_complete_source  LIKE LINE OF it_complete_source ,
it_complete_object_source  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_complete_object_source  LIKE LINE OF it_complete_object_source ,
it_inf_tab  TYPE STANDARD TABLE OF EDMODTAB,"TABLES PARAM
wa_inf_tab  LIKE LINE OF it_inf_tab ,
it_smodilog_abap  TYPE STANDARD TABLE OF SMODILOG,"TABLES PARAM
wa_smodilog_abap  LIKE LINE OF it_smodilog_abap ,
it_corr_tab  TYPE STANDARD TABLE OF SEDI_KORR_TAB,"TABLES PARAM
wa_corr_tab  LIKE LINE OF it_corr_tab .

DATA(ld_object_name) = 'some text here'.
DATA(ld_object_type) = 'some text here'.
DATA(ld_object_incl) = 'some text here'.
DATA(ld_object_key) = 'Check type of data required'.
DATA(ld_mod_struc_significant) = 'some text here'.

"populate fields of struture and append to itab
append wa_object_source to it_object_source.

"populate fields of struture and append to itab
append wa_complete_source to it_complete_source.

"populate fields of struture and append to itab
append wa_complete_object_source to it_complete_object_source.

"populate fields of struture and append to itab
append wa_inf_tab to it_inf_tab.

"populate fields of struture and append to itab
append wa_smodilog_abap to it_smodilog_abap.

"populate fields of struture and append to itab
append wa_corr_tab to it_corr_tab. . CALL FUNCTION 'RS_DETERMINE_OBJECT_SOURCE' EXPORTING object_name = ld_object_name object_type = ld_object_type * object_incl = ld_object_incl * object_key = ld_object_key * mod_struc_significant = ld_mod_struc_significant IMPORTING first_stmnt_beg = ld_first_stmnt_beg first_stmnt_end = ld_first_stmnt_end first_stmnt_line = ld_first_stmnt_line last_stmnt_line = ld_last_stmnt_line last_stmnt_beg = ld_last_stmnt_beg last_stmnt_end = ld_last_stmnt_end start_line = ld_start_line end_line = ld_end_line deleted_anchor = ld_deleted_anchor TABLES object_source = it_object_source complete_source = it_complete_source complete_object_source = it_complete_object_source * inf_tab = it_inf_tab * smodilog_abap = it_smodilog_abap * corr_tab = it_corr_tab EXCEPTIONS OBJECT_NOT_FOUND = 1 . " RS_DETERMINE_OBJECT_SOURCE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_first_stmnt_beg  TYPE SY-INDEX ,
ld_object_name  TYPE STRING ,
it_object_source  TYPE STANDARD TABLE OF STRING ,
wa_object_source  LIKE LINE OF it_object_source,
ld_first_stmnt_end  TYPE SY-INDEX ,
ld_object_type  TYPE STRING ,
it_complete_source  TYPE STANDARD TABLE OF STRING ,
wa_complete_source  LIKE LINE OF it_complete_source,
ld_first_stmnt_line  TYPE SY-INDEX ,
ld_object_incl  TYPE STRING ,
it_complete_object_source  TYPE STANDARD TABLE OF STRING ,
wa_complete_object_source  LIKE LINE OF it_complete_object_source,
ld_last_stmnt_line  TYPE SY-INDEX ,
ld_object_key  TYPE SMODI_SRC_KEY ,
it_inf_tab  TYPE STANDARD TABLE OF EDMODTAB ,
wa_inf_tab  LIKE LINE OF it_inf_tab,
ld_last_stmnt_beg  TYPE SY-INDEX ,
ld_mod_struc_significant  TYPE STRING ,
it_smodilog_abap  TYPE STANDARD TABLE OF SMODILOG ,
wa_smodilog_abap  LIKE LINE OF it_smodilog_abap,
ld_last_stmnt_end  TYPE SY-INDEX ,
it_corr_tab  TYPE STANDARD TABLE OF SEDI_KORR_TAB ,
wa_corr_tab  LIKE LINE OF it_corr_tab,
ld_start_line  TYPE SY-INDEX ,
ld_end_line  TYPE SY-INDEX ,
ld_deleted_anchor  TYPE STRING .

ld_object_name = 'some text here'.

"populate fields of struture and append to itab
append wa_object_source to it_object_source.
ld_object_type = 'some text here'.

"populate fields of struture and append to itab
append wa_complete_source to it_complete_source.
ld_object_incl = 'some text here'.

"populate fields of struture and append to itab
append wa_complete_object_source to it_complete_object_source.
ld_object_key = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_inf_tab to it_inf_tab.
ld_mod_struc_significant = 'some text here'.

"populate fields of struture and append to itab
append wa_smodilog_abap to it_smodilog_abap.

"populate fields of struture and append to itab
append wa_corr_tab to it_corr_tab.

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 RS_DETERMINE_OBJECT_SOURCE or its description.