SAP Function Modules

RH_ORG_OBJ_ADDRESS_TO_ZAV SAP Function module







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

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


Pattern for FM RH_ORG_OBJ_ADDRESS_TO_ZAV - RH ORG OBJ ADDRESS TO ZAV





CALL FUNCTION 'RH_ORG_OBJ_ADDRESS_TO_ZAV' "
  EXPORTING
*   plvar =                     " plvar         Plan Version
    otype =                     " otype         Object Type
    objid =                     "               Object ID
*   begda = SY-DATUM            " begdatum      Start Date
*   endda = '99991231'          " enddatum      End Date
*   istat = '1'                 " istat_d       Planning Status
*   langu = SY-LANGU            " sy-langu      Language
*   i1028_subty =               " subtyp        Subtype
    i1028 =                     " hri1028       Infotype 1028 Fields
*   i1032 =                     " hri1032       Infotype 1032 Fields
*   i1028_only =                " flag
*   buffer_mode = 'X'           " flag          General Flag
*   addrnum =                   " ad_addrnum    Address Number
  IMPORTING
    address =                   " addr1_data    Address transfer structure
    act_begda =                 " begdatum      Start Date
    act_endda =                 " enddatum      End Date
    new_addrnum =               " ad_addrnum    Address Number
* TABLES
*   iadtel =                    " adtel         Telephone number data transfer structure (centr.addr.admin)
*   iadfax =                    " adfax         Transfer structure for fax numbers (central address admin.)
*   iadsmtp =                   " adsmtp        SMTP addresses data transfer structure (centr. addr. admin.)
  EXCEPTIONS
    NO_ACTIVE_PLVAR = 1         "               Plan version not active
    OBJECT_NOT_FOUND = 2        "               Object Not Found
    ADDRESS_ERROR = 3           "
    .  "  RH_ORG_OBJ_ADDRESS_TO_ZAV

ABAP code example for Function Module RH_ORG_OBJ_ADDRESS_TO_ZAV





The ABAP code below is a full code listing to execute function module RH_ORG_OBJ_ADDRESS_TO_ZAV 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_address  TYPE ADDR1_DATA ,
ld_act_begda  TYPE BEGDATUM ,
ld_act_endda  TYPE ENDDATUM ,
ld_new_addrnum  TYPE AD_ADDRNUM ,
it_iadtel  TYPE STANDARD TABLE OF ADTEL,"TABLES PARAM
wa_iadtel  LIKE LINE OF it_iadtel ,
it_iadfax  TYPE STANDARD TABLE OF ADFAX,"TABLES PARAM
wa_iadfax  LIKE LINE OF it_iadfax ,
it_iadsmtp  TYPE STANDARD TABLE OF ADSMTP,"TABLES PARAM
wa_iadsmtp  LIKE LINE OF it_iadsmtp .

DATA(ld_plvar) = 'Check type of data required'.
DATA(ld_otype) = 'Check type of data required'.
DATA(ld_objid) = 'some text here'.
DATA(ld_begda) = 'Check type of data required'.
DATA(ld_endda) = 'Check type of data required'.
DATA(ld_istat) = 'Check type of data required'.
DATA(ld_langu) = 'Check type of data required'.
DATA(ld_i1028_subty) = 'Check type of data required'.
DATA(ld_i1028) = 'Check type of data required'.
DATA(ld_i1032) = 'Check type of data required'.
DATA(ld_i1028_only) = 'Check type of data required'.
DATA(ld_buffer_mode) = 'Check type of data required'.
DATA(ld_addrnum) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_iadtel to it_iadtel.

"populate fields of struture and append to itab
append wa_iadfax to it_iadfax.

"populate fields of struture and append to itab
append wa_iadsmtp to it_iadsmtp. . CALL FUNCTION 'RH_ORG_OBJ_ADDRESS_TO_ZAV' EXPORTING * plvar = ld_plvar otype = ld_otype objid = ld_objid * begda = ld_begda * endda = ld_endda * istat = ld_istat * langu = ld_langu * i1028_subty = ld_i1028_subty i1028 = ld_i1028 * i1032 = ld_i1032 * i1028_only = ld_i1028_only * buffer_mode = ld_buffer_mode * addrnum = ld_addrnum IMPORTING address = ld_address act_begda = ld_act_begda act_endda = ld_act_endda new_addrnum = ld_new_addrnum * TABLES * iadtel = it_iadtel * iadfax = it_iadfax * iadsmtp = it_iadsmtp EXCEPTIONS NO_ACTIVE_PLVAR = 1 OBJECT_NOT_FOUND = 2 ADDRESS_ERROR = 3 . " RH_ORG_OBJ_ADDRESS_TO_ZAV
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 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_address  TYPE ADDR1_DATA ,
ld_plvar  TYPE PLVAR ,
it_iadtel  TYPE STANDARD TABLE OF ADTEL ,
wa_iadtel  LIKE LINE OF it_iadtel,
ld_act_begda  TYPE BEGDATUM ,
ld_otype  TYPE OTYPE ,
it_iadfax  TYPE STANDARD TABLE OF ADFAX ,
wa_iadfax  LIKE LINE OF it_iadfax,
ld_act_endda  TYPE ENDDATUM ,
ld_objid  TYPE STRING ,
it_iadsmtp  TYPE STANDARD TABLE OF ADSMTP ,
wa_iadsmtp  LIKE LINE OF it_iadsmtp,
ld_new_addrnum  TYPE AD_ADDRNUM ,
ld_begda  TYPE BEGDATUM ,
ld_endda  TYPE ENDDATUM ,
ld_istat  TYPE ISTAT_D ,
ld_langu  TYPE SY-LANGU ,
ld_i1028_subty  TYPE SUBTYP ,
ld_i1028  TYPE HRI1028 ,
ld_i1032  TYPE HRI1032 ,
ld_i1028_only  TYPE FLAG ,
ld_buffer_mode  TYPE FLAG ,
ld_addrnum  TYPE AD_ADDRNUM .

ld_plvar = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_iadtel to it_iadtel.
ld_otype = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_iadfax to it_iadfax.
ld_objid = 'some text here'.

"populate fields of struture and append to itab
append wa_iadsmtp to it_iadsmtp.
ld_begda = 'Check type of data required'.
ld_endda = 'Check type of data required'.
ld_istat = 'Check type of data required'.
ld_langu = 'Check type of data required'.
ld_i1028_subty = 'Check type of data required'.
ld_i1028 = 'Check type of data required'.
ld_i1032 = 'Check type of data required'.
ld_i1028_only = 'Check type of data required'.
ld_buffer_mode = 'Check type of data required'.
ld_addrnum = '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 RH_ORG_OBJ_ADDRESS_TO_ZAV or its description.