SAP Reports / Programs

RWSORTA1 SAP ABAP Report - Compare Promotion POs and Promotion Sales Orders







RWSORTA1 is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Program RWSORTA1 compares the status at any given time of purchase orders, stocks and sales orders for a (wholesale) promotion...see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.

If you would like to execute this report or see the full code listing simply enter RWSORTA1 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

WSLG - Compare promotion POs - sales orders


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 RWSORTA1. "Basic submit
SUBMIT RWSORTA1 AND RETURN. "Return to original report after report execution complete
SUBMIT RWSORTA1 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: AKTLB = Only Compare Promotion Stock
Selection Text: AKTNR = Promotion
Selection Text: MATNR = Material
Selection Text: NURVZ = Only Consider DC Stocks
Selection Text: PROT = Issue Update Log
Selection Text: REGEL = Rule For Automatic Qty Adjstmt
Selection Text: STEP5 = Order Adjustment
Selection Text: STEP6 = Quantity Adjustment
Selection Text: WERKBS = Display Plant Stocks
Title: Compare Promotion POs and Promotion Sales Orders
Text Symbol: 021 = Customer Not Assigned To Promotion
Text Symbol: 020 = PO Quantity > Order Quantity
Text Symbol: 012 = Be Processed?
Text Symbol: 011 = Should Purchase Orders
Text Symbol: 010 = PO Quantity = Order Quantity
Text Symbol: 005 = Features
Text Symbol: 004 = Output Control
Text Symbol: 003 = Select Stock Data
Text Symbol: 002 = Select Customers And Assortments
Text Symbol: 001 = Select Promotion And Promotion Material
Text Symbol: 072 = Be Saved First?
Text Symbol: 073 = Exit Processing
Text Symbol: 100 = Result Of The Quantity Adjustment
Text Symbol: 101 = Customers With Orders For The Promotion
Text Symbol: 102 = Customers Without Orders In The Promotion
Text Symbol: 103 = Promotion POs
Text Symbol: 104 = Vendor Material Quantity OrderUn
Text Symbol: 110 = Customer Material Quantity SalesUn Order Item
Text Symbol: 111 = Customer Description
Text Symbol: CHA = Quantities Adjusted
Text Symbol: AB1 = Cover:
Text Symbol: 203 = Order Quantity BaseUn Cover (%)
Text Symbol: 202 = PO Quantity In Promotion Storage Total BaseUn
Text Symbol: 201 = Promotion Description
Text Symbol: 200 = PO quantity Unrestricted-use stock Total BaseUn
Text Symbol: R04 = Control Via User Exit
Text Symbol: R03 = Customers Before Plants
Text Symbol: R02 = Plants Before Customers





Text Symbol: R01 = Equal Distribution
Text Symbol: R00 = Allocation Rule:
Text Symbol: M01 = Material Description
Text Symbol: K31 = Plant Unrestr. Use Stock In PromoStorage BaseUn
Text Symbol: K21 = Vendor Description PO Qty OrdUn Purchase Order
Text Symbol: K11 = Customer Description Order Qty SlsUn Order
Text Symbol: K04 = No Orders Exist
Text Symbol: K03 = Stock List
Text Symbol: K02 = PO List
Text Symbol: K01 = Order List
Text Symbol: EPR = End Of Log
Text Symbol: END = End Of List
Text Symbol: UEZ = Update log
Text Symbol: UEP = Material Order Item Quantity-old Qty-new SlsUn
Text Symbol: UEM = Material Description
Text Symbol: UE2 = Process Quantities
Text Symbol: UE1 = Information On Status (Incl. Quantities) Only
Text Symbol: 071 = Should The Changes
Text Symbol: 070 = You Are About To Exit.
Text Symbol: 066 = Read Material Stock
Text Symbol: 031 = Should Purchase Orders Now
Text Symbol: 030 = PO Quantity < Order Quantity


INCLUDES used within this REPORT RWSORTA1

INCLUDE RWSORTA2.


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:

PROMOTION_WLBM_POSITION_GET CALL FUNCTION 'PROMOTION_WLBM_POSITION_GET' EXPORTING FWAKHD = WAKHD FLAYVR = WWMI-LAYVR TABLES FXWAKPD = WAKPD FXWLBMD = WLBMD CHANGING FWAZWD = WAZWD FWLBMD_MAX = Z1 * fmaxposnr = EXCEPTIONS NO_POSITION = 1 OTHERS = 2.

