rv61a_koupd_dokumentation

15
RV61A_KOUPD Detailed description of the execution of the application and a technical documentation. Version 1.0 31th October 2007 SAP AG Dietmar – Hopp - Allee 16 D-69190 Walldorf

Upload: razakwk

Post on 12-Sep-2015

233 views

Category:

Documents


1 download

DESCRIPTION

RV61A_KOUPD_Dokumentation

TRANSCRIPT

  • RV61A_KOUPDDetailed description of the execution of the application and atechnical documentation.

    Version 1.031th October 2007

    SAP AGDietmar Hopp - Allee 16

    D-69190 Walldorf

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    2

    Index

    A APPLICATION..................................................................................................31 OPTION 1 (AUSGANGSPUNKT: VERKAUFSBELEG)...............................................32 OPTION 2 (AUSGANGSPUNKT: KONDITIONSSATZ)...............................................6

    B TECHNICAL DOCUMENTATION.....................................................................91 EXPLAIN THE DIFFERENT SCREENS AND THEIR PBO AND PAI MODULES ................9

    1.1 Modules Screen 100..............................................................................101.1.1 PBO Modules ..................................................................................10

    1.2 Modules Screen 200..............................................................................101.2.1 PBO Modules ..................................................................................10

    1.3 Modules Screen 300..............................................................................111.3.1 PBO Modules ..................................................................................11

    1.4 Modules Screen 900..............................................................................111.4.1 PBO Modules ..................................................................................111.4.2 PAI Modules....................................................................................11

    2 EXPLAIN THE DATA DEFINITION .........................................................................12

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    3

    A ApplicationThis program provides information relevant for condition update from tablesKONV, KONP , Annn and S071.

    1 Option 1 (Ausgangspunkt: Verkaufsbeleg)

    STEP 1:

    If you choose the radio-button for option 1 (Ausgangspunkt: Verkaufsbeleg) it isnecessary to enter as a minimum the VBELN (Number of the sales document). Inaddition you can restrict the results by entering the item number (POSNR) andthe condition type (KSCHL).Presses execute to start Dynpro 100.

    STEP 2:

    The screen (Dynpro 100) shows a table with information about the enteredVBELN. The first ALV-Grid gives information about each condition of the pricingresult in the document where the flag KOUPD (update of condition) is set (X).The columns Item Number and Condition type specify the condition record.The columns Condition rate , Currency, Pricing unit and ME specify thecondition rate used in the pricing result of the document.The condition basis is displayed in the columns Condition base value and ME.The column Maximum Base Value informs if the limit is already reached or not(X when reached, when not Y. When : no limit given).

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    4

    The condition value is displayed in the columns Condition value and Documentcurrency. The column Maximum Amount informs if the limit is already reachedor not (X when reached, when not Y. When : no limit given).

    The corresponding condition record number is displayed in the last column.The columns Material, Reason for rejection and Inactive provide additionalinformation about the item and condition.

    The second ALV-Grid (KONP-Daten) shows information from the conditionmaster data of the condition records which have been determined in the firstALV-Grid. The condition records are specified by their condition record numberKNUMH. The columns Condition rate , Currency, Pricing unit and MEspecify the condition rate used condition master data (table KONP).The columns Max. cond.base value, ME show the limit specified for themaximal condition basis.The columns Max. condition value, ME show the limit specified for themaximal condition value.In the third ALV-Grid (S071-Daten) you can see the cumulated values.The records are specified by their condition record number (KNUMH) andaccording to the periodicity chosen in transaction OMO1.The columns Condition value and Currency show the cumulated conditionvalues. The columns CondBasVal and ME show the cumulated conditionbases.In addition the first 3 documents are listed which use the condition record withthe KNUMH concerned in the relevant period.

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    5

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    6

    2 Option 2 (Ausgangspunkt: Konditionssatz)

    STEP 1:

    If you choose the radio-button for option 2 (Ausgangspunkt: Nr. Konditionssatz)it would be better to enter as a minimum the KNUMH (Number of the conditionrecord). ). In addition you can restrict the results by entering a range of thepricing date (PRSDT).With the 3 radio-buttons you can influence the result listing. The first radio-button(Ausgabe Belege 1-3 aus S071) only shows the 3 reference documents out ofthe table S071. (The numbers of these documents are also listed in the third gridwhen you execute option 1) The second radio-button (Suche alle Belege inKONV) searches and shows all related sales documents in table KONV.Presses execute to start Dynpro 200, where the cumulation of the conditionrecord and condition record information (table KONP) going to be displayed.

    The third radio-button (Suche nach Konditionssatz in A-Tabelle) providesinformation about the condition record from the related condition table(characteristics of the key fields and validity periods).Presses execute to start Dynpro 300.

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    7

    STEP 2:

    At this screen you can see how many records the table concerned contains. Youhave the opportunity to stop the selection of the data if the volume of the tableseems too big. . Press Nein, Zurck to stop and go back, to continue press Ja,Starten.

    STEP 3 a:

    If you choose the first or second radio-button on the selection screen for thisoption you will be linked to Dynpro 200.

    On the top you see information from the condition master data of the currentcondition record which is specified by the number of the condition record.In the ALV-Grid below you see a list of the sales documents containing itemswith this condition record.The columns Document No. and Item Number specify the items where thecurrent condition record is active of the documents that had been found in one offthe two search tables (S071 or KONV depending on the input).The columns Condition rate , Currency, Pricing unit and ME specify thecondition rate used in the pricing result of the document.The condition basis is displayed in the columns Condition base value and ME.The condition value is displayed in the columns Condition value and Documentcurrency.

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    8

    The columns Order quantity, Net price and Net value and correspondingCurrency display pricing information of the current item of the sales document.In the last column the pricing date is displayed.Additionally the condition base and value are cumulated.

    STEP 3 b:

    If you choose the third radio-button on the selection screen for this option you willbe linked to Dynpro 300.On this Dynpro the number of the condition table and the characteristics of thekey fields are displayed on the left side and a list of the validity periods on theright side.

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    9

    CALL SCREEN 100

    Process Before Output

    MODULE status_0100.

    MODULE create_control.

    B Technical documentation

    1 Explain the different Screens and their PBO and PAI Modules

    CALL SCREEN 300

    Process Before Output

    MODULE status_0300.

    MODULE create_control.

    CALL SCREEN 200

    Process Before Output

    MODULE status_0200.

    MODULE create_control.

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    10

    1.1 Modules Screen 100

    1.1.1 PBO Modules

    Set the title for dynpro 100.Set the status for dynpro 100.

    This module is responsible for the ALV Grid for the output.

    1.2 Modules Screen 200

    1.2.1 PBO Modules

    Set the title for Dynpro 200.Set the status for Dynpro 200.

    This module is responsible for the ALV Grid for the output.

    CALL SCREEN 900

    Process Before Output

    MODULE STATUS_0900.

    Process After Input

    MODULE user_command_0900.

    MODULE status_0100.

    MODULE status_0200.

    MODULE create_control.

    MODULE create_control.

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    11

    1.3 Modules Screen 300

    1.3.1 PBO Modules

    Set the title for Dynpro 300.Set the status for Dynpro 300.

    This module is responsible for the ALV Grid for the output.

    1.4 Modules Screen 900

    1.4.1 PBO Modules

    Set the title for Dynpro 900.Set the status for Dynpro 900.

    1.4.2 PAI Modules

    Define the pushbuttons.EXECUTE? start the respective data research for Dynpro 200 or 300

    BACK / CANCEL ? back to selection screen

    MODULE status_0300.

    MODULE create_control.

    MODULE status_0900.

    MODULE user_command_0900.

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    12

    2 Explain the data definition

    *&---------------------------------------------------------------------**& TABLES exchange infrastructure*&---------------------------------------------------------------------*

    TABLES konp.

    *&---------------------------------------------------------------------**& local structures for output*&---------------------------------------------------------------------* structure for first table on dynpro 100TYPES: BEGIN OF akonv, kposn TYPE konv-kposn, matnr TYPE vbap-matnr, kschl TYPE konv-kschl, abgru TYPE vbap-abgru, kbetr TYPE konv-kbetr, waers TYPE konv-waers, kpein TYPE konv-kpein, kmein TYPE vbak-vbeln, kawrt TYPE konv-kawrt, kmein2 TYPE vbak-vbeln, kmxaw TYPE konv-kmxaw, kwert TYPE konv-kwert, waerk TYPE vbak-waerk, kmxwr TYPE konv-kmxwr, kinak TYPE konv-kinak, knumh TYPE konv-knumh,

    END OF akonv.

    * structure for second table on dynpro 100

    TYPES: BEGIN OF akonp, kschl TYPE konp-kschl, kbetr TYPE konp-kbetr, kwaeh TYPE konp-kwaeh, kpein TYPE konp-kpein, kmein TYPE vbak-vbeln, mxkbas TYPE konp-mxkbas, kmein2 TYPE vbak-vbeln, komxwrt TYPE konp-komxwrt, waers TYPE t001-waers, knumh TYPE konp-knumh,

    END OF akonp.

    * structure for third table on dynpro 100

    TYPES: BEGIN OF as071, knumh TYPE s071-knumh, kopos TYPE s071-kopos, spmon TYPE s071-spmon,

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    13

    sptag TYPE s071-sptag, spwoc TYPE s071-spwoc, spbup TYPE s071-spbup, kwert TYPE s071-kwert, waers TYPE t001-waers, kawrt TYPE s071-kawrt, kmein TYPE vbak-vbeln, aunr1 TYPE s071-aunr1, aunr2 TYPE s071-aunr2, aunr3 TYPE s071-aunr3,

    END OF as071.

    * structure for table on dynpro 200

    TYPES: BEGIN OF aknumh, vbeln TYPE vbak-vbeln, posnr TYPE konv-kposn, kbetr TYPE konv-kbetr, waers TYPE konv-waers, kpein TYPE konv-kpein, kmein TYPE vbak-vbeln, kawrt TYPE konv-kawrt, kmein2 TYPE vbak-vbeln, kwert TYPE konv-kwert, waerk TYPE vbak-waerk, kwmeng TYPE vbap-kwmeng, vrkme TYPE vbap-vrkme, netpr TYPE vbap-netpr, waerk2 TYPE vbak-waerk, netwr TYPE vbap-netwr, waerk3 TYPE vbak-waerk, prsdt TYPE vbkd-prsdt,

    END OF aknumh.

    * structure for counting the amount of data

    DATA: BEGIN OF ls_count, anzhl TYPE vbak-vbeln, tab TYPE vbak-vbeln,

    END OF ls_count.

    * structure which consist all knumv and vbeln that are responsiblefor dynpro 200

    DATA: BEGIN OF ls_knumv, knumv TYPE vbak-knumv, vbeln TYPE vbak-vbeln, kposn TYPE konv-kposn, kwert TYPE konv-kwert, kbetr TYPE konv-kbetr, kawrt TYPE konv-kawrt, waers TYPE konv-waers, krech TYPE konv-krech,

    END OF ls_knumv.

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    14

    * structure for the name of the condition table

    DATA: BEGIN OF ls_atab, kvewe TYPE konh-kvewe, kotabnr TYPE konh-kotabnr, felder TYPE konh-vakey, vakey TYPE konh-vakey,

    END OF ls_atab.

    * structure to read the columns and content of the condition table

    TYPES: BEGIN OF aspalt, name TYPE t681e-sefeld, inhalt TYPE konh-vakey,

    END OF aspalt.

    * structure: validity periods of the condition record

    TYPES: BEGIN OF dat, datbi TYPE konh-datbi, datab TYPE konh-datab,

    END OF dat.

    DATA ls_vbak TYPE vbak.

    DATA ls_konv TYPE konv.DATA lt_konv TYPE TABLE OF konv.

    DATA ls_akonv TYPE akonv.DATA lt_akonv TYPE TABLE OF akonv.

    DATA ls_konp TYPE konp.

    DATA ls_akonp TYPE akonp.DATA lt_akonp TYPE TABLE OF akonp.

    DATA ls_as071 TYPE as071.DATA lt_as071 TYPE TABLE OF as071.

    DATA lt_knumv LIKE TABLE OF ls_knumv.

    DATA ls_knumh TYPE aknumh.DATA lt_knumh TYPE TABLE OF aknumh.

    DATA ls_spalt TYPE aspalt.DATA lt_spalt TYPE TABLE OF aspalt.

    DATA ls_dat TYPE dat.DATA lt_dates TYPE TABLE OF dat.

  • RV61A_KOUPD Page

    Clemens Khne BA WI

    15

    *&---------------------------------------------------------------------**& local data*&---------------------------------------------------------------------*

    DATA ld_conc TYPE string. *var. for concatenateDATA ld_koupd TYPE konv-koupd.DATA ld_waers TYPE konv-waers.DATA ld_outtab TYPE string. *name of outtab1DATA ld_outtab2 TYPE string. *name of outtab2DATA ld_buchp TYPE string. *fiscal periodeDATA ld_table TYPE string. *name of condition tableDATA ld_currdec TYPE tcurx-currdec. *currency abbreviation