Moving the database of SAP J2EE Adapter Engine on another host

Hello all,
I'd like to ask SAP/Oracle experts if there is any obstacle, why would not be able to move Oracle database of SAP J2EE Adapter Engine on other/different host after the installation.
As I describe int he thread [Installation of J2EE Adapter Engine with DB on different host|Installation of J2EE Adapter Engine with DB on different host;, the SAPINST program doesn't offer the possibility to install J2EE Adapter Engine with DB on other host than the central instance.
Only thing I'm not sure about is if this is done by any purpose for some database requirement, or it's simply not there.
SAP J2EE AE is normal JAVA AS with some more functionalities and is also installed within SAP PI/XI installation, which can run in "distributed model" system.
What do you think ?
Thank you for your opinion in advance.
Regards
Tomas

No opinion anyone ?
Tom

Similar Messages

  • Installation of J2EE Adapter Engine with DB on different host

    Hello all,
    I don't know if this is the right thread, but hopefully it is.
    I have got following assignment:
    I have to install NW70 PI/XI J2EE Adapter Engine. The trouble is, that due to a CI and DB hosts politics it's necessary to have database on different host than the central instance is.
    But unfortunatelly the "SAPINST" program and its choice of J2EE Adapter Engine installation doesn't offer the possibility to install the product (J2EE AE) as a distributed system. SAPINST simply installs J2EE AE on one host including database. I've not succeeded the find a work-around.
    I got two ideas, but I would like to confirm them:
    1) Instal full SAP Java AS as a distributed system. After proper installation and patching I would use a SDM tool and deploy all necessary components to get a J2EE Adapter Engine "like" system. The  only problem is that I don't know exact difference between normal SAP Java AS and SAP J2EE Adapter Engine and I'm not sure where could I get all necessary .SAR files.
    2) Make a installation of SAP J2EE Adapter Engine as SAPINST allows. After installation and pathing, shutdown the system and move database to desired host, change all settings and start SAP J2EE AE as a distributed system. Only thing I'm not sure about is, if the J2EE AE would run in such a landscape.
    Could anyone help me to get out of this deadend ?
    Thank you for your comments in advance. Rewards points granted.
    Tomas

    Hi Jitendra,
    thank you for your effort.
    Maybe the question is more to Oracle forum part, because I don't think, that I would be able to do the installation as I described in point 1) (distributed JAVA AS and manuall deploying of AE components).
    Probably the SAPINST is built up in this way, because in most cases it's needed to install J2EE AE on side of the other integrated system and there is one special machine dedicated to it.
    If this is true and J2EE AE is really "normal JAVA AS" with some more functionality, I think the installation can be done as I described in point 2) - to install the J2EE AE locally, then shut it down and move the database to different host as required.
    Anybody with different idea ?
    Thank you
    Regards
    Tomas

  • Missing "SAP XI Adapter engine" in CCMS Monitor

    Dear all,
    we try to configure PI CCMS monitor but we can't find the subtree "SAP XI Adapter engine " in Visual admin.
    In detail:
    the subtree "SAP XI Adapter engine "is not displayed in Visual administrato under
    server->service->monitoring->Monitor tree ->Root application .
    So we have set to true the value "CCMSEnabled" of seervice "SAP XI AF core" , and we have restarted the instance.
    After the restart i DO NOT find the "SAP XI Adapter engine " in
    SAP NetWeaver Administrator,
    'System  Management' -> 'Monitoring' -> 'Java System Reports' -> 'Reports'. From the dropdown list 'Report' choose 'Monitor Browser', and display all monitors
    So I can't activate the monitor.
    and if the subtree is not present , i can't see the MTE in "SAP XI Adapter engine " RZ20.
    Additional info:
    - In RZ20 I have my system under SAP J2ee Monitor template->All system
    but the MTE "J2EE Applications" is grayed.
    - In file application.xml under /usr/sap/ccms/XIT_10/j2ee<server0> i do not find the tag:
    <app name="application sap.com/com.sap.aii.af.app">
        <node>\XIT\XIT 10 Appl .... sp30t0\SAP XI Adapter Engine</node>
      </app>
    I think this is the correct procedure that we have done in other different landscape whithout problems.
    Is there something else to check ?
    I've alredy checked following Blogs
    /people/sap.user72/blog/2005/11/24/xi-configuring-ccms-monitoring-for-xi-part-i
    /people/sap.user72/blog/2005/12/05/xi-grmg-customizing-for-xi-ccms-heartbeat-monitoring-part-ii
    Thanks in advance
    Steven

    Hi Sekhar,
    I am using PI 7.0 instead so I have followed the instruction in (http://help.sap.com/saphelp_nw70/helpdata/en/e5/5d1741b393f26fe10000000a1550b0/frameset.htm) instead.
    The problem is, Adapter Engine is still not listed as one of the application avaialble for Monitoring in Visual Admin even though the SAP XI AF Core has definitely been set with CCMSEnabled = true.
    Any further suggestions?
    Thanks,
    Wi

  • Troubleshooting the J2EE-Adapter Engine PDF

    Hi,
    anyone has:
    Troubleshooting the J2EE-Adapter Engine.pdf
    presentation from the webinar ?
    if so can you give me the link?
    (it's not available on the https://www.sdn.sap.com/sdn/webinar.sdn?res=/irj/servlet/prt/portal/prtroot/com.sap.sdn.wcm.compound.docs//library/uuid/47a9a361-0301-0010-d39a-dd40d34b2e9d ) but maybe someone has it
    Thanks:)
    Regards,
    michal
    Message was edited by: Michal Krawczyk

    Michal,
    Did you get the pdf ? If yes, please send it to [email protected]
    Thanks
    SKM

  • J2ee Adapter engine installation error

    Hi All,
    I am installing XI with NW07. I had an ERP2005 server here with ABAP only. I installed Java Add In to it with usage type PI.
    Now I tried to install J2ee adapter engine. It showed if i want to run a new installation or continue the old one.
    I tried to install installation of J2ee adapter engine from a new directory.
    It is stuck in between. I choose it as a MCOD to existing DB.
    I can see a new instance for this in MMC and it is up and running.
    But the old java instance is not running. None of the Proceses of Old Java instance (dispatcher, server0 and SDM) are not running. Did I do something wrong?
    My JVM_BOOTSTRAP.OUT says this:-
    Exception occurred:
    com.sap.engine.frame.core.configuration.NameNotFoundException: A configuration with the path "cluster_data/dispatcher/ID4065200" does not exist.
    at com.sap.engine.core.configuration.impl.ConfigurationDataCacheAllImpl.getSubConfiguration(ConfigurationDataCacheAllImpl.java:107)
    at com.sap.engine.core.configuration.impl.ReadAccessConfiguration.getSubConfiguration(ReadAccessConfiguration.java:715)
    at com.sap.engine.bootstrap.Synchronizer.getConfiguration(Synchronizer.java:426)
    at com.sap.engine.bootstrap.Synchronizer.getElementType(Synchronizer.java:72)
    at com.sap.engine.bootstrap.Bootstrap.initDatabaseConnection(Bootstrap.java:420)
    at com.sap.engine.bootstrap.Bootstrap.<init>(Bootstrap.java:144)
    at com.sap.engine.bootstrap.Bootstrap.main(Bootstrap.java:814)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    Exception occurred:
    com.sap.engine.bootstrap.SynchronizationException: Database initialization failed! Check database properties!
    at com.sap.engine.bootstrap.Bootstrap.initDatabaseConnection(Bootstrap.java:422)
    at com.sap.engine.bootstrap.Bootstrap.<init>(Bootstrap.java:144)
    at com.sap.engine.bootstrap.Bootstrap.main(Bootstrap.java:814)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    == Caused by: ==----
    com.sap.engine.bootstrap.SynchronizationException: No such Dialog Instance (ID4065200) in the database! Check database consistency or local Bootstrap properties!
    at com.sap.engine.bootstrap.Synchronizer.getElementType(Synchronizer.java:75)
    at com.sap.engine.bootstrap.Bootstrap.initDatabaseConnection(Bootstrap.java:420)
    at com.sap.engine.bootstrap.Bootstrap.<init>(Bootstrap.java:144)
    at com.sap.engine.bootstrap.Bootstrap.main(Bootstrap.java:814)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:81)
    Bootstrap module> Problem occurred while performing synchronization.
    My dev_jcontrol.b00 shows:-
    JControlStartJLaunch: program = C:\usr\sap\IDE\DVEBMGS00\exe\jlaunch.exe
    -> arg00 = C:\usr\sap\IDE\DVEBMGS00\exe\jlaunch.exe
    -> arg01 = pf=C:\usr\sap\IDE\SYS\profile\IDE_DVEBMGS00_sapides
    -> arg02 = -DSAPINFO=IDE_00_bootstrap
    -> arg03 = -nodeId=-1
    -> arg04 = -file=C:\usr\sap\IDE\DVEBMGS00\j2ee\cluster\instance.properties
    -> arg05 = -syncSem=JSTARTUP_WAIT_ON_5284
    -> arg06 = -nodeName=bootstrap
    -> arg07 = -jvmOutFile=C:\usr\sap\IDE\DVEBMGS00\work\jvm_bootstrap.out
    -> arg08 = -stdOutFile=C:\usr\sap\IDE\DVEBMGS00\work\std_bootstrap.out
    -> arg09 = -locOutFile=C:\usr\sap\IDE\DVEBMGS00\work\dev_bootstrap
    -> arg10 = -mode=BOOTSTRAP
    -> arg11 = pf=C:\usr\sap\IDE\SYS\profile\IDE_DVEBMGS00_sapides
    -> arg12 = -DSAPSTART=1
    -> arg13 = -DCONNECT_PORT=4740
    -> arg14 = -DSAPSYSTEM=00
    -> arg15 = -DSAPSYSTEMNAME=IDE
    -> arg16 = -DSAPMYNAME=sapides_IDE_00
    -> arg17 = -DSAPPROFILE=C:\usr\sap\IDE\SYS\profile\IDE_DVEBMGS00_sapides
    -> arg18 = -DFRFC_FALLBACK=ON
    -> arg19 = -DFRFC_FALLBACK_HOST=localhost
    -> lib path = PATH=C:\j2sdk1.4.2_09\jre\bin\server;C:\j2sdk1.4.2_09\jre\bin;F:\oracle\IDE\102\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\j2sdk1.4.2_06\bin;C:\j2sdk1.4.2_06\lib;C:\usr\sap\IDE\SYS\exe\uc\NTI386
    -> exe path = PATH=C:\j2sdk1.4.2_09\bin;C:\usr\sap\IDE\DVEBMGS00\j2ee\os_libs;F:\oracle\IDE\102\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\j2sdk1.4.2_06\bin;C:\j2sdk1.4.2_06\lib;C:\usr\sap\IDE\SYS\exe\uc\NTI386
    Thr 4232 Tue Sep 16 17:48:04 2008
    Thr 4232 *** ERROR => invalid return code of process bootstrap (exitcode = 66) http://jstartxx.c 1642
    Thr 4232 JControlExecuteBootstrap: error executing bootstrap node bootstrap (rc = 66)
    Thr 4232 JControlCloseProgram: started (exitcode = 66)
    Thr 4232 JControlCloseProgram: good bye... (exitcode = 66)
    My DEV_BOOTSTRAP.B00 shows:-
    Thr 5984 Tue Sep 16 17:48:02 2008
    Thr 5984 JHVM_RegisterNatives: registering methods in com.sap.bc.krn.perf.PerfTimes
    Thr 5608 Tue Sep 16 17:48:04 2008
    Thr 5608 JLaunchIExitJava: exit hook is called (rc = 66)
    Thr 5608 **********************************************************************
    u2022     
    o     
         ERROR => The Java VM terminated with a non-zero exit code.
         Please see SAP Note 943602 , section 'J2EE Engine exit codes'
         for additional information and trouble shooting.
    Thr 5608 JLaunchCloseProgram: good bye (exitcode = 66)
    I ran the prerequisite checks before starting the installation.
    It shows everything ok except it told me to have a environmental variable as CPIC_MAX_CONV with the value 200 at least. And I did that.
    All the other checks were ok.
    All are on SAME OS and same machine.
    I have J2EE Adapter Engine installation guide, but there is nothing for this in that
    In Instance properties file for the old instance it is showing the instance ID which it is not able to find.
    In the configtool of both the instances, the instance ID is same under cluster_data and this is of the newer instance
    How did the instance ID and data got replaced in the configtool of old instance. I mean the new instance has its new directory or folder.
    What Could be the problem?
    Did I do anything wrong here?
    Kindly help

    Hi,
    Check out the SNote 997510, " Note 997510 - Troubleshooting
    J2EE Engine 6.40/7.0 Bootstrap Issues ".
    I hope it will help you to drill more in to the problem
    Rgds
    Radhakrishna D S

  • Guide for J2EE Adapter Engine on WAS 6.40 with XI 3.0

    Hi all,
    we are currently struggling with our AE. We are going to migrate from Xi 2.0 to  XI 3.0, we run into problems while configuring our old J2SE AE (for which I have found a good PDF document on the SAP Service Marketplace).
    Now we would like to test/configure the J2EE AE on XI 3.0.
    But I cant find any guide for this on the SAP Service Marketplace. Does anyone know where to find this?
    Thanks
    Nesimi Buelbuel

    Hi Nesimi,
    There is a webinar replay of "Troubleshooting the J2EE Adapter Engine" at
    https://www.sdn.sap.com/sdn/webinar.sdn?res=/irj/servlet/prt/portal/prtroot/com.sap.sdn.wcm.compound.docs//library/uuid/47a9a361-0301-0010-d39a-dd40d34b2e9d
    Also make sure you check these links:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/webinars/configuring a local adapter engine.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/3.0/configuration guide - sap xi 3.0.pdf
    Regards,
    Sridhar

  • No monitor browser named "SAP XI Adapter Engine" in PI 7.1

    In PI 7.0 there is a monitor tree in NWA monitor browser named "SAP XI Adapter Engine"
    as follows: Monitoring > Java System Report > Select Monitor Browser > Show: Predefined Local J2EE View > Select All view > Selcet SAP XI Adapter Engine in Server Node
    Enable all children node for data collection would have allowd to collect all the adapter engine related error in CCMS in RZ20 by using MTE class SAP_XIJ2EE_ND.
    Now after upgrading to PI 7.1 this monitor node is not available anymore in NWA.
    There are some monitor node for runtime cache and messaging system montoring in NWA but not the one I am looking for.
    And in RZ20 there is no more error reported using MTE class SAP_XIJ2EE_ND; it shows No MTEs currently available. Though I have some error in adapters.
    Does anyone know how the adapter engine errors can be collected in CCMS for 7.1?

    Suman,
    The adapter engine node itself is not visible in Java system reports of NWA.
    XPI:AF core is enable true and sevice re started.
    Also in RZ20 adapter node is not visible for CCMS
    Please suggest.

  • Error in Local J2EE Adapter Engine

    Hi All,
    We configured the J2ee Adapter engine and did the design and Configuration part also.but while testing the scenario it's giving error in SXMB_MONI as
    *<?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="1">
      <SAP:Category>XIAdapterFramework</SAP:Category>
      <SAP:Code area="MESSAGE">GENERAL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>com.sap.aii.af.ra.ms.api.ConfigException: ConfigException in XI protocol handler. Failed to determine a receiver agreement for the given message. Root cause: com.sap.aii.af.service.cpa.impl.exception.CPALookupException: Couldn't retrieve outbound binding for the given P/S/A values: FP=;TP=;FS=BS_LAE;TS=BS_LAE;AN=MI_PPS_IB;ANS=urn:pps.com;</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack />
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Can anyone suggest me?
    Thanks,
    Kalyan.

    Hi kalyan,
    If the error still says that, "Failed to determine a receiver agreement for the given message" - could you please compare the Sender/Receiver party/service determined in the XI message header and that in the Receiver Agreement in ID? Also please check the same for the Receiver Interface and Namespace. receiver agreement not found means any of these values doesn't match. If these look fine.............can you provide us with few more extra information...........like at which pipeline step in MONI you getting the error - the message hasn't yet reach Adapter Engine. So I don't think it's a problem in AE.
    Regards,
    Suddha

  • Decentral J2EE Adapter Engine

    I am trying to install a Decentral J2EE Adapter Engine.
    Please could someone tell me whether, when defining ABAP UME, should I define the same users as were defined on my Central PI instance for Admin & Guest, or should I use the suffix of the users as I receive in the default values on the screen ?

    Hi Mark,
    have you tried this presentation?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/03fd85cc-0201-0010-8ca4-a32a119a582d
    Regards,
    Michal

  • Installation of J2ee Adapter engine

    Hi All,
    As per my understanding in order to install J2ee Adapter engine, First we need to install Java System and later we install J2ee Adapter Engine.
    Please correct me if am wrong.
    Thanks,
    Kalyan.

    Hi Prateek,
    Thanks for ur reply,
    We ahve a J2ee engine in EP server. If i want to configure a Local J2ee engine in that.Do i need to install a separate J2ee adapter engine on already existed J2EE (EP)server. Or can i do directly Configuration in Visual Admin of the existed J2EE server to connect my PI system.
    My doubt is J2ee adapter engine already exists in J2ee engine of the WAS or is that a separate installation i need to do even i have tha J2EE engine.
    Please clarify my doubt.
    Thanks,
    Kalyan.

  • SOAP adapter in XI3.0 using J2EE adapter engine

    Folks,
    I have a scenario SOAP client -> XI 3.0
    I am using XI 3.0 and the J2EE adapter framework to configure a sender SOAP adapter. I do not have a Party, just the service and the channel.
    I tried using the following url format:
    http://<server>:50000/XISOAPAdapter/MessageServlet?channel
    =:<service name>:<channel name>
    When I use this in my SOAP client , I get an 401 forbidden error in the browser. However when I type this url directly in the browser and I get:
    Message Servlet is in Status OK
    Status information:
    Servlet com.sap.aii.af.mp.soap.web.MessageServlet (Version $Id: //tc/aii/30_REL/src/_adapters/_soap/java/com/sap/aii/af/mp/soap/web/MessageServlet.java#5 $) bound to /MessageServlet
    Classname ModuleProcessor: null
    Lookupname for localModuleProcessorLookupName: localejbs/ModuleProcessorBean
    Lookupname for remoteModuleProcessorLookupName: null
    ModuleProcessorClass not instantiated
    ModuleProcessorLocal is Instance of com.sap.aii.af.mp.processor.ModuleProcessorLocalLocalObjectImpl0
    ModuleProcessorRemote not instantiated
    A couple of questions:
    1. Inspite of configuring the sender SOAP adapter, the sender service and the interface, I still cannot see the green light for the SOAP adapter in rumtime workbench->adapter monitoring.
    Although the communication channel (in intergration builder- design)shows the status of the adapter as "active"
    Does this mean that my SOAP adapter is correctly configured and active?
    2. The above mentioned url takes the ABAP engine login/password while the J2EE engine (AFW)takes a different login/password. Which authentication should the SOAP client use?
    Thanks for your help!
    Shailesh

    Post your message to following URL:
    http://host:port/XISOAPAdapter/MessageServlet?channel=party:service:channel
    port is the J2EE port 50000 in your example.
    Check the newest manual for further details.
    Regards
    Stefan

  • J2SE Vs J2EE Adapter Engine

    Hi All,
    I am having a doubt. Apart from having a decentralized installation location of J2SE Adapter,
    What is the difference between the J2EE and J2SE Adapters???????
    As much as i understand J2EE adapters installed on the XI Server(part of the installation)
    whereas we need to install the J2SE Adapters locally.
    Anybody has any idea ???
    rgds
    RM

    Hi,
    In one of SAP's presentations I've found:
    "Reasons for Decentral SAP J2EE-based AE:
    - Protocol of Sender-/Receiver system (e.g. ftp not allowed)
    - Driver OS - dependent
    - Sender-System has to send independent from IS
    - Performance
    - Organizational Aspects"
    Regards,
    michal

  • Adding Data to the database for SAP Transactions

    Hi
    I'm new to the whole ABAP. I would like to enquire about adding transaction data in SAP through ABAP but it must be immediate.
    I know that one can use a BAPI to add data and can rollback if any problems occur.
    But if no BAPI exists how does one write code to add a document to the SAP database but with everything SAP transaction requires like the BAPI. What is the process and how???
    So let say I wanted to do FB01 which is SAP FI document and must be immediate. There is a BAPI that exists for it but if there was not one how would I do this???
    I know one can also use BDC but that creates a batch and then needs to be executed in SM35, I want a way to add data for two or three SAP transactions, if any problems occur with any of the steps rollback everything else commit everything to the database.
    Any simple detail examples (code) that satisfy the above will be greatly appreciated and REWARDED.
    Thanks in advance

    Luis,
    i have a code exactly same BDC for FB01.
    refer:
    REPORT z_etching_fb01
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    *etching invoice load
    INCLUDE bdcrecx1.
    TYPE-POOLS: truxs , slis.
    *PARAMETERS: dataset(132) LOWER CASE DEFAULT
    *                              'c:\temp\etchingload.txt'.
    PARAMETER: pfile LIKE rlgrap-filename." OBLIGATORY.
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
    PARAMETER:    p_kunnr LIKE kna1-kunnr OBLIGATORY,           "kna1-kunnr
                  p_bukrs LIKE bseg-bukrs,
                  p_mwskz LIKE t007a-mwskz OBLIGATORY,"t007a-mwskz
                  p_prctr LIKE cepc-prctr OBLIGATORY,"cepc-prctr
    *            p_newko LIKE ska1-saknr OBLIGATORY DEFAULT 41000000,"
                p_budat LIKE bkpf-budat OBLIGATORY ,
                p_hkont LIKE bseg-hkont OBLIGATORY DEFAULT 41000000 ,
                p_waers TYPE waers OBLIGATORY DEFAULT 'GBP'."tcurr-waers
    SELECTION-SCREEN END OF BLOCK a.
    SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
    PARAMETER : report AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK b.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    *                          ALV                                           *
    DATA: it_fieldcat     TYPE    slis_t_fieldcat_alv,
          wa_fieldcat     LIKE    LINE OF it_fieldcat,
          it_top_of_page  TYPE    slis_t_listheader,
          ls_layout       TYPE    slis_layout_alv,
          gt_events       TYPE    slis_t_event.
    DATA: it_raw TYPE truxs_t_text_data.
    DATA: BEGIN OF record,
    * data element: BLDAT
            bldat_001(010),   "Invoice Date
    * data element: BLART
            blart_002(002),   " Doc Type DR or DG if credit
    * data element: BUKRS
            bukrs_003(004),   " Company Code
    * data element: BUDAT
            budat_004(010),   "Posting Date
    * data element: MONAT
            monat_005(002),   "period"
    * data element: WAERS
            waers_006(005),   "Currency
    * data element: XBLNR1
            xblnr_007(016),   "Invoice Number
    * data element: BKTXT
            bktxt_008(025),   "PO number
    * data element: SAEOBJART
            docid_009(010),
    * data element: NEWBS
            newbs_010(002),   "posting Key
    * data element: NEWKO
            newko_011(017),   "Customer number or GL account
    * data element: WRBTR
            wrbtr_012(016),   "Amount
    * data element: DZTERM
            zterm_013(004),
    * data element: DZBD1T
            zbd1t_014(003),
    * data element: DZFBDT
            zfbdt_015(010),
    * data element: DZUONR
            zuonr_016(018),   "Invoice Number
    * data element: SGTXT
            sgtxt_017(050),   " PO number
    * data element: NEWBS
            newbs_018(002),
    * data element: NEWKO
            newko_019(017),   "GL Account
    * data element: WRBTR
            wrbtr_020(016),   "Amount
    * data element: MWSKZ
            mwskz_021(002),   "Tax
    * data element: DZUONR
            zuonr_022(018),   "Invoice Number
    * data element: SGTXT
            sgtxt_023(050),   "PO Number
    * data element: PRCTR
            prctr_024(010),   "Profit Center
    * data element: WRBTR
            wrbtr_025(016),   " Amount
    * data element: MWSKZ
            mwskz_026(002),   "Tax
    * data element: DZUONR
            zuonr_027(018),   "Invoice Number
    * data element: SGTXT
            sgtxt_028(050),   "PO Number
    * data element: FMORE
            fmore_029(001),
    * data element: PRCTR
            prctr_030(010),   "Pr Center
    * data element: FWSTE
            fwste_01_031(016),
          END OF record.
    DATA: BEGIN OF it_excel OCCURS 0,
    * data element: XBLNR1
          xblnr_007(016),   "Invoice Number
    * data element: BLDAT
          bldat_001(010),   "Invoice Date
    * data element: WRBTR
          wrbtr_012(016),   "Amount
    * data element: WRBTR
          wrbtr_025(016),   " Tax Amount
    * data element: WRBTR
          wrbtr_020(016),   "Gross Amount
    * data element: BLART
          blart_002(002),   " No of units
    * data element: MONAT
          monat_005(002),   "No of units second test"
    * data element: BKTXT
            bktxt_008(025),   "PO number
    * data element: SGTXT
          sgtxt_017(050),   " PO number
    * data element: BUKRS
          bukrs_003(004),   " Company Code
    * data element: BUDAT
          budat_004(010),   "Posting Date
    *        budat_004 TYPE string,   "Posting Date
    * data element: WAERS
          waers_006(005),   "Currency*
    * data element: NEWKO
          newko_011(017),   "Customer number or GL account
    * data element : kunnr
          kunnr_019(010),   " customer
          mwskz(002),
         prctr(010),
          date(002),
          month(002),
    ** data element: BKTXT
    *      bktxt_008(025),   "PO number
    ** data element: SAEOBJART
    *      docid_009(010),
    ** data element: NEWBS
    *      newbs_010(002),   "posting Key
    ** data element: DZTERM
    *      zterm_013(004),
    ** data element: DZBD1T
    *      zbd1t_014(003),
    ** data element: DZFBDT
    *      zfbdt_015(010),
    ** data element: DZUONR
    *      zuonr_016(018),   "Invoice Number
    ** data element: NEWBS
    *      newbs_018(002),
    ** data element: NEWKO
    *      newko_019(017),   "GL Account
    ** data element: MWSKZ
    *      mwskz_021(002),   "Tax
    ** data element: DZUONR
    *      zuonr_022(018),   "Invoice Number
    ** data element: SGTXT
    *      sgtxt_023(050),   "PO Number
    ** data element: PRCTR
    *      prctr_024(010),   "Profit Center
    ** data element: MWSKZ
    *      mwskz_026(002),   "Tax
    ** data element: DZUONR
    *      zuonr_027(018),   "Invoice Number
    ** data element: SGTXT
    *      sgtxt_028(050),   "PO Number
    ** data element: FMORE
    *      fmore_029(001),
    ** data element: PRCTR
    *      prctr_030(010),   "Pr Center
    ** data element: FWSTE
    *      fwste_01_031(016),
        END OF it_excel.
    DATA : BEGIN OF it_bkpf OCCURS 0,
            belnr LIKE bkpf-belnr,
            budat LIKE bkpf-budat,
            bldat LIKE bkpf-bldat,
            xblnr LIKE bkpf-xblnr,
            bktxt LIKE bkpf-bktxt,
            total LIKE bseg-dmbtr,
            numdocs TYPE p DECIMALS 0,
            END OF it_bkpf,
            BEGIN OF it_bseg OCCURS 0,
              belnr LIKE bseg-belnr,
              dmbtr LIKE bseg-dmbtr,
              mwsts LIKE bseg-mwsts,
              pswsl LIKE bseg-pswsl,
              END OF it_bseg,
              BEGIN OF it_final OCCURS 0,
                belnr LIKE bkpf-belnr,
                budat LIKE bkpf-budat,
                bldat LIKE bkpf-bldat,
                xblnr LIKE bkpf-xblnr,
                bktxt LIKE bkpf-bktxt,
                dmbtr LIKE bseg-dmbtr,
                mwsts LIKE bseg-mwsts,
                pswsl LIKE bseg-pswsl,
                END OF it_final.
    ***** End generated data section ***
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfile.
      PERFORM sub_browse_file. "Get file name
    START-OF-SELECTION.
      PERFORM sub_data_load.  " Transfer excel into internal table.
      PERFORM sub_calc_excel.
      IF report = 'X'.
    *    PERFORM data_selection.
    *    PERFORM data_move.
    *********************************GET ALV  DATA
        PERFORM alv_get_data.
    *********************************ALV GRID DATA
        PERFORM alv_grid.
      ENDIF.
    *if report = ''.
    *  PERFORM write.
    *  PERFORM open_dataset USING dataset.
      PERFORM open_group.
    *  DO.
    *    READ DATASET dataset INTO record.
      LOOP AT it_excel.
    *   IF sy-subrc <> 0. EXIT. ENDIF.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BKPF-BLDAT'
                                      it_excel-bldat_001.
        PERFORM bdc_field       USING 'BKPF-BLART'
                                      'DR'." record-blart_002.
        PERFORM bdc_field       USING 'BKPF-BUKRS'
                                      it_excel-bukrs_003.
        PERFORM bdc_field       USING 'BKPF-BUDAT'
                                      it_excel-budat_004.
        PERFORM bdc_field       USING 'BKPF-MONAT'
                                    '3'. "record-monat_005.
        PERFORM bdc_field       USING 'BKPF-WAERS'
                                      it_excel-waers_006.
        PERFORM bdc_field       USING 'BKPF-XBLNR'
                                      it_excel-xblnr_007.
        PERFORM bdc_field       USING 'BKPF-BKTXT'
                                      it_excel-bktxt_008.
        PERFORM bdc_field       USING 'FS006-DOCID'
                                     '*' ."record-docid_009.
        PERFORM bdc_field       USING 'RF05A-NEWBS'
                                    '01'." record-newbs_010.
        PERFORM bdc_field       USING 'RF05A-NEWKO'
                                    it_excel-kunnr_019  .
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0301'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                    it_excel-wrbtr_020."  it_excel-wrbtr_012.
        PERFORM bdc_field       USING 'BSEG-ZTERM'
                                      'NT30' ."  record-zterm_013.
        PERFORM bdc_field       USING 'BSEG-ZBD1T'
                                      '30'."record-zbd1t_014.
        PERFORM bdc_field       USING 'BSEG-ZFBDT'
                                      it_excel-bldat_001."record-zfbdt_015.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                      it_excel-xblnr_007."record-zuonr_016.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                      it_excel-sgtxt_017.
        PERFORM bdc_field       USING 'RF05A-NEWBS'
                                     '50'." record-newbs_018.
        PERFORM bdc_field       USING 'RF05A-NEWKO'
                                   it_excel-newko_011."  record-newko_019."Gl account
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'BSEG-SGTXT'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                      it_excel-wrbtr_012."changes from 12 to 20
        PERFORM bdc_field       USING 'BSEG-MWSKZ'
                                     it_excel-mwskz." record-mwskz_021.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                    it_excel-xblnr_007."  record-zuonr_022.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                     it_excel-sgtxt_017."  record-sgtxt_023.
        PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'COBL-PRCTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTE'.
        PERFORM bdc_field       USING 'COBL-PRCTR'
                                    it_excel-prctr ." record-prctr_024.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'BSEG-WRBTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=STER'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                     it_excel-wrbtr_012." it_excel-wrbtr_025.
        PERFORM bdc_field       USING 'BSEG-MWSKZ'
                                      it_excel-mwskz.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                     it_excel-xblnr_007." record-zuonr_027.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                     it_excel-sgtxt_017." record-sgtxt_028.
        PERFORM bdc_field       USING 'DKACB-FMORE'
                                     'X' ."record-fmore_029.
        PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'COBL-PARGB'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTE'.
        PERFORM bdc_field       USING 'COBL-PRCTR'
                                     it_excel-prctr." record-prctr_030.
        PERFORM bdc_dynpro      USING 'SAPLTAX1' '0300'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'BSET-FWSTE(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=GOBU'.
        PERFORM bdc_field       USING 'BSET-FWSTE(01)'
                                    it_excel-wrbtr_025."  record-fwste_01_031.
        PERFORM bdc_transaction USING 'FB01'.
        REFRESH:bdcdata,messtab.
      ENDLOOP.
      REFRESH:bdcdata.
    **    PERFORM bdc_dynpro      USING 'SAPMF05A' '0100'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'RF05A-NEWKO'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '/00'.
    *    PERFORM bdc_field       USING 'BKPF-BLDAT'
    *                                  record-bldat_001.
    *    PERFORM bdc_field       USING 'BKPF-BLART'
    *                                  record-blart_002.
    *    PERFORM bdc_field       USING 'BKPF-BUKRS'
    *                                  record-bukrs_003.
    *    PERFORM bdc_field       USING 'BKPF-BUDAT'
    *                                  record-budat_004.
    *    PERFORM bdc_field       USING 'BKPF-MONAT'
    *                                  record-monat_005.
    *    PERFORM bdc_field       USING 'BKPF-WAERS'
    *                                  record-waers_006.
    *    PERFORM bdc_field       USING 'BKPF-XBLNR'
    *                                  record-xblnr_007.
    *    PERFORM bdc_field       USING 'BKPF-BKTXT'
    *                                  record-bktxt_008.
    *    PERFORM bdc_field       USING 'FS006-DOCID'
    *                                  record-docid_009.
    *    PERFORM bdc_field       USING 'RF05A-NEWBS'
    *                                  record-newbs_010.
    *    PERFORM bdc_field       USING 'RF05A-NEWKO'
    *                                  record-newko_011.
    *    PERFORM bdc_dynpro      USING 'SAPMF05A' '0301'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'RF05A-NEWKO'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '/00'.
    *    PERFORM bdc_field       USING 'BSEG-WRBTR'
    *                                  record-wrbtr_012.
    *    PERFORM bdc_field       USING 'BSEG-ZTERM'
    *                                  record-zterm_013.
    *    PERFORM bdc_field       USING 'BSEG-ZBD1T'
    *                                  record-zbd1t_014.
    *    PERFORM bdc_field       USING 'BSEG-ZFBDT'
    *                                  record-zfbdt_015.
    *    PERFORM bdc_field       USING 'BSEG-ZUONR'
    *                                  record-zuonr_016.
    *    PERFORM bdc_field       USING 'BSEG-SGTXT'
    *                                  record-sgtxt_017.
    *    PERFORM bdc_field       USING 'RF05A-NEWBS'
    *                                  record-newbs_018.
    *    PERFORM bdc_field       USING 'RF05A-NEWKO'
    *                                  record-newko_019.
    *    PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'BSEG-SGTXT'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '/00'.
    *    PERFORM bdc_field       USING 'BSEG-WRBTR'
    *                                  record-wrbtr_020.
    *    PERFORM bdc_field       USING 'BSEG-MWSKZ'
    *                                  record-mwskz_021.
    *    PERFORM bdc_field       USING 'BSEG-ZUONR'
    *                                  record-zuonr_022.
    *    PERFORM bdc_field       USING 'BSEG-SGTXT'
    *                                  record-sgtxt_023.
    *    PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'COBL-PRCTR'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=ENTE'.
    *    PERFORM bdc_field       USING 'COBL-PRCTR'
    *                                  record-prctr_024.
    *    PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'BSEG-WRBTR'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=STER'.
    *    PERFORM bdc_field       USING 'BSEG-WRBTR'
    *                                  record-wrbtr_025.
    *    PERFORM bdc_field       USING 'BSEG-MWSKZ'
    *                                  record-mwskz_026.
    *    PERFORM bdc_field       USING 'BSEG-ZUONR'
    *                                  record-zuonr_027.
    *    PERFORM bdc_field       USING 'BSEG-SGTXT'
    *                                  record-sgtxt_028.
    *    PERFORM bdc_field       USING 'DKACB-FMORE'
    *                                  record-fmore_029.
    *    PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'COBL-PARGB'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=ENTE'.
    *    PERFORM bdc_field       USING 'COBL-PRCTR'
    *                                  record-prctr_030.
    *    PERFORM bdc_dynpro      USING 'SAPLTAX1' '0300'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'BSET-FWSTE(01)'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=GOBU'.
    *    PERFORM bdc_field       USING 'BSET-FWSTE(01)'
    *                                  record-fwste_01_031.
    *    PERFORM bdc_transaction USING 'FB01'.
    *  ENDDO.
      PERFORM close_group.
    *  PERFORM close_dataset USING dataset.
    *endif.
    *&      Form  sub_browse_file
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM sub_browse_file .
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
    *   FIELD_NAME          = ' '
       IMPORTING
         file_name           = pfile.
    ENDFORM.                    " sub_browse_file
    *&      Form  sub_data_load
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM sub_data_load .
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
    *     I_FIELD_SEPERATOR          =
          i_line_header              = 'X'
          i_tab_raw_data             = it_raw
          i_filename                 = pfile
        TABLES
          i_tab_converted_data       = it_excel[]
    *   EXCEPTIONS
    *     CONVERSION_FAILED          = 1
    *     OTHERS                     = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " sub_data_load
    **&      Form  data_selection
    **       text
    **  -->  p1        text
    **  <--  p2        text
    *FORM data_selection .
    *  SELECT * FROM bkpf
    *      INTO CORRESPONDING FIELDS OF TABLE it_bkpf
    *      WHERE budat = p_budat AND
    *      bukrs = p_bukrs.
    *  IF NOT it_bkpf[] IS INITIAL.
    *    SELECT belnr dmbtr mwsts pswsl
    *        FROM bseg INTO TABLE it_bseg
    *        FOR ALL ENTRIES IN it_bkpf
    *        WHERE belnr = it_bkpf-belnr AND
    *        kunnr = p_kunnr AND
    *        hkont = p_hkont AND
    *        pswsl = p_waers.
    *  ENDIF.
    *ENDFORM.                    " data_selection
    **&      Form  data_move
    **       text
    **  -->  p1        text
    **  <--  p2        text
    *FORM data_move.
    *  SORT : it_bseg BY belnr,
    *          it_bkpf BY belnr.
    *  LOOP AT it_bseg.
    *    it_final-dmbtr = it_bseg-dmbtr.
    *    it_final-belnr = it_bseg-belnr.
    *    it_final-mwsts = it_bseg-mwsts.
    *    it_final-pswsl = it_bseg-pswsl.
    *    READ TABLE it_bkpf WITH KEY belnr = it_bseg-belnr BINARY SEARCH.
    *    IF sy-subrc = 0.
    *      it_final-budat = it_bkpf-budat.
    *      it_final-bldat = it_bkpf-bldat.
    *      it_final-xblnr = it_bkpf-xblnr.
    *      it_final-bktxt = it_bkpf-bktxt.
    *    ENDIF.
    *    APPEND it_final.
    *    CLEAR it_final.
    *  ENDLOOP.
    *ENDFORM.                    " data_move
    *&      Form  alv_get_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alv_get_data .
      CLEAR it_fieldcat.
    ***************** Document number
    *  wa_fieldcat-col_pos    = '1'.                    " ALV O/P COL-1
      wa_fieldcat-fieldname  = 'XBLNR_007'.
      wa_fieldcat-seltext_m  = 'Document number'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ***************** Posting Date
    *  wa_fieldcat-col_pos    = '2'.                    " ALV O/P COL-1
      wa_fieldcat-fieldname  = 'BUDAT_004'.
      wa_fieldcat-seltext_m  = 'Posting Date'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 20.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ******************** Document Date
    *  wa_fieldcat-col_pos    = '3'.                     " ALV O/P COL-2
      wa_fieldcat-fieldname  = 'BLDAT_001'.
      wa_fieldcat-seltext_m  = 'Document Date'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ********************* REFERENCE DOCUMENT
    **  wa_fieldcat-col_pos    = '4'.                     " ALV O/P COL-2
    *  wa_fieldcat-fieldname  = 'XBLNR'.
    *  wa_fieldcat-seltext_m  = 'REFERENCE DOCUMENT'.
    *  wa_fieldcat-just       = 'L'.
    *  wa_fieldcat-tabname    = 'IT_EXCEL'.
    **  wa_fieldcat-outputlen  = 15.
    *  APPEND wa_fieldcat TO it_fieldcat.
    *  CLEAR wa_fieldcat.
    ***************** DOCUMENT HEADER TEXT
    *  wa_fieldcat-col_pos    = '5'.                     " ALV O/P COL-3
      wa_fieldcat-fieldname  = 'SGTXT_017'.
      wa_fieldcat-seltext_m  = 'DOCUMENT HEADER TEXT'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
    *  wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *******************Invoice Net amount
    *  wa_fieldcat-col_pos    = '6'.                     " ALV O/P COL-4
      wa_fieldcat-fieldname  = 'WRBTR_012'.
      wa_fieldcat-seltext_m  = 'Invoice Net amount'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
    *  wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** Tax Amount
    *  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
      wa_fieldcat-fieldname  = 'WRBTR_025'.
      wa_fieldcat-seltext_m  = 'Tax Amount'.
      wa_fieldcat-just       = 'L'.
    * wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** NEt Amount
    *  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
      wa_fieldcat-fieldname  = 'WRBTR_020'.
      wa_fieldcat-seltext_m  = 'Net Amount'.
      wa_fieldcat-just       = 'L'.
    * wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** General ledger currency
    *  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
      wa_fieldcat-fieldname  = 'WAERS_006'.
      wa_fieldcat-seltext_l  = 'General ledger currency'.
      wa_fieldcat-just       = 'L'.
    * wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 25.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM.                    " alv_get_data
    *&      Form  alv_grid
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alv_grid .
    *  PERFORM fill_list_header USING it_top_of_page[].
    *  PERFORM event-build USING gt_events[].
      PERFORM fill_layout USING ls_layout.
    MESSAGE 'Please press F3 to generate a session or call transaction method after getting report!' TYPE 'I'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          is_layout          = ls_layout
          it_fieldcat        = it_fieldcat
          it_events          = gt_events[]
          i_save             = 'A'
        TABLES
          t_outtab           = it_excel
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " alv_grid
    *                                     FORM FILL_LAYOUT                      *
    FORM fill_layout  USING    p_ls_layout  TYPE slis_layout_alv.
      p_ls_layout-zebra       = 'X'.
      p_ls_layout-cell_merge  = 'X'.
    ENDFORM.                                                         "fill_layout
    *&      Form  sub_calc_excel
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM sub_calc_excel .
          data: idate TYPE sy-datum,
              tdat8 type string.
      LOOP AT it_excel.
        CONCATENATE  it_excel-blart_002 '/' it_excel-monat_005 '/' it_excel-bktxt_008 INTO
            it_excel-sgtxt_017.
        it_excel-bukrs_003 = p_bukrs.
    *    it_excel-budat_004 = p_budat.
        it_excel-waers_006 = p_waers.
        it_excel-newko_011 = p_hkont.
        it_excel-kunnr_019 = p_kunnr.
        it_excel-mwskz     = p_mwskz.
        it_excel-prctr     = p_prctr.
        idate              = p_budat.
        CALL FUNCTION 'DATUMSAUFBEREITUNG'
         EXPORTING
    *       FLAGM                 = ' '
    *       FLAGW                 = ' '
           IDATE                 = idate
    *       IMONT                 = ' '
    *       IWEEK                 = ' '
         IMPORTING
    *       MDAT4                 =
    *       MDAT6                 =
    *       TDAT4                 =
    *       TDAT6                 =
            TDAT8                 = tdat8
    *       WDAT4                 =
    *       WDAT6                 =
    *     EXCEPTIONS
    *       DATFM_UNGUELTIG       = 1
    *       DATUM_UNGUELTIG       = 2
    *       OTHERS                = 3
        IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
          it_excel-budat_004 = tdat8.
    *    CONCATENATE it_excel-budat_004+4(2) '/' it_excel-budat_004+6(2) '/'  it_excel-budat_004+0(4)
    *                INTO it_excel-budat_004.
    *    SPLIT it_excel-bldat_001 AT '/' INTO it_excel-month it_excel-date.
    *    CONCATENATE it_excel-date '.' it_excel-month '.' it_excel-bldat_001+6(4) INTO it_excel-bldat_001.
        MODIFY it_excel.
        CLEAR it_excel.
      ENDLOOP.
    ENDFORM.                    " sub_calc_excel
    *&      Form  write
    *       text
    *  -->  p1        text
    *  <--  p2        text
    *form write .
    *OPEN DATASET dataset FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    *data: wa_excel like line of it_excel.
    *loop at it_excel into wa_excel.
    *TRANSFER wa_excel to dataset.
    *endloop.
    *CLOSE DATASETdataset.
    *endform.                    " write

  • Moving the database to different mount point.

    Hi,
    I have R12 app tier on one server and 10gR2 database on separate server.
    I want to move the database files from /u01/oradata/PROD to /u02/oradata/PROD on the same server.
    I know how to do this for the database using alter database rename file .....
    But what do I have to do with the application and context files.?
    Do I just need to edit the values s_dbhome1, s_dbhome2, s_dbhome3 and s_dbhome4 to point to /u02/oradata/PROD and then run adconfig?
    Many thanks
    Skulls.

    I am not cloning, just moving the databaseI know, but Rapid Clone does also help (use the same hostname, domain name, port pool, ..etc except for the directory paths) -- Please note you do not need to use "alter database rename file" as Rapid Clone will take care of that.
    so I think manual changing datfile names is needed, followed by edit context file and run autoconfig?This is also valid.
    Thanks,
    Hussein

  • Moving the database in the same server

    Your replay:-
    for WIN NT: take a look at note 61747.1 Moving a 7.3 or 8.x database. And take a look at Note:99275.1, UNIX/NT: Moving a Database Within the Same Machine.
    Clarification: Where can i get the help for Note:61747.1 & 99275.1

    Sorry Sridhar.
    Take a look in MetaLink (www.metalink.com) and use the note ids to look up the information.
    Thanks.

Maybe you are looking for

  • ABAP QUERY PROGRAM OUTPUT SHOULD DISPLAY FROM SAP SCRIPT.

    THIS IS MY URGENT REQUIREMENT ... I DONT KNOW ABAP QUERY PROGRAM .. PLEASE SUGGEST ME A WAY ON THIS .... Functional requirements Introduction The wish of the customer is a printable customer overview. All desired fields will be shown in a new query c

  • Photoshop 7 faster than CS 3 on Mac Intel .....

    How come Photoshop 7 running on a MacIntel so via Rosetta emulation mode is really really quite faster than the CS 3 which is native !! It clearly shows the lack oof optimisation of adobe softwares and that after each update they are becoming more an

  • Order of buttons

    I have imported an FCP project with chapter markers into iDVD. It looks great and the chapters work, but on the menu, when skipping from scene selection to scene selection with the remote, it jumps around instead of going from top left button to bott

  • How to uninstall Inquisitor and use the updated AcidSearch (in Leopard)

    Title says it all I think - I loved AcidSearch - enough that I didn't use Safari 3 (beta) in Tiger because it killed AcidSearch and when I migrated to Leopard I missed it dearly and have been getting by unhappily with Inquisitor. Now there's a new Ac

  • InDesign on two PC's

    I am looking to buy InDesign. I would like it on two laptops. Will I have to buy two copies? Is it a case of purchasing a license for the second PC? Or will one disc load on two PC's?