SAP Function Modules

RSAR_COMSTRUCTURE_GET SAP Function module - Read a communication structure







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

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


Pattern for FM RSAR_COMSTRUCTURE_GET - RSAR COMSTRUCTURE GET





CALL FUNCTION 'RSAR_COMSTRUCTURE_GET' "Read a communication structure
  EXPORTING
    i_comstru =                 " rsa_comstru   Communication Structure
*   i_objvers = RS_C_OBJVERS-ACTIVE  " rs_objvers  Requested object version
*   i_type = RSAOS_C_TYPE-TRAN  " rsrequtype    Type of requested data
*   i_segment_id =              " rssegid       Segment ID
*   i_th_tlogo =                " rso_th_tlogo  BW Repository: List (Hash) of TLOGO Object and Type
  IMPORTING
    e_s_cs =                    " rsarc_s_rsks  Communication structure header
    e_t_csfield =               " rsarc_t_rsksfield  Fields of the communication structure
    e_t_csfieldtxt =            " rsarc_t_rsksfieldtxt  Fields of the communication structure with texts
    e_t_field =                 " rsarc_t_rsfield  Fields of communication structure in general format
  EXCEPTIONS
    COMSTRU_NOT_FOUND = 1       "               Communication structure does not exist
    NO_FIELDS_TO_COMSTRU = 2    "               No fields found for the communication structure
    INTERNAL_ERROR = 3          "               Reading from RSKS for Master Data
    COMSTRU_NOT_SUPPORTED_FOR_TYPE = 4  "       Only D, M and T types allowed
    COMSTRU_NOT_GENERATED = 5   "               Communication structure is not generated but a standard table
    .  "  RSAR_COMSTRUCTURE_GET

ABAP code example for Function Module RSAR_COMSTRUCTURE_GET





The ABAP code below is a full code listing to execute function module RSAR_COMSTRUCTURE_GET 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_e_s_cs  TYPE RSARC_S_RSKS ,
ld_e_t_csfield  TYPE RSARC_T_RSKSFIELD ,
ld_e_t_csfieldtxt  TYPE RSARC_T_RSKSFIELDTXT ,
ld_e_t_field  TYPE RSARC_T_RSFIELD .

DATA(ld_i_comstru) = 'Check type of data required'.
DATA(ld_i_objvers) = 'Check type of data required'.
DATA(ld_i_type) = 'Check type of data required'.
DATA(ld_i_segment_id) = 'Check type of data required'.
DATA(ld_i_th_tlogo) = 'Check type of data required'. . CALL FUNCTION 'RSAR_COMSTRUCTURE_GET' EXPORTING i_comstru = ld_i_comstru * i_objvers = ld_i_objvers * i_type = ld_i_type * i_segment_id = ld_i_segment_id * i_th_tlogo = ld_i_th_tlogo IMPORTING e_s_cs = ld_e_s_cs e_t_csfield = ld_e_t_csfield e_t_csfieldtxt = ld_e_t_csfieldtxt e_t_field = ld_e_t_field EXCEPTIONS COMSTRU_NOT_FOUND = 1 NO_FIELDS_TO_COMSTRU = 2 INTERNAL_ERROR = 3 COMSTRU_NOT_SUPPORTED_FOR_TYPE = 4 COMSTRU_NOT_GENERATED = 5 . " RSAR_COMSTRUCTURE_GET
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 ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "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_e_s_cs  TYPE RSARC_S_RSKS ,
ld_i_comstru  TYPE RSA_COMSTRU ,
ld_e_t_csfield  TYPE RSARC_T_RSKSFIELD ,
ld_i_objvers  TYPE RS_OBJVERS ,
ld_e_t_csfieldtxt  TYPE RSARC_T_RSKSFIELDTXT ,
ld_i_type  TYPE RSREQUTYPE ,
ld_e_t_field  TYPE RSARC_T_RSFIELD ,
ld_i_segment_id  TYPE RSSEGID ,
ld_i_th_tlogo  TYPE RSO_TH_TLOGO .

ld_i_comstru = 'Check type of data required'.
ld_i_objvers = 'Check type of data required'.
ld_i_type = 'Check type of data required'.
ld_i_segment_id = 'Check type of data required'.
ld_i_th_tlogo = 'Check type of data required'.

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