SAP Function Modules

HR_EXPORT_DATA_TO_OTHER_SYS SAP Function module







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

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


Pattern for FM HR_EXPORT_DATA_TO_OTHER_SYS - HR EXPORT DATA TO OTHER SYS





CALL FUNCTION 'HR_EXPORT_DATA_TO_OTHER_SYS' "
  EXPORTING
    indxkey =                   " indx-srtfd
*   headline1 =                 " t512g-gtext
*   headline2 =                 " t512g-gtext
*   headline3 =                 " t512g-gtext
*   headline4 =                 " t512g-gtext
*   footnote1 =                 " t512g-gtext
*   footnote2 =                 " t512g-gtext
*   footnote3 =                 " t512g-gtext
*   release =                   " sy-saprl
*   system =                    " sy-sysid
* TABLES
*   datatab =                   " hrdatatab
*   fieldnames =                " hrfieldnam
*   hr_errortab =               " hrerror
*   daten1 =                    " hrdaten1
*   daten2 =                    " hrdaten2
*   daten3 =                    " hrdaten3
    .  "  HR_EXPORT_DATA_TO_OTHER_SYS

ABAP code example for Function Module HR_EXPORT_DATA_TO_OTHER_SYS





The ABAP code below is a full code listing to execute function module HR_EXPORT_DATA_TO_OTHER_SYS 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:
it_datatab  TYPE STANDARD TABLE OF HRDATATAB,"TABLES PARAM
wa_datatab  LIKE LINE OF it_datatab ,
it_fieldnames  TYPE STANDARD TABLE OF HRFIELDNAM,"TABLES PARAM
wa_fieldnames  LIKE LINE OF it_fieldnames ,
it_hr_errortab  TYPE STANDARD TABLE OF HRERROR,"TABLES PARAM
wa_hr_errortab  LIKE LINE OF it_hr_errortab ,
it_daten1  TYPE STANDARD TABLE OF HRDATEN1,"TABLES PARAM
wa_daten1  LIKE LINE OF it_daten1 ,
it_daten2  TYPE STANDARD TABLE OF HRDATEN2,"TABLES PARAM
wa_daten2  LIKE LINE OF it_daten2 ,
it_daten3  TYPE STANDARD TABLE OF HRDATEN3,"TABLES PARAM
wa_daten3  LIKE LINE OF it_daten3 .


SELECT single SRTFD
FROM INDX
INTO @DATA(ld_indxkey).


SELECT single GTEXT
FROM T512G
INTO @DATA(ld_headline1).


SELECT single GTEXT
FROM T512G
INTO @DATA(ld_headline2).


SELECT single GTEXT
FROM T512G
INTO @DATA(ld_headline3).


SELECT single GTEXT
FROM T512G
INTO @DATA(ld_headline4).


SELECT single GTEXT
FROM T512G
INTO @DATA(ld_footnote1).


SELECT single GTEXT
FROM T512G
INTO @DATA(ld_footnote2).


SELECT single GTEXT
FROM T512G
INTO @DATA(ld_footnote3).

DATA(ld_release) = 'some text here'.
DATA(ld_system) = 'some text here'.

"populate fields of struture and append to itab
append wa_datatab to it_datatab.

"populate fields of struture and append to itab
append wa_fieldnames to it_fieldnames.

"populate fields of struture and append to itab
append wa_hr_errortab to it_hr_errortab.

"populate fields of struture and append to itab
append wa_daten1 to it_daten1.

"populate fields of struture and append to itab
append wa_daten2 to it_daten2.

"populate fields of struture and append to itab
append wa_daten3 to it_daten3. . CALL FUNCTION 'HR_EXPORT_DATA_TO_OTHER_SYS' EXPORTING indxkey = ld_indxkey * headline1 = ld_headline1 * headline2 = ld_headline2 * headline3 = ld_headline3 * headline4 = ld_headline4 * footnote1 = ld_footnote1 * footnote2 = ld_footnote2 * footnote3 = ld_footnote3 * release = ld_release * system = ld_system * TABLES * datatab = it_datatab * fieldnames = it_fieldnames * hr_errortab = it_hr_errortab * daten1 = it_daten1 * daten2 = it_daten2 * daten3 = it_daten3 . " HR_EXPORT_DATA_TO_OTHER_SYS
IF SY-SUBRC EQ 0. "All OK 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_indxkey  TYPE INDX-SRTFD ,
it_datatab  TYPE STANDARD TABLE OF HRDATATAB ,
wa_datatab  LIKE LINE OF it_datatab,
ld_headline1  TYPE T512G-GTEXT ,
it_fieldnames  TYPE STANDARD TABLE OF HRFIELDNAM ,
wa_fieldnames  LIKE LINE OF it_fieldnames,
ld_headline2  TYPE T512G-GTEXT ,
it_hr_errortab  TYPE STANDARD TABLE OF HRERROR ,
wa_hr_errortab  LIKE LINE OF it_hr_errortab,
ld_headline3  TYPE T512G-GTEXT ,
it_daten1  TYPE STANDARD TABLE OF HRDATEN1 ,
wa_daten1  LIKE LINE OF it_daten1,
ld_headline4  TYPE T512G-GTEXT ,
it_daten2  TYPE STANDARD TABLE OF HRDATEN2 ,
wa_daten2  LIKE LINE OF it_daten2,
ld_footnote1  TYPE T512G-GTEXT ,
it_daten3  TYPE STANDARD TABLE OF HRDATEN3 ,
wa_daten3  LIKE LINE OF it_daten3,
ld_footnote2  TYPE T512G-GTEXT ,
ld_footnote3  TYPE T512G-GTEXT ,
ld_release  TYPE SY-SAPRL ,
ld_system  TYPE SY-SYSID .


SELECT single SRTFD
FROM INDX
INTO ld_indxkey.


"populate fields of struture and append to itab
append wa_datatab to it_datatab.

SELECT single GTEXT
FROM T512G
INTO ld_headline1.


"populate fields of struture and append to itab
append wa_fieldnames to it_fieldnames.

SELECT single GTEXT
FROM T512G
INTO ld_headline2.


"populate fields of struture and append to itab
append wa_hr_errortab to it_hr_errortab.

SELECT single GTEXT
FROM T512G
INTO ld_headline3.


"populate fields of struture and append to itab
append wa_daten1 to it_daten1.

SELECT single GTEXT
FROM T512G
INTO ld_headline4.


"populate fields of struture and append to itab
append wa_daten2 to it_daten2.

SELECT single GTEXT
FROM T512G
INTO ld_footnote1.


"populate fields of struture and append to itab
append wa_daten3 to it_daten3.

SELECT single GTEXT
FROM T512G
INTO ld_footnote2.


SELECT single GTEXT
FROM T512G
INTO ld_footnote3.

ld_release = 'some text here'.
ld_system = 'some text here'.

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