Related to data transfer techniques

hi,
when we use lsmw ,when we use bdc ?
please explain clearly.......
with regards,
ramnaresh.

hi
good
Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a
typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.
BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form
of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The
transaction is then started using this internal table as the input and executed in the background.
In Call Transaction, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling.
It can also be used for real-time interfaces and custom error handling & logging features. Whereas in Batch Input Sessions, the ABAP
program creates a session with all the transactional data, and this session can be viewed, scheduled and processed (using
Transaction SM35) at a later time. The latter technique has a built-in error processing mechanism too.
Batch Input (BI) programs still use the classical BDC approach but doesnt require an ABAP program to be written to format the
BDCDATA. The user has to format the data using predefined structures and store it in a flat file. The BI program then reads this and
invokes the transaction mentioned in the header record of the file.
Direct Input (DI) programs work exactly similar to BI programs. But the only difference is, instead of processing screens they validate
fields and directly load the data into tables using standard function modules. For this reason, DI programs are much faster (RMDATIND - Material Master DI program works at least 5 times faster) than the BDC counterpart and so ideally suited for loading large volume data. DI programs are
not available for all application areas.
LSMW is an encapsulated data transfer tool. It can provide the same functionality as BDC infact much more but when coming to techinical perspective most the parameters are encapulated. To listout some of the differences :
•LSMW is basicaly designed for a fuctional consultant who do not do much coding but need to explore the fuctionality while BDC is designed for a technical consultant.
•LSMW offers different techinque for migrating data: Direct input ,BAPI,Idoc,Batch input recording. While bdc basically uses recording.
•LSMW mapping is done by SAP while in BDC we have to do it explicitly .
•LSMW is basically for standard SAP application while bdc basically for customized application.
•Coding can be done flexibly in BDC when compared to LSMW
its all depends upon the requirement before implementing any method to your requirement.
thanks
mrutyun^

