SAP Function Modules

FRE_SEND_TSD_FOR_SITE SAP Function module - Selection and Transfer of Time Series Data







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

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


Pattern for FM FRE_SEND_TSD_FOR_SITE - FRE SEND TSD FOR SITE





CALL FUNCTION 'FRE_SEND_TSD_FOR_SITE' "Selection and Transfer of Time Series Data
  EXPORTING
*   i_werks =                   " marc-werks    Plant
*   i_tzone =                   " fre_db_site-tzone  Timezone for site
    i_trsto =                   " xfeld         Transfer stock information
    i_stock_gen =               " xfeld         Read stock general
    i_trcon =                   " xfeld         Transfer consumption data
    i_con_init =                " xfeld         Initial load for consumption data
    i_sender =                  " logsystem     Logical system
    i_refid =                   " fre_bif_id    Identifier
    i_send_opt =                " fre_send_option  Options for Transmissions of Orders to F&R
  TABLES
    t_matnr =                   " range_c18     Structure of a Range Table for an 18 Character Field
    t_sttyp =                   " fre_ts_rel_st  relevant stock types for F&R Transfer
    t_art_site =                " fre_db_art_site  Relevant article/site-combinations for F&R
    t_site_tz_loctype =         " fre_werks_tz_loctype_sty  Structure for sites with time zone and location type
    t_art_site_org =            " fre_db_art_site  Relevant article/site-combinations for F&R
  EXCEPTIONS
    LOCK_ON_DB_ART_SITE = 1     "               Records for site in table FRE_DB_ART_SITE already locked
    .  "  FRE_SEND_TSD_FOR_SITE

ABAP code example for Function Module FRE_SEND_TSD_FOR_SITE





The ABAP code below is a full code listing to execute function module FRE_SEND_TSD_FOR_SITE 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_t_matnr  TYPE STANDARD TABLE OF RANGE_C18,"TABLES PARAM
wa_t_matnr  LIKE LINE OF it_t_matnr ,
it_t_sttyp  TYPE STANDARD TABLE OF FRE_TS_REL_ST,"TABLES PARAM
wa_t_sttyp  LIKE LINE OF it_t_sttyp ,
it_t_art_site  TYPE STANDARD TABLE OF FRE_DB_ART_SITE,"TABLES PARAM
wa_t_art_site  LIKE LINE OF it_t_art_site ,
it_t_site_tz_loctype  TYPE STANDARD TABLE OF FRE_WERKS_TZ_LOCTYPE_STY,"TABLES PARAM
wa_t_site_tz_loctype  LIKE LINE OF it_t_site_tz_loctype ,
it_t_art_site_org  TYPE STANDARD TABLE OF FRE_DB_ART_SITE,"TABLES PARAM
wa_t_art_site_org  LIKE LINE OF it_t_art_site_org .


SELECT single WERKS
FROM MARC
INTO @DATA(ld_i_werks).


SELECT single TZONE
FROM FRE_DB_SITE
INTO @DATA(ld_i_tzone).

DATA(ld_i_trsto) = 'Check type of data required'.
DATA(ld_i_stock_gen) = 'Check type of data required'.
DATA(ld_i_trcon) = 'Check type of data required'.
DATA(ld_i_con_init) = 'Check type of data required'.
DATA(ld_i_sender) = '20210129'.
DATA(ld_i_refid) = 'some text here'.
DATA(ld_i_send_opt) = 'some text here'.

"populate fields of struture and append to itab
append wa_t_matnr to it_t_matnr.

"populate fields of struture and append to itab
append wa_t_sttyp to it_t_sttyp.

"populate fields of struture and append to itab
append wa_t_art_site to it_t_art_site.

"populate fields of struture and append to itab
append wa_t_site_tz_loctype to it_t_site_tz_loctype.

"populate fields of struture and append to itab
append wa_t_art_site_org to it_t_art_site_org. . CALL FUNCTION 'FRE_SEND_TSD_FOR_SITE' EXPORTING * i_werks = ld_i_werks * i_tzone = ld_i_tzone i_trsto = ld_i_trsto i_stock_gen = ld_i_stock_gen i_trcon = ld_i_trcon i_con_init = ld_i_con_init i_sender = ld_i_sender i_refid = ld_i_refid i_send_opt = ld_i_send_opt TABLES t_matnr = it_t_matnr t_sttyp = it_t_sttyp t_art_site = it_t_art_site t_site_tz_loctype = it_t_site_tz_loctype t_art_site_org = it_t_art_site_org EXCEPTIONS LOCK_ON_DB_ART_SITE = 1 . " FRE_SEND_TSD_FOR_SITE
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_i_werks  TYPE MARC-WERKS ,
it_t_matnr  TYPE STANDARD TABLE OF RANGE_C18 ,
wa_t_matnr  LIKE LINE OF it_t_matnr,
ld_i_tzone  TYPE FRE_DB_SITE-TZONE ,
it_t_sttyp  TYPE STANDARD TABLE OF FRE_TS_REL_ST ,
wa_t_sttyp  LIKE LINE OF it_t_sttyp,
ld_i_trsto  TYPE XFELD ,
it_t_art_site  TYPE STANDARD TABLE OF FRE_DB_ART_SITE ,
wa_t_art_site  LIKE LINE OF it_t_art_site,
ld_i_stock_gen  TYPE XFELD ,
it_t_site_tz_loctype  TYPE STANDARD TABLE OF FRE_WERKS_TZ_LOCTYPE_STY ,
wa_t_site_tz_loctype  LIKE LINE OF it_t_site_tz_loctype,
ld_i_trcon  TYPE XFELD ,
it_t_art_site_org  TYPE STANDARD TABLE OF FRE_DB_ART_SITE ,
wa_t_art_site_org  LIKE LINE OF it_t_art_site_org,
ld_i_con_init  TYPE XFELD ,
ld_i_sender  TYPE LOGSYSTEM ,
ld_i_refid  TYPE FRE_BIF_ID ,
ld_i_send_opt  TYPE FRE_SEND_OPTION .


SELECT single WERKS
FROM MARC
INTO ld_i_werks.


"populate fields of struture and append to itab
append wa_t_matnr to it_t_matnr.

SELECT single TZONE
FROM FRE_DB_SITE
INTO ld_i_tzone.


"populate fields of struture and append to itab
append wa_t_sttyp to it_t_sttyp.
ld_i_trsto = 'some text here'.

"populate fields of struture and append to itab
append wa_t_art_site to it_t_art_site.
ld_i_stock_gen = 'some text here'.

"populate fields of struture and append to itab
append wa_t_site_tz_loctype to it_t_site_tz_loctype.
ld_i_trcon = 'some text here'.

"populate fields of struture and append to itab
append wa_t_art_site_org to it_t_art_site_org.
ld_i_con_init = 'some text here'.
ld_i_sender = '20210129'.
ld_i_refid = 'some text here'.
ld_i_send_opt = 'some text here'.

SAP Documentation for FM FRE_SEND_TSD_FOR_SITE


Execution of Forecasting and Replenishment in F R requires input from external systems. A part of these input are stock information and ...See here for full SAP fm documentation





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