SAP RDM_BBY_WA_FOREIGN_KEYS_CHECK Function Module for Bonus Buy: Check existency of a BBY entity









RDM_BBY_WA_FOREIGN_KEYS_CHECK is a standard rdm bby wa foreign keys check SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Bonus Buy: Check existency of a BBY entity processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for rdm bby wa foreign keys check FM, simply by entering the name RDM_BBY_WA_FOREIGN_KEYS_CHECK into the relevant SAP transaction such as SE37 or SE38.

Function Group: RDM_BBY_CHECKS
Program Name: SAPLRDM_BBY_CHECKS
Main Program: SAPLRDM_BBY_CHECKS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RDM_BBY_WA_FOREIGN_KEYS_CHECK pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'RDM_BBY_WA_FOREIGN_KEYS_CHECK'"Bonus Buy: Check existency of a BBY entity
EXPORTING
* IS_WA_HEADER = "Bonus Buy: Work-Area Header
* I_COLLECT_MESSAGES = ' ' "Collect messages
* I_ROW = "Lines in parameter
* IT_WA_ORGITEMS = "Bonus Buy: Table with Organization Items
* IT_WA_ORGSITES = "Bonus Buy: Sites of Site Groups (Table Type)
* IT_WA_BUY = "Bonus Buy: 'Buy' Side (Table Type)
* IT_WA_GET = "Bonus Buy: 'Get' Side (Table Type)
* IT_WA_MATGRP_HDR = "Bonus Buy: Material Grouping Header (Table Type)
* IT_WA_MATGRP = "Bonus Buy: Table with Material Groupings
* IT_WA_REWARD = "Bonus Buy: Reward (Table Type)
* IV_RE_SERVICE = "New Input Values

IMPORTING
ET_RETURN = "Table Type for Structure BAPIRET2

EXCEPTIONS
SALES_ORG_NOT_FOUND = 1 SALES_UNIT_NOT_FOUND = 10 CURRENCY_NOT_FOUND = 11 DISTR_CHANNEL_NOT_FOUND = 2 DISTR_CHAIN_NOT_FOUND = 3 PLANT_NOT_FOUND = 4 PLANT_NOT_IN_DISTR_CHAIN = 5 PLANT_GROUP_NOT_FOUND = 6 PRICE_LIST_NOT_FOUND = 7 MATERIAL_NOT_FOUND = 8 MAT_GROUPING_NOT_FOUND = 9
.



IMPORTING Parameters details for RDM_BBY_WA_FOREIGN_KEYS_CHECK

IS_WA_HEADER - Bonus Buy: Work-Area Header

Data type: RDM_S_BBY_WA_HEADER
Optional: Yes
Call by Reference: Yes

I_COLLECT_MESSAGES - Collect messages

Data type: XFELD
Default: ' '
Optional: Yes
Call by Reference: Yes

I_ROW - Lines in parameter

Data type: BAPIRET2-ROW
Optional: Yes
Call by Reference: Yes

IT_WA_ORGITEMS - Bonus Buy: Table with Organization Items

Data type: RDM_T_BBY_WA_ORGITEMS
Optional: Yes
Call by Reference: Yes

IT_WA_ORGSITES - Bonus Buy: Sites of Site Groups (Table Type)

Data type: RDM_T_BBY_WA_ORGSITES
Optional: Yes
Call by Reference: Yes

IT_WA_BUY - Bonus Buy: 'Buy' Side (Table Type)

Data type: RDM_T_BBY_WA_BUY
Optional: Yes
Call by Reference: Yes

IT_WA_GET - Bonus Buy: 'Get' Side (Table Type)

Data type: RDM_T_BBY_WA_GET
Optional: Yes
Call by Reference: Yes

IT_WA_MATGRP_HDR - Bonus Buy: Material Grouping Header (Table Type)

Data type: RDM_T_BBY_WA_MATGRP_HDR
Optional: Yes
Call by Reference: Yes

IT_WA_MATGRP - Bonus Buy: Table with Material Groupings

Data type: RDM_T_BBY_WA_MATGRP
Optional: Yes
Call by Reference: Yes

IT_WA_REWARD - Bonus Buy: Reward (Table Type)

Data type: RDM_T_BBY_WA_REWARD
Optional: Yes
Call by Reference: Yes

IV_RE_SERVICE - New Input Values

Data type: XFELD
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for RDM_BBY_WA_FOREIGN_KEYS_CHECK

ET_RETURN - Table Type for Structure BAPIRET2

Data type: BAPIRET2_TTY
Optional: No
Call by Reference: Yes

EXCEPTIONS details

SALES_ORG_NOT_FOUND - Sales organisation not found

Data type:
Optional: No
Call by Reference: Yes

SALES_UNIT_NOT_FOUND - Sales unit of measure not found

Data type:
Optional: No
Call by Reference: Yes

CURRENCY_NOT_FOUND - Currency not found

Data type:
Optional: No
Call by Reference: Yes