Similar Messages

  • Best Data Transfer Technique

    Of all the methods used for data migration like BDC, LSMW , Call Transaction which one is used most of the time? How is the decision made which method should be followed? What is the procedure followed for this analysis?

    lsmw is used most of da times..its easy and doesnt require any programming knowledge.BDC is used for certain transactions where u need to carryout certain checks and based on da results u carrout out processing of screens.
    plz reward points if dis helps

  • Significance of data transfer in each technique

    Hi there are different data transfer techniques in data transfers such as BDC, LSMW, ALE/IDOCS, BAPI right?
    Why do we need these many data transfer techniques I mean what is the siginficance of each data transfer technique?

    Hi
    You can use which ever method you feel comfortable to transfer the data
    BDC or BAPI or LSMW or someother
    Initially we used to use BDC's for transfering data
    afterwards LSMW came to transfer data allowing the Fun consultants also to transfer data without much coding
    After the ENJOY transactions came you can't use BDC's for them So BAPI's have become popular to transfer data to these enjoy Transactions (likp ME21N, VL01N)
    ALE is used to exchange data between the Applications servers of an orgn, so it is mainly used between the different depts of a single orgn
    IDOC is the just Intermediate data document which is used in ALE/EDI .
    Regards
    Kiran Sure

  • Data transfer between SAP & Java and Vice versa using IDOC Process

    Dear Experts,
            We are working on one of the good requirement related to data transfer between SAP and Java software. Client requirement is, they want to transfer the data in both the ways (from SAP --> Java and Vice versa also).
    In detail is, after sales order creation using one custom program loading plan details will be calculated. Once loading dates are confirmed then, user will release the sales document to transfer the data from SAP to Java using "Outbound IDOC processing". Similarly in that JAVA software some shipment details will be performed, once completed from JAVA software again details needs to be pumped back to SAP as "Inbound IDOC Processing".
    For this fields are already identified from external software SAP and we are looking for the same to perform the steps in SAP.
    At this stage, I need your expert opinion  / feedback how to go  about at this stage.
    Meaning,  
                     1. What are the customizing steps needs to be done in SAP..?
                     2. How to trigger the :Outbound IDOC process" once the documents are "Released" from custom transaction
                     3. How to create the link between SAP and JAVA to transfer the data between these 2 software
                     4. How to trigger the "Inbound IDOC Process" from JAVA software to SAP and how to store the data in SAP
    Experts, please give your feedback in terms of reply or by sending the step by step process to fulfill this client requirement.
    Thanks for your cooperation.
    Regards,
    Ramesh

    Maybe too many open questions in the same document.
    Maybe you should repost a more specific question in a technical forum.
    This looks like a small project where you already know what you want, maybe you should contract a technical specialist so he proceeds to the implementation!

  • Data trasfer techniques

    Hi,
    We have so may data transfer techniques such as BDC, LSMW, BAPI, IDoc.
    What is the each technology for? I mean what is the significance of each technology?

    Hi Sandeep,
    BDC is the old technic used for DATA transfer. SAP Replaced all BDCs with BAPI function modules in the newer versions. SAP doesn't encourage using BDC. Almost for all transactions we have readily available BAPIs. Both will do the same thing
    i.e Updating the data base. BDC and BAPI can be used both from with in SAP or from Non SAP to SAP.
    eg: If we are going to change some order information it will be with in SAP. We will get the order details from SAP database and change the details using BDC or BAPI.
    If we are going to create new order by uploading the data from Flat files then it will be between Non SAP to SAP.
    Another important point is All BAPIs are RFCs. SO u can use
    BAPI from another system also(SAP/NonSAP)
    LSMW is generally used for initial migration of legacy data from Non SAP system to SAP system.
    IDOC is used to send and receive the documents/data From SAP to SAP or Non SAP to SAP or SAP to Non SAP. I heard that it is possible to send the data between 2 Non SAP systems also using IDOCs.
    Thanks,
    Vinod.

  • Error while executing Initialize with Data Transfer for 0FI_GL_10

    Hello All,
    Post Pre prod refresh, our timestamp for the datasource 0FI_GL_10 got reset. Due to which our deltas did not bring any records to the BW system.
    First we did an Initialize without data transfer for all the BW related datasources. The deltas were then set properly for all datasources except 0FI_GL_10.
    We then raised a message to SAP and they suggested to run the 'Initialize with data transfer' for 0FI_GL_10 so that the timestamp is set and accordingly the deltas are fixed.
    The issue now is we are getting the following error message while running INIT with data transfer.
    Job terminated in source system --> Request set to red
    Message no. RSM078
    We have copied the data till July 1st week of 2011.
    Please advice. The issue is very critical.
    Thanks & Regards
    Sneha

    Hi Arvind
    Thanks for your inputs.
    Please find below the details of the short dump.
    Runtime Errors         DBIF_RSQL_SQL_ERROR
    Exception              CX_SY_OPEN_SQL_DB
    Date and Time          09/07/2011 11:25:32
    Short text
         SQL error in the database when accessing a table.
    What can you do?
         Note which actions and input led to the error.
         For further help in handling the problem, contact your SAP administrator
         You can use the ABAP dump analysis transaction ST22 to view and manage
         termination messages, in particular for long term reference.
    How to correct the error
         Database error text........: "ORA-01652: unable to extend temp segment by 128
          in tablespace PSAPTEMP"
         Internal call code.........: "[RSQL/FTCH/FAGLFLEXT ]"
         Please check the entries in the system log (Transaction SM21).
         If the error occures in a non-modified SAP program, you may be able to
         find an interim solution in an SAP Note.
         If you have access to SAP Notes, carry out a search with the following
         keywords:
         "DBIF_RSQL_SQL_ERROR" "CX_SY_OPEN_SQL_DB"
    Information on where terminated
        Termination occurred in the ABAP program "GP_GLX_FAGLFLEXT" - in
         "FETCH_TO_ISTRUCTURE".
        The main program was "SBIE0001 ".
        In the source code you have the termination point in line 903
        of the (Include) program "GP_GLX_FAGLFLEXT".
        The program "GP_GLX_FAGLFLEXT" was started as a background job.
        Job Name....... "BIREQU_4N3PZQ12IA0X0PYGEA85IG39S"
        Job Initiator.. "BIWREMOTE"
        Job Number..... 11203300
        The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
        procedure "FETCH_TO_ISTRUCTURE" "(FORM)", but it was neither handled locally
         nor declared
        in the RAISING clause of its signature.
        The procedure is in program "GP_GLX_FAGLFLEXT "; its source code begins in line
        840 of the (Include program "GP_GLX_FAGLFLEXT ".

  • How to increase AFP data transfer speed?

    When I connect to our server from a WAN source outside of our facility the file data transfer rate is extremely slow. We just upgraded to a 10Mps fiber service and that has dematically increased our website data tranfer speed. I would like to find a way to access the file server from remote location and work, but the data transfer rate makes productivity impossible. I would appreciate hearing how other organizations are set-up and functioning with file transfer sizes at an average of 10 to 15 Mb.
    Thanks,
    Brian
    OS10.6.8 Server,

    If you don't have enough network bandwidth for your time requirements, you have little chance of success with the direct approach.  Techniques such as file compression and such can only provide limited help.  If you're transfering multiple copies of the files, then you can push one copy of the file to a hosted provider, and then serve additional copies from there.
    As for your network, a ten million bits per second network connection is the speed of first-generation Ethernet.  That Ethernet was a fast network, back in 1985.  In the era of a one billion bits per second Gigabit Ethernet and increasingly commonly with the ten gigabit Ethernet links, a 10 Mb link is glacial.
    A typical DSL network is asymmetric, meaning you'll have 10 Mb down (theoretically) and some fraction of that up.  So you might not be getting that 10 Mb in the direction you're coppying files.  And this is best case; various of the ISP network links around aren't providing their rated speeds.
    AFP stinks on a network, and you're also opening up your file system to remote attackers. 
    As for WebDAV, read this.   In addition to WebDAV, you can also try an sftp or other "simpler" copy command as a test, and see what you get for that.  (sftp is also encrypted, which has benefits, though the encryption also requires more processing time.)
    But beyond techniques such as data compression (and which may or may not be an option here) or incremental or "delta" changes to the data (which probably isn't an option here) or working locally and batching over the changes, there are few good ways to contend with a too-slow-for-your-needs link.

  • Very slow network directory listing - but fast data transfer speed once listed?

    Hello,
    I have really tried to sort this myself before opening up to the community, however I have run out of ideas, and hope someone can offer the magic solution I have missed.
    I am currently using the 3.4ghz i7 iMac on a 1GB LAN, running OSX10.7.2 - connecting to a Windows Server 2008 (Running Release 2) over ethernet.
    If i go to a network directory that i haven't recently accessed it can take up to 60 seconds to show the contents of that directory. Once i have accessed that folder, if i come out of it and go back in it will be instant again - but the first time it lists the directory it looks like i have opened an empty folder - which after anything from 10seconds to 1 minute will suddenly show the files that are there.
    Internet connectivity is fast through the network, and file transfers across the LAN are fast. (showing as approx 300mb per second) I can play and edit HD content across the network with no slowdown so I am confident that this issue is not related to the network speed itself, and is more to do with a setting on this mac.
    Symptoms are very similar to this post: https://discussions.apple.com/message/12245148?messageID=12245148&amp%3b#1224514 8 - however i understand that in OSX Lion - SMB was removed - so i cannot find this file to edit.
    I have tried bypassing additional hubs in the network by wiring direct cables to the switch that is connected to the file server, this made no difference.
    I have also tried disconnecting the ethernet cable, and running over wifi. This fixes the listing problem, but when editing HD content over a network drive, this connection is not fast enough to carry the data without interruption (some projects are linked to up to 900gb of hd video content!)
    Using ethernet, I have tried DHCP, DHCP with manual address, and manual mode. All reproduce this problem. i have tried using the windows workgroup, and tried without it.
    I have also followed this suggestion: https://discussions.apple.com/thread/2134936?threadID=2134936&tstart=45 and used OpenDNS. this did not fix the issue.
    For argument sake, I have also just tested a Macbook Pro running Snow Leopard to see if it was OS related. This reproduces the exact same problem, near instant directory listing on the wifi, a long and arduous wait on ethernet.
    I cannot work out why directory listing is instant over wifi, but not over ethernet on 2 different macs, running 2 different versions of OSX. I also do not understand why if the network is having trouble listing the directories - the data transfer speed is 300mbps when i copy files across the wired network from the file server to the mac.
    Does anyone have any other ideas as to what could be the problem here? We are about to start work on a very large project, where the content we are editing is spread out across around 200 different network folders (different shoots captured over the past 2 years). We really don't have the time to wait 60 seconds each time we need to access one of those directories to look for a file, and I am very close to pulling all my hair out!
    I really look forward to hearing from anyone who can offer any insight.

    If you are suspecting that the Windows update had something to do with your LAN going slow, then try the following:
    1.  Look for updates for your clients LAN NIC driver; or
    2.  Un-install the updates.

  • Possible network issues preventing successful application data transfer?

    Hello all.
    We are having a few issues with a specific set up here at work involving Oracle 11, and Oracle 9 databases and I was hoping someone with a fair idea of how Oracle configurations work when it comes to network connectivity and data transfer would mind sharing their opinion on the matter.
    First off, a bit of background. I'm a network security engineer by trade and my experience when it comes to the application side of things, specifically databases is inherently weak; so I apologise if my terminology or logic is slightly off here.
    Basically what I'm trying to determine is where a fault lies between our users using a terminal server and a remote Oracle SQL database that should service their requests.
    The problem lies wherein the user will utilise the 'sqlplus' application invoked from a Windows command prompt window, and expect to be able login and query a database. I believe we have two versions available to use, version 9 which is not actually in production but able to be used for testing and version 11 which is active in production.
    When accessing Oracle 11 servers will hang where we expect to see a successful connection followed by a healthy looking "SQL>" prompt data transfer appears to stall as follows:
    C:\>sqlplus username/[email protected]
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 22 18:12:17 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    *hangs here*If we try on the Oracle 9 setup things look fine initially:
    C:\>sqlplus username/[email protected]
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 22 18:19:20 2010
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - ProductionHowever once connected to the Oracle 9 box; if we run a query similar to:
    sqlplus username/[email protected]
    select * from <database> where rownum < 10;This will again hang.
    That said however, if we try and run a query similar to:
    sqlplus username/[email protected]
    select * from <database> where rownum < 5;This will return 4 rows of usable data, without issue.
    Our systems engineer provided me with a SQLNET trace from the server side and believes he's identified where it occurs:
    [21-SEP-2010 16:06:42:989] nsdo: entry
    [21-SEP-2010 16:06:42:989] nsdo: cid=0, opcode=85, *bl=0, *what=0, uflgs=0x0, cflgs=0x3
    [21-SEP-2010 16:06:42:989] nsdo: rank=64, nsctxrnk=0
    [21-SEP-2010 16:06:42:990] nsdo: nsctx: state=8, flg=0x420c, mvd=0
    [21-SEP-2010 16:06:42:990] nsdo: gtn=156, gtc=156, ptn=10, ptc=2011
    [21-SEP-2010 16:06:42:990] nsdo: switching to application buffer
    [21-SEP-2010 16:06:42:990] nsrdr: entry
    [21-SEP-2010 16:06:42:990] nsrdr: recving a packet
    [21-SEP-2010 16:06:42:990] nsprecv: entry
    [21-SEP-2010 16:06:42:990] nsprecv: reading from transport...
    [21-SEP-2010 16:06:42:990] nttrd: entry
    #    HANG OCCURS HERE
    [21-SEP-2010 16:10:13:347] ntt2err: entry
    [21-SEP-2010 16:10:13:347] ntt2err: soc 25 error - operation=5, ntresnt[0]=517, ntresnt[1]=131, ntresnt[2]=0
    [21-SEP-2010 16:10:13:347] ntt2err: exit
    [21-SEP-2010 16:10:13:347] nttrd: exit
    [21-SEP-2010 16:10:13:347] nsprecv: transport read error
    [21-SEP-2010 16:10:13:347] nsprecv: error exit
    [21-SEP-2010 16:10:13:347] nserror: entry
    [21-SEP-2010 16:10:13:347] nserror: nsres: id=0, op=68, ns=12547, ns2=12560; nt[0]=517, nt[1]=131, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
    [21-SEP-2010 16:10:13:348] nsrdr: error exit
    [21-SEP-2010 16:10:13:348] nsdo: nsctxrnk=0
    [21-SEP-2010 16:10:13:348] nsdo: error exit
    [21-SEP-2010 16:10:13:348] nioqrc:  wanted 1 got 0, type 0
    [21-SEP-2010 16:10:13:348] nioqper:  error from nioqrc
    [21-SEP-2010 16:10:13:348] nioqper:    nr err code: 0
    [21-SEP-2010 16:10:13:348] nioqper:    ns main err code: 12547
    [21-SEP-2010 16:10:13:348] nioqper:    ns (2)  err code: 12560
    [21-SEP-2010 16:10:13:348] nioqper:    nt main err code: 517
    [21-SEP-2010 16:10:13:348] nioqper:    nt (2)  err code: 131
    [21-SEP-2010 16:10:13:349] nioqper:    nt OS   err code: 0
    [21-SEP-2010 16:10:13:349] nioqer: entry
    [21-SEP-2010 16:10:13:349] nioqer:  incoming err = 12151
    [21-SEP-2010 16:10:13:349] nioqce: entry
    [21-SEP-2010 16:10:13:349] nioqce: exit
    [21-SEP-2010 16:10:13:349] nioqer:  returning err = 3113
    [21-SEP-2010 16:10:13:349] nioqer: exit
    [21-SEP-2010 16:10:13:349] nioqrc: exit
    [21-SEP-2010 16:10:13:349] nioqds: entry
    [21-SEP-2010 16:10:13:349] nioqds:  disconnecting...
    [21-SEP-2010 16:10:13:349] nsdo: entry
    [21-SEP-2010 16:10:13:349] nsdo: cid=0, opcode=67, *bl=0, *what=1, uflgs=0x2, cflgs=0x3
    [21-SEP-2010 16:10:13:350] nsdo: rank=64, nsctxrnk=0
    [21-SEP-2010 16:10:13:350] nsdo: nsctx: state=1, flg=0x420c, mvd=0
    [21-SEP-2010 16:10:13:350] nsdo: nsctxrnk=0
    [21-SEP-2010 16:10:13:350] nsdo: error exitFrom the client log side, it looks like this:
    [21-SEP-2010 16:06:42:886] nsdo: entry
    [21-SEP-2010 16:06:42:886] nsdo: cid=0, opcode=84, *bl=0, *what=1, uflgs=0x20, cflgs=0x3
    [21-SEP-2010 16:06:42:886] nsdo: rank=64, nsctxrnk=0
    [21-SEP-2010 16:06:42:886] nsdo: nsctx: state=8, flg=0x400d, mvd=0
    [21-SEP-2010 16:06:42:886] nsdo: gtn=127, gtc=127, ptn=10, ptc=2011
    [21-SEP-2010 16:06:42:886] nsdofls: entry
    [21-SEP-2010 16:06:42:886] nsdofls: DATA flags: 0x0
    [21-SEP-2010 16:06:42:886] nsdofls: sending NSPTDA packet
    [21-SEP-2010 16:06:42:886] nspsend: entry
    [21-SEP-2010 16:06:42:886] nspsend: plen=17, type=6
    [21-SEP-2010 16:06:42:886] nttwr: entry
    [21-SEP-2010 16:06:42:886] nttwr: socket 1724 had bytes written=17
    [21-SEP-2010 16:06:42:886] nttwr: exit
    [21-SEP-2010 16:06:42:886] nspsend: packet dump
    [21-SEP-2010 16:06:42:886] nspsend: 00 11 00 00 06 00 00 00  |........|
    [21-SEP-2010 16:06:42:886] nspsend: 00 00 03 05 1C 01 01 01  |........|
    [21-SEP-2010 16:06:42:886] nspsend: 0F                       |.       |
    [21-SEP-2010 16:06:42:886] nspsend: 17 bytes to transport
    [21-SEP-2010 16:06:42:886] nspsend: normal exit
    [21-SEP-2010 16:06:42:886] nsdofls: exit (0)
    [21-SEP-2010 16:06:42:886] nsdo: nsctxrnk=0
    [21-SEP-2010 16:06:42:886] nsdo: normal exit
    [21-SEP-2010 16:06:42:886] nsdo: entry
    [21-SEP-2010 16:06:42:886] nsdo: cid=0, opcode=85, *bl=0, *what=0, uflgs=0x0, cflgs=0x3
    [21-SEP-2010 16:06:42:886] nsdo: rank=64, nsctxrnk=0
    [21-SEP-2010 16:06:42:886] nsdo: nsctx: state=8, flg=0x400d, mvd=0
    [21-SEP-2010 16:06:42:886] nsdo: gtn=127, gtc=127, ptn=10, ptc=2011
    [21-SEP-2010 16:06:42:886] nsdo: switching to application buffer
    [21-SEP-2010 16:06:42:886] nsrdr: entry
    [21-SEP-2010 16:06:42:886] nsrdr: recving a packet
    [21-SEP-2010 16:06:42:886] nsprecv: entry
    [21-SEP-2010 16:06:42:886] nsprecv: reading from transport...
    [21-SEP-2010 16:06:42:886] nttrd: entry
    #    HANG OCCURS HERE
    #    Need to <CTRL C> twice to kill
    #I've tried searching the net for similar occurrences of some of the interesting looking trace data but there appears to be limited information available, none of which is terribly helpful.
    What I'm really after is either someone who has had this issue before, or someone who can better interpret the error output from the trace files and perhaps give me an idea of what's causing it to occur. Specifically whether that error text above relates to a failed connection on the underlying network connectivity side of things or whether it may be something on a higher level within the application layers. We have done packet dumps on firewalls to check the traffic as it traverses the firewall but there are no anomalies that I can see which may be contributing to the issue at hand.
    I have organised for some testing to occur within the next 24 hours as there is a Cisco ASA Firewall that sits in the network path that is performing inspection on packets travelling through it. The inspection for SQLNET specifically is disabled, but we intend to enable this once more for testing to see whether it makes a difference. I'm not entirely confident it will however, and until we do get a chance to test any constructive input or alternate ideas will be greatly appreciated. I'm trying to cover as many bases as possible here.
    Cheers,
    Josh.

    So some further testing doesn't show anything interesting. But that said here's a look at a TCP Dump for the Oracle 11 session that hangs:
    SNORT01:~ # tcpdump -nni bond0 -vvv vlan and host 125.x.x.x and host 172.x.x.x -c 10000
    tcpdump: WARNING: bond0: no IPv4 address assigned
    tcpdump: listening on bond0, link-type EN10MB (Ethernet), capture size 68 bytes
    21:55:43.781596 IP (tos 0x0, ttl 126, id 24439, offset 0, flags [DF], proto: TCP (6), length: 48) 125.x.x.x.62008 > 172.x.x.x.1521: S, cksum 0x4d0a (correct), 2416392635:2416392635(0) win 64512 <mss 1380,nop,nop,sackOK>
    21:55:43.782454 IP (tos 0x0, ttl  59, id 50281, offset 0, flags [DF], proto: TCP (6), length: 48) 172.x.x.x.1521 > 125.x.x.x.62008: S, cksum 0xc0ae (correct), 3123579836:3123579836(0) ack 2416392636 win 49680 <mss 1460,nop,nop,sackOK>
    21:55:43.783311 IP (tos 0x0, ttl 126, id 24440, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.62008 > 172.x.x.x.1521: ., cksum 0xb382 (correct), 1:1(0) ack 1 win 64512
    21:55:43.787142 IP (tos 0x0, ttl 126, id 24441, offset 0, flags [DF], proto: TCP (6), length: 284) 125.x.x.x.62008 > 172.x.x.x.1521: P 1:245(244) ack 1 win 64512
    21:55:43.788504 IP (tos 0x0, ttl  59, id 50282, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.62008: ., cksum 0xed72 (correct), 1:1(0) ack 245 win 49436
    21:55:43.859023 IP (tos 0x0, ttl  59, id 50283, offset 0, flags [DF], proto: TCP (6), length: 48) 172.x.x.x.1521 > 125.x.x.x.62008: P, cksum 0xe166 (correct), 1:9(8) ack 245 win 49680
    21:55:43.860392 IP (tos 0x0, ttl 126, id 24445, offset 0, flags [DF], proto: TCP (6), length: 284) 125.x.x.x.62008 > 172.x.x.x.1521: P 245:489(244) ack 9 win 64504
    21:55:43.861773 IP (tos 0x0, ttl  59, id 50284, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.62008: ., cksum 0xeb82 (correct), 9:9(0) ack 489 win 49680
    21:55:43.861908 IP (tos 0x0, ttl  59, id 50285, offset 0, flags [DF], proto: TCP (6), length: 72) 172.x.x.x.1521 > 125.x.x.x.62008: P 9:41(32) ack 489 win 49680
    21:55:43.865341 IP (tos 0x0, ttl 126, id 24446, offset 0, flags [DF], proto: TCP (6), length: 196) 125.x.x.x.62008 > 172.x.x.x.1521: P 489:645(156) ack 41 win 64472
    21:55:43.867017 IP (tos 0x0, ttl  59, id 50286, offset 0, flags [DF], proto: TCP (6), length: 167) 172.x.x.x.1521 > 125.x.x.x.62008: P 41:168(127) ack 645 win 49680
    21:55:43.874836 IP (tos 0x0, ttl 126, id 24447, offset 0, flags [DF], proto: TCP (6), length: 77) 125.x.x.x.62008 > 172.x.x.x.1521: P 645:682(37) ack 168 win 64345
    21:55:43.876405 IP (tos 0x0, ttl  59, id 50287, offset 0, flags [DF], proto: TCP (6), length: 226) 172.x.x.x.1521 > 125.x.x.x.62008: P 168:354(186) ack 682 win 49680
    21:55:43.995921 IP (tos 0x0, ttl 126, id 24451, offset 0, flags [DF], proto: TCP (6), length: 1420) 125.x.x.x.62008 > 172.x.x.x.1521: . 682:2062(1380) ack 354 win 64159
    21:55:43.995978 IP (tos 0x0, ttl 126, id 24452, offset 0, flags [DF], proto: TCP (6), length: 671) 125.x.x.x.62008 > 172.x.x.x.1521: P 2062:2693(631) ack 354 win 64159
    21:55:43.999910 IP (tos 0x0, ttl  59, id 50288, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.62008: ., cksum 0xe18d (correct), 354:354(0) ack 2693 win 49680
    21:55:44.015402 IP (tos 0x0, ttl 126, id 24455, offset 0, flags [DF], proto: TCP (6), length: 326) 125.x.x.x.62008 > 172.x.x.x.1521: P 2693:2979(286) ack 354 win 64159
    21:55:44.020491 IP (tos 0x0, ttl  59, id 50289, offset 0, flags [DF], proto: TCP (6), length: 1420) 172.x.x.x.1521 > 125.x.x.x.62008: . 354:1734(1380) ack 2979 win 49680
    21:55:44.020789 IP (tos 0x0, ttl  59, id 50290, offset 0, flags [DF], proto: TCP (6), length: 671) 172.x.x.x.1521 > 125.x.x.x.62008: P 1734:2365(631) ack 2979 win 49680
    21:55:44.021015 IP (tos 0x0, ttl  59, id 50291, offset 0, flags [DF], proto: TCP (6), length: 355) 172.x.x.x.1521 > 125.x.x.x.62008: P 2365:2680(315) ack 2979 win 49680
    21:55:44.022489 IP (tos 0x0, ttl 126, id 24457, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.62008 > 172.x.x.x.1521: ., cksum 0x9ea4 (correct), 2979:2979(0) ack 2365 win 64512
    21:55:44.148236 IP (tos 0x0, ttl 126, id 24461, offset 0, flags [DF], proto: TCP (6), length: 215) 125.x.x.x.62008 > 172.x.x.x.1521: P 2979:3154(175) ack 2680 win 64197
    21:55:44.152125 IP (tos 0x0, ttl  59, id 50292, offset 0, flags [DF], proto: TCP (6), length: 187) 172.x.x.x.1521 > 125.x.x.x.62008: P 2680:2827(147) ack 3154 win 49680
    21:55:44.174040 IP (tos 0x0, ttl 126, id 24462, offset 0, flags [DF], proto: TCP (6), length: 1054) 125.x.x.x.62008 > 172.x.x.x.1521: P 3154:4168(1014) ack 2827 win 64050
    21:55:44.732635 IP (tos 0x0, ttl 126, id 24482, offset 0, flags [DF], proto: TCP (6), length: 1054) 125.x.x.x.62008 > 172.x.x.x.1521: P 3154:4168(1014) ack 2827 win 64050
    21:55:44.735346 IP (tos 0x0, ttl  59, id 50294, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.62008: ., cksum 0xcefc (correct), 3632:3632(0) ack 4168 win 49680
    21:56:17.076742 IP (tos 0x0, ttl 126, id 25631, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.62008 > 172.x.x.x.1521: R, cksum 0x942e (correct), 4168:4168(0) ack 2827 win 0
    *SQL session hangs here*The 'RESET' occurs when I kill the client using CTRL+C after a long period of inactivity, not during the session itself.
    And then.. Here's a successful login and query of 7 rows on the Oracle 9 database from a network perspective:
    SNORT01:~ # tcpdump -nni bond0 -vvv vlan and host 125.x.x.x and host 172.x.x.x -c 10000
    tcpdump: WARNING: bond0: no IPv4 address assigned
    tcpdump: listening on bond0, link-type EN10MB (Ethernet), capture size 68 bytes
    21:53:27.598450 IP (tos 0x0, ttl 126, id 19396, offset 0, flags [DF], proto: TCP (6), length: 48) 125.x.x.x.61937 > 172.x.x.x.1521: S, cksum 0xc9b4 (correct), 2519356327:2519356327(0) win 64512 <mss 1380,nop,nop,sackOK>
    21:53:27.612189 IP (tos 0x0, ttl  53, id 46015, offset 0, flags [DF], proto: TCP (6), length: 48) 172.x.x.x.1521 > 125.x.x.x.61937: S, cksum 0x1cdb (correct), 1010936359:1010936359(0) ack 2519356328 win 49680 <mss 1460,nop,nop,sackOK>
    21:53:27.612905 IP (tos 0x0, ttl 126, id 19398, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.61937 > 172.x.x.x.1521: ., cksum 0x0faf (correct), 1:1(0) ack 1 win 64512
    21:53:27.616233 IP (tos 0x0, ttl 126, id 19399, offset 0, flags [DF], proto: TCP (6), length: 321) 125.x.x.x.61937 > 172.x.x.x.1521: P 1:282(281) ack 1 win 64512
    21:53:27.629987 IP (tos 0x0, ttl  53, id 46016, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x4886 (correct), 1:1(0) ack 282 win 49680
    21:53:27.692135 IP (tos 0x0, ttl  53, id 46017, offset 0, flags [DF], proto: TCP (6), length: 48) 172.x.x.x.1521 > 125.x.x.x.61937: P, cksum 0x3d6e (correct), 1:9(8) ack 282 win 49680
    21:53:27.693603 IP (tos 0x0, ttl 126, id 19402, offset 0, flags [DF], proto: TCP (6), length: 321) 125.x.x.x.61937 > 172.x.x.x.1521: P 282:563(281) ack 9 win 64504
    21:53:27.707460 IP (tos 0x0, ttl  53, id 46018, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x4765 (correct), 9:9(0) ack 563 win 49680
    21:53:27.707883 IP (tos 0x0, ttl  53, id 46019, offset 0, flags [DF], proto: TCP (6), length: 72) 172.x.x.x.1521 > 125.x.x.x.61937: P 9:41(32) ack 563 win 49680
    21:53:27.711950 IP (tos 0x0, ttl 126, id 19403, offset 0, flags [DF], proto: TCP (6), length: 196) 125.x.x.x.61937 > 172.x.x.x.1521: P 563:719(156) ack 41 win 64472
    21:53:27.725971 IP (tos 0x0, ttl  53, id 46020, offset 0, flags [DF], proto: TCP (6), length: 167) 172.x.x.x.1521 > 125.x.x.x.61937: P 41:168(127) ack 719 win 49680
    21:53:27.734468 IP (tos 0x0, ttl 126, id 19405, offset 0, flags [DF], proto: TCP (6), length: 77) 125.x.x.x.61937 > 172.x.x.x.1521: P 719:756(37) ack 168 win 64345
    21:53:27.748270 IP (tos 0x0, ttl  53, id 46021, offset 0, flags [DF], proto: TCP (6), length: 199) 172.x.x.x.1521 > 125.x.x.x.61937: P 168:327(159) ack 756 win 49680
    21:53:27.878720 IP (tos 0x0, ttl 126, id 19409, offset 0, flags [DF], proto: TCP (6), length: 1110) 125.x.x.x.61937 > 172.x.x.x.1521: P 756:1826(1070) ack 327 win 64186
    21:53:28.994991 IP (tos 0x0, ttl 126, id 19443, offset 0, flags [DF], proto: TCP (6), length: 1110) 125.x.x.x.61937 > 172.x.x.x.1521: P 756:1826(1070) ack 327 win 64186
    21:53:29.010680 IP (tos 0x0, ttl  53, id 46023, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x3d83 (correct), 1276:1276(0) ack 1826 win 49680
    21:53:32.561849 IP (tos 0x0, ttl  53, id 46024, offset 0, flags [DF], proto: TCP (6), length: 989) 172.x.x.x.1521 > 125.x.x.x.61937: P 327:1276(949) ack 1826 win 49680
    21:53:32.710661 IP (tos 0x0, ttl 126, id 19550, offset 0, flags [DF], proto: TCP (6), length: 223) 125.x.x.x.61937 > 172.x.x.x.1521: P 1826:2009(183) ack 1276 win 63237
    21:53:32.724384 IP (tos 0x0, ttl  53, id 46025, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x3ccc (correct), 1276:1276(0) ack 2009 win 49680
    21:53:32.732636 IP (tos 0x0, ttl  53, id 46026, offset 0, flags [DF], proto: TCP (6), length: 133) 172.x.x.x.1521 > 125.x.x.x.61937: P 1276:1369(93) ack 2009 win 49680
    21:53:32.739922 IP (tos 0x0, ttl 126, id 19553, offset 0, flags [DF], proto: TCP (6), length: 947) 125.x.x.x.61937 > 172.x.x.x.1521: P 2009:2916(907) ack 1369 win 63144
    21:53:32.763266 IP (tos 0x0, ttl  53, id 46027, offset 0, flags [DF], proto: TCP (6), length: 329) 172.x.x.x.1521 > 125.x.x.x.61937: P 1369:1658(289) ack 2916 win 49680
    21:53:32.770925 IP (tos 0x0, ttl 126, id 19555, offset 0, flags [DF], proto: TCP (6), length: 78) 125.x.x.x.61937 > 172.x.x.x.1521: P 2916:2954(38) ack 1658 win 64512
    21:53:32.784774 IP (tos 0x0, ttl  53, id 46028, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 1658:1836(178) ack 2954 win 49680
    21:53:32.787455 IP (tos 0x0, ttl 126, id 19556, offset 0, flags [DF], proto: TCP (6), length: 149) 125.x.x.x.61937 > 172.x.x.x.1521: P 2954:3063(109) ack 1836 win 64334
    21:53:33.478760 IP (tos 0x0, ttl 126, id 19578, offset 0, flags [DF], proto: TCP (6), length: 149) 125.x.x.x.61937 > 172.x.x.x.1521: P 2954:3063(109) ack 1836 win 64334
    21:53:33.492256 IP (tos 0x0, ttl  53, id 46030, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x34ce (correct), 2268:2268(0) ack 3063 win 49680
    21:53:36.820908 IP (tos 0x0, ttl  53, id 46031, offset 0, flags [DF], proto: TCP (6), length: 472) 172.x.x.x.1521 > 125.x.x.x.61937: P 1836:2268(432) ack 3063 win 49680
    21:53:36.824225 IP (tos 0x0, ttl 126, id 19733, offset 0, flags [DF], proto: TCP (6), length: 57) 125.x.x.x.61937 > 172.x.x.x.1521: P 3063:3080(17) ack 2268 win 63902
    21:53:36.837345 IP (tos 0x0, ttl  53, id 46032, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x34bd (correct), 2268:2268(0) ack 3080 win 49680
    21:53:36.838015 IP (tos 0x0, ttl  53, id 46033, offset 0, flags [DF], proto: TCP (6), length: 110) 172.x.x.x.1521 > 125.x.x.x.61937: P 2268:2338(70) ack 3080 win 49680
    21:53:36.839520 IP (tos 0x0, ttl 126, id 19734, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 3080:3119(39) ack 2338 win 63832
    21:53:36.853507 IP (tos 0x0, ttl  53, id 46034, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 2338:2516(178) ack 3119 win 49680
    21:53:36.855886 IP (tos 0x0, ttl 126, id 19735, offset 0, flags [DF], proto: TCP (6), length: 160) 125.x.x.x.61937 > 172.x.x.x.1521: P 3119:3239(120) ack 2516 win 63654
    21:53:36.870292 IP (tos 0x0, ttl  53, id 46035, offset 0, flags [DF], proto: TCP (6), length: 99) 172.x.x.x.1521 > 125.x.x.x.61937: P 2516:2575(59) ack 3239 win 49680
    21:53:36.879557 IP (tos 0x0, ttl 126, id 19738, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 3239:3278(39) ack 2575 win 63595
    21:53:36.893506 IP (tos 0x0, ttl  53, id 46036, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 2575:2753(178) ack 3278 win 49680
    21:53:36.895884 IP (tos 0x0, ttl 126, id 19739, offset 0, flags [DF], proto: TCP (6), length: 292) 125.x.x.x.61937 > 172.x.x.x.1521: P 3278:3530(252) ack 2753 win 63417
    21:53:36.911464 IP (tos 0x0, ttl  53, id 46037, offset 0, flags [DF], proto: TCP (6), length: 305) 172.x.x.x.1521 > 125.x.x.x.61937: P 2753:3018(265) ack 3530 win 49680
    21:53:36.913580 IP (tos 0x0, ttl 126, id 19740, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 3530:3569(39) ack 3018 win 63152
    21:53:36.927515 IP (tos 0x0, ttl  53, id 46038, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 3018:3196(178) ack 3569 win 49680
    21:53:36.938328 IP (tos 0x0, ttl 126, id 19742, offset 0, flags [DF], proto: TCP (6), length: 315) 125.x.x.x.61937 > 172.x.x.x.1521: P 3569:3844(275) ack 3196 win 64512
    21:53:36.953008 IP (tos 0x0, ttl  53, id 46039, offset 0, flags [DF], proto: TCP (6), length: 183) 172.x.x.x.1521 > 125.x.x.x.61937: P 3196:3339(143) ack 3844 win 49680
    21:53:36.961020 IP (tos 0x0, ttl 126, id 19743, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 3844:3883(39) ack 3339 win 64369
    21:53:36.974890 IP (tos 0x0, ttl  53, id 46040, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 3339:3517(178) ack 3883 win 49680
    21:53:36.977183 IP (tos 0x0, ttl 126, id 19744, offset 0, flags [DF], proto: TCP (6), length: 208) 125.x.x.x.61937 > 172.x.x.x.1521: P 3883:4051(168) ack 3517 win 64191
    21:53:36.991461 IP (tos 0x0, ttl  53, id 46041, offset 0, flags [DF], proto: TCP (6), length: 110) 172.x.x.x.1521 > 125.x.x.x.61937: P 3517:3587(70) ack 4051 win 49680
    21:53:36.993439 IP (tos 0x0, ttl 126, id 19747, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 4051:4090(39) ack 3587 win 64121
    21:53:37.007199 IP (tos 0x0, ttl  53, id 46042, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 3587:3765(178) ack 4090 win 49680
    21:53:37.011239 IP (tos 0x0, ttl 126, id 19748, offset 0, flags [DF], proto: TCP (6), length: 183) 125.x.x.x.61937 > 172.x.x.x.1521: P 4090:4233(143) ack 3765 win 63943
    21:53:37.025767 IP (tos 0x0, ttl  53, id 46043, offset 0, flags [DF], proto: TCP (6), length: 210) 172.x.x.x.1521 > 125.x.x.x.61937: P 3765:3935(170) ack 4233 win 49680
    21:53:37.027455 IP (tos 0x0, ttl 126, id 19750, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 4233:4272(39) ack 3935 win 63773
    21:53:37.041382 IP (tos 0x0, ttl  53, id 46044, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 3935:4113(178) ack 4272 win 49680
    21:53:37.044708 IP (tos 0x0, ttl 126, id 19751, offset 0, flags [DF], proto: TCP (6), length: 75) 125.x.x.x.61937 > 172.x.x.x.1521: P 4272:4307(35) ack 4113 win 63595
    21:53:37.058388 IP (tos 0x0, ttl  53, id 46045, offset 0, flags [DF], proto: TCP (6), length: 56) 172.x.x.x.1521 > 125.x.x.x.61937: P 4113:4129(16) ack 4307 win 49680
    21:53:37.060398 IP (tos 0x0, ttl 126, id 19752, offset 0, flags [DF], proto: TCP (6), length: 75) 125.x.x.x.61937 > 172.x.x.x.1521: P 4307:4342(35) ack 4129 win 63579
    21:53:37.073926 IP (tos 0x0, ttl  53, id 46046, offset 0, flags [DF], proto: TCP (6), length: 56) 172.x.x.x.1521 > 125.x.x.x.61937: P 4129:4145(16) ack 4342 win 49680
    21:53:37.088056 IP (tos 0x0, ttl 126, id 19753, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.61937 > 172.x.x.x.1521: ., cksum 0xf23e (correct), 4342:4342(0) ack 4145 win 63563
    21:53:56.309909 IP (tos 0x0, ttl 126, id 20509, offset 0, flags [DF], proto: TCP (6), length: 176) 125.x.x.x.61937 > 172.x.x.x.1521: P 4342:4478(136) ack 4145 win 63563
    21:53:56.325783 IP (tos 0x0, ttl  53, id 46047, offset 0, flags [DF], proto: TCP (6), length: 398) 172.x.x.x.1521 > 125.x.x.x.61937: P 4145:4503(358) ack 4478 win 49680
    21:53:56.329152 IP (tos 0x0, ttl 126, id 20511, offset 0, flags [DF], proto: TCP (6), length: 57) 125.x.x.x.61937 > 172.x.x.x.1521: P 4478:4495(17) ack 4503 win 63205
    21:53:56.557234 IP (tos 0x0, ttl 126, id 20519, offset 0, flags [DF], proto: TCP (6), length: 57) 125.x.x.x.61937 > 172.x.x.x.1521: P 4478:4495(17) ack 4503 win 63205
    21:53:56.570496 IP (tos 0x0, ttl  53, id 46049, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x24ea (correct), 4904:4904(0) ack 4495 win 49680
    21:53:58.561449 IP (tos 0x0, ttl  53, id 46051, offset 0, flags [DF], proto: TCP (6), length: 441) 172.x.x.x.1521 > 125.x.x.x.61937: P 4503:4904(401) ack 4495 win 49680
    21:53:58.602228 IP (tos 0x0, ttl 126, id 20579, offset 0, flags [DF], proto: TCP (6), length: 79) 125.x.x.x.61937 > 172.x.x.x.1521: P 4495:4534(39) ack 4904 win 64512
    21:53:58.615281 IP (tos 0x0, ttl  53, id 46052, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x24c3 (correct), 4904:4904(0) ack 4534 win 49680
    21:53:58.616571 IP (tos 0x0, ttl  53, id 46053, offset 0, flags [DF], proto: TCP (6), length: 218) 172.x.x.x.1521 > 125.x.x.x.61937: P 4904:5082(178) ack 4534 win 49680
    21:53:58.745531 IP (tos 0x0, ttl 126, id 20584, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.61937 > 172.x.x.x.1521: ., cksum 0xead2 (correct), 4534:4534(0) ack 5082 win 64334
    21:54:01.476582 IP (tos 0x0, ttl 126, id 20707, offset 0, flags [DF], proto: TCP (6), length: 53) 125.x.x.x.61937 > 172.x.x.x.1521: P 4534:4547(13) ack 5082 win 64334
    21:54:01.492998 IP (tos 0x0, ttl  53, id 46054, offset 0, flags [DF], proto: TCP (6), length: 53) 172.x.x.x.1521 > 125.x.x.x.61937: P 5082:5095(13) ack 4547 win 49680
    21:54:01.499924 IP (tos 0x0, ttl 126, id 20709, offset 0, flags [DF], proto: TCP (6), length: 50) 125.x.x.x.61937 > 172.x.x.x.1521: P, cksum 0xe469 (correct), 4547:4557(10) ack 5095 win 64321
    21:54:01.500558 IP (tos 0x0, ttl 126, id 20710, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.61937 > 172.x.x.x.1521: F, cksum 0xeaba (correct), 4557:4557(0) ack 5095 win 64321
    21:54:01.513561 IP (tos 0x0, ttl  53, id 46055, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: F, cksum 0x23ec (correct), 5095:5095(0) ack 4557 win 49680
    21:54:01.513628 IP (tos 0x0, ttl  53, id 46056, offset 0, flags [DF], proto: TCP (6), length: 40) 172.x.x.x.1521 > 125.x.x.x.61937: ., cksum 0x23eb (correct), 5096:5096(0) ack 4558 win 49680
    21:54:01.514175 IP (tos 0x0, ttl 126, id 20713, offset 0, flags [DF], proto: TCP (6), length: 40) 125.x.x.x.61937 > 172.x.x.x.1521: ., cksum 0xeab9 (correct), 4558:4558(0) ack 5096 win 64321The above is obviously fine, but it's really quite strange. I can get the Oracle 9 queries to hang if I select over 7 rows (8 being the point at which it dies).
    So I can run
    Sqlplus user/[email protected]
    Select * from <blah> where rownum < 7;Over and over again, as many times as I like without issue.
    But!.. As soon as I run
    Sqlplus user/[email protected]
    Select * from <blah> where rownum < 8;The session will hang, and from a network perspective there are no packets being transferred in either direction. It looks exactly like the Oracle 11 session in that the session is still ESTABLISHED from a client perspective but no data is flowing in either direction..
    Does anyone have any idea why '8' is the magic number that would be causing it to hang? I'm really stuggling to see from a network perspective how this may be occuring, as above the TCPDump looks clean.
    Unfortunately I don't have access do a dump on the client/server itself however, just on the network path. I guess that may be where we need to be looking next.
    Thanks for the ideas so far all, much appreciated.
    Josh.

  • N95 8GB reboots periodically in data transfer mode

    I have a new N95 8GB running firmware v20. Unfortunately, when I use the genuine USB cable and select "Data Transfer Mode" the phone reboots 60 seconds after I connect the cable (and thereafter each 60 seconds when I don't touch the phone).
    I have tried with a non-genuine cable and the behaviour is the same.
    Coincidentally the "Power Save Time-out" is set to 60 seconds. When I change this to another value, say 40 seconds, then the above rebooting happens every 40 seconds.
    This appears to be a phone bug and makes it extremely difficult to use data transfer mode, unless you can transfer files within the power save time-out period, or unless you are prepared to press a button on the phone within this period.
    **Nokia please fix this**
    See related post: /discussions/board/message?board.id=smartphones&thread.id=81967&view=by_date_ascending&page=1

    Well,rotateme works perfectly for me and i have a n95 8gb too.So there are two things that might happening.
    1.You are doing something wrong with the whole installation(does rotateme works when you install it?)
    2.You downloaded your self a corrapted or somekind of a virus or a bug .sis file and installed it to your phone.
    Why dont you try to download one other rotateme file for you?You can find plenty rotateme from a lot of users.I can send you mine,if you want send me an e-mail and i`ll send to you the .sis file that i used and as i said,it works fine for me.
    Peace
    Message Edited by noslien on 06-Feb-2008 07:47 AM
    Eykleidis

  • Data transfer from sap r/3 into excel sheet for mi01

    hi gurus,
       as i  am a xi consultant i got requirement to write a program for data transfer from sap r/3 into excel sheet for MI01.can any body help me by giving sample code or example for this requirement.please help me.

    Hi Rohit,
    This is an upload program and it has used both function modules to upload from an excel to R3 and to download from R3 onto excel.
    GUI_UPLOAD
    GUI_DOWNLOAD
    are the function modules used.
    Hope this helps,
    *Output:        Downloads error records onto presentation server,
    *               Displays report with number of success and error records
    REPORT ZMCG047CONTR NO STANDARD PAGE HEADING
                                   LINE-SIZE 255
                                   MESSAGE-ID ZM.
    *&       Table declarations
    TABLES : T001W,     "Plants/Branches
             T024E,     "Purchasing Organizations
             T001.      "Company Codes
    *              TYPE-POOLS  DECLARATION
    TYPE-POOLS : SLIS.
    *                       Types  Declaration                            *
    TYPES: BEGIN OF T_RECORD,    "record storing contract info
            LIFNR(010),      "Vendor Number
            EVART(004),      "Agreement Type
            EKORG(004),      "Purchasing Organization
            EKGRP(003),      "Purchasing Group
            WERKS(004),      "Plant
            LGORT(004),      "Storage Location
            KDATB(010),      "Valid start Date
            KDATE(010),      "Valid End Date
            ZTERM(004),      "Payment Terms
            KTWRT(020),      "Target Value
            EPSTP(001),      "Item Category
            EMATN(018),      "Material Number
            KTMNG(017),      "Target Quantity
            NETPR(014),      "Net Price
            PEINH(006),      "Net Price Unit
            BPRME(003),      "Net Price Order Price Unit
            IDNLF(035),      "Vendor Material number
            WEBRE(001),      "GR Based-IV
            MEPRF(001),      "Pricing Date Category
            LTEX1(040),      "Info Text
            DATAB(010),      "Valid From
            DATBI(010),      "Valid To
            KSCHL(004),      "Condition Type
            KBETR(016),      "Condition Rate if scale is not given
            KONWA(005),      "Currency
            KPEIN(005),      "Condition Pricing Unit
            KMEIN(003),      "Condition Unit of Measure
            KSTBM(019),      "Scale
            KBETR_01(016),   "Scale Rate
            DEL_FLAG,        "Delete Flag Indicator
            ERR_MSG(100),    "Error Message
          END OF T_RECORD,
          BEGIN OF T_ERR_RECORD,   "to have error records stored
             LIFNR(010),      "Vendor Number
             EVART(004),      "Agreement Type
             EKORG(004),      "Purchasing Organization
             EKGRP(003),      "Purchasing Group
             WERKS(004),      "Plant
             LGORT(004),      "Storage Location
             KDATB(010),      "Valid start Date
             KDATE(010),      "Valid End Date
             ZTERM(004),      "Payment Terms
             KTWRT(020),      "Target Value
             EPSTP(001),      "Item Category
             EMATN(018),      "Material Number
             KTMNG(017),      "Target Quantity
             NETPR(014),      "Net Price
             PEINH(006),      "Net Price Unit
             BPRME(003),      "Net Price Order Price Unit
             IDNLF(035),      "Vendor Material number
             WEBRE(001),      "GR Based-IV
             MEPRF(001),      "Pricing Date Category
             LTEX1(040),      "Info Text
             DATAB(010),      "Valid From
             DATBI(010),      "Valid To
             KSCHL(004),      "Condition Type
             KBETR(016),      "Condition Rate if scale is not given
             KONWA(005),      "Currency
             KPEIN(005),      "Condition Pricing Unit
             KMEIN(003),      "Condition Unit of Measure
             KSTBM(019),      "Scale
             KBETR_01(016),   "Scale Rate
             DEL_FLAG,        "Delete Flag Indicator
             ERR_MSG(100),    "Error Message
          END OF T_ERR_RECORD,
          BEGIN OF T_LOEKZ,    "To have deletion indicators for materials
              LOEKZ(001),    "Deletion indicator in purchasing document
              EMATN(018),    "Material Number
              WERKS(004),    "Plant
              LGORT(004),    "Storage Location
              BSTYP(001),    "Purchasing document category
          END OF T_LOEKZ,
          BEGIN OF T_MATNR,  " Type definition to store details of materials
               MATNR(018),    "Material Number
          END OF T_MATNR,
          BEGIN OF T_T001,   " Type definition for company codes
              BUKRS(004),    " Company Code
          END OF T_T001,
          BEGIN OF T_ZMVXREF,   "Cross-Reference table type
              D_ALTKN(10),      "Legacy Vendor Number
              D_BUKRS(4),       "Legacy Company Code
              M_ALTKN(10),      "SAP Company Code
          END OF T_ZMVXREF,
          BEGIN OF T_LFA1,    "Master data of vendors
              LIFNR(10),      "Vendor Number
          END OF T_LFA1,
    *  Type Declaration for T024E (Company Codes)
           BEGIN OF T_T024E,
             EKORG   LIKE   T024E-EKORG,     "Purchasing organization
             BUKRS   LIKE   T024E-BUKRS,     "Company Code
           END OF T_T024E,
    *  Type Declaration for t001w (Plant)
           BEGIN OF T_T001W,
             WERKS  LIKE  T001W-WERKS,            "Plant
           END OF T_T001W,
    *  Type Declatation for String Line
           BEGIN OF T_STR1,                                     "#EC NEEDED
             SLINE(6000) TYPE C,
           END OF T_STR1.
    TYPES:  BEGIN OF T_BDCDATA.  "BDC Data
            INCLUDE STRUCTURE BDCDATA.
    TYPES:  END OF T_BDCDATA.
    *       Internal Tables  Declaration                                  *
    DATA:
    *      Internal table to store input file data
           I_RECORD TYPE STANDARD TABLE OF T_RECORD INITIAL SIZE 0,
    *      Internal table to capture errors
           I_ERR_REC TYPE STANDARD TABLE OF T_ERR_RECORD INITIAL SIZE 0,
    *      Internal table to check for deletion indicators
           I_LOEKZ TYPE STANDARD TABLE OF T_LOEKZ INITIAL SIZE 0,
    *      Internal table to check for material numbers
           I_MATNR TYPE STANDARD TABLE OF T_MATNR INITIAL SIZE 0,
    *      Internal table used for storing Cross-Reference data of Vendor
           I_ZMVXREF TYPE STANDARD TABLE OF T_ZMVXREF INITIAL SIZE 0,
    *      Internal table for holding Vendor Numbers from Master table
           I_LFA1 TYPE STANDARD TABLE OF T_LFA1 INITIAL SIZE 0,
    *      Internal table for holding Purchase Org and Company Codes
           I_T024E TYPE STANDARD TABLE OF T_T024E INITIAL SIZE 0,
    *      Internal table for holding Plants
           I_T001W TYPE STANDARD TABLE OF T_T001W INITIAL SIZE 0,
    *      Internal table for storing a list of Company Codes
           I_T001 TYPE STANDARD TABLE OF T_T001 INITIAL SIZE 0,
    *      Internal table used for ALV Reporting
           I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    *      Internal table used for holding List Header
           I_LISTHEADER TYPE SLIS_T_LISTHEADER,    "EC NEEDED
    *      Internal table to hold ALV Event
           I_ALV_EVENT TYPE SLIS_T_EVENT,
    *      Internal table to hold Sort Info for ALV Report
           I_SORT TYPE SLIS_T_SORTINFO_ALV,
    *      Internal table for BDC Data
           I_BDCDATA TYPE STANDARD TABLE OF T_BDCDATA INITIAL SIZE 0,
    *      Internal table for messages
           I_MESSTAB TYPE TABLE OF BDCMSGCOLL,
    *      Internal table for String line
           I_STR1 TYPE STANDARD TABLE OF T_STR1 INITIAL SIZE 0.
    *       Work Area Declaration                                         *
    DATA:
    *  Work Area to hold data for the Open Contract
          WA_RECORD TYPE T_RECORD,
    *  Work Area to hold previous record data
          WA_RECORDPREV TYPE T_RECORD,
    *  Work Area to hold errors
          WA_ERR_REC TYPE T_ERR_RECORD,
    *  Work Area to hold the Deletion Indicator of materials
          WA_LOEKZ TYPE T_LOEKZ,
    *  Work Area to hold Material numbers of required materials
          WA_MATNR TYPE T_MATNR,      "EC NEEDED
    *  Work Area to hold errors occured while performing BDC
          WA_MESSTAB TYPE BDCMSGCOLL,
    *  Work Area to hold field catalog for ALV Reports
          WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    *  Work Area to hold list header data for ALV reports
          WA_LISTHEADER TYPE SLIS_LISTHEADER,
    *  Work Area to hold ALV Event
          WA_ALV_EVENT LIKE LINE OF I_ALV_EVENT,  "EC NEEDED
    *  Work Area to hold Layout of ALV Report
          WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
    *  Work Area to hold Cross-Reference data of Vendor
          WA_ZMVXREF TYPE T_ZMVXREF,
    *  Work Area to hold Vendor Numbers from Master table
          WA_LFA1 TYPE T_LFA1,    "EC NEEDED
    *  Work Area to hold Purchase Org and Company Codes
          WA_T024E TYPE T_T024E,
    *  Work Area to hold Company Codes
          WA_T001 TYPE T_T001,
    *  Work Area to hold Plants
          WA_T001W TYPE T_T001W,
    *  Work Area to hold Sort Info for ALV Report
          WA_SORT TYPE SLIS_SORTINFO_ALV,
    *  Work Area to hold BDC Data
          WA_BDCDATA TYPE T_BDCDATA,
    *  Work Area for String line
          WA_STR1 TYPE T_STR1.
    *       Variables  Declaration                                        *
    DATA: V_ERRMSG(500),           "To temporarily store the error message
          V_CONV_DATE(10) TYPE C,  "To capture the converted date format
          V_DATE LIKE SY-DATUM,
          V_REPID LIKE SY-REPID,   "holds report id
          V_CROSS_REFERENCE_ERROR TYPE I,  " cross-reference error
          V_INPUTERROR_FLAG VALUE '',      " input error status
          V_FILENAME TYPE STRING,          " File Name
          VEN_FLAG(1),                       " at new status
          MAT_FLAG(1),                      " at new status
          V_IND(2) TYPE N,                 " index of table control
          V_IND2(2) TYPE N,                " index of table control
          V_IND3(2) TYPE N,                " index of table control
          V_EVRTP1(20),
          V_EPSTP1(20),
          V_EMATN1(20),
          V_KTMNG1(20),
          V_NETPR1(20),
          V_PEINH1(20),
          V_BPRME1(20),
          V_TCSELFLAG1(20),
          V_KSCHL2(20),
          V_KBETR2(20),
          V_KONWA2(20),
          V_KPEIN2(20),
          V_KMEIN2(20),
          V_SELKZ2(20),
          V_KBETR3(20),
          V_KSTBM3(20),
          V_LINE TYPE I,
          V_STR TYPE X VALUE '09',
          V_EXIST TYPE C,
          V_EXIST1 TYPE C,
          V_ISDIR TYPE C,
          V_ISDIR1 TYPE C.
    *       Constants  Declaration                                        *
    CONSTANTS: C_TCODE(5) VALUE 'ME31K', "Trx code - Open Contract Creation
               C_TRUE     VALUE 'X',       " Del_Flag indicator
               C_LOEKZ_MARKED VALUE 'X',   "Deletion indicator for material
               C_INPUTERROR_FLAG_YES VALUE 'X',  "Input File Indicator
               C_VEN_ERR1 VALUE 1,    "Error Indicator
               C_16(2)    VALUE '16',
               C_VEN_ERR2 VALUE 2,    "Error Indicator
               C_VEN_ERR3 VALUE 3,    "Error Indicator
               C_VEN_SUCS VALUE 0,    "Success Indicator
               C_SUCCESS  LIKE SY-SUBRC VALUE '0',
               C_STRUE    VALUE 'S',  "Del_flag for SAP Errors
               C_YTRUE    VALUE 'Y',  "Del_flag for Success Records
               C_MSGTYP_E VALUE 'E',  "holds error message type
               C_MSGTYP_S VALUE 'S',  "holds success message type
               C_BSTYP    VALUE 'K',  "Purchasing Document type is Contract
               C_BACKGROUND VALUE 'N', "Background mode
               C_FOREGROUND VALUE 'A', "All Screen mode
               C_ERRORS   VALUE 'E',   "Error screen mode
               C_WK(2)    VALUE 'WK'. "Value Contract
    *        Selection Screen                                             *
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-033.
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS:
    *              Plant
                   S_WERKS FOR T001W-WERKS OBLIGATORY,
    *              Purchase Organization
                   S_EKORG FOR T024E-EKORG OBLIGATORY.
    *              Company Code
    PARAMETER      P_BUKRS LIKE T001-BUKRS OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN POSITION 3.
    PARAMETER RB_SERVE RADIOBUTTON GROUP RBX DEFAULT 'X' USER-COMMAND U1.
    SELECTION-SCREEN COMMENT 6(19)  TEXT-036.
    SELECTION-SCREEN POSITION 37.
    PARAMETER RB_LOCAL RADIOBUTTON GROUP RBX.
    SELECTION-SCREEN COMMENT 40(13) TEXT-035.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP.
    PARAMETERS:
    *    Parameter holding Input File name
              P_FILE LIKE RLGRAP-FILENAME
                     OBLIGATORY
                     LOWER CASE
                     DEFAULT 'C:\'
                     MODIF ID G1,
              P_FILE1 LIKE RLGRAP-FILENAME
                      OBLIGATORY
                      LOWER CASE
                      DEFAULT '/celestica/interface/corp/in/work/'
                      MODIF ID G2,
    *    Parameter specifying Mode of calling the Transaction.
              P_MODE DEFAULT 'N' OBLIGATORY,
    *    Check box used to test the input file.
              P_TEST AS CHECKBOX DEFAULT 'X',
    *    Parameter holding Filename for holding Input File Errors
              P_IPERR LIKE RLGRAP-FILENAME
                      OBLIGATORY
                      LOWER CASE
                      DEFAULT 'C:\'
                      MODIF ID G1,
              P_IPERR1 LIKE RLGRAP-FILENAME
                     OBLIGATORY
                     LOWER CASE
                     DEFAULT '/celestica/interface/corp/in/work/047_Err.txt'
                     MODIF ID G2.
    SELECTION-SCREEN END OF BLOCK B2.
    *        AT Selection Screen  Events                                  *
    *  Loop the screen to activate relative paths
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF RB_SERVE = C_TRUE AND SCREEN-GROUP1 = 'G1'.
          SCREEN-OUTPUT = 0.
          SCREEN-ACTIVE = 0.
          SCREEN-INPUT = 0.
        ELSEIF RB_LOCAL = C_TRUE AND SCREEN-GROUP1 = 'G2'.
          SCREEN-OUTPUT = 0.
          SCREEN-ACTIVE = 0.
          SCREEN-INPUT = 0.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN ON BLOCK B2.
    *  Checking Access Authorization for the user
      CALL FUNCTION 'ZU_DATA_ACCESS_AUTH_CHECK'
           EXPORTING
                ACTVT        = C_16
                P_BUKRS      = P_BUKRS
           TABLES
                S_WERKS      = S_WERKS
                S_EKORG      = S_EKORG
           EXCEPTIONS
                BUKRS_FAILED = 1
                VKORG_FAILED = 2
                VTWEG_FAILED = 3
                EKORG_FAILED = 4
                WERKS_FAILED = 5
                LGNUM_FAILED = 6
                OTHERS       = 7.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    AT SELECTION-SCREEN ON P_BUKRS.
      IF NOT P_BUKRS IS INITIAL.
        SELECT SINGLE BUKRS INTO T001
                            FROM T001
                            WHERE BUKRS EQ P_BUKRS.
        IF SY-SUBRC NE 0.
          MESSAGE I000 WITH TEXT-089.
          STOP.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    * Search Help to select Input File path.
      PERFORM GET_FILE_NAME USING P_FILE.
    * Check for the existence of the file.
      IF RB_LOCAL EQ C_TRUE.
        CALL FUNCTION 'TMP_GUI_GET_FILE_EXIST'
             EXPORTING
                  FNAME          = P_FILE
             IMPORTING
                  EXIST          = V_EXIST
                  ISDIR          = V_ISDIR
             EXCEPTIONS
                  FILEINFO_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.
        IF V_ISDIR IS INITIAL.
          IF V_EXIST IS INITIAL.
            MESSAGE I000 WITH TEXT-018.
            STOP.
          ENDIF.
        ELSEIF V_ISDIR EQ C_TRUE.
          MESSAGE I000 WITH TEXT-068.
          STOP.
        ENDIF.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_IPERR.
    * Search Help to select Input Error File path.
      PERFORM GET_FILE_NAME USING P_IPERR.
    AT SELECTION-SCREEN.
    * Validate Transaction Mode
      IF  P_MODE <> C_BACKGROUND AND
          P_MODE <> C_FOREGROUND AND
          P_MODE <> C_ERRORS.
        MESSAGE I000 WITH TEXT-034.
        STOP.
      ENDIF.
    START-OF-SELECTION.
    * Get the Input File Data
      V_FILENAME = P_FILE.
      PERFORM UPLOAD_FLATFILE_DATA TABLES I_RECORD
                                   USING V_FILENAME.
    * Sorting the data by all fields
      SORT I_RECORD.
    * Ensuring the padding of the empty spaces before the vendor No
      CLEAR WA_RECORD.
      LOOP AT I_RECORD INTO WA_RECORD.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  INPUT  = WA_RECORD-LIFNR
             IMPORTING
                  OUTPUT = WA_RECORD-LIFNR.
        MODIFY I_RECORD FROM WA_RECORD
                        INDEX SY-TABIX
                        TRANSPORTING LIFNR.
        CLEAR WA_RECORD.
      ENDLOOP.
    * Input file validation
      PERFORM VALIDATE_FLATFILE_DATA.
      IF P_TEST = C_TRUE.
        IF I_ERR_REC[] IS INITIAL.
          MESSAGE I000 WITH TEXT-032.
          STOP.
        ELSE.
    *  Display all the error records at the input level.
          PERFORM DISPLAY_INPERR_RECORDS.
    *  Download Error File
          PERFORM DOWNLOAD_ERROR_FILE.
        ENDIF.
      ELSE.
    * Build BDC Data
        PERFORM BUILD_BDC_DATA.
    * Download Error File
        PERFORM DOWNLOAD_ERROR_FILE.
    * Display the status report.
        PERFORM DISPLAY_PROCESSED_RECORDS.
      ENDIF.
    END-OF-SELECTION.
      REFRESH:  I_RECORD,
                I_ERR_REC,
                I_LOEKZ,
                I_MATNR,
                I_ZMVXREF,
                I_LFA1,
                I_T024E,
                I_FIELDCAT,
                I_LISTHEADER,
                I_ALV_EVENT,
                I_SORT,
                I_BDCDATA,
                I_MESSTAB,
                I_STR1.
      FREE: I_RECORD,
            I_ERR_REC,
            I_LOEKZ,
            I_MATNR,
            I_ZMVXREF,
            I_LFA1,
            I_T024E,
            I_FIELDCAT,
            I_LISTHEADER,
            I_ALV_EVENT,
            I_SORT,
            I_BDCDATA,
            I_MESSTAB,
            I_STR1.
    *&      Form  GET_file_name
    *       Fetches the file and path from the presentation system
    *  -->  p1        Path along with the file name
    FORM GET_FILE_NAME USING L_FILE LIKE RLGRAP-FILENAME.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                MASK             = ',*.TXT,*.txt.'
                MODE             = 'O'
                TITLE            = TEXT-011
           IMPORTING
                FILENAME         = L_FILE
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
      CASE SY-SUBRC.
        WHEN 1.
          MESSAGE I000 WITH TEXT-084.
          STOP.
        WHEN 2.
          MESSAGE I000 WITH TEXT-085.
          STOP.
        WHEN 3.
          MESSAGE I000 WITH TEXT-086.
          STOP.
        WHEN 4.
          MESSAGE I000 WITH TEXT-087.
          STOP.
      ENDCASE.
    ENDFORM.                    " GET_file_name
    *&      Form  upload_flatfile_data
    *       Uploading data from Flat File
    FORM UPLOAD_FLATFILE_DATA
                          TABLES I_L_RECORD STRUCTURE WA_RECORD
                          USING L_FILENAME TYPE STRING.
      DATA WA_L_RECORD TYPE T_RECORD.
    * Upload the Flat file data
      IF RB_LOCAL EQ C_TRUE. "File is on the Local System
        CALL FUNCTION 'GUI_UPLOAD'
             EXPORTING
                  FILENAME                = L_FILENAME
                  FILETYPE                = 'ASC'
                  HAS_FIELD_SEPARATOR     = 'X'
             TABLES
                  DATA_TAB                = I_L_RECORD
             EXCEPTIONS
                  FILE_OPEN_ERROR         = 1
                  FILE_READ_ERROR         = 2
                  NO_BATCH                = 3
                  GUI_REFUSE_FILETRANSFER = 4
                  INVALID_TYPE            = 5
                  NO_AUTHORITY            = 6
                  UNKNOWN_ERROR           = 7
                  BAD_DATA_FORMAT         = 8
                  HEADER_NOT_ALLOWED      = 9
                  SEPARATOR_NOT_ALLOWED   = 10
                  HEADER_TOO_LONG         = 11
                  UNKNOWN_DP_ERROR        = 12
                  ACCESS_DENIED           = 13
                  DP_OUT_OF_MEMORY        = 14
                  DISK_FULL               = 15
                  DP_TIMEOUT              = 16
                  OTHERS                  = 17.
        CASE SY-SUBRC.
          WHEN 0.
            DESCRIBE TABLE I_L_RECORD LINES V_LINE.
            IF V_LINE EQ 0.
              MESSAGE I000 WITH TEXT-065.
              STOP.
            ENDIF.
          WHEN 1.
            MESSAGE I000 WITH TEXT-068.
            STOP.
          WHEN 2.
            MESSAGE I000 WITH TEXT-069.
            STOP.
          WHEN 3.
            MESSAGE I000 WITH TEXT-070.
            STOP.
          WHEN 4.
            MESSAGE I000 WITH TEXT-071.
            STOP.
          WHEN 5.
            MESSAGE I000 WITH TEXT-072.
            STOP.
          WHEN 6.
            MESSAGE I000 WITH TEXT-073.
            STOP.
          WHEN 7.
            MESSAGE I000 WITH TEXT-074.
            STOP.
          WHEN 8.
            MESSAGE I000 WITH TEXT-075.
            STOP.
          WHEN 9.
            MESSAGE I000 WITH TEXT-076.
            STOP.
          WHEN 10.
            MESSAGE I000 WITH TEXT-077.
            STOP.
          WHEN 11.
            MESSAGE I000 WITH TEXT-078.
            STOP.
          WHEN 12.
            MESSAGE I000 WITH TEXT-079.
            STOP.
          WHEN 13.
            MESSAGE I000 WITH TEXT-080.
            STOP.
          WHEN 14.
            MESSAGE I000 WITH TEXT-081.
            STOP.
          WHEN 15.
            MESSAGE I000 WITH TEXT-082.
            STOP.
          WHEN 16.
            MESSAGE I000 WITH TEXT-083.
            STOP.
        ENDCASE.
        CLEAR V_LINE.
      ELSEIF RB_SERVE EQ C_TRUE. "File is on the Application Server
        P_MODE = C_BACKGROUND.
        OPEN DATASET P_FILE1 FOR INPUT IN TEXT MODE.
        CHECK SY-SUBRC EQ C_SUCCESS.
        CLEAR WA_STR1.
        DO.
          READ DATASET P_FILE1 INTO WA_STR1.
          IF SY-SUBRC <> 0.      " NE SUCCESS.
            EXIT.
          ELSEIF SY-SUBRC EQ C_SUCCESS.
            APPEND WA_STR1 TO I_STR1.
            CLEAR WA_STR1.
          ENDIF.                  " ENDIF on SY-SUBRC 0 Check.
        ENDDO.                    " ENDDO
        DELETE I_STR1 WHERE SLINE EQ ' '.
        DESCRIBE TABLE I_STR1 LINES V_LINE.
        IF V_LINE EQ 0.
          MESSAGE S000 WITH TEXT-065.
          STOP.
        ENDIF.
        LOOP AT I_STR1 INTO WA_STR1.
          CLEAR: WA_L_RECORD.
          SPLIT WA_STR1-SLINE AT V_STR
          INTO WA_L_RECORD-LIFNR
               WA_L_RECORD-EVART
               WA_L_RECORD-EKORG
               WA_L_RECORD-EKGRP
               WA_L_RECORD-WERKS
               WA_L_RECORD-LGORT
               WA_L_RECORD-KDATB
               WA_L_RECORD-KDATE
               WA_L_RECORD-ZTERM
               WA_L_RECORD-KTWRT
               WA_L_RECORD-EPSTP
               WA_L_RECORD-EMATN
               WA_L_RECORD-KTMNG
               WA_L_RECORD-NETPR
               WA_L_RECORD-PEINH
               WA_L_RECORD-BPRME
               WA_L_RECORD-IDNLF
               WA_L_RECORD-WEBRE
               WA_L_RECORD-MEPRF
               WA_L_RECORD-LTEX1
               WA_L_RECORD-DATAB
               WA_L_RECORD-DATBI
               WA_L_RECORD-KSCHL
               WA_L_RECORD-KBETR
               WA_L_RECORD-KONWA
               WA_L_RECORD-KPEIN
               WA_L_RECORD-KMEIN
               WA_L_RECORD-KSTBM
               WA_L_RECORD-KBETR_01
               WA_L_RECORD-DEL_FLAG
               WA_L_RECORD-ERR_MSG.
          APPEND WA_L_RECORD TO I_L_RECORD.
          CLEAR: WA_L_RECORD,
                  WA_STR1.
        ENDLOOP.
        REFRESH I_STR1.
        CLOSE DATASET P_FILE1.
      ENDIF.
    ENDFORM.
    *&      Form  BDC_DYNPRO
    *       Data populated into i_bdcdata table for program
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-PROGRAM  = PROGRAM.
      WA_BDCDATA-DYNPRO   = DYNPRO.
      WA_BDCDATA-DYNBEGIN = C_TRUE.
      APPEND WA_BDCDATA TO I_BDCDATA.
    ENDFORM.
    *&      Form  BDC_FIELD
    *       Data populated into i_bdcdata table for fields
    FORM BDC_FIELD USING FNAM FVAL.
      CLEAR WA_BDCDATA.
      WA_BDCDATA-FNAM = FNAM.
      WA_BDCDATA-FVAL = FVAL.
      APPEND WA_BDCDATA TO I_BDCDATA.
    ENDFORM.
    *&      Form  convert_date
    *       Converting the data from the file format to mm/dd/yyyy format
    *      <--P_wa_record_kdatb  Source Date
    *      <--p_l_conv_date      Target Date
    FORM CONVERT_DATE USING L_DATE
                            L_TAR_DATE.
      CONCATENATE L_DATE+0(2)
                  L_DATE+3(2)
                  L_DATE+6(4)
                  INTO L_TAR_DATE.
    ENDFORM.                    " convert_date
    *&      Form  validate_flatfile_data
    *       Validating the input file
    FORM VALIDATE_FLATFILE_DATA.
      DATA: L_TODAY LIKE SY-DATUM,
            L_STARTDATE_C LIKE SY-DATUM,
            L_ENDDATE_C LIKE SY-DATUM,
            L_ENDDATE_C1 LIKE SY-DATUM,
            L_STARTDATE_C1 LIKE SY-DATUM,
            L_STARTDATE(8),
            L_ENDDATE(8).
    * Fetch indicator for all records on the material, plant & storage
    * location combination.
      IF NOT I_RECORD[] IS INITIAL.
        REFRESH I_LOEKZ.
        SELECT EMATN            " Material Number
               WERKS            " Plant
               LGORT            " Storage Location
               BSTYP            " Purchasing Document Category
               LOEKZ            " Deletion indicator
          INTO TABLE I_LOEKZ
          FROM EKPO
          FOR ALL ENTRIES IN I_RECORD
          WHERE EMATN = I_RECORD-EMATN
            AND WERKS = I_RECORD-WERKS
            AND LGORT = I_RECORD-LGORT
            AND BSTYP = C_BSTYP
            AND LOEKZ = C_LOEKZ_MARKED.
        IF SY-SUBRC EQ 0.
          SORT I_LOEKZ BY EMATN WERKS LGORT BSTYP LOEKZ.
        ENDIF.
    * Fetching Plants for all entries in the selection screen
        REFRESH I_T001W.
        SELECT WERKS  "Plant
            INTO TABLE I_T001W
            FROM T001W
            WHERE WERKS IN S_WERKS.
        IF SY-SUBRC EQ 0.
          SORT I_T001W BY WERKS.
        ENDIF.
    * Fetching materials for the plants listed in flat file
        REFRESH I_MATNR.
        SELECT MATNR          " Material Number
          INTO TABLE I_MATNR
          FROM MARC
          FOR ALL ENTRIES IN I_RECORD
          WHERE WERKS = I_RECORD-WERKS.
        IF SY-SUBRC EQ 0.
          SORT I_MATNR BY MATNR.
        ENDIF.
    * Fetching Company Codes for repective Purchase Organizations
        REFRESH I_T024E.
        SELECT EKORG       "  Purchase Organization
               BUKRS       "  Company Code
            INTO TABLE I_T024E
            FROM T024E
            WHERE EKORG IN S_EKORG.
        IF SY-SUBRC EQ 0.
          SORT I_T024E BY EKORG.
        ENDIF.
    * Fetching SAP Data using Legacy Data.
        REFRESH I_ZMVXREF.
        SELECT D_ALTKN
               D_BUKRS
               M_ALTKN
            INTO TABLE I_ZMVXREF
            FROM ZMVXREF
            FOR ALL ENTRIES IN I_RECORD
            WHERE D_ALTKN = I_RECORD-LIFNR.
        IF SY-SUBRC EQ 0.
          SORT I_ZMVXREF BY D_ALTKN D_BUKRS.
        ENDIF.
    * Fetching Vendors from LFA1
        IF NOT I_ZMVXREF[] IS INITIAL.
          REFRESH I_LFA1.
          SELECT LIFNR
             INTO TABLE I_LFA1
             FROM LFA1
             FOR ALL ENTRIES IN I_ZMVXREF
             WHERE LIFNR = I_ZMVXREF-M_ALTKN.
          IF SY-SUBRC EQ 0.
            SORT I_LFA1 BY LIFNR.
          ENDIF.
        ENDIF.
    * Start Validating the flat file
        CLEAR: WA_RECORD,
               WA_T024E,
               WA_ZMVXREF,
               WA_LFA1,
               WA_LOEKZ,
               WA_MATNR.
        LOOP AT I_RECORD INTO WA_RECORD.
          L_TODAY = SY-DATUM.
          L_STARTDATE = WA_RECORD-KDATB.
          L_ENDDATE = WA_RECORD-KDATE.
          IF WA_RECORD-DEL_FLAG IS INITIAL.
            READ TABLE I_T001W INTO WA_T001W
                               WITH KEY WERKS = WA_RECORD-WERKS
                               BINARY SEARCH.
            IF SY-SUBRC EQ 0.
    *   Cross-Reference check performed for the given Vendors
              READ TABLE I_T024E INTO WA_T024E
                                 WITH KEY EKORG = WA_RECORD-EKORG
                                 BINARY SEARCH.
              IF SY-SUBRC NE 0.
                V_CROSS_REFERENCE_ERROR = C_VEN_ERR3.
              ELSE.
                READ TABLE I_ZMVXREF INTO WA_ZMVXREF
                            WITH KEY D_ALTKN = WA_RECORD-LIFNR
                                     D_BUKRS = P_BUKRS
                            BINARY SEARCH.
                IF SY-SUBRC EQ 0.
                  READ TABLE I_LFA1 INTO WA_LFA1
                             WITH KEY LIFNR = WA_ZMVXREF-M_ALTKN
                             BINARY SEARCH.
                  IF SY-SUBRC EQ 0.
                    V_CROSS_REFERENCE_ERROR = C_VEN_SUCS.
                  ELSE.
                    V_CROSS_REFERENCE_ERROR = C_VEN_ERR2.
                  ENDIF.
                ELSE.
                  V_CROSS_REFERENCE_ERROR = C_VEN_ERR1.
                ENDIF.
              ENDIF.
    * Legacy Vendor could not be mapped
              IF V_CROSS_REFERENCE_ERROR EQ C_VEN_ERR1.
            V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES. "Inp.file err. occurd
                WA_RECORD-DEL_FLAG = C_TRUE.
                WA_RECORD-ERR_MSG = TEXT-007.
                MODIFY I_RECORD FROM WA_RECORD
                                TRANSPORTING DEL_FLAG
                                             ERR_MSG
                                WHERE LIFNR = WA_RECORD-LIFNR.
    * Legacy Vendor is mapped but the obtained SAP vendor doesn't exist.
              ELSEIF V_CROSS_REFERENCE_ERROR EQ C_VEN_ERR2.
    *           Inp.file err. occurd
                V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                WA_RECORD-DEL_FLAG = C_TRUE.
                WA_RECORD-ERR_MSG = TEXT-008.
                MODIFY I_RECORD FROM WA_RECORD
                                TRANSPORTING DEL_FLAG
                                             ERR_MSG
                                WHERE LIFNR = WA_RECORD-LIFNR.
    * Purchase Organization doesn't exist in T024E.
              ELSEIF V_CROSS_REFERENCE_ERROR EQ C_VEN_ERR3.
    *             Inp.file err. occurd
                V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                WA_RECORD-DEL_FLAG = C_TRUE.
                WA_RECORD-ERR_MSG = TEXT-014.
                MODIFY I_RECORD FROM WA_RECORD
                                TRANSPORTING DEL_FLAG
                                             ERR_MSG
                                WHERE EKORG = WA_RECORD-EKORG.
    * Vendor is mapped and validated successfully
              ELSEIF V_CROSS_REFERENCE_ERROR EQ C_VEN_SUCS.
    * Checking for the deletion indicator for that record
                CONCATENATE WA_RECORD-KDATB+6(4)
                            WA_RECORD-KDATB+3(2)
                            WA_RECORD-KDATB+0(2)
                            INTO
                            L_STARTDATE.
                MOVE L_STARTDATE TO L_STARTDATE_C.
                CONCATENATE WA_RECORD-KDATB+6(4)
                            WA_RECORD-KDATB+0(2)
                            WA_RECORD-KDATB+3(2)
                            INTO
                            L_STARTDATE_C1.
                CONCATENATE WA_RECORD-KDATE+6(4)
                            WA_RECORD-KDATE+3(2)
                            WA_RECORD-KDATE+0(2)
                            INTO
                            L_ENDDATE.
                MOVE L_ENDDATE TO L_ENDDATE_C.
                CONCATENATE WA_RECORD-KDATE+6(4)
                            WA_RECORD-KDATE+0(2)
                            WA_RECORD-KDATE+3(2)
                            INTO
                            L_ENDDATE_C1.
                READ TABLE I_LOEKZ INTO WA_LOEKZ WITH KEY
                                                 EMATN = WA_RECORD-EMATN
                                                 WERKS = WA_RECORD-WERKS
                                                 LGORT = WA_RECORD-LGORT
                                                 BINARY SEARCH.
                IF SY-SUBRC EQ 0.
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-003.
                  WA_RECORD-DEL_FLAG = C_TRUE.    "marking the record
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                                ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE
                                    AND ZTERM = WA_RECORD-ZTERM
                                    AND KTWRT = WA_RECORD-KTWRT
                                    AND EPSTP = WA_RECORD-EPSTP
                                    AND EMATN = WA_RECORD-EMATN.
    * Validating the Purchasing Organization for Blank/Null
                ELSEIF WA_RECORD-EKORG IS INITIAL.
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-010.
                  WA_RECORD-DEL_FLAG = C_TRUE.
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE
                                    AND ZTERM = WA_RECORD-ZTERM
                                    AND KTWRT = WA_RECORD-KTWRT
                                    AND EPSTP = WA_RECORD-EPSTP
                                    AND EMATN = WA_RECORD-EMATN.
    * Validating the Plant for Blank/Null
                ELSEIF WA_RECORD-WERKS IS INITIAL.
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-039.
                  WA_RECORD-DEL_FLAG = C_TRUE.
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE
                                    AND ZTERM = WA_RECORD-ZTERM
                                    AND KTWRT = WA_RECORD-KTWRT
                                    AND EPSTP = WA_RECORD-EPSTP
                                    AND EMATN = WA_RECORD-EMATN.
    * Validating the Contract Validity Start Date
                ELSEIF L_STARTDATE_C1 GT L_TODAY.             "#EC PORTABLE
    *             Inpfle err.occured
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-004.
                  WA_RECORD-DEL_FLAG = C_TRUE.      "marking the record
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB.
    * Validating the Contract Validity End Date
                ELSEIF L_ENDDATE_C1 LE L_TODAY.               "#EC PORTABLE
    *             Inpfle err.ocrd
                  V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
                  WA_RECORD-ERR_MSG = TEXT-005.
                  WA_RECORD-DEL_FLAG = C_TRUE.    "marking the record
                  MODIFY I_RECORD FROM WA_RECORD
                                  TRANSPORTING DEL_FLAG
                                               ERR_MSG
                                  WHERE LIFNR = WA_RECORD-LIFNR
                                    AND EVART = WA_RECORD-EVART
                                    AND EKORG = WA_RECORD-EKORG
                                    AND EKGRP = WA_RECORD-EKGRP
                                    AND WERKS = WA_RECORD-WERKS
                                    AND LGORT = WA_RECORD-LGORT
                                    AND KDATB = WA_RECORD-KDATB
                                    AND KDATE = WA_RECORD-KDATE.
    * Checking for Material under the Plant for Agreement Type 'WK'
                ELSEIF WA_RECORD-EVART = C_WK.
                  READ TABLE I_MATNR INTO WA_MATNR
                                     WITH KEY MATNR = WA_RECORD-EMATN
                                     BINARY SEARCH.
                  IF SY-SUBRC NE 0.
                 V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES. "Inpfle err.ocrd
                    WA_RECORD-ERR_MSG = TEXT-006.
                    WA_RECORD-DEL_FLAG = C_TRUE.   "marking the record
                    MODIFY I_RECORD FROM WA_RECORD
                                    TRANSPORTING DEL_FLAG
                                                 ERR_MSG
                                    WHERE LIFNR = WA_RECORD-LIFNR
                                      AND EVART = WA_RECORD-EVART
                                      AND EKORG = WA_RECORD-EKORG
                                      AND EKGRP = WA_RECORD-EKGRP
                                      AND WERKS = WA_RECORD-WERKS
                                      AND LGORT = WA_RECORD-LGORT
                                      AND KDATB = WA_RECORD-KDATB
                                      AND KDATE = WA_RECORD-KDATE
                                      AND ZTERM = WA_RECORD-ZTERM
                                      AND KTWRT = WA_RECORD-KTWRT
                                      AND EPSTP = WA_RECORD-EPSTP
                                      AND EMATN = WA_RECORD-EMATN.
                  ENDIF.
                ENDIF.  " checking of deletion indicator
              ENDIF.   " checking for success of vendor cross reference
            ELSE.
              V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES. "Inpfle err.ocrd
              WA_RECORD-ERR_MSG = TEXT-041.
              WA_RECORD-DEL_FLAG = C_TRUE.   "marking the record
              MODIFY I_RECORD FROM WA_RECORD
                              TRANSPORTING DEL_FLAG
                                           ERR_MSG
                              WHERE WERKS = WA_RECORD-WERKS.
            ENDIF. " Plant checked to selection screen
          ENDIF.  " the records for which del_flag is initial
          CLEAR: WA_RECORD,
                 WA_T024E,
                 WA_ZMVXREF,
                 WA_LFA1,
                 WA_LOEKZ,
                 WA_MATNR,
                 L_TODAY,
                 L_STARTDATE_C,
                 L_ENDDATE_C,
                 L_STARTDATE,
                 L_ENDDATE.
        ENDLOOP.
        LOOP AT I_RECORD INTO WA_RECORD.
          IF WA_RECORD-DEL_FLAG = C_TRUE.
            APPEND WA_RECORD TO I_ERR_REC.
            CLEAR WA_RECORD.
          ENDIF.
        ENDLOOP.
      ELSE.
        MESSAGE E000 WITH TEXT-013.  " no records in the flat file
        STOP.
      ENDIF.
    ENDFORM.                    " validate_flatfile_data
    *&      Form  DOWNLOAD_ERROR_FILE
    *       Downloads all records along with the records encountering the
    *       input file validation error
    FORM DOWNLOAD_ERROR_FILE.
      DATA L_ISDIR TYPE C.
      IF V_INPUTERROR_FLAG = C_INPUTERROR_FLAG_YES.
        V_FILENAME = P_IPERR.
    * Check for the existence of the file.
        IF RB_LOCAL EQ C_TRUE.
          CALL FUNCTION 'TMP_GUI_GET_FILE_EXIST'
               EXPORTING
                    FNAME          = P_IPERR
               IMPORTING
                    ISDIR          = L_ISDIR
               EXCEPTIONS
                    FILEINFO_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.
          IF L_ISDIR EQ C_TRUE.
            MESSAGE I000 WITH TEXT-088.
            STOP.
          ENDIF.
        ENDIF.
        IF RB_LOCAL EQ C_TRUE.
    * Download the Input Error File.
          CALL FUNCTION 'GUI_DOWNLOAD'
               EXPORTING
                    FILENAME                = V_FILENAME
                    FILETYPE                = 'ASC'
                    WRITE_FIELD_SEPARATOR   = '#'
               TABLES
                    DATA_TAB                = I_ERR_REC
               EXCEPTIONS
                    FILE_WRITE_ERROR        = 1
                    NO_BATCH                = 2
                    GUI_REFUSE_FILETRANSFER = 3
                    INVALID_TYPE            = 4
                    NO_AUTHORITY            = 5
                    UNKNOWN_ERROR           = 6
                    HEADER_NOT_ALLOWED      = 7
                    SEPARATOR_NOT_ALLOWED   = 8
                    FILESIZE_NOT_ALLOWED    = 9
                    HEADER_TOO_LONG         = 10
                    DP_ERROR_CREATE         = 11
                    DP_ERROR_SEND           = 12
                    DP_ERROR_WRITE          = 13
                    UNKNOWN_DP_ERROR        = 14
                    ACCESS_DENIED           = 15
                    DP_OUT_OF_MEMORY        = 16
                    DISK_FULL               = 17
                    DP_TIMEOUT              = 18
                    FILE_NOT_FOUND          = 19
                    DATAPROVIDER_EXCEPTION  = 20
                    CONTROL_FLUSH_ERROR     = 21
                    OTHERS                  = 22.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
        ELSEIF RB_SERVE EQ C_TRUE.
          OPEN DATASET P_IPERR1 FOR OUTPUT IN TEXT MODE.
          CHECK SY-SUBRC EQ 0.
          CLEAR WA_ERR_REC.
          LOOP AT I_ERR_REC INTO WA_ERR_REC.
            IF WA_ERR_REC-DEL_FLAG = C_TRUE.
              TRANSFER WA_ERR_REC TO P_IPERR1.
            ENDIF.
            CLEAR WA_ERR_REC.
          ENDLOOP.
          CLOSE DATASET P_IPERR1.
        ENDIF.
      ENDIF.
    ENDFORM.                    " DOWNLOAD_ERROR_FILE
    *&      Form  BUILD_BDC_DATA
    * Populates BDC for all the fields neccessary for Open Contract Creation
    FORM BUILD_BDC_DATA.
      DATA: L_MAT_INDEX TYPE I,
            L_CON_INDEX TYPE I,
            L_SCA_INDEX TYPE I.
      CLEAR   WA_BDCDATA.
      REFRESH: I_BDCDATA,
               I_MESSTAB.
    * Processing the bdc
      CLEAR: WA_RECORD,
             WA_RECORDPREV,
             VEN_FLAG,
             MAT_FLAG.
      LOOP AT I_RECORD INTO WA_RECORD.
    *    Checks for the del_flag of the record.
        IF     WA_RECORD-DEL_FLAG EQ C_TRUE
            OR WA_RECORD-DEL_FLAG EQ C_STRUE.
          CLEAR WA_RECORD.
          CONTINUE.
        ELSE.
          IF  WA_RECORDPREV-LIFNR NE WA_RECORD-LIFNR
           OR WA_RECORDPREV-EVART NE WA_RECORD-EVART
           OR WA_RECORDPREV-EKORG NE WA_RECORD-EKORG
           OR WA_RECORDPREV-EKGRP NE WA_RECORD-EKGRP
           OR WA_RECORDPREV-WERKS NE WA_RECORD-WERKS
           OR WA_RECORDPREV-LGORT NE WA_RECORD-LGORT
           OR WA_RECORDPREV-KDATB NE WA_RECORD-KDATB
           OR WA_RECORDPREV-KDATE NE WA_RECORD-KDATE
           OR WA_RECORDPREV-ZTERM NE WA_RECORD-ZTERM
           OR WA_RECORDPREV-KTWRT NE WA_RECORD-KTWRT.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0200'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'RM06E-LGORT'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '/00'.
    *   Cross-Reference check performed for the given Vendors
            CLEAR WA_T024E.
            READ TABLE I_T024E INTO WA_T024E
                               WITH KEY EKORG = WA_RECORD-EKORG
                               BINARY SEARCH.
            IF SY-SUBRC EQ 0.
              CLEAR WA_ZMVXREF.
              READ TABLE I_ZMVXREF INTO WA_ZMVXREF
                          WITH KEY D_ALTKN = WA_RECORD-LIFNR
                                   D_BUKRS = P_BUKRS
                          BINARY SEARCH.
              IF SY-SUBRC EQ 0.
                PERFORM BDC_FIELD   USING 'EKKO-LIFNR'
                                           WA_ZMVXREF-M_ALTKN.
              ENDIF.
              CLEAR WA_ZMVXREF.
            ENDIF.
            CLEAR WA_T024E.
            PERFORM BDC_FIELD       USING 'RM06E-EVART'
                                          WA_RECORD-EVART.
            PERFORM BDC_FIELD       USING 'EKKO-EKORG'
                                          WA_RECORD-EKORG.
            PERFORM BDC_FIELD       USING 'EKKO-EKGRP'
                                          WA_RECORD-EKGRP.
            PERFORM BDC_FIELD       USING 'RM06E-WERKS'
                                          WA_RECORD-WERKS.
            PERFORM BDC_FIELD       USING 'RM06E-LGORT'
                                          WA_RECORD-LGORT.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0201'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'EKKO-KTWRT'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=AB'.
            PERFORM CONVERT_DATE USING WA_RECORD-KDATB V_CONV_DATE.
            PERFORM BDC_FIELD       USING 'EKKO-KDATB'
                                          V_CONV_DATE.
            PERFORM CONVERT_DATE USING WA_RECORD-KDATE V_CONV_DATE.
            PERFORM BDC_FIELD       USING 'EKKO-KDATE'
                                          V_CONV_DATE.
            PERFORM BDC_FIELD       USING 'EKKO-ZTERM'
                                          WA_RECORD-ZTERM.
            PERFORM BDC_FIELD       USING 'EKKO-KTWRT'
                                            WA_RECORD-KTWRT.
            VEN_FLAG = 1.
            L_MAT_INDEX = 1. "index for table-control of material
          ENDIF.
    *          "first check for itemline
          IF  WA_RECORDPREV-EPSTP NE WA_RECORD-EPSTP
           OR WA_RECORDPREV-EMATN NE WA_RECORD-EMATN
           OR WA_RECORDPREV-KTMNG NE WA_RECORD-KTMNG
           OR WA_RECORDPREV-NETPR NE WA_RECORD-NETPR
           OR WA_RECORDPREV-PEINH NE WA_RECORD-PEINH
           OR WA_RECORDPREV-BPRME NE WA_RECORD-BPRME
           OR WA_RECORDPREV-IDNLF NE WA_RECORD-IDNLF
           OR WA_RECORDPREV-WEBRE NE WA_RECORD-WEBRE
           OR WA_RECORDPREV-MEPRF NE WA_RECORD-MEPRF
           OR WA_RECORDPREV-LTEX1 NE WA_RECORD-LTEX1
           OR VEN_FLAG EQ 1.
            V_IND = L_MAT_INDEX.
            IF V_IND GT 1.
              V_IND = 2.
            ENDIF.
            CONCATENATE 'RM06E-EVRTP(' V_IND ')' INTO V_EVRTP1.
            CONCATENATE 'RM06E-EPSTP(' V_IND ')' INTO V_EPSTP1.
            CONCATENATE 'EKPO-EMATN(' V_IND ')' INTO V_EMATN1.
            CONCATENATE 'EKPO-KTMNG(' V_IND ')' INTO V_KTMNG1.
            CONCATENATE 'EKPO-NETPR(' V_IND ')' INTO V_NETPR1.
            CONCATENATE 'EKPO-PEINH(' V_IND ')' INTO V_PEINH1.
            CONCATENATE 'EKPO-BPRME(' V_IND ')' INTO V_BPRME1.
            CONCATENATE 'RM06E-TCSELFLAG(' V_IND ')' INTO V_TCSELFLAG1.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0220'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=NP'.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0220'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          V_EVRTP1.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=DETA'.
            PERFORM BDC_FIELD       USING V_EPSTP1
                                          WA_RECORD-EPSTP.
            PERFORM BDC_FIELD       USING V_EMATN1
                                          WA_RECORD-EMATN.
            PERFORM BDC_FIELD       USING V_KTMNG1
                                          WA_RECORD-KTMNG.
            PERFORM BDC_FIELD       USING V_NETPR1
                                          WA_RECORD-NETPR.
            PERFORM BDC_FIELD       USING V_PEINH1
                                          WA_RECORD-PEINH.
            PERFORM BDC_FIELD       USING V_BPRME1
                                          WA_RECORD-BPRME.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0211'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'EKPO-WEBRE'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=DETZ'.
            PERFORM BDC_FIELD       USING 'EKPO-IDNLF'
                                          WA_RECORD-IDNLF.
            TRANSLATE WA_RECORD-EVART TO UPPER CASE.
            IF WA_RECORD-EVART EQ C_WK.
              PERFORM BDC_FIELD       USING 'EKPO-WEBRE' 'X'.
            ENDIF.
            PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0212'.
            PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                          'EKPO-MEPRF'.
            PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                          '=TXP'.
            PERFORM BDC_FIELD       USING 'EKPO-MEPRF'
                                          WA_RECORD-MEPRF.
            IF NOT WA_RECORD-LTEX1 IS INITIAL. "NE space.
              PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0106'.
              PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                            'RM06E-SELKZ(02)'.
              PERFORM BDC_FIELD 

  • IDOC Data transfer

    Hi Experts,
                      I have few questions related to IDOC Data transfer. I have two different SAP Systems S1 and S2,  S1 Creates sales order and send the data through  IDOC Type ORDERS05 to S2,  To create sales order in S1.
    As i know, Program IDOC_INPUT_ORDERS is used for I/B IDocs in S2. Will be there be any programs to push the data from S1 System.
    Thank you
    Kris

    hi,
    idoc is not meant for sending files to another system, they are basically data containers which are sent to other systems like to send the data related to sales orders you can send idoc ORDERS.
    you need to first be clear with the requirement for which business object you want to transfer the data, then need to look out if the Idoc is available for the same then only u can sent it.
    for more info on idocs you can easily search on forums.
    Reg,
    NJ

  • LBBIL_INVOICE. Billing Data: Transfer Structure to Smart Forms

    Hi...
    Can u please help me out in my query regading how the data passes to
    LBBIL_INVOICE. Billing Data: Transfer Structure to Smart Forms.
    I have an smartform which runs through VF01/VF02/ VF03 while pressing the print preview button.
    But if i try to run it directly from driver program, no data wil be displayed. Now i have the requirement to detach from VF03.. and make it to run directly from my driver program.
    what shall i have to do to achieve this. Should i have to take all the internal tables saparately or else can i use LBBIL_invoice structure itself.
    If i can use that structure itself, how to make the data flow into it.  Pls help me.
    In my codeing these includes were there. is there anything related , is the data passes because of these includes
    INCLUDE rlb_invoice_data_declare.
    definition of forms
    INCLUDE rlb_invoice_form01.
    INCLUDE rlb_print_forms.
    Pls clarify my dobut...
    Thanks in advance,
    Hema

    1. These are normal structure
    2. you can use anywhere but they designed for forms currently.
    3. Yes ,it works like it will look at NAST Table -> nast table will connect the TNAPR Table -> tnapr will have smart form print program.
        so smart form program calls smartform and it will show output
    4. you can create your own structure and use them into anywhere like report program or forms..
    5. you can see example simple form name SF_EXAMPLE_01 ,program name is SF_EXAMPLE_01 ,you can design your own form and print program.
    Thanks
    Seshu

  • Query  related to the transfer of the control to the other controller.

    Hi all,
    I have a query related to the transfer of the control to the other controller.
    I have components A and B .From a view of component A I neeed to open a window which belong to component B.Problem is that ,if I use create_window_for_cmp_usage( ) and the open( ) method and after that there is some code,then that code is getting executed before the window is opening.
    I want that the control should be back to the these code after the window is poped up and  after clossing the window. 
    Eg
    method ONACTIONOPEN_WINDOW .
    DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component  TYPE REF TO if_wd_component.
      DATA lo_window         TYPE REF TO if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window         = lo_window_manager->create_window_for_cmp_usage(
                         interface_view_name    = 'ZHELLO_WORLD'
                         component_usage_name   = 'USAGE_HELLO'
                       title                  =
                       close_in_any_case      = abap_true
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
      lo_window->open( ).
      data a type i.
      data b type i.
      a = 2.
      b = 3.
      a = a + b.
    endmethod.
    In this case I am calling  ONACTIONOPEN_WINDOW method.But before opening the window the a iscalculated here.I want that after popuping  the window the calculations should be done .
    How will I achieve this.
    Thanks in advance.
    Edited by: vaibhav nirmal on Nov 25, 2008 6:42 AM

    Hi,
    You will have to do your calculation as an event in your new window, or capture the closing of the new window as an event in your currenbt view and do your calculations in the event.
    Regards,
    Shruthi R

  • Errors in ALE data transfer to E-Recruiting.

    Hello,
    I need help with my ALE for E-Recruiting.
    We are on E-Rec 604 with seperated standlone e-rec system.
    We have set up ALE Data transfer for object type P from ECC QA to E-Rec QA system but unfortunately the I-Doc is always gettign posted with status 52.
    Those are the messages:
    Object 01 ,P ,01012021 does not exist: infotype 0105 cannot be created
    Object 01 ,P ,01012021 does not exist: infotype 0009 cannot be created
    Object 01 ,P ,01012021 does not exist: infotype 0006 cannot be created
    Diagnosis:
    You have tried to create infotype 0105 for plan version 01,object type P,object ID 01012021. However,the object does not exist.
    PA objects exist if infotypes 0000, 0001, and 0003 have been created.
    PB objects exist if infotypes 4000, 0001, and 0002 have been created.
    PD objects exist if infotype 1000 has been created.
    I followed the setting of "standalone" attachment to note 997181:
    HRSYNC_P                                    CONV_HR_DATA_TO_EREC (active as of Release 604)
    HRALE00INBOUND_IDOC             HRRCF00_INBD_NEWMOD (active as of Release 604)
    HRALE00SPLIT_INBOUND            HR_INB_PROCESS_IDOC (inactive as of Release 604)
    HRALE00INBOUND_IDOC             HRRCF00_DELETE_SPREL (inactive as of Release
    604)
    HRALE00SPLIT_INBOUND            HR_INB_PROCESS_IDOC (active up to Release 603)
    HRALE00INBOUND_IDOC             HRRCF00_DELETE_SPREL (active up to Release 603)
    So we have activated only the CONV_HR_DATA_TO_EREC and HRRCF00_INBD_NEWMOD because we are on 604.
    We have distributed Infotypes 0000, 0001, 0002, 0105 (Subtypes 0001 and 0010), 0006, and 0009 and I have to distribute the P - CP relation with 1001 A209.
    Somebody could help me please?.
    Thanks,
    Esther

    Hi Esther,
    Can you share you inputs how you have fixed the issue.
    Currently we are following I2 A Scenario according to the link
    http://help.sap.com/erp2005_ehp_05/helpdata/en/49/46037f06971ec6e10000000a42189b/frameset.htm
    DO we need activate the swiches  in HR System or Erec System.I believe it has to be in HR
    HRALX HRAC - X
    HRALX PBPHR ON
    HRALX USRAC X
    RECFA HRRFC
    RECFA RECCE
    RECFA DTCBA
    BADI do i need to activate only below one's
    HRSYNC_P
    CONV_HR_DATA_TO_EREC (active as of Release 604)   HR system
    HRALE00INBOUND_IDOC
    HRRCF00_INBD_NEWMOD (active as of Release 604)   Erec System.
    Correct me if im wrong.

Maybe you are looking for

  • Changing content in an array

    can someone help me with changing content in an array. The index will be specified by the user entering the index number. eg Enter the item number to Change 1 Then I need to replace the data in this index with new data. I am very new to java so I am

  • Keep getting this error when trying to skype... i ...

    http://puu.sh/cTXLk/0df5219d2f.png - keep getting this error. i tried downgrading from 6.2 to 6.1 and still getting it....

  • Itunes crashes every time I add folder to library

    I have deleted my library so that I could start over. I went to add the itunes folder back in and itunes crashes. I have moved the music to anouther folder and then tried it. It crashes again. I have re-installed itunes, it still crashes. I have run

  • How to convert and download Vide

    I have a Zen 4GB MP3 player and I don't know how to convert videos or download videos to my Zen Is there any specific site I have to download/convert ?videos?

  • Once cleaned, how can i get Firefox to stop warning potentially malicious content on my site?

    My site was hacked, now it's clean. I have requested removal from list of phishing sites from Google. Google has done so and taken off warning page in Chrome browser. Stopbadware.org lists status of site with white button, and there's no link to "Req