SAP Reports / Programs | Logistics - General | Logistics Basic Data | Retail Demand Management(LO-MD-RDM) SAP LO

RDM_BBY_COPY_02 SAP ABAP Report - Bonus Buy: Copy Bonus Buys







RDM_BBY_COPY_02 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter RDM_BBY_COPY_02 into the relevant SAP transactions such as SE38 or SE80


Transaction Code(s):

Below is a list of transaction codes which are relevant to this SAP report

RDMBBYCOP2 - Copy Bonus Buy


ABAP code to call this SAP report using the submit statement

This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.






SUBMIT RDM_BBY_COPY_02. "Basic submit
SUBMIT RDM_BBY_COPY_02 AND RETURN. "Return to original report after report execution complete
SUBMIT RDM_BBY_COPY_02 VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: PA_AAB_N = Promotion Valid From
Selection Text: PA_AAB_R = Promotion Valid From
Selection Text: PA_ABI_N = Promotion Valid To
Selection Text: PA_ABI_R = Promotion Valid To
Selection Text: PA_AKT_N = D .
Selection Text: PA_AKT_R = D .
Selection Text: PA_BBY_N = D .
Selection Text: PA_BBY_R = D .
Selection Text: PA_DAB_N = D .
Selection Text: PA_DAB_R = D .
Selection Text: PA_DBI_N = D .
Selection Text: PA_DBI_R = D .
Title: Bonus Buy: Copy Bonus Buys
Text Symbol: 001 = Copy from
Text Symbol: 002 = Confirmation
Text Symbol: 003 = No bonus buy number entered. Shall number be internally determined? Otherwise abortion.


INCLUDES used within this REPORT RDM_BBY_COPY_02

No INCLUDES are used within this REPORT code!


TABLES used within REPORT and the associated SELECT statement:





No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

RDM_BBY_DB_KONBBYH_READ CALL FUNCTION 'RDM_BBY_DB_KONBBYH_READ' EXPORTING i_bbynr = i_bbynr_ref i_buffer_refresh = l_buffer_refresh i_buffer_read = lr_int_services->x i_buffer_store = lr_int_services->x IMPORTING es_db_konbbyh = ls_konbbyh_ref EXCEPTIONS db_header_not_found = 1 OTHERS = 2.

RDMT_BBY_PROF_SINGLE_READ CALL FUNCTION 'RDMT_BBY_PROF_SINGLE_READ' EXPORTING i_bprof = ls_konbbyh_ref-bprof IMPORTING es_bby_prof = ls_bby_bprof EXCEPTIONS bby_profile_not_found = 1 OTHERS = 2.

RDM_BBY_PLGR_TO_PLANTS_CONVERT * CALL FUNCTION 'RDM_BBY_PLGR_TO_PLANTS_CONVERT' * CHANGING * xt_wa_orgitems = gt_wa_orgitems * xt_wa_orgsites = gt_wa_orgsites.

RDM_BBY_ORGITEMS_DATE_EXCHANGE * CALL FUNCTION 'RDM_BBY_ORGITEMS_DATE_EXCHANGE' * EXPORTING * i_datab = gs_wa_header-datab * i_datbi = gs_wa_header-datbi * CHANGING * xt_wa_orgitems = gt_wa_orgitems.

RDM_BBY_WA_PROMO_CONS_PRECHECK CALL FUNCTION 'RDM_BBY_WA_PROMO_CONS_PRECHECK' EXPORTING is_wa_header = gs_wa_header it_wa_orgitems = gt_wa_orgitems it_wa_orgsites = gt_wa_orgsites i_collect_messages = c_yes IMPORTING et_return = lt_return EXCEPTIONS OTHERS = 0.

RDM_BBY_ORGITEMS_DATE_EXCHANGE CALL FUNCTION 'RDM_BBY_ORGITEMS_DATE_EXCHANGE' EXPORTING i_datab = gs_wa_header-datab i_datbi = gs_wa_header-datbi CHANGING xt_wa_orgitems = gt_wa_orgitems.

RDM_BBY_WA_ORGSITES_DB_ALIGN CALL FUNCTION 'RDM_BBY_WA_ORGSITES_DB_ALIGN' EXPORTING is_wa_header = gs_wa_header it_wa_orgitems = gt_wa_orgitems * IMPORTING * e_orgsites_adjusted = l_orgsites_adjusted CHANGING xt_wa_orgsites = gt_wa_orgsites EXCEPTIONS OTHERS = 99.

RDM_BBY_BBYNR_EXCHANGE CALL FUNCTION 'RDM_BBY_BBYNR_EXCHANGE' EXPORTING i_bbynr_new = pa_bby_n CHANGING xs_wa_header = gs_wa_header xt_wa_buy = gt_wa_buy xt_wa_get = gt_wa_get xt_wa_reward = gt_wa_reward xt_wa_scales = gt_wa_scales xt_wa_matgrp = gt_wa_matgrp xt_wa_orgitems = gt_wa_orgitems xt_wa_orgsites = gt_wa_orgsites xt_wa_texts = gt_wa_texts.

