SAP Function Modules

OIJ_3WP_PEG_ITEMS SAP Function module - Peg Items







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

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


Pattern for FM OIJ_3WP_PEG_ITEMS - OIJ 3WP PEG ITEMS





CALL FUNCTION 'OIJ_3WP_PEG_ITEMS' "Peg Items
  EXPORTING
    iv_g_unit =                 " oij_unit      General unit of measure
*   iv_ps_flag = GC_FALSE       " oij_xflag_ps  Pegging to Stock
    it_marked_rows_dmd =        " lvc_t_row     ALV control: Table rows
    it_marked_rows_sup =        " lvc_t_row     ALV control: Table rows
    it_marked_rows_ds =         " lvc_t_row     ALV control: Table rows
  IMPORTING
    ev_refresh_ds =             " xfeld         Refresh Outtab for Distribution Schedule
    ev_refresh_dmd =            " xfeld         Refresh Outtab for Demand Items
    ev_refresh_sup =            " xfeld         Refresh Outtab for Supply Avails
  CHANGING
    xt_outtab_ds =              " roij_3wp_grid_t  Table type for ROIJ_3WP_GRID
    xt_outtab_dmd =             " roij_3wp_grid_t  Table type for ROIJ_3WP_GRID
    xt_outtab_sup =             " roij_3wp_grid_t  Table type for ROIJ_3WP_GRID
  EXCEPTIONS
    MULTIPLE_PEGGING = 1        "               m --> n relationship!
    PEGGING_ERROR = 2           "               Pegging Error
    .  "  OIJ_3WP_PEG_ITEMS

ABAP code example for Function Module OIJ_3WP_PEG_ITEMS





The ABAP code below is a full code listing to execute function module OIJ_3WP_PEG_ITEMS 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_ev_refresh_ds  TYPE XFELD ,
ld_ev_refresh_dmd  TYPE XFELD ,
ld_ev_refresh_sup  TYPE XFELD .

DATA(ld_xt_outtab_ds) = 'Check type of data required'.
DATA(ld_xt_outtab_dmd) = 'Check type of data required'.
DATA(ld_xt_outtab_sup) = 'Check type of data required'.
DATA(ld_iv_g_unit) = 'Check type of data required'.
DATA(ld_iv_ps_flag) = 'Check type of data required'.
DATA(ld_it_marked_rows_dmd) = 'Check type of data required'.
DATA(ld_it_marked_rows_sup) = 'Check type of data required'.
DATA(ld_it_marked_rows_ds) = 'Check type of data required'. . CALL FUNCTION 'OIJ_3WP_PEG_ITEMS' EXPORTING iv_g_unit = ld_iv_g_unit * iv_ps_flag = ld_iv_ps_flag it_marked_rows_dmd = ld_it_marked_rows_dmd it_marked_rows_sup = ld_it_marked_rows_sup it_marked_rows_ds = ld_it_marked_rows_ds IMPORTING ev_refresh_ds = ld_ev_refresh_ds ev_refresh_dmd = ld_ev_refresh_dmd ev_refresh_sup = ld_ev_refresh_sup CHANGING xt_outtab_ds = ld_xt_outtab_ds xt_outtab_dmd = ld_xt_outtab_dmd xt_outtab_sup = ld_xt_outtab_sup EXCEPTIONS MULTIPLE_PEGGING = 1 PEGGING_ERROR = 2 . " OIJ_3WP_PEG_ITEMS
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_xt_outtab_ds  TYPE ROIJ_3WP_GRID_T ,
ld_ev_refresh_ds  TYPE XFELD ,
ld_iv_g_unit  TYPE OIJ_UNIT ,
ld_xt_outtab_dmd  TYPE ROIJ_3WP_GRID_T ,
ld_ev_refresh_dmd  TYPE XFELD ,
ld_iv_ps_flag  TYPE OIJ_XFLAG_PS ,
ld_xt_outtab_sup  TYPE ROIJ_3WP_GRID_T ,
ld_ev_refresh_sup  TYPE XFELD ,
ld_it_marked_rows_dmd  TYPE LVC_T_ROW ,
ld_it_marked_rows_sup  TYPE LVC_T_ROW ,
ld_it_marked_rows_ds  TYPE LVC_T_ROW .

ld_xt_outtab_ds = 'Check type of data required'.
ld_iv_g_unit = 'Check type of data required'.
ld_xt_outtab_dmd = 'Check type of data required'.
ld_iv_ps_flag = 'Check type of data required'.
ld_xt_outtab_sup = 'Check type of data required'.
ld_it_marked_rows_dmd = 'Check type of data required'.
ld_it_marked_rows_sup = 'Check type of data required'.
ld_it_marked_rows_ds = '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 OIJ_3WP_PEG_ITEMS or its description.