ENQUEUE_EWWAKH CALL FUNCTION 'ENQUEUE_EWWAKH' EXPORTING MODE_WAKH = 'E' MANDT = SY-MANDT AKTNR = AKTNR * X_AKTNR = ' ' * _SCOPE = '2' * _WAIT = ' ' EXCEPTIONS FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2 OTHERS = 3.

ME_DISPLAY_PURCHASE_DOCUMENT CALL FUNCTION 'ME_DISPLAY_PURCHASE_DOCUMENT' EXPORTING i_ebeln = HIDE-BESTN I_ENJOY = 'X' I_EDIT = ' ' EXCEPTIONS OTHERS = 1.

POPUP_TO_CONFIRM_WITH_MESSAGE CALL FUNCTION 'POPUP_TO_CONFIRM_WITH_MESSAGE'"#EC FB_OLDED EXPORTING DIAGNOSETEXT1 = TEXT-070 TEXTLINE1 = TEXT-071 TEXTLINE2 = TEXT-072 TITEL = TEXT-073 "Überschrift DEFAULTOPTION = 'Y' "Antwort 'Y'/'N' IMPORTING ANSWER = ANSWER. "'J'/'N'/'A'

ME_DISPLAY_PURCHASE_DOCUMENT CALL FUNCTION 'ME_DISPLAY_PURCHASE_DOCUMENT' EXPORTING i_ebeln = HIDE-BESTN I_ENJOY = 'X' I_EDIT = 'X' EXCEPTIONS OTHERS = 1.

ME_DISPLAY_PURCHASE_DOCUMENT CALL FUNCTION 'ME_DISPLAY_PURCHASE_DOCUMENT' EXPORTING i_ebeln = HIDE-BESTN I_ENJOY = 'X' I_EDIT = ' ' EXCEPTIONS OTHERS = 1.

CLAF_OBJECTS_OF_CLASS CALL FUNCTION 'CLAF_OBJECTS_OF_CLASS' EXPORTING CLASS = KLAH-CLASS CLASSES = ' ' CLASSTEXT = ' ' CLASSTYPE = KLAH-KLART FEATURES = 'X' LANGUAGE = SY-LANGU * OBJECT_HIGH = ' ' * OBJECT_LOW = ' ' * UPDATE_MODE = ' ' TABLES T_CLASS = L_T_CLASS T_OBJECTDATA = L_T_OBJECTDATA T_OBJECTS = L_T_KUNDEN "Kunden EXCEPTIONS NO_CLASSIFICATION = 01.






WAUF_DETERMINE_QUANTITIES * call function 'WAUF_DETERMINE_QUANTITIES' * exporting * im_quantity_to_split = sum3 * im_alloc_tbl = aupo-abeln * im_alloc_tbl_item = aupo-abelp * im_material = mara-matnr * im_base_unit = mara-meins * im_item_category = * im_quantity_simulation = simulations_kezi-proport_menge * im_rounding = rundg-aufrunden * im_split_remainder = restv-zu_werken_m_groesster_menge * importing * ex_quantity_splitted = aupo-pmnge * tables * im_ex_stores = betriebe * im_ex_store_groups = betr_gruppen * exceptions * quantity_simulation_invalid = 1 * rounding_invalid = 2 * split_remainder_invalid = 3 * stores_storegroup_inconsistent = 4 * sum_quotas_initial = 5 * call_functionmodul_round = 6 * others = 7.

WAUF_DETERMINE_QUANTITIES CALL FUNCTION 'WAUF_DETERMINE_QUANTITIES' EXPORTING IM_QUANTITY_TO_SPLIT = SUM3 IM_ALLOC_TBL = AUPO-ABELN IM_ALLOC_TBL_ITEM = AUPO-ABELP IM_MATERIAL = BETRIEBE-MATNR IM_BASE_UNIT = AUFTRAG-MEINS IM_ITEM_CATEGORY = SPACE IM_QUANTITY_SIMULATION = SIMULATIONS_KEZI-PROPORT_MENGE IM_ROUNDING = RUNDG-AUFRUNDEN IM_SPLIT_REMAINDER = RESTV-ZU_WERKEN_M_GROESSTER_MENGE IM_MIN_MAX_QTY = SPACE * IM_GENERIC_MATERIAL = ' ' IMPORTING EX_QUANTITY_SPLITTED = AUPO-PMNGE TABLES IM_EX_STORES = BETRIEBE IM_EX_STORE_GROUPS = BETR_GRUPPEN EXCEPTIONS QUANTITY_SIMULATION_INVALID = 1 ROUNDING_INVALID = 2 SPLIT_REMAINDER_INVALID = 3 MIN_MAX_QTY_INVALID = 4 STORES_STOREGROUP_INCONSISTENT = 5 SUM_QUOTAS_INITIAL = 6 CALL_FUNCTIONMODUL_ROUND = 7 PLANNED_QTY_LESS_MIN_QTY = 8 PLANNED_QTY_GREATER_MAX_QTY = 9 OTHERS = 10.