RDM_BBY_BBYNR_EXCHANGE CALL FUNCTION 'RDM_BBY_BBYNR_EXCHANGE' EXPORTING i_bbynr_new = l_bbynr_new CHANGING xs_wa_header = gs_wa_header xt_wa_buy = gt_wa_buy xt_wa_get = gt_wa_get xt_wa_reward = gt_wa_reward xt_wa_scales = gt_wa_scales xt_wa_matgrp = gt_wa_matgrp xt_wa_orgitems = gt_wa_orgitems xt_wa_orgsites = gt_wa_orgsites xt_wa_texts = gt_wa_texts.

RDM_BBY_DB_LOAD CALL FUNCTION 'RDM_BBY_DB_LOAD' EXPORTING i_bbynr = i_bbynr IMPORTING es_wa_header = es_wa_header et_wa_buy = et_wa_buy et_wa_get = et_wa_get et_wa_reward = et_wa_reward et_wa_scales = et_wa_scales et_wa_matgrp = et_wa_matgrp et_wa_orgitems = et_wa_orgitems et_wa_orgsites = et_wa_orgsites et_wa_texts = et_wa_texts EXCEPTIONS db_header_not_found = 1 other_error = 2 OTHERS = 3.

RDM_BBY_DB_SAVE CALL FUNCTION 'RDM_BBY_DB_SAVE' EXPORTING i_trtyp = c_trtyp_create i_buffer_read = c_yes i_lock_type = '2' "Remove lock after DB update i_check_authority = c_yes CHANGING xs_wa_header = xs_wa_header xt_wa_buy = xt_wa_buy xt_wa_get = xt_wa_get xt_wa_reward = xt_wa_reward xt_wa_scales = xt_wa_scales xt_wa_matgrp = xt_wa_matgrp xt_wa_orgitems = xt_wa_orgitems xt_wa_orgsites = xt_wa_orgsites xt_wa_texts = xt_wa_texts EXCEPTIONS missing_wa_header = 1 missing_bby_profile = 2 missing_bby_type = 3 missing_bby_number = 4 incomplete_reward = 5 no_lock_possible = 6 no_rebate_type_found = 7 no_condtab_found = 8 invalid_number_range = 9 bby_number_not_in_number_range = 10 bby_profile_not_found = 11 no_authority = 12 invalid_header = 13 invalid_buy = 14 invalid_get = 15 invalid_reward = 16 invalid_orgitem = 17 other_error = 18 OTHERS = 19.

ENQUEUE_E_BONUSBUY CALL FUNCTION 'ENQUEUE_E_BONUSBUY' EXPORTING mode_konbbyh = c_enqueue_write mode_konbbyprq = c_enqueue_write mode_konbbyt = c_enqueue_write mandt = sy-mandt bbynr = i_bbynr * prqnr = * matposnr = * spras = x_bbynr = 'X' x_prqnr = ' ' x_matposnr = ' ' x_spras = ' ' _scope = '3' * _WAIT = ' ' * _COLLECT = ' ' EXCEPTIONS foreign_lock = 1 system_failure = 2 OTHERS = 3.

DEQUEUE_E_BONUSBUY CALL FUNCTION 'DEQUEUE_E_BONUSBUY' EXPORTING mode_konbbyh = c_enqueue_write mode_konbbyprq = c_enqueue_write mode_konbbyt = c_enqueue_write mandt = sy-mandt bbynr = i_bbynr * prqnr = * matposnr = * spras = x_bbynr = 'X' x_prqnr = ' ' x_matposnr = ' ' x_spras = ' ' _scope = '3' * _synchron = ' ' * _collect = ' ' .

RDM_BBY_DB_PROMO_ORGDATA_GET CALL FUNCTION 'RDM_BBY_DB_PROMO_ORGDATA_GET' EXPORTING i_aktnr = i_aktnr IMPORTING et_wa_orgitems = et_wa_orgitems et_wa_orgsites = et_wa_orgsites EXCEPTIONS promotion_not_found = 1 authority_error = 2 plant_group_error = 3 other_error = 99 OTHERS = 99.

MARA_SINGLE_READ * CALL FUNCTION 'MARA_SINGLE_READ' * EXPORTING ** KZRFB = ' ' ** MAXTZ = 0 * matnr = -matnr ** SPERRMODUS = ' ' ** STD_SPERRMODUS = ' ' ** OUTPUT_NO_MESSAGE = * IMPORTING * wmara = ls_db_mara * EXCEPTIONS * lock_on_material = 1 * lock_system_error = 2 * wrong_call = 3 * not_found = 4 * OTHERS = 5.

MARA_SINGLE_READ * CALL FUNCTION 'MARA_SINGLE_READ' * EXPORTING ** KZRFB = ' ' ** MAXTZ = 0 * matnr = -matnr ** SPERRMODUS = ' ' ** STD_SPERRMODUS = ' ' ** OUTPUT_NO_MESSAGE = * IMPORTING * wmara = ls_db_mara * EXCEPTIONS * lock_on_material = 1 * lock_system_error = 2 * wrong_call = 3 * not_found = 4 * OTHERS = 5.

