Outside in development - Server proxy  in ECC60

Hi,
Is it possible to develop webservices in ECC6.0 system with outside in approach without XI.That means for a given wsdl generated by third party system ( not XI )we need to generate server proxy and this has to act as a webservice.
If it's possible any documentation on this or details how to achieve this?
Thanks,
Abdul Raheem S

Hi,
   Thanks for replying to the message. I am asking this question based on below blog.
/people/sap.user72/blog/2005/12/29/service-enable-your-sap-application-component
As mentioned in the blog while generation server proxy it generates proxy class but it generages client proxy ( Outbound interface ).
Path to create Server Proxy:
SE80->Edit Object->Enterprise Services>Server Proxy>new
Thanks,
Abdul Raheem S
null

Similar Messages

  • ABAP Server Proxy development for creation of IDOC

    Hi all,
    I am working on JDBC to ABAP Server Proxy where i need to populate fields and then i need to mapp to the standard IDOC ie, SHIPMENT_CREATEFROMDATA01 which will create shipment idoc this is my requirement.Can anyone provide me the proxy development part  for creation of IDOC.
    Regards,
    Bhoj

    Hi,
    Create server proxy at the receiver end and deploy it using the following links:
    ABAP Server proxies
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    Debugging of Inbound ABAP proxies
    /people/stefan.grube/blog/2006/07/28/xi-debug-your-inbound-abap-proxy-implementation
    File to R/3 via ABAP Proxy
    /people/prateek.shah/blog/2005/06/14/file-to-r3-via-abap-proxy
    How to push data from BI to XI using proxy
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e698aa90-0201-0010-7982-b498e02af76b
    How to push data into BW from XI using proxy
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/18dfe590-0201-0010-6b8b-d21dfa9929c9
    http://help.sap.com/saphelp_nw04s/helpdata/en/2d/b9766df88f4a24967dae38cb672fe1/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/11/e2bc3d9ecc6b3be10000000a114084/frameset.htm
    Server proxy part1 and part2:
    /people/sap.user72/blog/2005/12/08/integration-builders-through-proxy-server-part--1
    /people/sap.user72/blog/2005/12/13/integration-builders-through-proxy-server-part--2
    Regards,
    Vinod.

  • Internal table in ABAP Server Proxy

    Hi Experts,
        I have developed a JDBC to ABAP Proxy scenario.
    I have a problem. In my ABAP server proxy I have to import the values into an internal table and pass them to a BAPI for GR creation.
    I get an error like. OCCURS 0 is not allowed in OO concept.
    Can anyone give me examples on declaring internal table in an ABAP Proxy(OO Concept).
    Thanks
    AK

    Hi
    Check this out.
    http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb3660358411d1829f0000e829fbfe/frameset.htm
    Cheers

  • Error in Java Server Proxy in PI 7.1

    Hi Gurus,
       Can you please help me whether for Java server Proxies ,registration of interfaces are required or not in PI 7.1? I am using one synchronus interface(stateless).I have developped the proxy by connecting the ESR from NWDS and generating the Java skeleton from that interface.It is deployed and I tested the WSDL also after creating the service endpoint.It is running fine.
                   But while trying to use that proxy in an end-to-end scenario and triggering the msg from RWB->integration engine,even after registering it is giving the error "Cannot locate proxy bean localejbs/sap.com/JavaProxyServer/CalculatorImplBean"
    Is it also requirred in PI 7.1 to register the interface?If not,the what should be the next step?
    Thanks,
    Jaydeep

    Hi,
    I am working on java proxy PI7.1.
    I have follwed the steps provided in the below link
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508bb504-87cf-2c10-2aaf-f3a5df75e651?quicklink=index&overridelayout=true
    I have Generates an outbound JAX-WS proxy based on the WSDL document.
    And i didnt get the further steps.
    Please advice me how to deploy the java proxie.
    Thanks,
    Sabitha

  • OAS 4.0.8 & Developer Server 6.0

    Hi,
    I 've installed on WindowsNT Workstation 4.0/SP5
    1.) Developer Server Rel.6.0
    2.) OAS 4.0.8.0.0
    When I open a HTML file which has a reference to Forms executable (.fmx)
    I get the Oracle Developer Server logo and nothing happens. Java console shows the following error messages:
    com.ms.security.SecurityExceptionEx[oracle/forms/engine/Main.init]: cannot access file C:\WINNT\Java\.hotjava
    at com/ms/security/permissions/FileIOPermission.check
    Error getting package information: sun/applet
    com.ms.packagemanager.PackageManagerException: Package not found.
    I had this working in OAS 4.0.7. but not in 4.0.8.
    Can anyone tell me why it is trying to access C:\WINNT\Java\.hotjava?
    Any help is appreciated.
    Thank you.
    null

    Never mind. I found the problem.
    The above error message occurs when
    "security settings have not been configured to allow Java applications in the Intranet Zone to run outside of the Java sandbox".
    null

  • ABAP Server Proxy - ICM_HTTP_CONNECTION_FAILED

    Hi,
    i am trying to develop java proxy to abap proxy.
    my test pattern JAVA application -> XI -> R/3
    proxy setting has no problem, i created inbound proxy by using sproxy.
    when i send data by java application with proxy,
    i could see data comming from client java proxy on sxmb_moni, after mapping request and technical routing, i got the following error on Adapter call step.
    i already tested my inbound abap proxy without problem so that i am aware of knowing abap coding issue or not.
    i think that it's XI adapter communication issue from adapter frame work to R/3 side...
    so what step do i have to do?
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Adapter Call (Integration Engine, Idoc, RFC)
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">CLIENT_RECEIVE_FAILED</SAP:Code>
      <SAP:P1>400</SAP:P1>
      <SAP:P2>ICM_HTTP_CONNECTION_FAILED</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText><html><head><title>Application Server Error</title> <style type="text/css"> body { font-family: arial, sans-serif;} </style> </head> <BODY text="#172972" link="#808080" vlink="#808080" alink="#8e236b" bgcolor=white leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"> <table height="61" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td background="http://xi.test.com:8000/sap/public/icman/img/bluebar_tile.gif" height="30"><table> <tr> <td width=5></td> <td width=20% nowrap><font face=arial size="-1" color=white>SAP Web Application Server </font></td><td width=75% align="right" nowrap><font face=arial size="-1" color="white"><a href="http://help.sap.com/">Help </font></td><td width=5% nowrap></font></td> </tr></table> </td><td rowspan=2 width=122 height=61 valign=top><img src= "http://xi.test.com:8000/sap/public/icman/img/theme.jpg" width=122 height=61 border=0 alt="SAP"></td> </tr><tr><td background="http://xi.test.com:8000/sap/public/icman/img/graybar_tile.jpg" height="31">  </td></tr> </table> <br><br> <table width=800> <tr><td width=50 nowrap> </td><td> <H2><b>404 Resource not found</b></H2><br>Partner not reached<br><br><hr> <table border="0"> <tr><td>Error:</td><td>-20</td></tr> <tr><td>Version:</td><td>7000</td></tr> <tr><td>Component:</td><td>ICM</td></tr> <tr><td>Date/Time:</td><td>Thu Aug 3 20:22:57 2006 </td></tr> <tr><td>Module:</td><td>icxxconn_mt.c</td></tr> <tr><td>Line:</td><td>2314</td></tr> <tr><td>Server:</td><td>xi_SXD_00</td></tr> <tr><td>Error Tag:</td><td></td></tr> <tr><td>Detail:</td><td>Connection request from (23/16970/0) to host: 70.2.240.70, service: 8000 failed (NIECONN_REFUSED) EX-T23, U16970, 300 XIAFUSER, 70.7.103.208, 20:22:52, M0, W0, , 1/0</td></tr> </table> <p></p> </td></tr></table> <table><tr><td width=50 nowrap></td> <td nowrap><FONT SIZE=-1><a href="http://www.sap.com/">&copy; 2001-2005, SAP AG</a></FONT> </td></tr></table> </body></html></SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error while receiving by HTTP (error code: 400, error text: ICM_HTTP_CONNECTION_FAILED)</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>

    Hi Venjamin,
    Here are a list of possible reasons for your problem with solutions.
    It could be that it cannot find your file adapter.
    1. Have you specified your hostname or IP address? Often the server cannot resolve the ip address for the hostname of your PC.
    2. Is the path and port in the directory the same as the path and port of your file adapter?
    3. Try question 14 (integration engine section)
    /people/mark.finnern/blog/2006/01/12/finally-best-of-sdn-2005
    4. also question 11 (in the same section)
    5. if the avove will not fix it open XI config guide and
    have a look at section
    "Connecting Business Systems with an Integration Engine to the Central Integration Server"
    6. Your error code is 400, so check this link,
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
    For http 400 - its a bad request.
    'The request could not be understood by the server due to malformed syntax.'
    If you have the XI trouble shooting guide see from page 54,and also try:
    1.Check that the port really is the ICM HTTP Port (transaction
    SMICM) and not the J2EE port
    2.If the port is wrong, change the pipeline URL in the SLD in
    the business system of the Integration Server
    3.Restart the J2EE Engine to reset the SLD buffer of the
    Adapter Engine
    Source- "XI troubleshooting guide"
    Regards,
    Abhy

  • Error code 403  in Java Server Proxy

    Hi All,
    I developed Java Server Proxy.
    1. I get the Generated files from IR.
    2. Implement those files in J2EE Application.
    3. Configure all .xml configuration files.
    4. Deploy the .ear file.
    5. Register the Bean in JPR registry.
    finally i put the file in source side then the file picked successfully.
    I checked in Message Monitor i got success message but I Checked in SXMB_MONI then i got the following error .
    ERROR:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>
      <SAP:P1>403</SAP:P1>
      <SAP:P2>Forbidden</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Error Report</title> <style> td {font-family : Arial, Tahoma, Helvetica, sans-serif; font-size : 14px;} A:link A:visited A:active </style> </head> <body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" rightmargin="0"> <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75"> <tr bgcolor="#FFFFFF"> <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="4" color="#666666"><b>  403 &nbsp Forbidden</b></font></td> </tr> <tr bgcolor="#3F73A3"> <td height="23" width="84"><img width=1 height=1 border=0 alt=""></td> <td height="23"><img width=1 height=1 border=0 alt=""></td> <td align="right" height="23"><font face="Arial, Verdana, Helvetica" size="2" color="#FFFFFF"><b>SAP J2EE Engine/7.00 </b></font></td> </tr> <tr bgcolor="#9DCDFD"> <td height="4" colspan="3"><img width=1 height=1 border=0 alt=""></td> </tr> </table> <br><br><br><br><br><br> <table width="100%" cellspacing="0" cellpadding="0" border="0" align="left" height="75"> <tr bgcolor="#FFFFFF"> <td align="left" colspan="2" height="48"><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><b>  You are not authorized to view the requested resource.</b></font></td> </tr> <tr bgcolor="#FFFFFF"> <td align="left" valign="top" height="48"><font face="Arial, Verdana, Helvetica" size="2" color="#000000"><b>  Details:</b></font></td> <td align="left" valign="top" height="48"><font face="Arial, Verdana, Helvetica" size="3" color="#000000"><pre>  No details available</pre></font></td> </tr> </body> </html></SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP response contains status code 403 with the description Forbidden Error while sending by HTTP (error code: 403, error text: Forbidden)</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Please give me the sloution.
    Thanks,
    Bharathiraja R

    Hi
    Look into this blog where you have solutions for all Errors.
    /people/krishna.moorthyp/blog/2006/07/23/http-errors-in-xi
    Error: HTTP 403 Forbidden
    Description: The server understood the request, but is refusing to fulfill it
    Possible Tips:
    Path sap/xi/engine not active
    • HTTP 403 during cache refresh of the adapter framework - Refer SAP Note -751856
    • Because of Inactive Services in ICF –Go to SICF transaction and activate the services. Refer SAP Note -517484
    • Error in RWB/Message Monitoring- because of J2EE roles – Refer SAP Note -796726
    • Error in SOAP Adapter - "403 Forbidden" from the adapter's servlet. –Because of the URL is incorrect or the adapter is not correctly deployed.
    Reward points if usefull..........

  • Error "To run a SSIS package outside of SQL Server data tools you must install task name used in package of Integration service or highter.

    Hello Team,
    I am trying to execute a SSIS package from web page. When i try to do that i am getting following error.
    "To run a SSIS package outside of SQL Server data tools you must install <task name used in package> of Integration service or highter."
    In my machine Integration Services are installed and its service is also in running state.
    Please help me on this.
    Thanks,
    Ramesh
    Thanks, Ramesh Arige

    The SSIS package developed using SSIS 2008 Server R2 and Integrations Services 10.0 is exists in my machine. Is this wrong configuration, please help me on this.
    I am using the below code copied from CodeProject
    Thank you so much for responding.
    Ramesh
    Thanks, Ramesh Arige
    Which way are you using from the provided blog? Using 1) C# Code or 2) C# and Stored Procedure?
    Cheers,
    Vaibhav Chaudhari
    MCP, MCTS, MCSA (SQL Server 2012)

  • Problems while creating Web Services in development server

    Hello,
    We are facing problems while creating Web services . The transaction like WSADMIN, WSCONFIG are not there in development server. Its gives message u2018This transaction is obsoleteu2019.
    Due to this while creating Webservice, there is and error message . Kindly guide me whats needs to be done.
    We have also tried the transaction WSADMIN2 as suggested by SAP, but didnu2019t know wat needs to be done.
    Regards,
    Rachel
    Edited by: Rachel on Feb 3, 2009 9:15 AM

    Hi,
    With your help, we were configuring WEB Service through soamanger.Due to some problem, we couldn't proceed further.Kindly guide us with the further steps.
    *steps followed *
    Step 1 : Entered Service Registry Parameters in WSPARAM .
    Step 2 : In transaction SOAMANAGER->Technical Configuration -->System Global settings
    Step3 : From u2018SE80u2019 transaction, selected the package ZHR and then right clicked to create the enterprise service -> Client Proxy (Service Producer)
    We have followed steps in se80.Don't know how to proceed further.
    We are unable to find the service in soamanger .How to find the service name in soamanager?
    Regards,
    Rachel
    Edited by: Rachel on Feb 3, 2009 12:38 PM
    Edited by: Rachel on Feb 3, 2009 12:48 PM

  • Coding of Server proxy

    Hi all,
    where Can I see the Server Proxy code in XI if already implemented or not.  Where we can develop the server proxies and client proxies in XI. Please give the good suggisions.
    thanks in advance.
    Regards,
    Anjaneya

    <i>where Can I see the Server Proxy code in XI if already implemented or not</i>
    U can see it only in receiver R3 system
    <i>Where we can develop the server proxies and client proxies in XI. Please give the good suggisions.</i>
    Client proxy created at sender R/3. Seerver proxy at receiver R/3 .
    These are not developed on XI
    /people/ravikumar.allampallam/blog/2005/03/14/abap-proxies-in-xiclient-proxy
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    Regards,
    Prateek

  • Transfer of business object from development server to testing server

    if i want to transfer business object from development server to testing server how can i do that?
    what is the system landscape?
    what is business object?

    Hi Rizwan,
    U can get details of Business Objects in tcode - SWO1.
    Business objects are real world entities modeled as objects in an information system.
    Business objects encapsulate both data structures and the functions applied to the data, but hide their full complexity from other objects. This encapsulation of data and functions makes it easier to modify program components, because you can program with the relevant entities without having to know all the implementation details. You can also reuse existing functions.
    Client programs access business objects by reading their attributes, or by calling the methods that make up the objectu2019s interface:
    Attributes
    Attributes describe the data stored in an object through a set of properties. They provide direct read access to the data structures of objects, but client programs cannot change them from outside.
    Methods
    Methods provide a way to encapsulate the data structures of business objects, and to process them. When accessing an object, the client program calls a method with parameters and gets back return parameters.
    Interface
    The interface is the set of methods associated with a business object, and determines how an object interacts with the outside world.
    The client program defines the object types to be used and, at runtime, creates object instances of those object types.

  • Inside-out and Outside-in development

    What is Inside-out and Outside-in development in XI related to Adapters and Proxies?

    Hey
    Outside-In: You can develop new, platform-independent message interfaces by using the Integration Builder. Message interfaces are based on the WSDL standard Web Services Description Language), an XML schema for describing network services. Using this description, you can generate platform-specific proxies in Java or ABAP that you can then use to implement the actual message exchange.refers to Proxy development
    · Inside-Out: You can connect interfaces from SAP and non-SAP systems to SAP Exchange Infrastructure by using adapters. The Integration Builder can import interface descriptions in XML format for BAPI, RFC, and IDoc interfaces from SAP systems Release 4.0 or higher.Refers to adapters usage
    source:
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/d4c23b95c8466ce10000000a114084/content.htm
    thanx
    ahmad
    Message was edited by:
            Ahmad

  • Difference in Inside-out and Outside-In development approaches

    Hi,
    Can you please tell me difference between Inside-out and Outside-In development approaches. I heard it with respect to adapters and proxies.

    Hi Rupesh...
    <b>Nice question as a Project Management point of view..</b>
    We can go for Interface development in 2 ways..:
    1. Create Interface objects in XI and replicate that thing in both sides for further development..
    Adv :: You are not dependent on others for XI development....Like in case of Proxies.
    Disadvantage : Skill in proxy required..
    2. Create RFC/IDoc  in end systems and import those in XI for development..
    Advantage  : People are usually familiar/comfortable with adapter oriented approach rather then adapter less..
    Disadvantage : you can't start your work before the end systems have completed their task..Once they have completed then only you can import the RFC/IDoc and proceed..
    About deciding the approach : It depends upon teams strength/situation ...Like in one of the project i have worked Project needs to be done by a Consortium of 3 teams from different companies..One for handling legacy one for R3 one for XI..
    So we went for Approach 1 as we don't want our work to be dependent on others..
    Hope i am clear..
    Regards,

  • Why This Report Not Working in Production Server But in Development Server

    I just need your help in solving one issue. There is one report which is working fine in development server but it is not getting executed in production server.
    Although the code is same in both the server. Could you please guide me in locating the problem. I am attaching that report with this mail. Please do the needful help.
    TABLES : a363,
             mara,
             marc,
             makt,
             ekko,
             ekpo,
             mkpf,
             mseg,
             konp,
             konh.
    SELECTION-SCREEN
    SELECTION-SCREEN   :   BEGIN OF BLOCK cst WITH FRAME TITLE text-001.
    SELECT-OPTIONS :   s_matnr FOR mara-matnr,                            "Material Number
                       s_lifnr FOR ekko-lifnr,                            "Account Number of the Vendor
                       s_bedat FOR ekko-bedat,                            "Purchasing Document Date
                       s_kschl FOR konh-kschl OBLIGATORY NO INTERVALS,    "Condition type
                       s_bwart FOR mseg-bwart OBLIGATORY NO INTERVALS.    "Movement Type (Inventory Management)
    PARAMETERS     :   p_werks LIKE marc-werks OBLIGATORY.                "Plant
    SELECTION-SCREEN   :   END OF BLOCK cst.
    INCLUDES
    INCLUDE zalv_data.
    DATA - INTERNAL TABLES AND FIELD LISTS
    DATA :  BEGIN    OF     a363_itab  OCCURS 0,
            matnr    LIKE   a363-matnr,                    "Material Number
            lifnr    LIKE   a363-lifnr,                    "Account Number of the Vendor
            werks    LIKE   a363-werks,                    "Plant
            kschl    LIKE   a363-kschl,                    "Condition type
            knumh    LIKE   a363-knumh,                    "Condition record number
            kbetr    LIKE   konp-kbetr,                    "Rate (condition amount or percentage) where no scale exists
            END      OF     a363_itab.
    DATA :  BEGIN    OF     konp_itab  OCCURS 0,
            knumh    LIKE   a363-knumh,                    "Condition record number
            kbetr    LIKE   konp-kbetr,                    "Rate (condition amount or percentage) where no scale exists
            lifnr    LIKE   a363-lifnr,                    "Account Number of the Vendor
            END      OF     konp_itab.
    DATA :  BEGIN    OF     ekko_itab  OCCURS 0,
            ebeln    LIKE   ekko-ebeln,                    "Purchasing Document Number
            lifnr    LIKE   ekko-lifnr,                    "Account Number of the Vendor
            bedat    LIKE   ekko-bedat,                    "Purchasing Document Date
            END      OF     ekko_itab.
    DATA :  BEGIN    OF     ekpo_itab  OCCURS 0,
            ebeln    LIKE   ekpo-ebeln,                    "Purchasing Document Number
            ebelp    LIKE   ekpo-ebelp,                    "Item Number of Purchasing Document
            matnr    LIKE   ekpo-matnr,                    "Material Number
            werks    LIKE   ekpo-werks,                    "Plant
            menge    LIKE   ekpo-menge,                    "Purchase order quantity
            END      OF     ekpo_itab.
    DATA :  BEGIN    OF     v_po_det  OCCURS 0,            "VENDOR + PLANT + PO DEATILS
            lifnr    LIKE   ekko-lifnr,                    "Account Number of the Vendor
            ebeln    LIKE   ekko-ebeln,                    "Purchasing Document Number
            ebelp    LIKE   ekpo-ebelp,                    "Item Number of Purchasing Document
            bedat    LIKE   ekko-bedat,                    "Purchasing Document Date
            matnr    LIKE   ekpo-matnr,                    "Material Number
            werks    LIKE   ekpo-werks,                    "Plant
            menge    LIKE   ekpo-menge,                    "Purchase order quantity
            kbetr    LIKE   konp-kbetr,                    "Rate (condition amount or percentage) where no scale exists
            END      OF     v_po_det.
    DATA :  BEGIN    OF     mseg_itab  OCCURS 0,
            mblnr    LIKE   mseg-mblnr,                    "Number of Material Document
            ebeln    LIKE   mseg-ebeln,                    "Purchasing Document Number
            ebelp    LIKE   mseg-ebelp,                    "Item Number of Purchasing Document
            matnr    LIKE   mseg-matnr,                    "Material Number
            lifnr    LIKE   mseg-lifnr,                    "Account Number of the Vendor
            werks    LIKE   mseg-werks,                    "Plant
            menge    LIKE   mseg-menge,                    "Quantity
            dmbtr    LIKE   mseg-dmbtr,                    "Amount in local currency
            bwart    LIKE   mseg-bwart,                    "Movement Type (Inventory Management)
            END      OF     mseg_itab.
    DATA :  BEGIN    OF     mkpf_itab  OCCURS 0,
            mblnr    LIKE   mkpf-mblnr,                    "Number of Material Document
            bldat    LIKE   mkpf-bldat,                    "Document Date in Document
            END      OF     mkpf_itab.
    DATA :  BEGIN    OF     zeou_pcrdtl_itab  OCCURS 0,
            matnr    LIKE   zeou_pcrdtl-matnr,             "Material Number
            lifnr    LIKE   zeou_pcrdtl-lifnr,             "Account Number of the Vendor
            mblnr    LIKE   zeou_pcrdtl-mblnr,             "Number of Material Document
            whssn    LIKE   zeou_pcrdtl-whssn,             "Warehouse Records Entry Serial No.
            whsdt    LIKE   zeou_pcrdtl-whsdt,             "Warehouse Records Entry date
            END      OF     zeou_pcrdtl_itab.
    DATA :  BEGIN    OF     gr_wh_info  OCCURS 0,          "INFO OF GR & WH BASED ON MVMT TYPE & PO
            mblnr    LIKE   mseg-mblnr,                    "Number of Material Document
            bldat    LIKE   mkpf-bldat,                    "Document Date in Document
            ebeln    LIKE   mseg-ebeln,                    "Purchasing Document Number
            ebelp    LIKE   ekpo-ebelp,                    "Item Number of Purchasing Document
            matnr    LIKE   mseg-matnr,                    "Material Number
            lifnr    LIKE   mseg-lifnr,                    "Account Number of the Vendor
            werks    LIKE   mseg-werks,                    "Plant
            menge    LIKE   mseg-menge,                    "Quantity
            dmbtr    LIKE   mseg-dmbtr,                    "Amount in local currency
            bwart    LIKE   mseg-bwart,                    "Movement Type (Inventory Management)
            whssn    LIKE   zeou_pcrdtl-whssn,             "Warehouse Records Entry Serial No.
            whsdt    LIKE   zeou_pcrdtl-whsdt,             "Warehouse Records Entry date
            END      OF     gr_wh_info.
    DATA :  BEGIN    OF     bseg_itab  OCCURS 0,
            ebeln    LIKE   bseg-ebeln,                    "Purchasing Document Number
            ebelp    LIKE   bseg-ebelp,                    "Item Number of Purchasing Document
            matnr    LIKE   bseg-matnr,                    "Material Number
            lifnr    LIKE   bseg-lifnr,                    "Account Number of the Vendor
            werks    LIKE   bseg-werks,                    "Plant
            buzid    LIKE   bseg-buzid,                    "Identification of the Line Item
            bschl    LIKE   bseg-bschl,                    "Posting Key
            wrbtr    LIKE   bseg-wrbtr,                    "Amount in document currency
            bukrs    LIKE   bseg-bukrs,                    "Company Code
            belnr    LIKE   bseg-belnr,                    "Accounting Document Number
            gjahr    LIKE   bseg-gjahr,                    "Fiscal Year
            END      OF     bseg_itab.
    DATA :  BEGIN    OF     bkpf_itab  OCCURS 0,
            bukrs    LIKE   bkpf-bukrs,                    "Company Code
            belnr    LIKE   bkpf-belnr,                    "Accounting Document Number
            gjahr    LIKE   bkpf-gjahr,                    "Fiscal Year
            xblnr    LIKE   bkpf-xblnr,                    "Reference Document Number
            bldat    LIKE   bkpf-bldat,                    "Document Date in Document
            END      OF     bkpf_itab.
    DATA :  BEGIN    OF     vend_inv  OCCURS 0,            "VENDOR INVOICE DETAILS
            ebeln    LIKE   bseg-ebeln,                    "Purchasing Document Number
            ebelp    LIKE   bseg-ebelp,                    "Item Number of Purchasing Document
            matnr    LIKE   bseg-matnr,                    "Material Number
            lifnr    LIKE   bseg-lifnr,                    "Account Number of the Vendor
            werks    LIKE   bseg-werks,                    "Plant
            buzid    LIKE   bseg-buzid,                    "Identification of the Line Item
            bschl    LIKE   bseg-bschl,                    "Posting Key
            wrbtr    LIKE   bseg-wrbtr,                    "Amount in document currency
            bukrs    LIKE   bseg-bukrs,                    "Company Code
            belnr    LIKE   bseg-belnr,                    "Accounting Document Number
            gjahr    LIKE   bseg-gjahr,                    "Fiscal Year
            xblnr    LIKE   bkpf-xblnr,                    "Reference Document Number
            bldat    LIKE   bkpf-bldat,                    "Document Date in Document
            END      OF     vend_inv.
    DATA :  BEGIN    OF     chckinit  OCCURS 0,            "CHEQUE INIT INFO
            ebeln    LIKE   bseg-ebeln,                    "Purchasing Document Number
            ebelp    LIKE   bseg-ebelp,                    "Item Number of Purchasing Document
            matnr    LIKE   bseg-matnr,                    "Material Number
            lifnr    LIKE   bseg-lifnr,                    "Account Number of the Vendor
            werks    LIKE   bseg-werks,                    "Plant
            buzid    LIKE   bseg-buzid,                    "Identification of the Line Item
            bschl    LIKE   bseg-bschl,                    "Posting Key
            bukrs    LIKE   bkpf-bukrs,                    "Company Code
            belnr    LIKE   bkpf-belnr,                    "Accounting Document Number
            gjahr    LIKE   bkpf-gjahr,                    "Fiscal Year
            koart    LIKE   bseg-koart,                    "Account type
            augbl    LIKE   bseg-augbl,                    "Document Number of the Clearing Document
            END      OF     chckinit.
    DATA :  BEGIN    OF     chckpayer  OCCURS 0,           "CHEQUE BANK DETAILS
            vblnr    LIKE   payr-vblnr,                    "Document Number of the Payment Document
            zbukr    LIKE   payr-zbukr,                    "Paying company code
            gjahr    LIKE   payr-gjahr,                    "Fiscal Year
            chect    LIKE   payr-chect,                    "Check Number
            zaldt    LIKE   payr-zaldt,                    "Probable Payment Date (Cash Discount 1 Due)
            hbkid    LIKE   payr-hbkid,                    "Short key for a house bank
            END      OF     chckpayer.
    DATA :  chckpayer_u LIKE chckpayer OCCURS 0 WITH HEADER LINE.      "UNIQUE CHEQUE DETAILS
    DATA :  BEGIN    OF     chckfinal  OCCURS 0,           "CHEQUE FINAL INFO
            ebeln    LIKE   bseg-ebeln,                    "Purchasing Document Number
            ebelp    LIKE   bseg-ebelp,                    "Item Number of Purchasing Document
            matnr    LIKE   bseg-matnr,                    "Material Number
            lifnr    LIKE   bseg-lifnr,                    "Account Number of the Vendor
            werks    LIKE   bseg-werks,                    "Plant
            buzid    LIKE   bseg-buzid,                    "Identification of the Line Item
            bschl    LIKE   bseg-bschl,                    "Posting Key
            bukrs    LIKE   bkpf-bukrs,                    "Company Code
            belnr    LIKE   bkpf-belnr,                    "Accounting Document Number
            gjahr    LIKE   bkpf-gjahr,                    "Fiscal Year
            koart    LIKE   bseg-koart,                    "Account type
            augbl    LIKE   bseg-augbl,                    "Document Number of the Clearing Document
            vblnr    LIKE   payr-vblnr,                    "Document Number of the Payment Document
            zbukr    LIKE   payr-zbukr,                    "Paying company code
            chect    LIKE   payr-chect,                    "Check Number
            zaldt    LIKE   payr-zaldt,                    "Probable Payment Date (Cash Discount 1 Due)
            hbkid    LIKE   payr-hbkid,                    "Short key for a house bank
            END      OF     chckfinal.
    DATA :  BEGIN    OF     mat_desc OCCURS 0,
            matnr    LIKE   mara-matnr,
            maktx    LIKE   makt-maktx,
            END      OF     mat_desc.
    DATA :  BEGIN      OF     vend_det OCCURS 0,
            lifnr      LIKE   lfa1-lifnr,
            name1      LIKE   lfa1-name1,
            j_1icstno  LIKE   j_1imovend-j_1icstno,
            END        OF     vend_det.
    DATA :  BEGIN    OF     cst_rep  OCCURS 0,             "FINAL CST REPORT
            lifnr    LIKE   a363-lifnr,                    "Account Number of the Vendor
            name1    LIKE   lfa1-name1,                    "Vendor Name
            j_1icstno  LIKE   j_1imovend-j_1icstno,        " Vendor CST No.
            werks    LIKE   a363-werks,                    "Plant
           kschl    LIKE   a363-kschl,                    "Condition type
            ebeln    LIKE   ekko-ebeln,                    "Purchasing Document Number
            ebelp    LIKE   ekpo-ebelp,                    "Item Number of Purchasing Document
            bedat    LIKE   ekko-bedat,                    "Purchasing Document Date
            matnr    LIKE   ekpo-matnr,                    "Material Number
            maktx    LIKE   makt-maktx,                    "Material Description.
            kbetr    LIKE   konp-kbetr,                    "Rate (condition amount or percentage) where no scale exists
            mblnr    LIKE   mseg-mblnr,                    "Number of Material Document
            bldat    LIKE   mkpf-bldat,                    "Document Date in Document
            menge    LIKE   mseg-menge,                    "Quantity
            dmbtr    LIKE   mseg-dmbtr,                    "Amount in local currency
            cst_dmbtr LIKE  mseg-dmbtr,                    "CST Amount in local currency
            bwart    LIKE   mseg-bwart,                    "Movement Type (Inventory Management)
            whssn    LIKE   zeou_pcrdtl-whssn,             "Warehouse Records Entry Serial No.
            whsdt    LIKE   zeou_pcrdtl-whsdt,             "Warehouse Records Entry date
            buzid    LIKE   bseg-buzid,                    "Identification of the Line Item
            bschl    LIKE   bseg-bschl,                    "Posting Key
            wrbtr    LIKE   bseg-wrbtr,                    "Amount in document currency
            cst_wrbtr LIKE  bseg-wrbtr,                    "CST Amount in document currency
            belnr    LIKE   bseg-belnr,                    "Accounting Document Number
            gjahr    LIKE   bseg-gjahr,                    "Fiscal Year
            xblnr    LIKE   bkpf-xblnr,                    "Reference Document Number
            koart    LIKE   bseg-koart,                    "Account type
            augbl    LIKE   bseg-augbl,                    "Document Number of the Clearing Document
            vblnr    LIKE   payr-vblnr,                    "Document Number of the Payment Document
            zbukr    LIKE   payr-zbukr,                    "Paying company code
            chect    LIKE   payr-chect,                    "Check Number
            zaldt    LIKE   payr-zaldt,                    "Probable Payment Date (Cash Discount 1 Due)
            hbkid    LIKE   payr-hbkid,                    "Short key for a house bank
            END      OF     cst_rep.
    DATA :  BEGIN    OF     gt_output  OCCURS 0,              "ALV OUTPUT
            slno     LIKE   sy-tabix,                      "Serial Number
            lifnr    LIKE   a363-lifnr,                    "Account Number of the Vendor
            name1    LIKE   lfa1-name1,                    "Vendor Name
            j_1icstno  LIKE   j_1imovend-j_1icstno,        " Vendor CST No.
            werks    LIKE   a363-werks,                    "Plant
           kschl    LIKE   a363-kschl,                    "Condition type
            ebeln    LIKE   ekko-ebeln,                    "Purchasing Document Number
            ebelp    LIKE   ekpo-ebelp,                    "Item Number of Purchasing Document
            bedat    LIKE   ekko-bedat,                    "Purchasing Document Date
            matnr    LIKE   ekpo-matnr,                    "Material Number
            maktx    LIKE   makt-maktx,                    "Material Description
            mblnr    LIKE   mseg-mblnr,                    "Number of Material Document
            bldat    LIKE   mkpf-bldat,                    "Document Date in Document
            menge    LIKE   mseg-menge,                    "Quantity
            dmbtr    LIKE   mseg-dmbtr,                    "Amount in local currency
            cst_dmbtr LIKE  mseg-dmbtr,                    "CST Amount in local currency
            bwart    LIKE   mseg-bwart,                    "Movement Type (Inventory Management)
            whssn    LIKE   zeou_pcrdtl-whssn,             "Warehouse Records Entry Serial No.
            whsdt    LIKE   zeou_pcrdtl-whsdt,             "Warehouse Records Entry date
            buzid    LIKE   bseg-buzid,                    "Identification of the Line Item
            bschl    LIKE   bseg-bschl,                    "Posting Key
            wrbtr    LIKE   bseg-wrbtr,                    "Amount in document currency
            cst_wrbtr LIKE  bseg-wrbtr,                    "CST Amount in document currency
            belnr    LIKE   bseg-belnr,                    "Accounting Document Number
            gjahr    LIKE   bseg-gjahr,                    "Fiscal Year
            xblnr    LIKE   bkpf-xblnr,                    "Reference Document Number
            koart    LIKE   bseg-koart,                    "Account type
            augbl    LIKE   bseg-augbl,                    "Document Number of the Clearing Document
            vblnr    LIKE   payr-vblnr,                    "Document Number of the Payment Document
            zbukr    LIKE   payr-zbukr,                    "Paying company code
            chect    LIKE   payr-chect,                    "Check Number
            zaldt    LIKE   payr-zaldt,                    "Probable Payment Date (Cash Discount 1 Due)
            hbkid    LIKE   payr-hbkid,                    "Short key for a house bank
            usr_txt1(20) TYPE c,
            usr_txt2(20) TYPE c,
            END      OF     gt_output.
    *Working Variables
    DATA : cst_gr  LIKE  mseg-dmbtr,
           cst_inv LIKE  bseg-wrbtr,
           usr_txt1(20) TYPE c,
           usr_txt2(20) TYPE c.
    START-OF-SELECTION.
    *Retreiving Data from a363 table for the given input
      SELECT  matnr
              lifnr
              werks
              kschl
              knumh
              FROM a363
              INTO TABLE a363_itab
              WHERE matnr IN s_matnr AND lifnr IN s_lifnr AND werks EQ p_werks AND kschl IN s_kschl.
      SELECT  *
              FROM konp
              INTO CORRESPONDING FIELDS OF TABLE konp_itab
              FOR ALL ENTRIES IN a363_itab
              WHERE knumh EQ a363_itab-knumh.
      LOOP AT a363_itab.
        READ TABLE konp_itab WITH KEY knumh = a363_itab-knumh.
        IF sy-subrc EQ 0.
          MOVE : konp_itab-kbetr TO a363_itab-kbetr.
          MODIFY a363_itab.
        ENDIF.
        CLEAR : a363_itab, konp_itab.
      ENDLOOP.
      SELECT *
             FROM makt
             INTO CORRESPONDING FIELDS OF TABLE mat_desc
             FOR ALL ENTRIES IN a363_itab
             WHERE matnr EQ a363_itab-matnr.
      SELECT a~lifnr
             a~name1
             b~j_1icstno
             INTO TABLE vend_det
             FROM lfa1 AS a JOIN j_1imovend AS b
             ON alifnr EQ blifnr
             FOR ALL ENTRIES IN a363_itab
             WHERE a~lifnr EQ a363_itab-lifnr.
    Retreiving Data from EKKO & EKPO table for the given input
    And Populating the V_PO_DETAILS itab
      SELECT  *
              FROM ekko
              INTO CORRESPONDING FIELDS OF TABLE ekko_itab
              FOR ALL ENTRIES IN a363_itab
              WHERE lifnr EQ a363_itab-lifnr AND bedat IN s_bedat.
      SELECT  *
              FROM ekpo
              INTO CORRESPONDING FIELDS OF TABLE ekpo_itab
              FOR ALL ENTRIES IN a363_itab
              WHERE matnr EQ a363_itab-matnr AND werks EQ a363_itab-werks AND mwskz NE 'V0'.
      LOOP AT ekpo_itab.
        MOVE :   ekpo_itab-ebelp TO v_po_det-ebelp,
                 ekpo_itab-matnr TO v_po_det-matnr,
                 ekpo_itab-werks TO v_po_det-werks,
                 ekpo_itab-menge TO v_po_det-menge.
        READ TABLE ekko_itab WITH KEY ebeln = ekpo_itab-ebeln.
        IF sy-subrc EQ 0.
          MOVE  :  ekko_itab-lifnr TO v_po_det-lifnr,
                   ekko_itab-ebeln TO v_po_det-ebeln,
                   ekko_itab-bedat TO v_po_det-bedat.
          APPEND : v_po_det.
        ENDIF.
        CLEAR  : ekko_itab, ekpo_itab, v_po_det.
      ENDLOOP.
      LOOP AT v_po_det.
        READ TABLE a363_itab WITH KEY matnr = v_po_det-matnr lifnr = v_po_det-lifnr werks = v_po_det-werks.
        IF sy-subrc EQ 0.
          MOVE : a363_itab-kbetr TO v_po_det-kbetr.
          MODIFY v_po_det.
        ENDIF.
        CLEAR : a363_itab, v_po_det.
      ENDLOOP.
    Retreiving Data from MKPF & MSEG & ZEOU_PCRDTL table for the given input
    And Populating the GR_WH_info itab
      SELECT  *
              FROM mseg
              INTO CORRESPONDING FIELDS OF TABLE mseg_itab
              FOR ALL ENTRIES IN v_po_det
              WHERE ebeln EQ v_po_det-ebeln AND matnr EQ v_po_det-matnr AND bwart IN s_bwart.
      SELECT  *
              FROM mkpf
              INTO CORRESPONDING FIELDS OF TABLE mkpf_itab
              FOR ALL ENTRIES IN mseg_itab
              WHERE mblnr EQ mseg_itab-mblnr.
      SELECT  *
              FROM zeou_pcrdtl
              INTO CORRESPONDING FIELDS OF TABLE zeou_pcrdtl_itab
              FOR ALL ENTRIES IN mseg_itab
              WHERE mblnr EQ mseg_itab-mblnr AND matnr EQ mseg_itab-matnr.
      LOOP AT mseg_itab.
        MOVE  :  mseg_itab-mblnr TO gr_wh_info-mblnr,
                 mseg_itab-ebeln TO gr_wh_info-ebeln,
                 mseg_itab-ebelp TO gr_wh_info-ebelp,
                 mseg_itab-matnr TO gr_wh_info-matnr,
                 mseg_itab-lifnr TO gr_wh_info-lifnr,
                 mseg_itab-werks TO gr_wh_info-werks,
                 mseg_itab-menge TO gr_wh_info-menge,
                 mseg_itab-dmbtr TO gr_wh_info-dmbtr,
                 mseg_itab-bwart TO gr_wh_info-bwart.
        READ TABLE mkpf_itab WITH KEY mblnr = mseg_itab-mblnr.
        IF sy-subrc EQ 0.
          MOVE  :  mkpf_itab-bldat TO gr_wh_info-bldat.
        ENDIF.
        READ TABLE zeou_pcrdtl_itab WITH KEY mblnr = mseg_itab-mblnr.
        IF sy-subrc EQ 0.
          MOVE  :  zeou_pcrdtl_itab-whssn TO gr_wh_info-whssn,
                   zeou_pcrdtl_itab-whsdt TO gr_wh_info-whsdt.
        ENDIF.
        APPEND : gr_wh_info.
        CLEAR : mseg_itab, mkpf_itab, gr_wh_info.
      ENDLOOP.
    Retreiving Data from BSEG & BKPF table
    And Populating the Vendor Invoice Details
      SELECT  *
              FROM bseg
              INTO CORRESPONDING FIELDS OF TABLE bseg_itab
              FOR ALL ENTRIES IN v_po_det
              WHERE ebeln EQ v_po_det-ebeln AND matnr EQ v_po_det-matnr AND buzid EQ 'W' AND bschl EQ '96'.
      SELECT  *
              FROM bkpf
              INTO CORRESPONDING FIELDS OF TABLE bkpf_itab
              FOR ALL ENTRIES IN bseg_itab
              WHERE bukrs EQ bseg_itab-bukrs AND belnr EQ bseg_itab-belnr AND gjahr EQ bseg_itab-gjahr.
      LOOP AT bseg_itab.
        MOVE  :  bseg_itab-ebeln TO vend_inv-ebeln,
                 bseg_itab-ebelp TO vend_inv-ebelp,
                 bseg_itab-matnr TO vend_inv-matnr,
                 bseg_itab-lifnr TO vend_inv-lifnr,
                 bseg_itab-werks TO vend_inv-werks,
                 bseg_itab-buzid TO vend_inv-buzid,
                 bseg_itab-bschl TO vend_inv-bschl,
                 bseg_itab-wrbtr TO vend_inv-wrbtr,
                 bseg_itab-bukrs TO vend_inv-bukrs,
                 bseg_itab-belnr TO vend_inv-belnr,
                 bseg_itab-gjahr TO vend_inv-gjahr.
        READ TABLE bkpf_itab WITH KEY bukrs = bseg_itab-bukrs belnr = bseg_itab-belnr gjahr = bseg_itab-gjahr.
        IF sy-subrc EQ 0.
          MOVE  :  bkpf_itab-xblnr TO vend_inv-xblnr,
                   bkpf_itab-bldat TO vend_inv-bldat.
          APPEND  :  vend_inv.
        ENDIF.
        CLEAR : vend_inv, bseg_itab, bkpf_itab.
      ENDLOOP.
    Retreiving Data from BSEG & BKPF table
    And Populating the Cheque Info Details
      SELECT  *
              FROM bseg
              INTO CORRESPONDING FIELDS OF TABLE chckinit
              FOR ALL ENTRIES IN v_po_det
              WHERE ebeln EQ v_po_det-ebeln AND matnr EQ v_po_det-matnr AND buzid EQ 'W' AND bschl EQ '86' AND koart EQ 'K'.
      SELECT  *
              FROM payr
              INTO CORRESPONDING FIELDS OF TABLE chckpayer
              FOR ALL ENTRIES IN chckinit
              WHERE vblnr EQ chckinit-augbl.
      SORT chckpayer BY vblnr DESCENDING.
      LOOP AT chckpayer.
        ON CHANGE OF chckpayer-vblnr.
          MOVE   : chckpayer TO chckpayer_u.
          APPEND : chckpayer_u.
          CLEAR  : chckpayer_u, chckpayer.
        ENDON.
      ENDLOOP.
      LOOP AT chckinit.
        MOVE  :  chckinit-ebeln TO chckfinal-ebeln,
                 chckinit-ebelp TO chckfinal-ebelp,
                 chckinit-matnr TO chckfinal-matnr,
                 chckinit-lifnr TO chckfinal-lifnr,
                 chckinit-werks TO chckfinal-werks,
                 chckinit-buzid TO chckfinal-buzid,
                 chckinit-bschl TO chckfinal-bschl,
                 chckinit-bukrs TO chckfinal-bukrs,
                 chckinit-gjahr TO chckfinal-gjahr,
                 chckinit-koart TO chckfinal-koart,
                 chckinit-augbl TO chckfinal-augbl.
        READ TABLE chckpayer_u WITH KEY vblnr = chckinit-augbl gjahr = chckinit-gjahr.
        IF sy-subrc EQ 0.
          MOVE  :  chckpayer_u-vblnr TO chckfinal-vblnr,
                   chckpayer_u-zbukr TO chckfinal-zbukr,
                   chckpayer_u-chect TO chckfinal-chect,
                   chckpayer_u-zaldt TO chckfinal-zaldt,
                   chckpayer_u-hbkid TO chckfinal-hbkid.
          APPEND : chckfinal.
        ENDIF.
        CLEAR : chckfinal, chckpayer_u, chckinit.
      ENDLOOP.
    Populating the final CST TABLE
      LOOP AT v_po_det.
        MOVE  :   v_po_det-lifnr TO cst_rep-lifnr,
                  v_po_det-werks TO cst_rep-werks,
                  v_po_det-ebeln TO cst_rep-ebeln,
                  v_po_det-ebelp TO cst_rep-ebelp,
                  v_po_det-bedat TO cst_rep-bedat,
                  v_po_det-matnr TO cst_rep-matnr,
                  v_po_det-kbetr TO cst_rep-kbetr.
        READ TABLE gr_wh_info WITH KEY ebeln = v_po_det-ebeln ebelp = v_po_det-ebelp."matnr = v_po_det-matnr.
        IF sy-subrc EQ 0.
          MOVE :  gr_wh_info-mblnr TO cst_rep-mblnr,
                  gr_wh_info-bldat TO cst_rep-bldat,
                  gr_wh_info-menge TO cst_rep-menge,
                  gr_wh_info-dmbtr TO cst_rep-dmbtr,
                  gr_wh_info-bwart TO cst_rep-bwart,
                  gr_wh_info-whssn TO cst_rep-whssn,
                  gr_wh_info-whsdt TO cst_rep-whsdt.
        ENDIF.
        READ TABLE vend_inv WITH KEY ebeln = v_po_det-ebeln ebelp = v_po_det-ebelp."matnr = v_po_det-matnr.
        IF sy-subrc EQ 0.
          MOVE : vend_inv-buzid TO cst_rep-buzid,
                 vend_inv-bschl TO cst_rep-bschl,
                 vend_inv-wrbtr TO cst_rep-wrbtr,
                 vend_inv-belnr TO cst_rep-belnr,
                 vend_inv-gjahr TO cst_rep-gjahr,
                 vend_inv-xblnr TO cst_rep-xblnr.
        ENDIF.
        READ TABLE chckfinal WITH KEY ebeln = v_po_det-ebeln ebelp = v_po_det-ebelp."matnr = v_po_det-matnr.
        IF sy-subrc EQ 0.
          MOVE : chckfinal-augbl TO cst_rep-augbl,
                 chckfinal-vblnr TO cst_rep-vblnr,
                 chckfinal-zbukr TO cst_rep-zbukr,
                 chckfinal-chect TO cst_rep-chect,
                 chckfinal-zaldt TO cst_rep-zaldt,
                 chckfinal-hbkid TO cst_rep-hbkid.
        ENDIF.
        READ TABLE mat_desc WITH KEY matnr = v_po_det-matnr.
        IF sy-subrc EQ 0.
          MOVE : mat_desc-maktx TO cst_rep-maktx.
        ENDIF.
        READ TABLE vend_det WITH KEY lifnr = v_po_det-lifnr.
        IF sy-subrc EQ 0.
          MOVE : vend_det-name1 TO cst_rep-name1,
                 vend_det-j_1icstno TO cst_rep-j_1icstno.
        ENDIF.
        APPEND : cst_rep.
        CLEAR  : cst_rep, v_po_det, gr_wh_info, vend_inv, chckfinal.
      ENDLOOP.
    Populating GT_output
      LOOP AT cst_rep.
        cst_gr = cst_rep-dmbtr * ( cst_rep-kbetr / 1000 ).
        cst_inv = cst_rep-wrbtr * ( cst_rep-kbetr / 1000 ).
        MOVE : cst_gr  TO cst_rep-cst_dmbtr,
               cst_inv TO cst_rep-cst_wrbtr.
        MODIFY : cst_rep.
        CLEAR : cst_rep, cst_gr, cst_inv.
      ENDLOOP.
      LOOP AT cst_rep.
        MOVE :  sy-tabix TO gt_output-slno,
                cst_rep-lifnr TO gt_output-lifnr,
                cst_rep-name1 TO gt_output-name1,
                cst_rep-j_1icstno TO gt_output-j_1icstno,
                cst_rep-werks TO gt_output-werks,
                cst_rep-matnr TO gt_output-matnr,
                cst_rep-maktx TO gt_output-maktx,
                cst_rep-ebeln TO gt_output-ebeln,
                cst_rep-ebelp TO gt_output-ebelp,
                cst_rep-bedat TO gt_output-bedat,
                cst_rep-mblnr TO gt_output-mblnr,
                cst_rep-bldat TO gt_output-bldat,
                cst_rep-menge TO gt_output-menge,
                cst_rep-dmbtr TO gt_output-dmbtr,
                cst_rep-cst_dmbtr TO gt_output-cst_dmbtr,
                cst_rep-bwart TO gt_output-bwart,
                cst_rep-whssn TO gt_output-whssn,
                cst_rep-whsdt TO gt_output-whsdt,
                cst_rep-buzid TO gt_output-buzid,
                cst_rep-bschl TO gt_output-bschl,
                cst_rep-wrbtr TO gt_output-wrbtr,
                cst_rep-cst_wrbtr TO gt_output-cst_wrbtr,
                cst_rep-belnr TO gt_output-belnr,
                cst_rep-gjahr TO gt_output-gjahr,
                cst_rep-xblnr TO gt_output-xblnr,
                cst_rep-augbl TO gt_output-augbl,
                cst_rep-vblnr TO gt_output-vblnr,
                cst_rep-zbukr TO gt_output-zbukr,
                cst_rep-chect TO gt_output-chect,
                cst_rep-zaldt TO gt_output-zaldt,
                cst_rep-hbkid TO gt_output-hbkid.
        APPEND gt_output.
        CLEAR : cst_rep, gt_output, sy-tabix.
      ENDLOOP.
    END-OF-SELECTION.
    *-ALV Routine
      PERFORM alv_forms.
    *&      Form  alv_forms
    FORM alv_forms.
      PERFORM alv_routines.
      gx_variant = sy-repid.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = g_save
        CHANGING
          cs_variant = gx_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        vari = gx_variant-variant.
      ENDIF.
      PERFORM comment_build  USING gt_list_top_of_page[].
      PERFORM fieldcat_init  USING gt_fieldcat[].
      PERFORM layout_build USING gs_layout.
      PERFORM print_build  USING gs_print.
      PERFORM alv_output.
    ENDFORM.                    " alv_forms
    *&      Form  alv_routines
    FORM alv_routines.
      PERFORM eventtab_build USING gt_events[].
      PERFORM e06_t_sort_build  USING gt_sort[].
      PERFORM sp_group_build USING gt_sp_group[].
      g_save = 'A'.
      PERFORM variant_init.
    ENDFORM.                    " alv_routines
    *&      Form  eventtab_build
    FORM eventtab_build USING p_gt_events TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = p_gt_events.
      READ TABLE p_gt_events WITH KEY name =  slis_ev_top_of_page
                             INTO ls_event.
      IF sy-subrc = 0.
        MOVE slis_ev_top_of_page TO ls_event-form.
        APPEND ls_event TO p_gt_events.
      ENDIF.
      READ TABLE p_gt_events WITH KEY name =  slis_ev_user_command
                             INTO ls_event.
      IF sy-subrc = 0.
        MOVE slis_ev_user_command TO ls_event-form.
        APPEND ls_event TO p_gt_events.
      ENDIF.
      READ TABLE p_gt_events WITH KEY name =  slis_ev_pf_status_set
                             INTO ls_event.
      IF sy-subrc = 0.
        MOVE slis_ev_pf_status_set TO ls_event-form.
        APPEND ls_event TO p_gt_events.
      ENDIF.
      SORT p_gt_events BY name.
      DELETE ADJACENT DUPLICATES FROM  p_gt_events.
      DELETE  p_gt_events WHERE form IS INITIAL.
    ENDFORM.                    " eventtab_build
    *&      Form  sort_build
    FORM e06_t_sort_build USING e06_lt_sort TYPE slis_t_sortinfo_alv.
      DATA: ls_sort TYPE slis_sortinfo_alv.
      CLEAR ls_sort.
      ls_sort-fieldname = 'SLNO'.
      ls_sort-spos      = 1.
      ls_sort-up        = 'X'.
      APPEND ls_sort TO e06_lt_sort.
    CLEAR ls_sort.
    ls_sort-fieldname = 'CNCNR'.
    ls_sort-spos      = 1.
    ls_sort-up        = 'X'.
    APPEND ls_sort TO e06_lt_sort.
    CLEAR ls_sort.
    ls_sort-fieldname = 'MATNR'.
    ls_sort-spos      = 1.
    ls_sort-up        = 'X'.
    APPEND ls_sort TO e06_lt_sort.
    ENDFORM.                    " sort_build
    *&      Form  sp_group_build
    FORM sp_group_build USING    p_gt_sp_group TYPE slis_t_sp_group_alv.
      DATA: ls_sp_group TYPE slis_sp_group_alv.
      CLEAR  ls_sp_group.
      ls_sp_group-sp_group = 'A'.
      ls_sp_group-text     = 'PRODUCT'.
      APPEND ls_sp_group TO p_gt_sp_group.
    ENDFORM.                    " sp_group_build
    *&      Form  variant_init
    FORM variant_init.
      CLEAR g_variant.
      g_repid = sy-repid.
      g_variant-report = g_repid.
    ENDFORM.                    " variant_init
    *&      Form  comment_build
    FORM comment_build USING   e04_lt_top_of_page TYPE slis_t_listheader.
      DATA: ls_line     TYPE slis_listheader.
      DATA: l_date(10)  TYPE c,
            l_time(8)   TYPE c,
            l_out(255)  TYPE c.
      WRITE sy-datum TO l_date.
      WRITE sy-uzeit TO l_time.
      CONCATENATE l_date '/' l_time INTO l_out.
      CLEAR ls_line.
      ls_line-typ  = 'H'.
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = 'RUN BY :'.
      ls_line-info = sy-uname.
      APPEND ls_line TO e04_lt_top_of_page.
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = 'RUN ON :'.
      ls_line-info = l_out.
      APPEND ls_line TO e04_lt_top_of_page.
    ENDFORM.                    " comment_build
    *&      Form  fieldcat_init
    FORM fieldcat_init    USING e01_lt_fieldcat TYPE slis_t_fieldcat_alv.
      DATA: ls_fieldcat TYPE slis_fieldcat_alv.
      DATA n1(3).
      DATA count(2)    TYPE c.
      DATA h1(10).
      DATA: l_week     LIKE scal-week,
            l_text(17) TYPE c.
      DATA cnt TYPE i.
      cnt = cnt + 1.
      CLEAR ls_fieldcat.
      ls_fieldcat-row_pos      = 1.
      ls_fieldcat-col_pos      = 1.
      ls_fieldcat-fieldname    = 'SLNO'.
      ls_fieldcat-seltext_m    = 'SL.NO'.
      ls_fieldcat-hotspot      = 'X'.
      ls_fieldcat-key          = 'X'.
      ls_fieldcat-key_sel      = 'X'.
      ls_fieldcat-just         = 'R'.
      ls_fieldcat-sp_group = 'A'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      cnt = cnt + 1.
      CLEAR ls_fieldcat.
      ls_fieldcat-row_pos      = 1.
      ls_fieldcat-col_pos      = cnt.
      ls_fieldcat-fieldname    = 'LIFNR'.
      ls_fieldcat-seltext_m    = 'VENDOR NO.'.
      ls_fieldcat-hotspot      = 'X'.
      ls_fieldcat-key          = 'X'.
      ls_fieldcat-key_sel      = 'X'.
      ls_fieldcat-just         = 'R'.
      ls_fieldcat-sp_group = 'A'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      cnt = cnt + 1.
      CLEAR ls_fieldcat.
      ls_fieldcat-row_pos      = 1.
      ls_fieldcat-col_pos      = cnt.
      ls_fieldcat-fieldname    = 'NAME1'.
      ls_fieldcat-seltext_m    = 'VENDOR NAME'.
      ls_fieldcat-hotspot      = 'X'.
      ls_fieldcat-key          = 'X'.
      ls_fieldcat-key_sel      = 'X'.
      ls_fieldcat-just         = 'L'.
      ls_fieldcat-sp_group = 'A'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
      cnt = cnt + 1.
      CLEAR ls_fieldcat.
      ls_fieldcat-row_pos      = 1.
      ls_fieldcat-col_pos      = cnt.
      ls_fieldcat-fieldname    = 'J_1ICSTNO'.
      ls_fieldcat-seltext_m    = 'VENDOR CST NO.'.
      ls_fieldcat-hotspot      = 'X'.
      ls_fieldcat-key          = 'X'.
      ls_fieldcat-key_sel      = 'X'.
      ls_fieldcat-just         = 'R'.
      ls_fieldcat-sp_group = 'A'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
    cnt = cnt + 1.
    CLEAR ls_fieldcat.
    ls_fieldcat-row_pos      = 1.
    ls_fieldcat-col_pos      = cnt.
    ls_fieldcat-fieldname    = 'WERKS'.
    ls_fieldcat-seltext_m    = 'PLANT'.
    ls_fieldcat-key          = 'X'.
    ls_fieldcat-key_sel      = 'X'.
    ls_fieldcat-just         = 'R'.
    ls_fieldcat-sp_group = 'A'.
    APPEND ls_fieldcat TO e01_lt_fieldcat.
      cnt = cnt + 1.
      CLEAR ls_fieldcat.
      ls_fieldcat-row_pos      = 1.
      ls_fieldcat-col_pos      = cnt.
      ls_fieldcat-fieldname    = 'EBELN'.
      ls_fieldcat-seltext_m    = 'PO NO.'.
      ls_fieldcat-key          = 'X'.
      ls_fieldcat-key_sel      = 'X'.
      ls_fieldcat-just         = 'R'.
      ls_fieldcat-sp_group = 'A'.
      APPEND ls_fieldcat TO e01_lt_fieldcat.
    cnt = cnt + 1.
    CLEAR ls_fieldcat.
    ls_fieldcat-row_pos      = 1.
    ls_fieldcat-col_pos      = cnt.
    ls_fieldcat-fieldname    = 'EBELP'.
    ls_fieldcat-seltext_m    = 'PO ITEM'.
    ls_fieldcat-key          = 'X'.
    ls_fieldcat-key_sel      = 'X'.
    ls_fieldcat-just         = 'R'.
    ls_fieldcat-sp_group = 'A'.
    APPEND ls_fieldcat TO e01_lt_fieldcat.
      cnt = cnt + 1.
      CLEAR ls_fieldcat.
      ls_fieldcat-row_pos      = 1.
      ls_fieldcat-col_pos      = cnt

    Hi ,  
      This is a sort of performance issue , because your program takes more than the max time set for the program to execute in foreground.
    There are many stuff in program which will hamper your performance.
    I will list down a few
    1. SELECT *
    FROM konp
    INTO CORRESPONDING FIELDS OF TABLE konp_itab
    FOR ALL ENTRIES IN a363_itab
    WHERE knumh EQ a363_itab-knumh
    in this statement you are using for all entries a363_itab , but before this statement you are not checking if the table has any entry or not , please do remember that for all entries has this characterstic , that if you internal table does not contain any record , then all the records are selected from the database table. So in this case if you table a363_itab is empty , so what you want is no data must be seelcted from table konp , but what will happen is all the records in KONP will be seelcted.
    2. While retreiving data you are using seelct * even though you do not require all the fields , an example is
    <b>SELECT *
    FROM mkpf
    INTO CORRESPONDING FIELDS OF TABLE mkpf_itab
    FOR ALL ENTRIES IN mseg_itab
    WHERE mblnr EQ mseg_itab-mblnr.</b>
    in this your internal table contains only 2 fields
    <b>mblnr LIKE mkpf-mblnr, "Number of Material Document
    bldat LIKE mkpf-bldat, "Document Date in Document</b> , but to get these 2 fields you are selecting all the fields of the table.
    3. In select you are using into corresponding fields of table , it is not a good practice., so please avoidd it.
    Please understand that you must try to reduce the access to your database tables and try to keep it minimal , because this same thing may happen becasue data in DEV is very less compared to the volume of data in production , so a program working in DEV will take much more time in PRD if not written properly and may result in timeouts , as in your case.
    Please try to make chanegs to the prorgam and see if it works.
    In case you have more queries , please do revert back.
    Regards
    Arun
    *Reward points if replay is helpful

  • In a server proxy how can I use a INCLUDE STRUCTURE?

    Hi people!!, how can I put an internal table with an INCLUDE statement in a server proxy in abap. If I put the next code the system present me this error: Within classes and interfaces, you can only use "TYPE" to refer to ABAP     , Dictionary types, not "LIKE" or "STRUCTURE".
    The problem is that I need the STRUCTURE to make a APPEND.
    Thanks for the help.
    DATA: BEGIN OF bdc_tab .
            INCLUDE STRUCTURE bdcdata.
    DATA: END OF bdc_tab.

    Hi Carlos,
    Yes. It mainly accepts TYPE statements.
    You can use this as:
    DATA: BDC_LINE type bdcdata.
    DATA: BDC_TAB type table of bdcdata.
    When you want to use,
    Fill the BDC_LINE.
    Then:
    Append BDC_LINE to BDC_TAB.
    Or:
    Loop at BDC_TAB into BDC_LINE.
    Cheers,
    Bhanu

Maybe you are looking for

  • Pulling Individual Clips from Commercial DVD's

    Looking for good (preferably free) software that'll allow me to rip specifics clips from a DVD movie in high quality for editing with in imovie. I used to use media converter boxes but do not have that sort of gear available right now. The higher the

  • What is error 400-1

    I keep trying to watch Disney Junior but keep getting Error 400-1 message. This program had been working but after an automatic update, stopped. I have re-activated the Disney Junior but still not working.

  • Disk space is insufficient.

    The target file cannot be created. There are two possible reasons: 1. Disk space is insufficient. 2. The target file path is too long. I'm trying to output a Bridge Lightroom Flash gallery. I get the following error message The target file cannot be

  • Question about Business Rule Naming

    Hi, As we know that there is a restriction on number of characters you can enter to name a BR - is there a way that I can have two different names assigned to the same BR in EAS and Planning? Something like an alias? Or if that's something that cant

  • Ipod as portable disk

    It's a pity that (it seems) you cannot use your ipod as a portable disk between PC's and Macs...only between Macs or between PCs (if the software is present). It should be possible to bypass the software requirements (and iPod formatting) and use it