SAP Function Modules

WRF_POTB_READ_DATA SAP Function module







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

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


Pattern for FM WRF_POTB_READ_DATA - WRF POTB READ DATA





CALL FUNCTION 'WRF_POTB_READ_DATA' "
  EXPORTING
    is_control =                " wrf_potb_contr_rd_sty
*   it_key_id =                 " wrf_budg_pkey_tty
*   it_key_range =              " wrf_budg_key_id_rtty
*   is_key_data =               " wrf_budg_key_data_sty
*   is_po_data =                " wrf_potb_data_po_sty
  IMPORTING
    et_plan_pot =               " wrf_budg_potb_tty
    et_act_pot =                " wrf_budg_aotb_tty
    et_alloc_pot =              " wrf_budg_upd_alloc_tty
    et_ekko =                   " wrf_pohf_data_ekko_tty
    et_ekpo =                   " wrf_pohf_data_ekpo_tty
    et_eket =                   " wrf_pohf_data_eket_tty
    e_reference =               " data
    e_db_name =                 " wrf_budg_tabname
    et_inrat =                  " wrf_pcon_inrat_tty
  CHANGING
    ct_messages =               " wrf_pbas_msg_tty
  EXCEPTIONS
    ERROR = 1                   "
    NOT_FOUND = 2               "
    .  "  WRF_POTB_READ_DATA

ABAP code example for Function Module WRF_POTB_READ_DATA





The ABAP code below is a full code listing to execute function module WRF_POTB_READ_DATA 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_et_plan_pot  TYPE WRF_BUDG_POTB_TTY ,
ld_et_act_pot  TYPE WRF_BUDG_AOTB_TTY ,
ld_et_alloc_pot  TYPE WRF_BUDG_UPD_ALLOC_TTY ,
ld_et_ekko  TYPE WRF_POHF_DATA_EKKO_TTY ,
ld_et_ekpo  TYPE WRF_POHF_DATA_EKPO_TTY ,
ld_et_eket  TYPE WRF_POHF_DATA_EKET_TTY ,
ld_e_reference  TYPE DATA ,
ld_e_db_name  TYPE WRF_BUDG_TABNAME ,
ld_et_inrat  TYPE WRF_PCON_INRAT_TTY .

DATA(ld_ct_messages) = 'Check type of data required'.
DATA(ld_is_control) = 'Check type of data required'.
DATA(ld_it_key_id) = 'Check type of data required'.
DATA(ld_it_key_range) = 'Check type of data required'.
DATA(ld_is_key_data) = 'Check type of data required'.
DATA(ld_is_po_data) = 'Check type of data required'. . CALL FUNCTION 'WRF_POTB_READ_DATA' EXPORTING is_control = ld_is_control * it_key_id = ld_it_key_id * it_key_range = ld_it_key_range * is_key_data = ld_is_key_data * is_po_data = ld_is_po_data IMPORTING et_plan_pot = ld_et_plan_pot et_act_pot = ld_et_act_pot et_alloc_pot = ld_et_alloc_pot et_ekko = ld_et_ekko et_ekpo = ld_et_ekpo et_eket = ld_et_eket e_reference = ld_e_reference e_db_name = ld_e_db_name et_inrat = ld_et_inrat CHANGING ct_messages = ld_ct_messages EXCEPTIONS ERROR = 1 NOT_FOUND = 2 . " WRF_POTB_READ_DATA
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 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_ct_messages  TYPE WRF_PBAS_MSG_TTY ,
ld_et_plan_pot  TYPE WRF_BUDG_POTB_TTY ,
ld_is_control  TYPE WRF_POTB_CONTR_RD_STY ,
ld_et_act_pot  TYPE WRF_BUDG_AOTB_TTY ,
ld_it_key_id  TYPE WRF_BUDG_PKEY_TTY ,
ld_et_alloc_pot  TYPE WRF_BUDG_UPD_ALLOC_TTY ,
ld_it_key_range  TYPE WRF_BUDG_KEY_ID_RTTY ,
ld_et_ekko  TYPE WRF_POHF_DATA_EKKO_TTY ,
ld_is_key_data  TYPE WRF_BUDG_KEY_DATA_STY ,
ld_et_ekpo  TYPE WRF_POHF_DATA_EKPO_TTY ,
ld_is_po_data  TYPE WRF_POTB_DATA_PO_STY ,
ld_et_eket  TYPE WRF_POHF_DATA_EKET_TTY ,
ld_e_reference  TYPE DATA ,
ld_e_db_name  TYPE WRF_BUDG_TABNAME ,
ld_et_inrat  TYPE WRF_PCON_INRAT_TTY .

ld_ct_messages = 'Check type of data required'.
ld_is_control = 'Check type of data required'.
ld_it_key_id = 'Check type of data required'.
ld_it_key_range = 'Check type of data required'.
ld_is_key_data = 'Check type of data required'.
ld_is_po_data = '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 WRF_POTB_READ_DATA or its description.