DISTR_CHANNEL_NOT_FOUND - Distribution channel not found

Data type:
Optional: No
Call by Reference: Yes

DISTR_CHAIN_NOT_FOUND - Distribution chain not found

Data type:
Optional: No
Call by Reference: Yes

PLANT_NOT_FOUND - Plant not found

Data type:
Optional: No
Call by Reference: Yes

PLANT_NOT_IN_DISTR_CHAIN - Plant does not belong to distribution chain

Data type:
Optional: No
Call by Reference: Yes

PLANT_GROUP_NOT_FOUND - Plant group not found

Data type:
Optional: No
Call by Reference: Yes

PRICE_LIST_NOT_FOUND - Price list not found

Data type:
Optional: No
Call by Reference: Yes

MATERIAL_NOT_FOUND - Material not found

Data type:
Optional: No
Call by Reference: Yes

MAT_GROUPING_NOT_FOUND - Material grouping not found

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for RDM_BBY_WA_FOREIGN_KEYS_CHECK Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.

DATA:
lv_et_return  TYPE BAPIRET2_TTY, "   
lv_is_wa_header  TYPE RDM_S_BBY_WA_HEADER, "   
lv_sales_org_not_found  TYPE RDM_S_BBY_WA_HEADER, "   
lv_i_collect_messages  TYPE XFELD, "   ' '
lv_sales_unit_not_found  TYPE XFELD, "   
lv_i_row  TYPE BAPIRET2-ROW, "   
lv_currency_not_found  TYPE BAPIRET2, "   
lv_it_wa_orgitems  TYPE RDM_T_BBY_WA_ORGITEMS, "   
lv_distr_channel_not_found  TYPE RDM_T_BBY_WA_ORGITEMS, "   
lv_it_wa_orgsites  TYPE RDM_T_BBY_WA_ORGSITES, "   
lv_distr_chain_not_found  TYPE RDM_T_BBY_WA_ORGSITES, "   
lv_it_wa_buy  TYPE RDM_T_BBY_WA_BUY, "   
lv_plant_not_found  TYPE RDM_T_BBY_WA_BUY, "   
lv_it_wa_get  TYPE RDM_T_BBY_WA_GET, "   
lv_plant_not_in_distr_chain  TYPE RDM_T_BBY_WA_GET, "   
lv_it_wa_matgrp_hdr  TYPE RDM_T_BBY_WA_MATGRP_HDR, "   
lv_plant_group_not_found  TYPE RDM_T_BBY_WA_MATGRP_HDR, "   
lv_it_wa_matgrp  TYPE RDM_T_BBY_WA_MATGRP, "   
lv_price_list_not_found  TYPE RDM_T_BBY_WA_MATGRP, "   
lv_it_wa_reward  TYPE RDM_T_BBY_WA_REWARD, "   
lv_material_not_found  TYPE RDM_T_BBY_WA_REWARD, "   
lv_iv_re_service  TYPE XFELD, "   
lv_mat_grouping_not_found  TYPE XFELD. "   

  CALL FUNCTION 'RDM_BBY_WA_FOREIGN_KEYS_CHECK'  "Bonus Buy: Check existency of a BBY entity
    EXPORTING
         IS_WA_HEADER = lv_is_wa_header
         I_COLLECT_MESSAGES = lv_i_collect_messages
         I_ROW = lv_i_row
         IT_WA_ORGITEMS = lv_it_wa_orgitems
         IT_WA_ORGSITES = lv_it_wa_orgsites
         IT_WA_BUY = lv_it_wa_buy
         IT_WA_GET = lv_it_wa_get
         IT_WA_MATGRP_HDR = lv_it_wa_matgrp_hdr
         IT_WA_MATGRP = lv_it_wa_matgrp
         IT_WA_REWARD = lv_it_wa_reward
         IV_RE_SERVICE = lv_iv_re_service
    IMPORTING
         ET_RETURN = lv_et_return
    EXCEPTIONS
        SALES_ORG_NOT_FOUND = 1
        SALES_UNIT_NOT_FOUND = 10
        CURRENCY_NOT_FOUND = 11
        DISTR_CHANNEL_NOT_FOUND = 2
        DISTR_CHAIN_NOT_FOUND = 3
        PLANT_NOT_FOUND = 4
        PLANT_NOT_IN_DISTR_CHAIN = 5
        PLANT_GROUP_NOT_FOUND = 6
        PRICE_LIST_NOT_FOUND = 7
        MATERIAL_NOT_FOUND = 8
        MAT_GROUPING_NOT_FOUND = 9
. " RDM_BBY_WA_FOREIGN_KEYS_CHECK




ABAP code using 7.40 inline data declarations to call FM RDM_BBY_WA_FOREIGN_KEYS_CHECK

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
DATA(ld_i_collect_messages) = ' '.
 
 
"SELECT single ROW FROM BAPIRET2 INTO @DATA(ld_i_row).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!