WAUF_SIMULATION_UNTERPOS_MNG * CALL FUNCTION 'WAUF_SIMULATION_UNTERPOS_MNG' * EXPORTING * im_restv = restv-zu_werken_m_groesster_menge * im_rundg = rundg-aufrunden * im_simaend = simulations_kezi-proport_menge * im_smnge = sum3 * im_abeln = aupo-abeln * im_abelp = aupo-abelp * IMPORTING * ex_gmenge = aupo-pmnge * TABLES * im_ex_aufg = betr_gruppen * im_ex_aufi = betriebe * EXCEPTIONS * summe_anteile_zero = 1 * rundungskennzeichen_falsch = 2 * resteverteilungs_kezi_falsch = 3 * simulations_kennzeichen_falsch = 4 * fehler_aufruf_fubaust_round = 5 * OTHERS = 6.

WAUF_DETERMINE_QUANTITIES CALL FUNCTION 'WAUF_DETERMINE_QUANTITIES' EXPORTING IM_QUANTITY_TO_SPLIT = SUM3 IM_ALLOC_TBL = AUPO-ABELN IM_ALLOC_TBL_ITEM = AUPO-ABELP IM_MATERIAL = BETRIEBE-MATNR IM_BASE_UNIT = AUFTRAG-MEINS IM_ITEM_CATEGORY = SPACE IM_QUANTITY_SIMULATION = SIMULATIONS_KEZI-PROPORT_MENGE IM_ROUNDING = RUNDG-AUFRUNDEN IM_SPLIT_REMAINDER = RESTV-ZU_WERKEN_M_GROESSTER_MENGE IM_MIN_MAX_QTY = SPACE * IM_GENERIC_MATERIAL = ' ' IMPORTING EX_QUANTITY_SPLITTED = AUPO-PMNGE TABLES IM_EX_STORES = BETRIEBE IM_EX_STORE_GROUPS = BETR_GRUPPEN EXCEPTIONS QUANTITY_SIMULATION_INVALID = 1 ROUNDING_INVALID = 2 SPLIT_REMAINDER_INVALID = 3 MIN_MAX_QTY_INVALID = 4 STORES_STOREGROUP_INCONSISTENT = 5 SUM_QUOTAS_INITIAL = 6 CALL_FUNCTIONMODUL_ROUND = 7 PLANNED_QTY_LESS_MIN_QTY = 8 PLANNED_QTY_GREATER_MAX_QTY = 9 OTHERS = 10.

WAUF_SIMULATION_UNTERPOS_MNG * CALL FUNCTION 'WAUF_SIMULATION_UNTERPOS_MNG' * EXPORTING * im_restv = restv-zu_werken_m_groesster_menge * im_rundg = rundg-aufrunden * im_simaend = simulations_kezi-proport_menge * im_smnge = sum3 * im_abeln = aupo-abeln * im_abelp = aupo-abelp * IMPORTING * ex_gmenge = aupo-pmnge * TABLES * im_ex_aufg = betr_gruppen * im_ex_aufi = betriebe * EXCEPTIONS * summe_anteile_zero = 1 * rundungskennzeichen_falsch = 2 * resteverteilungs_kezi_falsch = 3 * simulations_kennzeichen_falsch = 4 * fehler_aufruf_fubaust_round = 5 * OTHERS = 6.

