SAP Function Modules

SEL_METH_ALE_CUST_DAT_TRSP SAP Function module







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

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


Pattern for FM SEL_METH_ALE_CUST_DAT_TRSP - SEL METH ALE CUST DAT TRSP





CALL FUNCTION 'SEL_METH_ALE_CUST_DAT_TRSP' "
  EXPORTING
    objekttyp =                 " tbd72-objekttyp
    objektname =                " tbd72-objektname
    objectkey =                 " tbd72-objectkey
*   korr_rel = 'X'              "
  IMPORTING
    lines =                     " sy-index
  TABLES
    i_e071k =                   " e071k
    text_line =                 " tline
    i_user =                    " rsnamrange
    i_date =                    " rsdatrange
    i_time =                    " bdtimrange
    i_korr =                    " bdtrrange
    .  "  SEL_METH_ALE_CUST_DAT_TRSP

ABAP code example for Function Module SEL_METH_ALE_CUST_DAT_TRSP





The ABAP code below is a full code listing to execute function module SEL_METH_ALE_CUST_DAT_TRSP 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_lines  TYPE SY-INDEX ,
it_i_e071k  TYPE STANDARD TABLE OF E071K,"TABLES PARAM
wa_i_e071k  LIKE LINE OF it_i_e071k ,
it_text_line  TYPE STANDARD TABLE OF TLINE,"TABLES PARAM
wa_text_line  LIKE LINE OF it_text_line ,
it_i_user  TYPE STANDARD TABLE OF RSNAMRANGE,"TABLES PARAM
wa_i_user  LIKE LINE OF it_i_user ,
it_i_date  TYPE STANDARD TABLE OF RSDATRANGE,"TABLES PARAM
wa_i_date  LIKE LINE OF it_i_date ,
it_i_time  TYPE STANDARD TABLE OF BDTIMRANGE,"TABLES PARAM
wa_i_time  LIKE LINE OF it_i_time ,
it_i_korr  TYPE STANDARD TABLE OF BDTRRANGE,"TABLES PARAM
wa_i_korr  LIKE LINE OF it_i_korr .


SELECT single OBJEKTTYP
FROM TBD72
INTO @DATA(ld_objekttyp).


SELECT single OBJEKTNAME
FROM TBD72
INTO @DATA(ld_objektname).


SELECT single OBJECTKEY
FROM TBD72
INTO @DATA(ld_objectkey).

DATA(ld_korr_rel) = 'some text here'.

"populate fields of struture and append to itab
append wa_i_e071k to it_i_e071k.

"populate fields of struture and append to itab
append wa_text_line to it_text_line.

"populate fields of struture and append to itab
append wa_i_user to it_i_user.

"populate fields of struture and append to itab
append wa_i_date to it_i_date.

"populate fields of struture and append to itab
append wa_i_time to it_i_time.

"populate fields of struture and append to itab
append wa_i_korr to it_i_korr. . CALL FUNCTION 'SEL_METH_ALE_CUST_DAT_TRSP' EXPORTING objekttyp = ld_objekttyp objektname = ld_objektname objectkey = ld_objectkey * korr_rel = ld_korr_rel IMPORTING lines = ld_lines TABLES i_e071k = it_i_e071k text_line = it_text_line i_user = it_i_user i_date = it_i_date i_time = it_i_time i_korr = it_i_korr . " SEL_METH_ALE_CUST_DAT_TRSP
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_lines  TYPE SY-INDEX ,
ld_objekttyp  TYPE TBD72-OBJEKTTYP ,
it_i_e071k  TYPE STANDARD TABLE OF E071K ,
wa_i_e071k  LIKE LINE OF it_i_e071k,
ld_objektname  TYPE TBD72-OBJEKTNAME ,
it_text_line  TYPE STANDARD TABLE OF TLINE ,
wa_text_line  LIKE LINE OF it_text_line,
ld_objectkey  TYPE TBD72-OBJECTKEY ,
it_i_user  TYPE STANDARD TABLE OF RSNAMRANGE ,
wa_i_user  LIKE LINE OF it_i_user,
ld_korr_rel  TYPE STRING ,
it_i_date  TYPE STANDARD TABLE OF RSDATRANGE ,
wa_i_date  LIKE LINE OF it_i_date,
it_i_time  TYPE STANDARD TABLE OF BDTIMRANGE ,
wa_i_time  LIKE LINE OF it_i_time,
it_i_korr  TYPE STANDARD TABLE OF BDTRRANGE ,
wa_i_korr  LIKE LINE OF it_i_korr.


SELECT single OBJEKTTYP
FROM TBD72
INTO ld_objekttyp.


"populate fields of struture and append to itab
append wa_i_e071k to it_i_e071k.

SELECT single OBJEKTNAME
FROM TBD72
INTO ld_objektname.


"populate fields of struture and append to itab
append wa_text_line to it_text_line.

SELECT single OBJECTKEY
FROM TBD72
INTO ld_objectkey.


"populate fields of struture and append to itab
append wa_i_user to it_i_user.
ld_korr_rel = 'some text here'.

"populate fields of struture and append to itab
append wa_i_date to it_i_date.

"populate fields of struture and append to itab
append wa_i_time to it_i_time.

"populate fields of struture and append to itab
append wa_i_korr to it_i_korr.

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