RDM_BBY_DB_PROMO_WAKC_POSTE * CALL FUNCTION 'RDM_BBY_DB_PROMO_WAKC_POSTE' IN UPDATE TASK * EXPORTING * it_db_wakc_upd = lt_db_wakc_upd.

RDMT_BBY_PROF_SINGLE_READ CALL FUNCTION 'RDMT_BBY_PROF_SINGLE_READ' EXPORTING i_bprof = gs_wa_header-bprof IMPORTING es_bby_prof = ls_bby_bprof EXCEPTIONS bby_profile_not_found = 1 OTHERS = 2.

POPUP_TO_CONFIRM





CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING titlebar = text-002 text_question = text-003 display_cancel_button = space default_button = '2' popup_type = 'ICON_MESSAGE_WARNING' IMPORTING answer = l_answer EXCEPTIONS text_not_found = 1 OTHERS = 2.

NUMBER_GET_NEXT CALL FUNCTION 'NUMBER_GET_NEXT' EXPORTING nr_range_nr = ls_bby_bprof-numki object = gr_int_services->number_obj_bbynr IMPORTING number = x_bbynr_new EXCEPTIONS object_not_found = 01 interval_not_found = 02 OTHERS = 99.

RDM_BBY_DB_WAKH_SINGLE_READ CALL FUNCTION 'RDM_BBY_DB_WAKH_SINGLE_READ' EXPORTING i_aktnr = i_aktnr IMPORTING es_db_wakh = ls_db_wakh EXCEPTIONS no_entry_found = 1 OTHERS = 2.

MARA_ARRAY_READ CALL FUNCTION 'MARA_ARRAY_READ' TABLES ipre03 = lt_pre03 mara_tab = gt_mara_pass.

MARA_ARRAY_READ CALL FUNCTION 'MARA_ARRAY_READ' TABLES ipre03 = lt_pre03 mara_tab = lt_generic_mara.

LESEN_VARIANTEN_ZU_SA CALL FUNCTION 'LESEN_VARIANTEN_ZU_SA' EXPORTING sammelartikel = iv_matnr p_meinh = iv_mebme TABLES varianten = lt_variant EXCEPTIONS enqueue_mode_changed = 1 lock_on_material = 2 lock_system_error = 3 wrong_call = 4 not_found = 5 no_maw1_for_mara = 6 lock_on_marc = 7 lock_on_mbew = 8 OTHERS = 9.

ENQUEUE_EWWAKH CALL FUNCTION 'ENQUEUE_EWWAKH' EXPORTING aktnr = i_aktnr_new *<<<<<<<<<<< begin of insertion note 545282 >>>>>>>>>>>> _scope = '3' *<<<<<<<<<<< end of insertion note 545282 >>>>>>>>>>>>>> EXCEPTIONS foreign_lock = 01 system_failure = 02.

PROMOTION_WAKP_UPDATE CALL FUNCTION 'PROMOTION_WAKP_UPDATE' IN UPDATE TASK EXPORTING faktion = i_aktnr TABLES fxwakpd = lt_wakpd exceptions promotion_not_found = 1 OTHERS = 2.

MD_INFORECORDS_READ CALL FUNCTION 'MD_INFORECORDS_READ' EXPORTING imatnr = cs_wakpd-artnr iattyp = cs_wakpd-attyp isatnr = cs_wakpd-satnr iprices = '1' "bester Bruttopreis ermitteln iwaehrung = gs_new_wakhd-waela "Vergleichswährung idatum = gs_new_wakhd-ekdab "Datum für Preisfindung IMPORTING eprices = l_kond_aus EXCEPTIONS missing_sel_parameter = 1 no_eina_record_found = 2 no_eine_record_found = 3 OTHERS = 4.

MARA_SINGLE_READ_PMATA CALL FUNCTION 'MARA_SINGLE_READ_PMATA' EXPORTING pmata = cs_wakpd-artnr * OP = 'EQ' IMPORTING rmara = lw_mara EXCEPTIONS not_found = 1 OTHERS = 2.

DETERMINE_PURCHASE_VARIANT CALL FUNCTION 'DETERMINE_PURCHASE_VARIANT' EXPORTING pi_variant = cs_wakpd-artnr TABLES pe_purchase_variant_tab = l_variant_tab EXCEPTIONS wrong_call = 1 variant_not_found = 2 no_logistic_variant = 3 no_purchase_variant = 4 error = 5 OTHERS = 6.

MATERIAL_READ CALL FUNCTION 'MATERIAL_READ' EXPORTING schluessel = mtcom IMPORTING matdaten = mara TABLES seqmat01 = ms_dummy EXCEPTIONS OTHERS = 1.

PROMOTION_DEFAULT_ITEM_CATEGO CALL FUNCTION 'PROMOTION_DEFAULT_ITEM_CATEGO' EXPORTING pi_i_wakhd = gs_new_wakhd IMPORTING pe_apstp = cs_wakpd-apstp EXCEPTIONS not_found = 01.



Contribute (Add Comments)

Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.

The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.

This will then be available for everyone to easily find by simply searching on the report name RDM_BBY_COPY_02 or its description.