WAUF_DETERMINE_QUANTITIES CALL FUNCTION 'WAUF_DETERMINE_QUANTITIES' EXPORTING IM_QUANTITY_TO_SPLIT = SUM3 IM_ALLOC_TBL = AUPO-ABELN IM_ALLOC_TBL_ITEM = AUPO-ABELP IM_MATERIAL = BETRIEBE-MATNR IM_BASE_UNIT = AUFTRAG-MEINS IM_ITEM_CATEGORY = SPACE IM_QUANTITY_SIMULATION = SIMULATIONS_KEZI-PROPORT_MENGE IM_ROUNDING = RUNDG-AUFRUNDEN IM_SPLIT_REMAINDER = RESTV-ZU_WERKEN_M_GROESSTER_MENGE IM_MIN_MAX_QTY = SPACE * IM_GENERIC_MATERIAL = ' ' IMPORTING EX_QUANTITY_SPLITTED = AUPO-PMNGE TABLES IM_EX_STORES = BETRIEBE IM_EX_STORE_GROUPS = BETR_GRUPPEN EXCEPTIONS QUANTITY_SIMULATION_INVALID = 1 ROUNDING_INVALID = 2 SPLIT_REMAINDER_INVALID = 3 MIN_MAX_QTY_INVALID = 4 STORES_STOREGROUP_INCONSISTENT = 5 SUM_QUOTAS_INITIAL = 6 CALL_FUNCTIONMODUL_ROUND = 7 PLANNED_QTY_LESS_MIN_QTY = 8 PLANNED_QTY_GREATER_MAX_QTY = 9 OTHERS = 10.

WAUF_SIMULATION_UNTERPOS_MNG * CALL FUNCTION 'WAUF_SIMULATION_UNTERPOS_MNG' * EXPORTING * im_restv = restv-zu_werken_m_groesster_menge * im_rundg = rundg-aufrunden * im_simaend = simulations_kezi-proport_menge * im_smnge = sum3 * im_abeln = aupo-abeln * im_abelp = aupo-abelp * IMPORTING * ex_gmenge = aupo-pmnge * TABLES * im_ex_aufg = betr_gruppen * im_ex_aufi = betriebe * EXCEPTIONS * summe_anteile_zero = 1 * rundungskennzeichen_falsch = 2 * resteverteilungs_kezi_falsch = 3 * simulations_kennzeichen_falsch = 4 * fehler_aufruf_fubaust_round = 5 * OTHERS = 6.

WAUF_DETERMINE_QUANTITIES CALL FUNCTION 'WAUF_DETERMINE_QUANTITIES' EXPORTING IM_QUANTITY_TO_SPLIT = SUM3 IM_ALLOC_TBL = AUPO-ABELN IM_ALLOC_TBL_ITEM = AUPO-ABELP IM_MATERIAL = BETRIEBE-MATNR IM_BASE_UNIT = AUFTRAG-MEINS IM_ITEM_CATEGORY = SPACE IM_QUANTITY_SIMULATION = SIMULATIONS_KEZI-PROPORT_MENGE IM_ROUNDING = RUNDG-AUFRUNDEN IM_SPLIT_REMAINDER = RESTV-ZU_WERKEN_M_GROESSTER_MENGE IM_MIN_MAX_QTY = SPACE * IM_GENERIC_MATERIAL = ' ' IMPORTING EX_QUANTITY_SPLITTED = AUPO-PMNGE TABLES IM_EX_STORES = BETRIEBE IM_EX_STORE_GROUPS = BETR_GRUPPEN EXCEPTIONS QUANTITY_SIMULATION_INVALID = 1 ROUNDING_INVALID = 2 SPLIT_REMAINDER_INVALID = 3 MIN_MAX_QTY_INVALID = 4 STORES_STOREGROUP_INCONSISTENT = 5 SUM_QUOTAS_INITIAL = 6 CALL_FUNCTIONMODUL_ROUND = 7 PLANNED_QTY_LESS_MIN_QTY = 8 PLANNED_QTY_GREATER_MAX_QTY = 9 OTHERS = 10.

WAUF_SIMULATION_UNTERPOS_MNG * CALL FUNCTION 'WAUF_SIMULATION_UNTERPOS_MNG' * EXPORTING * im_restv = restv-zu_werken_m_groesster_menge * im_rundg = rundg-aufrunden * im_simaend = simulations_kezi-proport_menge * im_smnge = sum3 * im_abeln = aupo-abeln * im_abelp = aupo-abelp * IMPORTING * ex_gmenge = aupo-pmnge * TABLES * im_ex_aufg = betr_gruppen * im_ex_aufi = betriebe * EXCEPTIONS * summe_anteile_zero = 1 * rundungskennzeichen_falsch = 2 * resteverteilungs_kezi_falsch = 3 * simulations_kennzeichen_falsch = 4 * fehler_aufruf_fubaust_round = 5 * OTHERS = 6.



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