DUMP while running the program RSAR_RSISOSMAP_REPAIR

Hi Experts,
I am facing the dump while executing the DTP. the dump is ITAB_DUPLICATE_KEY.to fix the error  ITAB_DUPLICATE_KEY I am referring to the below link :
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a04c82eb-ec7c-2c10-7fae-ca6e764c483a&overridelayout=true
i have run the program RSAR_RSISOSMAP_REPAIR with the repair indicator set.
the issue is its not executing successfully.kinldy help me in this.
the abap errror i m getting while execution of program RSAR_RSISOSMAP_REPAIR is as :
TSPREFIX for TCD500-1 not found.
Kindly help me in resolving the above error TSPREFIX for TCD500-1 not found, where TCD500-1 is my development R/3 system .
Kindly advise.
thanks & regards ,
M.S
Edited by: M.S on Dec 9, 2009 6:41 AM

Hi,
1) TCD for testing transactions, especially those that do not use controls
2)TCD has the following advantages
3)It has a built in screen simulation for standard screen element
4) No GUI is required for playback
5)  It is suitable for load testing
6) The TCD command has the same limitations as the CATT function of the same name. The flow of data to and from controls, as well as screen input values, are recorded. When the test script runs, the controls are deactivated and the user's actions are simulated by reading the recorded data flows
For more info on TCD go through the below link
http://help.sap.com/saphelp_sm32/helpdata/en/83/77cd3b4261706fe10000000a11402f/content.htm
Regards,
Marasa.

