SAP Function Modules

EHSWA_OBJART_FUNCTION SAP Function module







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

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


Pattern for FM EHSWA_OBJART_FUNCTION - EHSWA OBJART FUNCTION





CALL FUNCTION 'EHSWA_OBJART_FUNCTION' "
  EXPORTING
    i_action =                  " char10
*   i_bpdefinit_wa =            " ehswas_bpdefinitiot
*   i_ehswac_objart_wa =        " ehswac_objart
*   i_role =                    " tbz0-rltyp
*   i_recn =                    " ehsbe_uuid_32
  IMPORTING
    e_bpdefinit_wa =            " ehswas_bpdefinitiot
    e_adress =                  " addr1_val
    e_further_data =            " ehswas_obj_further_data
    e_accounting_objects =      " ehswas_account_objects
* CHANGING
*   x_ehswas_mdint =            " ehswas_mdint
  EXCEPTIONS
    ERROR = 1                   "
    .  "  EHSWA_OBJART_FUNCTION

ABAP code example for Function Module EHSWA_OBJART_FUNCTION





The ABAP code below is a full code listing to execute function module EHSWA_OBJART_FUNCTION 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_bpdefinit_wa  TYPE EHSWAS_BPDEFINITIOT ,
ld_e_adress  TYPE ADDR1_VAL ,
ld_e_further_data  TYPE EHSWAS_OBJ_FURTHER_DATA ,
ld_e_accounting_objects  TYPE EHSWAS_ACCOUNT_OBJECTS .

DATA(ld_x_ehswas_mdint) = 'Check type of data required'.
DATA(ld_i_action) = 'Check type of data required'.
DATA(ld_i_bpdefinit_wa) = 'Check type of data required'.
DATA(ld_i_ehswac_objart_wa) = 'Check type of data required'.

SELECT single RLTYP
FROM TBZ0
INTO @DATA(ld_i_role).

DATA(ld_i_recn) = 'Check type of data required'. . CALL FUNCTION 'EHSWA_OBJART_FUNCTION' EXPORTING i_action = ld_i_action * i_bpdefinit_wa = ld_i_bpdefinit_wa * i_ehswac_objart_wa = ld_i_ehswac_objart_wa * i_role = ld_i_role * i_recn = ld_i_recn IMPORTING e_bpdefinit_wa = ld_e_bpdefinit_wa e_adress = ld_e_adress e_further_data = ld_e_further_data e_accounting_objects = ld_e_accounting_objects * CHANGING * x_ehswas_mdint = ld_x_ehswas_mdint EXCEPTIONS ERROR = 1 . " EHSWA_OBJART_FUNCTION
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_x_ehswas_mdint  TYPE EHSWAS_MDINT ,
ld_e_bpdefinit_wa  TYPE EHSWAS_BPDEFINITIOT ,
ld_i_action  TYPE CHAR10 ,
ld_e_adress  TYPE ADDR1_VAL ,
ld_i_bpdefinit_wa  TYPE EHSWAS_BPDEFINITIOT ,
ld_e_further_data  TYPE EHSWAS_OBJ_FURTHER_DATA ,
ld_i_ehswac_objart_wa  TYPE EHSWAC_OBJART ,
ld_e_accounting_objects  TYPE EHSWAS_ACCOUNT_OBJECTS ,
ld_i_role  TYPE TBZ0-RLTYP ,
ld_i_recn  TYPE EHSBE_UUID_32 .

ld_x_ehswas_mdint = 'Check type of data required'.
ld_i_action = 'Check type of data required'.
ld_i_bpdefinit_wa = 'Check type of data required'.
ld_i_ehswac_objart_wa = 'Check type of data required'.

SELECT single RLTYP
FROM TBZ0
INTO ld_i_role.

ld_i_recn = '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 EHSWA_OBJART_FUNCTION or its description.