Similar Messages

  • ABAP dump while running the tcode MIGO

    Hi All,
    I am getting the abap dump while running the tcode MIGO when I searched I got two relevant sap notes but our functional team said that its not applicable in our case.
    Please find the details of ST22 analysis-:
    Runtime Errors         MESSAGE_TYPE_X
    Date and Time          17.04.2009 13:18:45
    Short text
         The current application triggered a termination with a short dump.
    What happened?
         The current application program detected a situation which really
         should not occur. Therefore, a termination with a short dump was
         triggered on purpose by the key word MESSAGE (type X).
    Error analysis
        Short text of error message:
        No RFC destination is defined for SAP Global Trade Services
        Long text of error message:
        Technical information about the message:
        Message class....... "/SAPSLL/PLUGINR3"
        Number.............. 002
        Variable 1.......... " "
        Variable 2.......... " "
        Variable 3.......... " "
        Variable 4.......... " "
    How to correct the error
        Probably the only way to eliminate the error is to correct the program.
        If the error occures in a non-modified SAP program, you may be able to
        find an interim solution in an SAP Note.
        If you have access to SAP Notes, carry out a search with the following
        keywords:
        "MESSAGE_TYPE_X" " "
        "SAPLMBWL" or "LMBWLU21"
        "MB_POST_GOODS_MOVEMENT"
    SAP Notes i have reffered 1098491, 1041122
    Currently we are running on SAP_APPL     600     0007     SAPKH60007     
    Regards,
    Prashant

    Hi Rohit,
    This particular note is valid for
    Support
    Packages Release Package
    Name
    PI 2004_1_46B SAPKIPZI38
    PI 2004_1_46C SAPKIPZI48
    PI 2004_1_470 SAPKIPZI58
    PI 2004_1_500 SAPKIPZI68
    Our system is running on PI_BASIS     2006_1_700     0005     SAPKIPYM05
    Pls suggest.
    Regards,
    Prashant

  • Error while running the program of deferred Tax ( New)Program Name RFUMSV50

    Hi
    I am getting the error while running the program of deferred Tax ( New)
    Following is the detailed error :
    Enter rate / INR rate type M for 00.00.0000 in the system settings
    Message no. SG105
    Diagnosis
    For the conversion of an amount into another currency, an entry is missing in the currency conversion table.
    Procedure
    Add the missing entry in the currency conversion table.
    Execute function
    You can then continue to process the commercial transaction.
    Thanks & Regards,
    PM

    Check the following notes:-
    1)  Note 46582 - 2.2->3.0: error SG105 for exchange rate M w. inv.
    2)  Note 165645 - SG105:Enter rate & / & rate type & for 00.00.0000..
    3)  Note 483542 - F110: SG105 in maintenance of proposal run with wthhldng tax
    4)  Note 975657 - SG 105: FI-Enjoy with foreign currency and calculate tax
    thanks
    G. Lakshmipathi

  • Error while running the program

    Hello everybody
    I have installed jdk in my computer, but when I try to run the program it shows the following error
    "Unable to load the main class"
    The program is compiling properly the only problem is in running the program.
    What is the reason for this error and how can I fix this error?
    Regards

    Are you familiar with the classpath?
    It tells the JRE which directory has your *.class files.
    At the command line, you would java -cp  dir_name  class_file_nameIf you're using an IDE, check the menus at the top of the editor screen.

  • Dump while running a program with OLE Excel download facility in ITS

    Hi,
    Because of some complex requirment, I had created a report program which will download the data to an Excel sheet using SAP OLE Automation Controller. For this report i had created a tcode too.
    The report which i developed is perfectly working fine in SAPGUI. But if i access the same report throught SAP ITS serice. I am getting a dump. Please find below the dump details. I am not able to figure it out why the dump is not coming in SAPGUI.
    Runtime Errors         MESSAGE_TYPE_X
    Date and Time          09.03.2010 05:35:41
    Short text
    The current application triggered a termination with a short dump.
    What happened?
    The current application program detected a situation which really
    should not occur. Therefore, a termination with a short dump was
    triggered on purpose by the key word MESSAGE (type X).
    |
    Error analysis
    Short text of error message:
    Control Framework : Error processing control
    Long text of error message:
    Diagnosis
    An error occurred when the system tried to process the commands
    from the Automation Queue on the presentation server.
    There are several possible reasons for this:
    - The installation of the SAP GUI on the presentation server is
    faulty or obsolete.
    - There is an error in the application program
    - There is an error in the SAPGUI or an integrated control
    Procedure
    1. Make sure that you have imported the appropriate Support
    Package, the current kernel, and GUI patch for the release of your
    system
    2. Check whether the error occurs locally on one or a few PCs, or
    generally on all PCs. Note whether the error only occurs for some
    users, for example because of a specific Customizing setting.
    If it only occurs locally, this suggests an installation problem
    with the PC. Check the installation; if necessary, reinstall the
    software. In the dump, search for the SY-MSGLI field, since it may
    point to the cause of the error.
    3. Activate the Automation Trace (in accordance with SAP Note
    158985).
    4.Start the transaction and continue until the screen immediately
    before the dump.
    5. From the System -> Utilities menu, choose Autom. Queue,
    Synchronous Processing.
    The status bar of the GUI displays the text:
    "Automation synchron flush mode on"
    6. If you now proceed with the application, the short dump will
    display the ABAP call that caused the error; the Automation Trace
    will contain the error on the presentation server.
    7. If necessary, load the short dump and trace files on to
    sapservX, so that SAP can analyze them.
    Technical information about the message:
    Message class....... "CNDP"
    Number.............. 006
    Variable 1.......... " "
    Variable 2.......... " "
    Variable 3.......... " "
    Variable 4.......... " "
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "MESSAGE_TYPE_X" " "
    "SAPLOLEA" or "LOLEAU02"
    "AC_SYSTEM_FLUSH"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    User and Transaction
    Client.............. 120
    User................ "XXXXXX"
    Language Key........ "E"
    Transaction......... "ZGA_BEACON_SOX_RPT "
    Transactions ID..... "4B95E2560EB62F9AE10000000A241C33"
    Program............. "SAPLOLEA"
    Screen.............. "ZGA_REP_BEACON_SOX_REPORT 9000"
    Screen Line......... 0
    Information on Caller ofr "HTTP" Connection:
    Plug-in Type.......... "HTTP"
    Caller IP............. "10.36.28.52"
    Caller Port........... 8000
    Universal Resource Id. "/sap/bc/gui/sap/its/webgui/~flNUQVRFPTIzNzIxLjAxNC4wNC4
    wNA=="

    Hi All,
    FYI.....
    As I said because of my complex requirement, i am using OLE excel download facilities to download the data. ITS wont support this OLE download facility.  This can be done only through local SAP GUI.
    The reason for this is that, when i am using this download facility through SAP GUI, OLE object thats used in my report program will directly talk to the Local OLE excel objects (i.e. the local installed Excell application) and download the data. But if it's through ITS, my program wont be able to communicate with the local excel OLE objects because of this i am getting a DUMP.
    Thank You all for the support. All the best in future. 
    Regards
    Maneesh Chandran

  • Problem while running the program in background

    hi SDNs,
    i have problem while i run report in background. in background, last three columns  are not appearing in the report. whereas it showing all columns in foreground.
    i have increased the line-size, even then it is giving truncating last some columns.
    could you any one pls help me out, what to do ?
    Thanking you,
    Ramakrishna S

    hi prakash ramu,
    even it is not working. it is directly talking me to spool request..
    i think it is not possible, while ur running the report in background.,
    any how if possible could u pls send me the code...
    thanks
    ramu

  • BI : dump while running the DTP

    Hi Experts,
    While loading the cube , The DTP fails due to below error :
    "Value 'Pyro DN March 2010 ' (hex. '005000790072006F00200044004E0020004D00610072006300') of characteristic 0CATSTEXT contains invalid characters".
    I have tried ALL_CAPITAL in RSKC but still unable to load the data. Kindly advise.
    thanks & regards,
    M.S

    Hello,
    Check the PSA for that particular record and see if the value contains any # there..if so remove them...
    Keep the lowercase letters checked and try again..
    Regards
    Shashank

  • Error while running the program /CCM/INITIALIZE_CME

    Hi Gurus,
    We are done with all our CCM Configuration,at last we are trying to unpack the predefined characteristics and create Master Catalog through program /CCM/INITIALIZE_CME in SE38. I am getting the following error.
    CHECK CME CUSTOMIZING & MDF PARTS
    We are on this support package
    SAP_ABA - SAPKA70011
    SAP BASIS - SAPKB70011
    PI_BASIS  -   PI_BASIS 2005_1_700
    CCM  - CCM200_700
    SAP_AP -  SAP_AP700
    SY_PI  - ST_PI 2005_1_700: Patch001
    we are on CCM2.0 SP02, TREX 7.0 and WEBAS 7.0.
    Please suggest me,am I missing something in the support pack.
                                                                                    Pradeep

    Hi
    <b>Please go through the follwoing SAP OSS Notes -></b>
    Note 814446 - CCM 2.0 SP00 on Netweaver 04 SP Stack 12
    Note 730047 - CME-Customizing check
    Note 843867 - Upgrade of CCM 1.0 to a higher version
    Note 878316 - Missing standard characteristics in CCM2.0 catalogs
    Note 734168 - Error during initialization of characteristics & data types
    Note 722919 - Change of definition of predefined characteristics
    Note 730896 - Customizing for A&D scenario
    Note 887133 - CCM 2.0 SP02 on Netweaver 04s SP Stack 05
    Do let me know.
    Regards
    - Atul

  • Error while running the Program file(Program Object)

    Hi All,
    I have created 2 program files in SAP BO 4.0 to send automated mail and to remove the flag file. It is working in my DEV environment.
    Last week i have created new environment(PROD) and created same program files. But its not working in new environment. Please fine the below error
    Also please find the trace:
    trc file: "jobserver_EXPLORER_QAS_Program.JobServer_ProgramSchedulingService_CHILD0_ncs.trc", trc level: 1, release: "720"

    M [Thr 4116] Wed Aug 06 17:05:09 2014
    M  [Thr 4116] ***LOG Q0I=> NiPGetHostByName: '$SMDAgentHost' not found: getaddrinfo [ninti.c 895]
    M  [Thr 4116] *** ERROR => Main agent failed to be initilized due to incorrect host setting! [ncsmtdatasen 20]
    M  [Thr 4116] *** ERROR => Main agent failed to be initilized due to incorrect host setting! [ncsmtdatasen 20]
    M  [Thr 4116] NCS trace timer is disabled since the interval is set to 0
    M  [Thr 4116] NCS data timer is disabled since the interval is set to 0
    M  [Thr 4116] NCS library version 2.3.9 (unicode) loaded
    M  [Thr 4116] NCS_ProcInit API invoked

    M [Thr 4116] Wed Aug 06 17:07:14 2014
    M  [Thr 4116] NCS_ProcExit API started
    M  [Thr 4116] Timer threads are successfully finished
    M  [Thr 4116] Data sending threads are successfully finished
    M  [Thr 4116] NCS_ProcExit API invoked
    Please help me with the solution and your suggestions.
    Thanks all for your help.
    Regards,
    Sakthi

    Check this link.
    APS service start up issue with BI 4.0

  • Cursor for update get stuck while running the program

    Dear
    i am using below mention program but work and get stuck. please any idea how can reslove this.
    declare
    l_segment1 VARCHAR (100);
    CURSOR req_number_cur
    IS
    SELECT TO_CHAR (current_max_unique_identifier + 1)
    FROM po_unique_identifier_control
    WHERE table_name = 'PO_REQUISITION_HEADERS'
    FOR UPDATE OF current_max_unique_identifier;
    BEGIN
    fnd_client_info.set_org_context (101);
    mo_global.set_policy_context ('S', 101);
    dbms_output.put_line('testing');
    begin
    OPEN req_number_cur;
    FETCH req_number_cur
    INTO l_segment1;
    IF req_number_cur%NOTFOUND
    THEN
    --do something
    NULL;
    --insert statement
    UPDATE po_unique_identifier_control
    SET current_max_unique_identifier = current_max_unique_identifier + 1
    WHERE CURRENT OF req_number_cur;
    END IF;
    CLOSE req_number_cur;
    end;
    END;
    ---thanks
    appreciate you help.

    Do you realise that this is a flawed approach?
    Performance in a multi-user and multi-process database system is about the ability to do things simultaneously.
    Simple analogy. You have a McDonalds. You have a 100 customers wanting to be serviced. What will be better? Having the customer all queuing in a single long queue to be serviced by a single cashier?
    Or 10 cashiers, 10 queues, and the ability to service 10 customers at the same time?
    It should be very obvious that the ability to service 10 customers at the same time is a lot better than only servicing a single customer at a time.
    Likewise, Oracle can service 1000's of different sessions all inserting data.
    Now you want to create a single queue for all insert transactions - and give each one a unique and sequential identifier. This will literally kill performance. It will turn a 32 CPU server into a 1 CPU desktop as all that extra CPU power can never be used as all the sessions need to get into a single queue and be serviced one at a time.
    Also consider the functionality of your approach. Session 1 gets a 5 unique identifiers as it wants to insert 5 rows. Session 2 gets the next 3 sequence numbers. Session 1 aborts and rolls back its transaction (numerous practical reasons exist for why this can and do happen).
    What is the status now in the database table? 5 numbers are now "missing".
    So despite your severely flawed attempt to enforce serialisation and sequential numbering, it will fail. So why then even contemplate turning the Oracle database from being able to service multiple concurrent sessions at the same time, to a slow single-user/single-process database that can only service a single request at a time?
    The CORRECT approach in Oracle is to use a sequence generator (see the CREATE SEQUENCE command in the <i>SQL Reference Guide</i>). Use it. Do not try a flawed approach that WILL fail and that WILL have a very severe performance impact.

  • Strange error while running java program in oracle

    Hi all,
    I have written a java program and saved it as .sqlj file. i have to run the program on sql prompt.
    while running the program i am getting the following error.Please help me.I am in urgent situation
    ORA-29536: badly formed source: User has attempted to load a class
    (tactossSecurity) into a restricted package. Permission can be granted using
    dbms_java.grant_permission(<user>, LoadClassInPackage...
    Thanks & Regards
    Raghavender Rao Kodumuri

    Raghavender,
    I also answered you in the SQL forum, where you posted the exact same question.
    Re: Trying to execute java programm in oracle getting the following error
    Good Luck,
    Avi.

  • Headers getting repeated while running the report in background

    Hi,
    I have a report which uses ALV grid display for output display.
    I have displayed a heder in the top_of_page option. while running the program in foregound the header gets displayed only once. but when executing in background the header is getting displayed for each and every page.
    can any one tell me how to get the header displayed only once in the background also.

    REPORT  ZBACKORD MESSAGE-ID VZ
                                  NO STANDARD PAGE HEADING.
    *& TABLES AND TYPE-POOLS                                               *
    Tables used
    TABLES : VBAK,    "Sales Document: Header Data
             VBAP,    "Sales Document: Item Data
             VBPA.    "Sales Document Partner
    For ALV Display
    TYPE-POOLS: SLIS.  "Globale Typen für generische Listbausteine
    *& CONSTANTS                                                           *
    Constants Used
    CONSTANTS:
               C_X         VALUE 'X',           "Order status
               C_TAPA(4)   VALUE 'TAPA',        "For Material Determination
               C_0001(4)   VALUE '0001',        "Etenr value
               C_A         VALUE 'A',           "Enable Save
               C_US(3)  VALUE 'US$',            "US DOLLAR.
               C_B         VALUE 'B',           "for Partially processed
               C_E         VALUE 'E',           "Language
               C_C         VALUE 'C',           "for completely processed
               C_BLANK     VALUE ' ',           "Blank
               C_IC1(4) VALUE '&IC1',           "for user command
               C_ZR(2)     VALUE 'ZR',          "Cs ReP No
               C_BP(2)     VALUE 'RE',          "Bill to party
               C_SH(2)     VALUE 'WE',          "Sold to party
              C_6(6)      VALUE '000000',      "For item number
               C_20(2)  TYPE N VALUE '20',      "For the length of the field
               C_S(1)   TYPE C VALUE 'S',       "STOCK
               C_H      VALUE 'H',              "Header
               C_COL(1) TYPE C VALUE ':',       " COLUMN FOR DATA AND TIME
               C_TOP    TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
                                               "For TOP_OF_PAGE
               C_USER   TYPE SLIS_FORMNAME VALUE 'USER_COMMAND'.
    " For USER_COMMAND
    *& TYPE DEFINITIONS                                                    *
    *FOR Sales Document: Header Data
    TYPES: BEGIN OF TP_VBAK,
             VBELN TYPE VBELN_VF,   "Sales Document
             ERDAT TYPE ERDAT,      "Date on which the record was created
             AUART TYPE AUART,      "Sales document type
             LIFSK TYPE LIFSK,      "Delivery block
             VKORG TYPE VKORG,      "Sales organization
             VTWEG TYPE VTWEG,      "Distribution channel
           END OF TP_VBAK.
    *FOR Sales Document Business Data
    TYPES :BEGIN OF TP_VBKD,
            VBELN TYPE VBELN,      "Sales and distribution document number
            POSNR TYPE POSNR,      "Item number of the SD document
            INCO1 TYPE INCO1,      "Incoterms
            ZTERM TYPE DZTERM,     "Terms of payment key
            BSTKD TYPE BSTKD,      "Customer purchase order number
          END OF TP_VBKD.
    TYPES : BEGIN OF TP_VBFA,
              VBELV TYPE VBELN_VON,
              POSNV TYPE POSNR_VON,
            END OF TP_VBFA.
    *FOR Sales Document: Partner
    TYPES : BEGIN OF TP_VBPA,
              VBELN TYPE VBELN,    "Sales and distribution
              PARVW TYPE PARVW,    "Partner function
              KUNNR TYPE KUNNR,    "Customer Number 1
              ADRNR TYPE ADRNR,    "address
            END OF TP_VBPA.
    *FOR Addresses (Business Address Services)
    TYPES : BEGIN OF TP_ADRC,
              ADDRNUMBER TYPE AD_ADDRNUM,  "Address
              DATE_FROM TYPE AD_DATE_FR,   "Date valid from
              NATION TYPE AD_NATION,       "International address
              NAME1 TYPE AD_NAME1,         "name
            END OF TP_ADRC.
    *FOR Sales Document: Item Data
    TYPES: BEGIN OF TP_VBAP,
            VBELN TYPE VBELN_VA,   "Sales document
            POSNR TYPE POSNR_VA,   "Sales document item
            MATNR TYPE MATNR,      "Material Number
            PSTYV TYPE PSTYV,      "Sales document item category
            KDMAT TYPE MATNR_KU,   "Material number used by customer
            VRKME TYPE VRKME,      "Sales unit
            WERKS TYPE WERKS_EXT,  "Plant (Own or External)
            VSTEL TYPE VSTEL,      "Shipping point /Receiving point
            NETPR TYPE NETPR,      "Net p
            NETWR TYPE NETWR_AP,
            WAERK TYPE VBAP-WAERK,"Target outline doc currency
         END OF TP_VBAP.
    *for Sales Document: Schedule Line Data
    TYPES: BEGIN OF TP_VBEP,
            VBELN TYPE VBELN_VA,   "Sales document
            POSNR TYPE POSNR_VA,   "Sales Document Item
            ETENR TYPE ETENR,      "Schedule line
            EDATU TYPE EDATU,      "Schedule line data
            WMENG TYPE WMENG,      "Order quantity in sales unit
            BMENG TYPE BMENG,      "Confirmed quantity
            LMENG TYPE LMENG,      "Required quantity
            WADAT TYPE WADAT,      "Goods issue date
            LIFSP TYPE LIFSP_EP,   "Schedule line blocked for delivery
          END OF TP_VBEP.
    *For Sales Document: Header Status and Administrative Data
    TYPES : BEGIN OF TP_VBUK,
              VBELN TYPE VBELN,  "Sales and Distribution Document Number
              SPSTG TYPE SPSTG,  "Overall blocked status
              CMGST TYPE CMGST,
            END OF TP_VBUK.
    TYPES : BEGIN OF TP_TVLST,
              LIFSP TYPE LIFSP,  "Default delivery block
              VTEXT TYPE BEZEI_LIFSP, "Description
            END OF TP_TVLST.
    *FOR Sales Document: Item Status
    TYPES : BEGIN OF TP_VBUP,
              VBELN TYPE VBELN,      "Sales and distribution
              POSNR TYPE POSNR,      "Item number of the SD
              LFGSA TYPE LFGSA,      "Overall delivery status of item
            END OF TP_VBUP.
    For ALV Display-if  cs rep is checked
    TYPES: BEGIN OF TP_DISPC,
              VBELN TYPE VBELN,       "Sales and distribution Doc
              VKORG TYPE VKORG,       "Sales organization
              VTWEG TYPE VTWEG,       "Distribution channel
              AUART TYPE AUART,       "Sales document type
              BSTKD TYPE BSTKD,       "Customer purchase order
              KUNNR_1 TYPE KUNNR,     "Cs Rep Number
              NAME1_1 TYPE NAME1,     "Cs Rep Name
              KUNNR_2 TYPE KUNNR,     "Bill to Number
              NAME1_2 TYPE NAME1,     "Bill to Party
              KUNNR_3 TYPE KUNNR,     "Ship to Number
              NAME1_3 TYPE NAME1,     "Ship to Party
              POSNR TYPE POSNR_VA,    "Item number of the SD
              MATNR TYPE MATNR,       "Material Number
              KDMAT TYPE MATNR_KU,    "Material number used by
              VSTEL TYPE VSTEL,       "Shipping point /Receiving
              NETPR TYPE NETPR,       "Net price
              NETWR TYPE NETWR_AP,
              WAERK TYPE WAERK,       "Currency
              ZTERM TYPE DZTERM,      "Terms of payment key
              WMENG TYPE WMENG,       "Order quantity in sales unit
              LOGIC_1 TYPE WMENG,     "BackOrder Quantity
              VRKME TYPE STRING,      "Sales Unit
              WADAT TYPE EDATU,       "Goods issue date
              WADAT1 TYPE EDATU,
              EDATU TYPE EDATU,       "Schedule line data
              VRKME_1 TYPE STRING,    "Sales Unit
              INCO1 TYPE INCO1,       "Incoterms
              LFGSA TYPE STRING,      "Overall delivery status of item
              LIFSP TYPE STRING,      "Line Item Block
              LIFSK TYPE STRING,      "Header block
              SPSTG TYPE STRING,      "Overall blocked status
             END OF TP_DISPC.
    For ALV Display-if plant is checked
    TYPES: BEGIN OF TP_DISPP,
              VBELN TYPE VBELN,       "Sales and distribution Doc
              VKORG TYPE VKORG,       "Sales organization
              VTWEG TYPE VTWEG,       "Distribution channel
              AUART TYPE AUART,       "Sales document type
              BSTKD TYPE BSTKD,       "Customer purchase order
              KUNNR_2 TYPE KUNNR,     "Cs rep number
              NAME1_2 TYPE NAME1,     "Cs rep Name
              KUNNR_3 TYPE KUNNR,     "Ship to Number
              NAME1_3 TYPE NAME1,     "Ship to Party Name
              POSNR TYPE POSNR_VA,    "Item number of the SD
              MATNR TYPE MATNR,       "Material Number
              KDMAT TYPE MATNR_KU,    "Material number used by customer
              VSTEL TYPE VSTEL,       "Shipping point /Receiving point
              NETPR TYPE NETPR,       "Net price
              NETWR TYPE NETWR_AP,
    *}MOD02
              WAERK TYPE WAERK,       "Currency
              ZTERM TYPE DZTERM,      "Terms of payment key
              WMENG TYPE WMENG,       "Order quantity in sales unit
              LOGIC_1 TYPE WMENG,     "Backorder Quantity
              VRKME TYPE STRING,      "Sales unit
              WADAT TYPE EDATU,       "Goods issue date
              WADAT1 TYPE EDATU,
              EDATU TYPE EDATU,       "Schedule line data
              VRKME_1 TYPE STRING,    "Sales Unit
              INCO1 TYPE INCO1,       "Incoterms
              LFGSA TYPE STRING,      "Overall delivery status of item
              LIFSP TYPE STRING,      "Line Item Block
              LIFSK TYPE STRING,      "Header block
              SPSTG TYPE STRING,      "Overall blocked status
              WERKS TYPE WERKS_EXT,   "Plant (Own or External)
           END OF TP_DISPP.
    For ALV Display-if cs rep and palnt is checked
    TYPES: BEGIN OF TP_DISP,
              VKORG TYPE VKORG,        "Sales organization
              VTWEG TYPE VTWEG,        "Distribution channel
              AUART TYPE AUART,        "Sales document type
              VBELN TYPE VBELN,        "Sales and distribution Doc no
              BSTKD TYPE BSTKD,        "Customer purchase order number
              KUNNR_1 TYPE KUNNR,      "Cs Rep Number
              NAME1_1 TYPE NAME1,      "Cs Rep Name
              KUNNR_2 TYPE KUNNR,      "Bill to Number
              NAME1_2 TYPE NAME1,      "Bill to Name
              KUNNR_3 TYPE KUNNR,      "Ship to Number
              NAME1_3 TYPE NAME1,      "Ship to Name
              POSNR TYPE POSNR_VA,     "Item number of the SD
              MATNR TYPE MATNR,        "Material Number
              KDMAT TYPE MATNR_KU,     "Material number used
              VSTEL TYPE VSTEL,        "Shipping point /Receiving
              NETPR TYPE NETPR,        "Net price
              NETWR TYPE NETWR_AP,
              WAERK TYPE WAERK,        "Currency
              ZTERM TYPE DZTERM,       "Terms of payment key
              WMENG TYPE WMENG,        "Order quantity in sales
              LOGIC_1 TYPE WMENG,      "Backorder Quantity
              VRKME TYPE STRING,       "Sales unit
              WADAT TYPE EDATU,        "Goods issue date
              WADAT1 TYPE EDATU,
              VRKME_1 TYPE STRING,     "Sales Unit
              EDATU TYPE EDATU,        "Schedule line date
              INCO1 TYPE INCO1,        "Incoterms
              LFGSA TYPE STRING,       "Overall delivery status of
              LIFSP TYPE STRING,       "Line Item Block
              LIFSK TYPE STRING,       "Header block
              SPSTG TYPE STRING,       "Overall blocked status
              WERKS TYPE WERKS_EXT,    "Plant (Own or External)
           END OF TP_DISP.
    *& INTERNAL TABLES                                                     *
    Internal Tables used for Data Selection
    DATA: T_VBAK TYPE STANDARD TABLE OF TP_VBAK WITH HEADER LINE,
          T_VBPA TYPE STANDARD TABLE OF TP_VBPA WITH HEADER LINE,
          T_VBAP TYPE STANDARD TABLE OF TP_VBAP WITH HEADER LINE,
          T_VBKD TYPE STANDARD TABLE OF TP_VBKD WITH HEADER LINE,
          T_VBEP TYPE STANDARD TABLE OF TP_VBEP WITH HEADER LINE,
          T_VBEP1 TYPE STANDARD TABLE OF TP_VBEP WITH HEADER LINE,
          T_VBUP TYPE STANDARD TABLE OF TP_VBUP WITH HEADER LINE,
          T_ADRC TYPE STANDARD TABLE OF TP_ADRC WITH HEADER LINE,
          T_DISPC TYPE STANDARD TABLE OF TP_DISPC WITH HEADER LINE,
          T_DISPP TYPE STANDARD TABLE OF TP_DISPP WITH HEADER LINE,
          T_DISP TYPE STANDARD TABLE OF TP_DISP WITH HEADER LINE.
    {23-8-2007
    DATA: T_VBUK TYPE STANDARD TABLE OF TP_VBUK WITH HEADER LINE,
          T_TVLST TYPE STANDARD TABLE OF TP_TVLST WITH HEADER LINE,
          T_TVLST1 TYPE STANDARD TABLE OF TP_TVLST WITH HEADER LINE,
          T_VBFA TYPE STANDARD TABLE OF TP_VBFA WITH HEADER LINE.
                Variables used for ALV Display                           *
    DATA:
          W_REPID TYPE SY-REPID,               " Report name
          W_POS   TYPE I VALUE 0,              " Column position indicator
          W_LAYOUT TYPE SLIS_LAYOUT_ALV,       " Layout
          W_DATUM(10) TYPE C,                  " Run date
          W_TIME(8)   TYPE C.                  " Run time
                Tables used for ALV Display                              *
    DATA  :   T_GROUP TYPE SLIS_T_SP_GROUP_ALV WITH HEADER LINE,
                                                 "Grouping of field
              T_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE,
                                                 "sorting of the field
              T_FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
                                                " Field description
              T_TOP TYPE SLIS_T_LISTHEADER.      " Header for the ALV
                Work Area used for ALV Display
    DATA : WA_TOP LIKE LINE OF T_TOP.            " Work Area for Header
    *& SELECTION SCREEN                                                    *
    Selection
    SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME TITLE TEXT-T01.
    "Sales Organization details
    SELECT-OPTIONS: S_VKORG FOR VBAK-VKORG OBLIGATORY.
    "Sales Organization
    SELECT-OPTIONS: S_VTWEG FOR VBAK-VTWEG .
    "Distribution Channel
    SELECT-OPTIONS: S_KUNNR1 FOR VBPA-KUNNR .             "CS Rep Number
    SELECT-OPTIONS: S_WERKS FOR VBAP-WERKS.               "Plant
    SELECTION-SCREEN END OF BLOCK B01.
    SELECTION-SCREEN BEGIN OF BLOCK B02 WITH FRAME TITLE TEXT-T02.
    "Additional Selections
    SELECT-OPTIONS: S_KUNNR2 FOR VBPA-KUNNR .      "Bill to party
    SELECT-OPTIONS: S_KUNNR3 FOR VBPA-KUNNR .      "Ship to party
    SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN .       "Saler Order
    SELECT-OPTIONS: S_MATNR FOR VBAP-MATNR .       "Material Number
    SELECT-OPTIONS: S_KDMAT FOR VBAP-KDMAT .       "Customer Material Number
    SELECT-OPTIONS: S_AUART FOR VBAK-AUART .       "Sales Order Type
    SELECTION-SCREEN END OF BLOCK B02.
    SELECTION-SCREEN BEGIN OF BLOCK B03 WITH FRAME TITLE TEXT-T03.
    "Date Selection
    SELECT-OPTIONS: S_ERDAT FOR VBAK-ERDAT OBLIGATORY.
    "Order Creation Date
    PARAMETER: P_PLANT AS CHECKBOX.                 "Backorder Plant
    PARAMETER: P_CSREP AS CHECKBOX.                 "Backorder CSREP number
    SELECTION-SCREEN END OF BLOCK B03.
    *& AT SELECTION SCREEN                                                 *
    *Validation Sales Organisation
    AT SELECTION-SCREEN ON S_VKORG.
      IF NOT S_VKORG[] IS INITIAL.
        SELECT VKORG UP TO 1 ROWS FROM TVKO
        BYPASSING BUFFER
        INTO S_VKORG
        WHERE VKORG IN S_VKORG.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          MESSAGE E000 WITH TEXT-E01.
          "Enter a valid Sales Organization
        ENDIF.
      ENDIF.
    *Validation Distribution Channel
    AT SELECTION-SCREEN ON S_VTWEG.
      IF NOT S_VTWEG[] IS INITIAL.
        SELECT VTWEG UP TO 1 ROWS FROM TVTW
         BYPASSING BUFFER
      INTO S_VTWEG
       WHERE VTWEG IN S_VTWEG.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          MESSAGE E000 WITH TEXT-E02.
          "Enter a valid Distribution channel
        ENDIF.
      ENDIF.
    *Validation Customer service rep number
    AT SELECTION-SCREEN ON S_KUNNR1.
      IF NOT S_KUNNR1[] IS INITIAL.
        SELECT KUNNR UP TO 1 ROWS FROM KNA1
        INTO S_KUNNR1
        WHERE KUNNR IN S_KUNNR1.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          MESSAGE E000 WITH TEXT-E03.
          "Enter a valid Customer Service rep number
        ENDIF.
      ENDIF.
    *Validation Plant
    AT SELECTION-SCREEN ON S_WERKS.
      IF NOT S_WERKS[] IS INITIAL.
        SELECT WERKS UP TO 1 ROWS
        FROM T001W
        INTO S_WERKS
        BYPASSING BUFFER
        WHERE WERKS IN S_WERKS.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          MESSAGE E000 WITH TEXT-E04.  "Enter a valid Plant
        ENDIF.
      ENDIF.
    *Validation Bill to number
    AT SELECTION-SCREEN ON S_KUNNR2.
      IF NOT S_KUNNR2[] IS INITIAL.
        SELECT KUNNR UP TO 1 ROWS FROM KNA1
        INTO S_KUNNR2
        WHERE KUNNR IN S_KUNNR2.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          MESSAGE E000 WITH TEXT-E05.  "Enter a valid Bill to number
        ENDIF.
      ENDIF.
    *Validation Ship to Number
    AT SELECTION-SCREEN ON S_KUNNR3.
      IF NOT S_KUNNR3[] IS INITIAL.
        SELECT KUNNR UP TO 1 ROWS FROM KNA1
        INTO S_KUNNR3
        WHERE KUNNR IN S_KUNNR3.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          MESSAGE E000 WITH TEXT-E06.  "Enter a valid Ship to number
        ENDIF.
      ENDIF.
    *Validation Order Number
    AT SELECTION-SCREEN ON S_VBELN.
      IF NOT S_VBELN[] IS INITIAL.
        SELECT VBELN UP TO 1 ROWS FROM VBUK
        INTO S_VBELN
        WHERE VBELN IN S_VBELN.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          MESSAGE E000 WITH TEXT-E07.  "Enter a valid Order number
        ENDIF.
      ENDIF.
    *Validation Material Number
    AT SELECTION-SCREEN ON S_MATNR.
      IF NOT S_MATNR[] IS INITIAL.
        SELECT MATNR UP TO 1 ROWS FROM MARA
        INTO S_MATNR
        WHERE MATNR IN S_MATNR.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          MESSAGE E000 WITH TEXT-E08.  "Enter a valid Material number
        ENDIF.
      ENDIF.
    *Validation Customer Material Number
    AT SELECTION-SCREEN ON S_KDMAT.
      IF NOT S_KDMAT[] IS INITIAL.
        SELECT KDMAT UP TO 1 ROWS
        FROM KNMT
        INTO S_KDMAT
        WHERE VKORG IN S_VKORG AND
              VTWEG IN S_VTWEG AND
              KDMAT IN S_KDMAT.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          MESSAGE E000 WITH TEXT-E09.
          "Enter a valid Customer Material number
        ENDIF.
      ENDIF.
    *Validation Salea order type
    AT SELECTION-SCREEN ON S_AUART.
      IF NOT S_AUART[] IS INITIAL.
        SELECT AUART UP TO 1 ROWS FROM TVAK
        INTO S_AUART
        BYPASSING BUFFER
        WHERE AUART IN S_AUART.
        ENDSELECT.
        IF SY-SUBRC NE 0.
          MESSAGE E000 WITH TEXT-E10.
          "Enter a valid Sales Order type
        ENDIF.
      ENDIF.
    *Validation for Plant / CS rep .
    AT SELECTION-SCREEN .
      IF NOT ( ( P_PLANT = C_X ) OR ( P_CSREP = C_X ) ).
        MESSAGE E000 WITH TEXT-E12.  "Choose the Plant or CSrep
      ENDIF.
      IF  ( P_PLANT = C_X ) AND S_WERKS IS INITIAL.
        MESSAGE E000 WITH TEXT-E13.  "Enter Plant
      ENDIF.
      IF  ( P_CSREP = C_X ) AND S_KUNNR1 IS INITIAL.
        MESSAGE E000 WITH TEXT-E14. " Enter CSREP number
      ENDIF.
    *& START OF SELECTION                                                  *
    START-OF-SELECTION.
    Clear Work Areas/Variables and Clear/Refresh Internal Tables
      PERFORM CLEAR_REFRESH.
    Selection of Data as per inputs
      PERFORM DATA_SELECTION.
    Populate Internal table for display
      PERFORM DATA_FILL_FOR_DISPLAY.
    *& END OF SELECTION                                                  *
    END-OF-SELECTION.
      IF NOT T_DISP[] IS INITIAL.
    *Populating the field catalog for ALV Display if plant and csrep is
    *checked.
        PERFORM POPULATE_FIELD_CATALOG.
        PERFORM DISPLAY.
      ELSEIF T_DISPP[] IS NOT INITIAL.
    *Populating the field catalog for ALV Display if plant is checked.
        PERFORM POPULATE_FIELD_CATALOG.
        PERFORM DISPLAY.
      ELSEIF T_DISPC[] IS NOT INITIAL.
    *Populating the field catalog for ALV Display if csrep is checked.
        PERFORM POPULATE_FIELD_CATALOG.
        PERFORM DISPLAY.
      ELSE.
        MESSAGE I000 WITH TEXT-E15. "No Data found for Selection Criteria
      ENDIF.
    Clear Work Areas/Variables and Clear/Refresh Internal Tables
      PERFORM CLEAR_REFRESH.
    *&      Form  CLEAR_REFRESH
          Clear Work Areas/Variables and Clear/Refresh Internal Tables
    FORM CLEAR_REFRESH .
    Clear Variables/Work Areas/Internal Tables
      CLEAR: W_REPID,
             W_POS,
             W_LAYOUT,
             W_DATUM,
             W_TIME,
             T_VBAK,
             T_VBKD,
             T_VBPA,
             T_VBAP,
             T_VBEP,
             T_VBUP,
             T_DISPC,
             T_DISPP,
             T_DISP,
             T_VBUK,
             T_TVLST,
             T_TVLST1.
    Refresh Internal Tables
      REFRESH: T_VBAK,
               T_VBKD,
               T_VBPA,
               T_VBAP,
               T_VBEP,
               T_VBUP,
               T_DISPC,
               T_DISPP,
               T_DISP,
               T_VBUK,
               T_TVLST,
               T_TVLST1.
    ENDFORM.                    " CLEAR_REFRESH
    *&      Form  DATA_SELECTION
          Selection of Data as per inputs
    FORM DATA_SELECTION .
    *Obtain Sales and distribution document number,Date on which the record
    *was created
    *Sales document type,Delivery block,Sales organisation,
    Distribution channel based on selection criteria
      SELECT VBELN                            "Sales and distribution Doc no
             ERDAT
             "Date on which the record was created
             AUART                            "Sales document type
             LIFSK                            "Delivery block
             VKORG                            "Sales organisation
             VTWEG                            "Distribution channel
             FROM VBAK
             INTO TABLE T_VBAK
             WHERE VBELN IN S_VBELN AND
                   ERDAT IN S_ERDAT AND
                   AUART IN S_AUART AND
                   VKORG IN S_VKORG AND
                   VTWEG IN S_VTWEG.
      IF SY-SUBRC EQ 0.
        SORT T_VBAK BY VBELN .
    *Obtain Sales document ,Sales document item,Material Number,Material
    *number used by customer
    Safer point ,Plant (Own or External),Shipping point /Receiving point
    Net price based on selection criteria
        SELECT A~VBELN        "Sales document
               A~POSNR        "Sales document item
               MATNR        "Material Number
               PSTYV        "Sales document item category
               KDMAT        "Material number used by customer
               VRKME        "Sales unit
               WERKS        "Plant (Own or External)
               VSTEL        "Shipping point /Receiving point
               NETPR        "Net price
    *MOD02 {
               NETWR
    *}MOD02
               WAERK        "Target outline doc currency
               FROM  VBAP AS A JOIN VBUP AS B
               ON ( AVBELN = BVBELN
                   AND APOSNR = BPOSNR )
               INTO TABLE T_VBAP
               FOR ALL ENTRIES IN T_VBAK
               WHERE A~VBELN = T_VBAK-VBELN AND
                     A~MATNR IN S_MATNR AND
                     A~PSTYV NE C_TAPA AND
                     A~KDMAT IN S_KDMAT AND
                     A~WERKS IN S_WERKS AND
                     A~ABGRU EQ SPACE AND
                     B~LFSTA NE 'C'.
        IF SY-SUBRC EQ 0.
          SORT T_VBAP BY VBELN POSNR.
        ENDIF.
       SELECT VBELV
              POSNV
              FROM VBFA
              INTO TABLE T_VBFA
              FOR ALL ENTRIES IN T_VBAP
              WHERE VBELV = T_VBAP-VBELN
              AND POSNV = T_VBAP-POSNR
              AND VBTYP_N = 'J'.
       IF SY-SUBRC = 0.
         SORT T_VBFA BY VBELV POSNV.
         LOOP AT T_VBAP.
    *READ TABLE T_VBFA WITH KEY VBELV = T_VBAP-VBELN POSNV = T_VBAP-POSNR.
           IF SY-SUBRC = 0.
             DELETE T_VBAP.
           ENDIF.
         ENDLOOP.
       ENDIF.
    { 23-8-2007
        SELECT LIFSP
               VTEXT
               FROM TVLST
               INTO TABLE T_TVLST
               FOR ALL ENTRIES IN T_VBAK
               WHERE SPRAS EQ C_E AND
                     LIFSP = T_VBAK-LIFSK.
        IF SY-SUBRC EQ 0.
          SORT T_TVLST BY LIFSP.
        ENDIF.
    *Obtain Sales and distribution document number,Item number of the SD
    *document ,Incoterms,Terms of payment key,Customer purchase order number
    *based on selection criteria
        SELECT VBELN                 "Sales and distribution document number
               POSNR                 "Item number of the SD document
               INCO1                 "Incoterms
               ZTERM                 "Terms of payment key
               BSTKD                 "Customer purchase order number
               FROM VBKD INTO TABLE T_VBKD
               FOR ALL ENTRIES IN T_VBAK
               WHERE VBELN = T_VBAK-VBELN.
        IF SY-SUBRC EQ 0.
          SORT T_VBKD BY VBELN .
        ENDIF.
    *Obtain Sales document,Sales Document Item,Schedule line,Schedule line
    *data, Order quantity in sales unit,Confirmed quantity,Goods issue date,
    *Schedule line blocked for delivery based on selection criteria
        SELECT VBELN                    "Sales document
                POSNR                   "Sales Document Item
                ETENR                   "Schedule line
                EDATU                   "Schedule line data
                CMENG                   "Order quantity in sales unit
                BMENG                   "Confirmed quantity
                LMENG
                WADAT                   "Goods issue date
                LIFSP                   "Schedule line blocked for delivery
                FROM VBEP INTO TABLE T_VBEP
                FOR ALL ENTRIES IN T_VBAK
                WHERE VBELN = T_VBAK-VBELN AND
                      ETENR = C_0001.
        IF SY-SUBRC EQ 0.
          SORT T_VBEP BY VBELN POSNR ETENR.
    { 23-8-2007
          SELECT LIFSP
                 VTEXT
                 FROM TVLST
                 INTO TABLE T_TVLST1
                 FOR ALL ENTRIES IN T_VBEP
                 WHERE SPRAS EQ C_E AND
                       LIFSP = T_VBEP-LIFSP.
          IF SY-SUBRC EQ 0.
            SORT T_TVLST1 BY LIFSP.
          ENDIF.
        ENDIF.
        SELECT VBELN                    "Sales document
                    POSNR                   "Sales Document Item
                    ETENR                   "Schedule line
                    EDATU                   "Schedule line data
                    CMENG                   "Order quantity in sales unit
                    BMENG                   "Confirmed quantity
                    LMENG
                    WADAT                   "Goods issue date
                    LIFSP
                    "Schedule line blocked for delivery
                    FROM VBEP INTO TABLE T_VBEP1
                    FOR ALL ENTRIES IN T_VBAK
                    WHERE VBELN = T_VBAK-VBELN .
        IF SY-SUBRC EQ 0.
          SORT T_VBEP1 BY VBELN POSNR .
        ENDIF.
    { 23-8-2007
        SELECT    VBELN    "Sales and Distribution Document Number
                  SPSTG    "Overall blocked status
    *MOD02 {
                  CMGST
    *}MOD02
            FROM VBUK
            INTO TABLE T_VBUK
            FOR ALL ENTRIES IN T_VBAK
           WHERE VBELN = T_VBAK-VBELN
           AND ( CMGST = 'A' OR CMGST = 'D' ).
        IF SY-SUBRC EQ 0.
          SORT T_VBUK BY VBELN .
        ENDIF.
    *Obtain Sales and distribution Doc no,Item number of the SD document
    Overall delivery status of item
        SELECT    VBELN    "Sales and distribution Doc no
                  POSNR    "Item number of the SD document
                  LFGSA    "Overall delivery status of item
            FROM VBUP
            INTO TABLE T_VBUP
            FOR ALL ENTRIES IN T_VBAK
           WHERE VBELN = T_VBAK-VBELN.
        IF SY-SUBRC EQ 0.
          SORT T_VBUP BY VBELN POSNR.
        ENDIF.
    *Obtain Sales and distribution document number,Partner function
    Customer Number 1,address based on selection criteria
        SELECT    VBELN   "Sales and distribution Doc no
                  PARVW   " Patner function
                  KUNNR   "Customer No1
                  ADRNR   "address
                    FROM VBPA
                    INTO TABLE T_VBPA
                    FOR ALL ENTRIES IN T_VBAP
                   WHERE VBELN = T_VBAP-VBELN AND
                        ( ( KUNNR IN S_KUNNR1 ) OR
                         ( KUNNR IN S_KUNNR2 )  OR
                          ( KUNNR IN S_KUNNR3 ) ) AND
                           ( ( PARVW = C_ZR ) OR
                             ( PARVW = C_BP ) OR
                             ( PARVW = C_SH ) ).
        IF SY-SUBRC EQ 0.
          SORT T_VBPA BY VBELN PARVW.
          IF NOT T_VBPA[] IS INITIAL.
    *Obtain  Address number ,name
            SELECT  ADDRNUMBER  "Address number
                    DATE_FROM   "Date valid from
                    NATION      "International address version ID
                    NAME1        "name
              FROM ADRC
              INTO TABLE T_ADRC
              FOR ALL ENTRIES IN T_VBPA
              WHERE ADDRNUMBER = T_VBPA-ADRNR.
            IF SY-SUBRC EQ 0.
              SORT T_ADRC BY ADDRNUMBER.
            ENDIF.
          ENDIF.
        ELSE.
          MESSAGE I000 WITH TEXT-S02."No Data For the Entered CS rep number
          STOP.
        ENDIF.
      ELSE.
        MESSAGE I000 WITH TEXT-S01.
        "No data found for the selection criteria
        STOP.
      ENDIF.
    ENDFORM.                    " DATA_SELECTION
    *&      Form  DATA_FILL_FOR_DISPLAY
          Populate Internal table for display
    FORM DATA_FILL_FOR_DISPLAY .
      DATA: L_NETPR TYPE NETPR.    "For net amount
      DATA: L_DATE TYPE EDATU.     "For Date Field
      DATA: L_WMENG TYPE WMENG.    "For Confirmed Quantity
      DATA: L_BMENG TYPE BMENG.    "For Delivered Quantity
      DATA : L_LAST_DATE TYPE EDATU.
      DATA : W_FG TYPE C.
      DATA : L_TABIX TYPE SY-TABIX.
      DATA: L_CNT TYPE I,
            L_NETWR TYPE NETWR.
    *If plant and csrep are selected.
      IF ( ( P_PLANT = C_X ) AND ( P_CSREP = C_X ) ).
        LOOP AT T_VBAP.
          CLEAR W_FG.
          CLEAR L_CNT.
    *MOD02 {
          READ TABLE T_VBUK WITH KEY VBELN = T_VBAP-VBELN.
          IF SY-SUBRC = 0.
    *}MOD02
            LOOP AT T_VBEP1 WHERE VBELN = T_VBAP-VBELN AND POSNR =
            T_VBAP-POSNR.
              L_CNT = L_CNT + 1.
              IF L_LAST_DATE IS NOT INITIAL AND W_FG NE 'X'.
                IF L_LAST_DATE NE T_VBEP1-WADAT.
                  W_FG = 'X'.
                ENDIF.
              ENDIF.
              L_LAST_DATE = T_VBEP1-WADAT.
            ENDLOOP.
            IF L_CNT = 1 AND T_VBEP1-BMENG = 0.
              W_FG = 'X'.
            ENDIF.
            IF W_FG = 'X'.
              READ TABLE T_VBEP WITH KEY VBELN = T_VBAP-VBELN
                                         POSNR = T_VBAP-POSNR
                                          BINARY SEARCH.
              IF SY-SUBRC EQ 0.
    *Move Order quantity in sales unit to final internal table
                MOVE T_VBEP-WMENG TO T_DISP-WMENG.
                MOVE T_VBEP-WADAT TO T_DISP-WADAT1.
    *Move Goods issue date to final internal table
                MOVE T_VBEP-EDATU TO T_DISP-WADAT.
    { 23-8-2007
                READ TABLE T_TVLST1 WITH KEY LIFSP = T_VBEP-LIFSP
                                          BINARY SEARCH.
                IF SY-SUBRC EQ 0.
                  CONCATENATE T_VBEP-LIFSP
                                  T_TVLST1-VTEXT
                                  INTO T_DISP-LIFSP
                                  SEPARATED BY SPACE.
                ENDIF.
    *Move the Schedule line blocked for delivery
    to final internal table.
              ENDIF.
    *LOOP AT T_VBEP1 WHERE VBELN = T_VBAP-VBELN AND POSNR = T_VBAP-POSNR.
              LOOP AT T_VBEP1 WHERE VBELN = T_VBAP-VBELN AND POSNR =
              T_VBAP-POSNR.
                L_WMENG = T_VBEP1-WMENG + L_WMENG.
                L_BMENG = T_VBEP1-BMENG + L_BMENG.
           IF NOT L_DATE IS INITIAL.
             IF ( L_DATE < T_VBEP1-EDATU ).
               L_DATE = T_VBEP1-EDATU.
             ENDIF.
           ELSE.
             L_DATE = T_VBEP1-EDATU.
           ENDIF.
                AT END OF POSNR.
                  READ TABLE T_VBEP1 INDEX SY-TABIX.
                  IF SY-SUBRC = 0.
                    L_DATE = T_VBEP1-EDATU.
                  ENDIF.
                ENDAT.
              ENDLOOP.
              IF T_VBEP1-WMENG EQ T_VBEP1-BMENG.
                T_DISP-LOGIC_1 = 0.
                T_DISP-EDATU = T_VBEP1-EDATU.
              ELSEIF   L_WMENG EQ L_BMENG  .
                T_DISP-EDATU = L_DATE.
                T_DISP-LOGIC_1 = L_WMENG.
              ELSE.
                T_DISP-EDATU = C_BLANK.
                T_DISP-LOGIC_1 = L_WMENG.
              ENDIF.
    *Move the Sales document item to final internal table.
              MOVE T_VBAP-POSNR TO T_DISP-POSNR.
    *Move the Material Number to final internal table.
              MOVE T_VBAP-MATNR TO T_DISP-MATNR.
    *Move the Material number used by customer to final internal table.
              MOVE T_VBAP-KDMAT TO T_DISP-KDMAT.
    *Move the Shipping point to final internal table.
              MOVE T_VBAP-VSTEL TO T_DISP-VSTEL.
    *Move the Sales unit to final internal table.
              PERFORM UNIT1 USING T_VBAP-VRKME CHANGING T_VBAP-VRKME.
              MOVE T_VBAP-VRKME TO T_DISP-VRKME.
              MOVE T_VBAP-VRKME TO T_DISP-VRKME_1.
    *Move the Plant (Own or External) to final internal table.
              MOVE T_VBAP-WERKS TO T_DISP-WERKS.
              MOVE T_VBAP-WAERK TO T_DISP-WAERK.
    *Move the Net price to final internal table.
              IF  T_VBAP-WAERK = C_US   .
                L_NETPR = T_VBAP-NETPR.
                L_NETPR = L_NETPR / 100.
                T_DISP-NETPR = L_NETPR.
                CLEAR L_NETPR.
              ELSE.
                MOVE T_VBAP-NETPR TO T_DISP-NETPR.
              ENDIF.
              CLEAR L_NETPR.
    *MOD02{
              IF  T_VBAP-WAERK = C_US   .
                L_NETWR = T_VBAP-NETWR.
                L_NETWR = L_NETWR / 100.
                T_DISP-NETWR = L_NETWR.
                CLEAR L_NETWR.
              ELSE.
                MOVE T_VBAP-NETWR TO T_DISP-NETWR.
              ENDIF.
              CLEAR L_NETWR.
    *}MOD02
    *READ THE TABLE VBAK TO FETCH Sales Order Number,sales
    *organisation,distribution channel,Document type,Delivery block
              READ TABLE T_VBAK WITH KEY VBELN = T_VBEP-VBELN BINARY SEARCH.
              IF SY-SUBRC EQ 0.
    *Move the Sales order number to final internal table.
                MOVE T_VBAK-VBELN TO T_DISP-VBELN.
                PERFORM DELETE_LEADING_ZEROES CHANGING T_DISP-VBELN.
    *Move the Sales organisation to final internal table.
                MOVE T_VBAK-VKORG TO T_DISP-VKORG.
    *Move the Distribution channel to final internal table.
                MOVE T_VBAK-VTWEG TO T_DISP-VTWEG.
    *Move the Document type to final internal table.
                MOVE T_VBAK-AUART TO T_DISP-AUART.
    {23-8-2007
                READ TABLE T_TVLST WITH KEY LIFSP = T_VBAK-LIFSK
                                            BINARY SEARCH.
                IF SY-SUBRC EQ 0.
                  CONCATENATE T_VBAK-LIFSK
                              T_TVLST-VTEXT
                              INTO T_DISP-LIFSK
                              SEPARATED BY SPACE.
                ENDIF.
              ENDIF.
    *READ THE TABLE VBKD TO FETCH Incoterms,Terms of payment key,Customer
    *purchase order number
              READ TABLE T_VBKD WITH KEY VBELN = T_VBAP-VBELN
                BINARY SEARCH.
              IF SY-SUBRC EQ 0.
    *Move the Customer purchase order number to final internal table.
                MOVE T_VBKD-BSTKD TO T_DISP-BSTKD.
    *Move the Incoterms to final internal table.
                MOVE T_VBKD-INCO1 TO T_DISP-INCO1.
    *Move the Terms of payment to final internal table.
                MOVE T_VBKD-ZTERM TO T_DISP-ZTERM.
              ENDIF.
    { 23-8-2007
              READ TABLE T_VBUK WITH KEY VBELN = T_VBEP-VBELN
              BINARY SEARCH.
              IF SY-SUBRC EQ 0.
                IF T_VBUK-SPSTG EQ SPACE.
                  T_DISP-SPSTG = TEXT-TE1. "Not Blocked
                ELSEIF T_VBUK-SPSTG EQ C_C.
                  T_DISP-SP

  • Short dump while running Payroll

    Dear Experts,
    I am getting short dump while running the payroll for around 150 employees, but am not able to see the short dump also as it says that "process terminated".
    please help me in this regard and also let me know if there could be any configuration errors.
    Regards
    Shansar

    Thank you all for the response.
    The issue has been resolved.  i have learnt that log field should not be flagged when you are executing payroll for more than 50 employees.
    Regards
    Shansar

  • Error while running jms program in eclipse

    Hi,
    Friends.I am new to forum.This is the first question I am posting.I am new to Java Messaging service.While running the program in eclipse I am getting the following error...
    javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'scsstasdap03:QSEIBEL'
         at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:569)
         at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2328)
         at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1749)
         at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:144)
         at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:54)
         at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:106)
         at com.bofa.pbes.cedapi.cmwmq.JMSManager.<init>(JMSManager.java:87)
         at com.bofa.pbes.cedapi.cmwmq.JMSManager.<clinit>(JMSManager.java:40)
         at com.bofa.pbes.cedapi.cmwmq.JMSCEDAgent.<init>(JMSCEDAgent.java:24)
         at com.bofa.pbes.cedapi.cmwmq.MessageProcessingController.<init>(MessageProcessingController.java:34)
         at com.bofa.pbes.cedapi.cmwmq.MessageProcessingController.<clinit>(MessageProcessingController.java:38)
    java.lang.ExceptionInInitializerError
    Caused by: java.lang.NullPointerException
         at com.bofa.pbes.cedapi.cmwmq.JMSManager.addMessageListener(JMSManager.java:173)
         at com.bofa.pbes.cedapi.cmwmq.JMSCEDAgent.<init>(JMSCEDAgent.java:25)
         at com.bofa.pbes.cedapi.cmwmq.MessageProcessingController.<init>(MessageProcessingController.java:34)
         at com.bofa.pbes.cedapi.cmwmq.MessageProcessingController.<clinit>(MessageProcessingController.java:38)
    Exception in thread "main"
    Please help me.....

    Have a look in eclipse in the menu under window -> preferences -> java -> installed jre's which one is selected there.
    Than you have to check you project settings: right click on the project and select properterties. Check "Java Build Path" and "Java Compiler" settings.
    If you run your program, the console also shows the version you are running. If it is an 1.6 version everything should work.

  • I am Using Ajax with DWR while running the application i am getting error?

    Hi,
    I am using DWR concept while running the program i am getting the following error:
    uk.ltd.getahead.dwr.util.CommonsLoggingOutput info INFO: Exec[0]: Demo.sayHello()
    and also all the methods that are there in that Java class. Plz anybody help me how to overcome this problem

    Hi Rameshkumar,
    The workaround mentioned by Chris will not be required in future versions of TopLink 10.1.3. We have removed our dependency on the 3-arg javax.xml.namespace.QName constructor that is not present in the WebLogic 8.1 distribution of the QName class.
    -Blaise

Maybe you are looking for

  • Segmenting the data in the table

    Hello, I need to create the segmentation on a table. Below is the original data in the table. Begmeasure       EndMeasure       DetMethod         Testpressure 0                          7703                   Acceptable          1006 7703            

  • Tracking in flash/Swf :: Help me please :)

    This is my first time working with Ad Tracking in Flash and I want to make sure I'm going about it correctly.. I can't test it on my side, so I want to know it's right when I pass it on to the client. I've gone through the tutorials on Adobe and here

  • Changing multiple file permissions - Applications folder

    After using migration assistant in Snow Leopard and then changing the username of my primary user, all third party apps in my Applications folder require me to enter the admin password when moving, updating with Sparkle, etc. They don't seem to have

  • Set flag for a set of records

    Hi I have a table that stores requests raised by employees as below name Request_ID date status ABC 112 05-Dec-11 rejected ABC 786 06-Dec-11 approved ABC 987 07-Dec-11 rejected ABC 119 08-Dec-11 approved MNP 221 09-Nov-11 rejected MNP 666 10-Nov-11 a

  • How do I stop my iPad from going 'ding' loudly every time I get an iMessage?

    How do I stop my iPad from going ding loudly every time a text message comes through? Not a good look in a meeting! Cheers