Unable to read data in lsmw

Hi Experts
Iam getting a problem in lsmw when i try to uplaod leave encashments to 0416 infotype,in the step read data iam getting following message.
Transactions Read:                    0
Records Read:                         0
Transactions Written:                 0
Records Written:                      0
i checkd all steps but not able to solve te problem could anyone help me in this regard.
VIjay

Are you able to save the file properly ? while saving the t.txt file check all the field. like - Delimiter.
Save your file.
Then assign your file.

Similar Messages

  • TcpListener not working on Azure: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host

    Hi Everybody,
    i'm playing a little bit with Windows Azure and I'm blocked with a really simple issue (or maybe not).
    I've created a Cloud Service containing one simple Worker Role. I've configured an EndPoint in the WorkerRole configuration, which allows Input connections via tcp on port 10100.
    Here the ServiceDefinition.csdef file content:
    <?xml version="1.0" encoding="utf-8"?>
    <ServiceDefinition name="EmacCloudService" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2014-01.2.3">
    <WorkerRole name="TcpListenerWorkerRole" vmsize="Small">
    <Imports>
    <Import moduleName="Diagnostics" />
    <Import moduleName="RemoteAccess" />
    <Import moduleName="RemoteForwarder" />
    </Imports>
    <Endpoints>
    <InputEndpoint name="Endpoint1" protocol="tcp" port="10100" />
    </Endpoints>
    </WorkerRole>
    </ServiceDefinition>
    This WorkerRole is just creating a TcpListener object listening to the configured port (using the RoleEnvironment instance) and waits for an incoming connection. It receives a message and returns a hardcoded message (see code snippet below).
    namespace TcpListenerWorkerRole
    using System;
    using System.Net;
    using Microsoft.WindowsAzure.ServiceRuntime;
    using System.Net.Sockets;
    using System.Text;
    using Roche.Emac.Infrastructure;
    using System.IO;
    using System.Threading.Tasks;
    using Microsoft.WindowsAzure.Diagnostics;
    using System.Linq;
    public class WorkerRole : RoleEntryPoint
    public override void Run()
    // This is a sample worker implementation. Replace with your logic.
    LoggingProvider.Logger.Info("TcpListenerWorkerRole entry point called");
    TcpListener listener = null;
    try
    listener = new TcpListener(RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint);
    listener.ExclusiveAddressUse = false;
    listener.Start();
    LoggingProvider.Logger.Info(string.Format("TcpListener started at '{0}:{1}'", RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint.Address, RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint1"].IPEndpoint.Port));
    catch (SocketException ex)
    LoggingProvider.Logger.Exception("Unexpected exception while creating the TcpListener", ex);
    return;
    while (true)
    Task.Run(async () =>
    TcpClient client = await listener.AcceptTcpClientAsync();
    LoggingProvider.Logger.Info(string.Format("Client connected. Address='{0}'", client.Client.RemoteEndPoint.ToString()));
    NetworkStream networkStream = client.GetStream();
    StreamReader reader = new StreamReader(networkStream);
    StreamWriter writer = new StreamWriter(networkStream);
    writer.AutoFlush = true;
    string input = string.Empty;
    while (true)
    try
    char[] receivedChars = new char[client.ReceiveBufferSize];
    LoggingProvider.Logger.Info("Buffer size: " + client.ReceiveBufferSize);
    int readedChars = reader.Read(receivedChars, 0, client.ReceiveBufferSize);
    char[] validChars = new char[readedChars];
    Array.ConstrainedCopy(receivedChars, 0, validChars, 0, readedChars);
    input = new string(validChars);
    LoggingProvider.Logger.Info("This is what the host sent to you: " + input+". Readed chars=" + readedChars);
    try
    string orderResultFormat = Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\xB")) + @"MSH|^~\&|Instrument|Laboratory|LIS|LIS Facility|20120427123212+0100||ORL^O34^ORL_O34| 11|P|2.5.1||||||UNICODE UTF-8|||LAB-28^IHE" + Environment.NewLine + "MSA|AA|10" + Environment.NewLine + @"PID|||patientId||""""||19700101|M" + Environment.NewLine + "SPM|1|sampleId&ROCHE||ORH^^HL70487|||||||P^^HL70369" + Environment.NewLine + "SAC|||sampleId" + Environment.NewLine + "ORC|OK|orderId|||SC||||20120427123212" + Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\x1c\x0d"));
    writer.Write(orderResultFormat);
    catch (Exception e)
    LoggingProvider.Logger.Exception("Unexpected exception while writting the response", e);
    client.Close();
    break;
    catch (Exception ex)
    LoggingProvider.Logger.Exception("Unexpected exception while Reading the request", ex);
    client.Close();
    break;
    }).Wait();
    public override bool OnStart()
    // Set the maximum number of concurrent connections
    ServicePointManager.DefaultConnectionLimit = 12;
    DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString");
    RoleEnvironment.Changing += RoleEnvironment_Changing;
    return base.OnStart();
    private void RoleEnvironment_Changing(object sender, RoleEnvironmentChangingEventArgs e)
    // If a configuration setting is changing
    LoggingProvider.Logger.Info("RoleEnvironment is changing....");
    if (e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange))
    // Set e.Cancel to true to restart this role instance
    e.Cancel = true;
    As you can see, nothing special is being done. I've used the RoleEnvironment.CurrentRoleInstance.InstanceEndpoints to retrieve the current IPEndpoint.
    Running the Cloud Service in the Windows Azure Compute Emulator everything works fine, but when I deploy it in Azure, then I receive the following Exception:
    2014-08-06 14:55:23,816 [Role Start Thread] INFO EMAC Log - TcpListenerWorkerRole entry point called
    2014-08-06 14:55:24,145 [Role Start Thread] INFO EMAC Log - TcpListener started at '100.74.10.55:10100'
    2014-08-06 15:06:19,375 [9] INFO EMAC Log - Client connected. Address='196.3.50.254:51934'
    2014-08-06 15:06:19,375 [9] INFO EMAC Log - Buffer size: 65536
    2014-08-06 15:06:45,491 [9] FATAL EMAC Log - Unexpected exception while Reading the request
    System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    --- End of inner exception stack trace ---
    at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
    at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer)
    at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count)
    at TcpListenerWorkerRole.WorkerRole.<>c__DisplayClass0.<<Run>b__2>d__0.MoveNext() in C:\Work\Own projects\EMAC\AzureCloudEmac\TcpListenerWorkerRole\WorkerRole.cs:line 60
    I've already tried to configure an internal port in the ServiceDefinition.csdef file, but I get the same exception there.
    As you can see, the client can connect to the service (the log shows the message: Client connected with the address) but when it tries to read the bytes from the stream, it throws the exception.
    For me it seems like Azure is preventing the retrieval of the message. I've tried to disable the Firewall in the VM in Azure and the same continues happening.
    I'm using Windows Azure SDK 2.3
    Any help will be very very welcome!
    Thanks in advance!
    Javier
    En caso de que la respuesta te sirva, porfavor, márcala como válida
    Muchas gracias y suerte!
    Javier Jiménez Roda
    Blog: http://jimenezroda.wordpress.com

    hi Javier,
    I changed your code like this:
    private AutoResetEvent connectionWaitHandle = new AutoResetEvent(false);
    public override void Run()
    TcpListener listener = null;
    try
    listener = new TcpListener(
    RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["Endpoint"].IPEndpoint);
    listener.ExclusiveAddressUse = false;
    listener.Start();
    catch (SocketException se)
    return;
    while (true)
    IAsyncResult result = listener.BeginAcceptTcpClient(HandleAsyncConnection, listener);
    connectionWaitHandle.WaitOne();
    The HandleAsync method is your "While (true)" code:
    private void HandleAsyncConnection(IAsyncResult result)
    TcpListener listener = (TcpListener)result.AsyncState;
    TcpClient client = listener.EndAcceptTcpClient(result);
    connectionWaitHandle.Set();
    NetworkStream netStream = client.GetStream();
    StreamReader reader = new StreamReader(netStream);
    StreamWriter writer = new StreamWriter(netStream);
    writer.AutoFlush = true;
    string input = string.Empty;
    try
    char[] receivedChars = new char[client.ReceiveBufferSize];
    // LoggingProvider.Logger.Info("Buffer size: " + client.ReceiveBufferSize);
    int readedChars = reader.Read(receivedChars, 0, client.ReceiveBufferSize);
    char[] validChars = new char[readedChars];
    Array.ConstrainedCopy(receivedChars, 0, validChars, 0, readedChars);
    input = new string(validChars);
    // LoggingProvider.Logger.Info("This is what the host sent to you: " + input + ". Readed chars=" + readedChars);
    try
    string orderResultFormat = Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\xB")) + @"MSH|^~\&|Instrument|Laboratory|LIS|LIS Facility|20120427123212+0100||ORL^O34^ORL_O34| 11|P|2.5.1||||||UNICODE UTF-8|||LAB-28^IHE" + Environment.NewLine + "MSA|AA|10" + Environment.NewLine + @"PID|||patientId||""""||19700101|M" + Environment.NewLine + "SPM|1|sampleId&ROCHE||ORH^^HL70487|||||||P^^HL70369" + Environment.NewLine + "SAC|||sampleId" + Environment.NewLine + "ORC|OK|orderId|||SC||||20120427123212" + Encoding.ASCII.GetString(Encoding.ASCII.GetBytes("\x1c\x0d"));
    writer.Write(orderResultFormat);
    catch (Exception e)
    // LoggingProvider.Logger.Exception("Unexpected exception while writting the response", e);
    client.Close();
    catch (Exception ex)
    //LoggingProvider.Logger.Exception("Unexpected exception while Reading the request", ex);
    client.Close();
    Please try it. For this error message, I suggest you could refer to this thread (http://stackoverflow.com/questions/6173763/using-windows-azure-to-use-as-a-tcp-server
    ) and this post (http://stackoverflow.com/a/5420788).
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unable to read data from the SAP marketplace

    Hi All,
        These days, certain packages in my download basketball cannot be downloaded, while others can be downloaded normally.
         After serveral redirecting, the SAP download manager keeps informing me that "Unable to read data from the SAP marketplace, check your settings and try again".
         Anyone knows how to solve it?
    Thanks,
    Yining

    Hi Yining,
    You user on SAP MarketPlace is locked.
    You have to unlock it but I do not know the way.
    Check in user data maintenance on SAP MarketPlace who is your responsible and perhaps he wwill be able to solve to unlock our user.
    Regards,
    Ronan

  • Unable to read data from the SAP Service Marketplace issue

    Good morning, experts.
    I´ve just installed the SAP Download Manager, but I can´t get connected to Marketplace.
    First I tried downloading a file I could see in my Basket Download. Then I deleted it from the basket so I could test only the connection. In both situations I got the same error message: "Unable to read data from the SAP Service Marketplace (...)".
    It is probably due to wrong settings, but I can´t figure it out. My settings are:
    Address: https://websmp205.sap-ag.de/
    User name: S0005951541
    Password: (my password)
    Proxy (my proxy settings)
    Any ideas?

    Thanks for your answer.
    I can see my download basket online. I realize I didn´t delete the items so I could test purely the connection. I am going to do it again.
    I found out I dind´t have permission to download those items, and with the right permission I could download them directly online.
    As long as I have more information I am going to repost this issue on a new forum.
    Thanks.

  • IMAQ Vision Unable to read data.

    This project is to match multiple templates, then i copied the method from the example "Match Multiple Geometric Pattens", but the error says:
    Error -1074395989 occurred at IMAQ ReadImageAndVisionInfo
    Possible reason(s):
    IMAQ Vision: Unable to read data.
    The problem is that the programming works if I use the labview example's templates. However,when i use the templates which generated by myself, the error appears. I have checked the format and pixels of my generated template, which looks indentical to the example's template.
    Could anybody help me to figure this out? I have attached my docs below.
    Thanks.
    Dylan
    Attachments:
    Multiple-Match-Pattern.zip ‏331 KB

    Hello,
    Labview Geometric matching uses a set of features/descriptors to describe the meaningful information contained in an image. You need to extract these descriptors to permorm the matching.
    Here is an example on how to create the pattern matching templates in Labview (you can alternatively use the Template Editor utility):
    http://forums.ni.com/t5/Machine-Vision/In-Pattern-matching-angle-remains-Zero-even-if-the-rotated/m-...
    (see the attachment in the solution post). You can easily adapt this to learn geometric template (just modify/replace the relevant vi.'s).
    Don't use screen shots to create the templates. Create a template directly from the image.
    Best regards,
    K
    https://decibel.ni.com/content/blogs/kl3m3n
    "Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."

  • Error accessing device data in netweaver."Unable to read data;can't connect

    Hi Friends,
    We have implemented MAM in one of our client here in India. Its around 7 months the project been gone live.
    From last few weeks we are facing problem accessing Device in Netweaver.
    We prepared a patch to be applied to devices but on searching by providing mobile device name ie. eg. MOBILE_000011 it gives an error which says "Unable to read data; cannot connect to middleware".
    It searches the device successfully but but doesnt display its device details,components etc.
    I checked in MI server for short dumps TSV_TNEW_PAGE_ALLOC_FAILED.
    All the measures have been taken to remove this dump. But problem still persist.
    Please suggest to identify the problem.
    Thanks, Amit Sharma

    hello frnds....
    still expecting your views....

  • Deleted Rows Flashback : unable to read data - table definition has changed

    Hi All,
    Its Really Important.
    I Unfortunately truncated a table using
    Trancate table mytable;
    and Made a alter table to decrease data pricision length.
    But i Need the tabla data back,
    i used the below command to get deleted rows, it shows error.
    query : select * from pol_tot versions between timestamp systimestamp-1 and systimestamp;
    error : ORA-01466: unable to read data - table definition has changed
    query : flashback table pol_tot to timestamp systimestamp - interval '45' minute;
    error : ORA-01466: unable to read data - table definition has changed
    Kindly Share your ideas How Can i Get thoose Deleted Records.
    Edited by: 887268 on Jul 8, 2012 12:26 AM

    BluShadow wrote:
    Khayyam wrote:
    Flashback dont works after DDL. Truncate command is DDL. Only recover from backup can help.Please don't spread untrue statements.Working of flashback after Drop command is so clear to say. I mean such DDL commands as CREATE, ALTER, TRUNCATE and so on...
    "Remember that DDLs that alter the structure of a table (such as drop/modify column, move table, drop partition, truncate table/partition, and add constraint) invalidate any existing undo data for the table. If you try to retrieve data from a time before such a DDL executed, you will get error ORA-1466. DDL operations that alter the storage attributes of a table (such as PCTFREE, INITRANS, and MAXTRANS) do not invalidate undo data."
    [http://docs.oracle.com/cd/B28359_01/appdev.111/b28424/adfns_flashback.htm#BJFJHDAG]

  • Ora-01466 unable to read data table definition has changed oracle.

    hi all,
    i truncated a table before 10 min. now i want the data's so i used this query ;
    select *
    from ( select *
    from sometable where some_condition )
    as of timestamp sysdate-1;
    but it shows:
    """ ora-01466 unable to read data table definition has changed oracle"""";
    how to get the deleted records from database????????????
    Edited by: 887268 on Oct 24, 2011 4:02 AM

    Error:  ORA 1466
    Text:   unable to read data -- object definition has changed
    Cause:  This is a time-based read consistency error for a database object,
            such as a table or index.
            Either of the following may have happened:
            The query was parsed and executed with a snapshot older than the time
            the object was changed.
            The creation time-stamp of the object is greater than the current
            system time.
            This happens, for example, when the system time is set to a time
            earlier than the creation time of the object.
    Action: If the cause is
            an old snapshot, then commit or rollback the transaction and resume
            work.
            a creation time-stamp in the future, ensure the system time is set
            correctly.
            If the object creation time-stamp is still greater than the system
            time, then export the object's data, drop the object, recreate the
            object so it has a new creation time-stamp, import the object's data,
            and resume work.

  • How to solve this problem "ORA-01466: Unable to read data -- Table definiti

    Hi,
    I had deleted the entry and i want back now and in between i done the following
    alter table pv_head enable constraint FK_PV_HED__CRF_HEDwhen i try in the following one
    SELECT * FROM PV_HEAD AS OF TIMESTAMP TO_DATE('28-FEB-2011 9:45:00','DD-MON-YYYY HH24:MI:SS')
    WHERE PV_NO IN (703705,703704) the error i am receiving           
    ORA-01466: Unable to read data -- Table definition has changed how to solve this issue.
    please guide me.
    Kanish

    You can not perform DDL and then perform a flashback query to before the DDL.
    One might wonder why you chose this particular time to perform an ALTER TABLE but you did. It is what it is.

  • Unable to read data from Analog Devices 6b11 module - error code 1240

    Hi everyone,
    I'm trying to read data from a thermocouple with an AD 6B11 module in an AD 6BP16-1 backplane using RS232 serial. I've been following this guide:
    http://digital.ni.com/public.nsf/allkb/8C77E5E52B4A27968625611600559421
    Everything seems to work out well until step 13, where I call the "AD6B Input Module - Read Data.VI". I get an error code 1240 stating something like "invalid parameter or unable to read instrument".
    Has anyone got any experience with this error or suggestions to fixing it?
    Thanks in advance!

    That user guide is 20+ years old. The serial functions from that day used 0 for com 1, 1 for com 2, etc. Make sure you have the correct one selected. Please provide the exact error message instead of 'something like'.

  • Unable to read data to Navigtional Attributes

    Hi,
    unable to read navigation attributes from a BI cube when loading transactional data from BI to BPC.
    Please suggest the inputs,
    Regards,
    Sathwik

    Hi Sathwik,
    How do you refer to those Navigational Attributes in your transformation file and what error message you are getting? Why do you want to make BW Nav Attr BPC cube charcteristics?
    I'd think that a better idea would be to keep them as Propeties of a BPC Dimension and load just BW cube Characteristics.
    Regards,
    Gersh

  • Table unable to read data from CSV file

    Dear All,
    I have created a table which have to read data from external CSV file. The table is giving error if the file is not there at the specified location,but when i put the file at that location there is no error but no rows are returned.
    Please suggest what should i do???
    Thanks in advance.

    No version.
    No operating system information.
    No DDL.
    No help is possible.
    I want to drive home the point here to the many people that write posts similar to yours.
    "My car won't start please tell me why" is insuffiicent information. Perhaps it is out of gas. Perhaps the battery is dead. Perhaps you didn't turn the key in the ignition.

  • Unable To Read Data DVDs

    When I first got my Power Mac G5, I was able to create and read data DVDs to back things up. Lately, when I put a data DVD into the drive, no icon shows up and I can't access any of the information I've saved.
    What should I do?
    Rob

    Hi Rob!
    In the Finder Preferences (Command + ,Comma keys, under Show these items on the Desktop: is CDs, DVDs, and iPods selected?
    ali b

  • REPORT- Unable to read data

    Hi all,
    I have a requirement that for a particular excise invoice no and date I should show the particular Material Company Code, Batch No, Gross Weight, Net Weight.
    There are two materials for that particular excise invoice no and for one material there are no of batch nos.
    I have used a function module QC01_BATCH_VALUES_READ.  In which if I give material number, company code, and batch number as import parameters it will return gross weight, net weight, tare weight.
    The problem is it is returning the first value only…. That is for the second material also it is showing the gross weight of first material only. I am unable to get the solution please help me check my source code.
    The return values will be coming in the table char_val_tab.
    TABLES: mara,
            mvke,
            likp,
            tvm3t,
            vbrk,
            vbrp,
            j_1imocust,
            J_1IEXCHDR,
            j_1iexcdtl.
    TYPES: BEGIN OF t_date,
           month(2) TYPE n,
           year(4) TYPE n,
           day(2) TYPE n,
           END OF t_date.
    TYPES: t_ct3(8)  TYPE c,
           t_are3(8) TYPE c.
    FIELD-SYMBOLS <fs> TYPE t_date.
    *INTERNAL TABLE DECLARATIONS
    DATA : BEGIN OF it_j_1imocust OCCURS 0,
           kunnr LIKE j_1imocust-kunnr,
           aedat LIKE j_1imocust-aedat,
           j_1iexcd LIKE j_1imocust-j_1iexcd,
           j_1iexrn LIKE j_1imocust-j_1iexrn,
           j_1iexrg LIKE j_1imocust-j_1iexrg,
           j_1iexdi LIKE j_1imocust-j_1iexdi,
           END OF it_j_1imocust.
    DATA : BEGIN OF it_j_1iexcdtl OCCURS 0,
           ecs LIKE j_1iexcdtl-ecs,
           cess LIKE j_1iexcdtl-cess,
           aedat LIKE j_1iexcdtl-aedat,
           exdat LIKE j_1iexcdtl-exdat,
           exnum LIKE j_1iexcdtl-exnum,
           docyr LIKE j_1iexcdtl-docyr,
           docno LIKE j_1iexcdtl-docno,
           rdoc1 LIKE j_1iexcdtl-rdoc1,
           rdoc2 LIKE j_1iexcdtl-rdoc2,
           exbas LIKE j_1iexcdtl-exbas,
           exbed LIKE j_1iexcdtl-exbed,
           zeile LIKE j_1iexcdtl-zeile,
           gewei LIKE j_1iexcdtl-gewei,
           werks LIKE j_1iexcdtl-werks,
           charg LIKE j_1iexcdtl-charg,
           ntgew LIKE j_1iexcdtl-ntgew,
           brgew LIKE j_1iexcdtl-brgew,
           menge LIKE j_1iexcdtl-menge,
           menga LIKE j_1iexcdtl-menga,
           matnr LIKE j_1iexcdtl-matnr,
           trntype LIKE j_1iexcdtl-trntyp,
           ecsrate LIKE j_1iexcdtl-ecsrate,
           BEDRATE LIKE j_1iexcdtl-bedrate,
           grosswt TYPE p DECIMALS 3,
           netwt TYPE p DECIMALS 3,
           tarewt TYPE p DECIMALS 3,
           cases  type i,
           exaddtax1 LIKE j_1iexcdtl-exaddtax1,
           END OF it_j_1iexcdtl.
    DATA : it_j_1iexcdtl1 LIKE it_j_1iexcdtl OCCURS 0 WITH HEADER LINE.
    DATA : l_menge TYPE j_1iexcdtl-menge.
    DATA : l_exnum TYPE j_1iexcdtl-exnum.
    DATA : l_exbas TYPE j_1iexcdtl-exbas.
    DATA : l_exbas1 TYPE j_1iexcdtl-exbas.
    DATA : l_exbas2 TYPE j_1iexcdtl-exbas.
    DATA : l_exbed TYPE j_1iexcdtl-exbed.
    DATA : l_ecs TYPE j_1iexcdtl-ecs.
    DATA : l_exaddtax1 TYPE j_1iexcdtl-exaddtax1.
    DATA : l_amount TYPE j_1iexcdtl-exbed.
    DATA : BEGIN OF it_likp OCCURS 0,
            vbeln LIKE likp-vbeln,
            traid LIKE likp-traid,
            werks LIKE likp-werks,
          END OF it_likp.
    DATA : zwerks      like j_1iexcdtl-werks,
           zecs        type p decimals 0,
           zcess       type p decimals 0,
           zexbed      type p decimals 0,
           zexaddtax1  type p decimals 0,
           zecsrate    like j_1iexcdtl-ecsrate,
           zbedrate    like j_1iexcdtl-bedrate,
           v_object    LIKE ausp-objek,
           zexbas      like j_1iexcdtl-exbas,
           zexaddrate1 like j_1iexcdtl-exaddrate1,
           tx_netwt    type p decimals 0,
           TT_CCASE(4) type p decimals 0.
    DATA: it_class    LIKE sclass OCCURS 0 WITH HEADER LINE,
          it_clobdata LIKE clobjdat OCCURS 0 WITH HEADER LINE,
          itab_lips   LIKE lips OCCURS 0 WITH HEADER LINE,
          struc_tj_1iexcdtl like j_1iexcdtl .
    DATA : BEGIN OF it_mvke OCCURS 0,
           matnr LIKE mvke-matnr,
           mvgr1 LIKE mvke-mvgr1,
           mvgr3 LIKE mvke-mvgr3,
           mvgr4 LIKE mvke-mvgr4,
           mvgr5 LIKE mvke-mvgr5,
           extwg LIKE mara-extwg,
           matkl LIKE mara-matkl,
           END OF it_mvke.
    DATA : BEGIN OF it_tvm3t OCCURS 0,
           mvgr3 LIKE tvm3t-mvgr3,
           bezei LIKE tvm3t-bezei,
           END OF it_tvm3t.
    DATA : char_val_tab LIKE api_vali OCCURS 10 WITH HEADER LINE,
          l_lfimg LIKE lips-lfimg,
          l_grosswt(30) TYPE c,
          l_grosswt1(30) TYPE c,
          t_grosswt(8) TYPE c,
          t_grosswt1(10) TYPE c,
          tz_grosswt1(10) TYPE c,
          tx_grosswt1(10) TYPE p decimals 3,
          tz_ccase   TYPE p DECIMALS 0,
          l_unit(30) TYPE c,
          l_netwt(30) TYPE c,
          l_netwt1(30) TYPE c,
          t_netwt1(30) TYPE c,
          l_tarewt(30) TYPE c,
          l_tarewt1(30) TYPE c,
          t_tarewt1(30) TYPE c,
          l_cases  TYPE I,
          flag TYPE c.
    DATA :   BEGIN OF it_delivery OCCURS 0,
            matnr LIKE lips-matnr,
            werks LIKE lips-werks,
            charg LIKE lips-charg,
            grosswt TYPE p DECIMALS 3,
            netwt   TYPE p DECIMALS 3,
            tarewt  TYPE p DECIMALS 3,
            END OF it_delivery.
    DATA : BEGIN OF IT_GROSSWT OCCURS 0,
            matnr LIKE lips-matnr,
            ccase   TYPE p DECIMALS 0,
            grosswt TYPE p DECIMALS 3,
            netwt   TYPE p DECIMALS 3,
           End of it_grosswt.
    DATA : BEGIN OF IT_INV OCCURS 0,
            exnum   LIKE j_1iexchdr-exnum,
            exdat   LIKE j_1iexchdr-exdat,
    End of it_inv.
    ***********selection parameters ****************
    SELECTION-SCREEN : BEGIN OF BLOCK blk WITH FRAME TITLE text-001.
    SELECT-OPTIONS : s_exnum FOR j_1iexcdtl-exnum,
                     s_exdat FOR j_1iexcdtl-exdat.
    PARAMETERS: s_ct3   TYPE t_ct3 ,
                s_date  TYPE j_1iexcdtl-exdat DEFAULT ' '.
    PARAMETERS: s_are3  TYPE t_are3,
                s_date1 TYPE j_1iexcdtl-exdat DEFAULT ' '.
    SELECTION-SCREEN : END OF BLOCK blk.
    AT SELECTION-SCREEN.
      IF NOT s_exnum IS INITIAL.
        SELECT SINGLE * FROM j_1iexcdtl WHERE exnum IN s_exnum.
        IF sy-subrc NE 0 .
          MESSAGE e398(00) WITH
            'This Invoice Number ' s_exnum 'does not exists'.
        ENDIF.
      ENDIF.
    START-OF-SELECTION.
      CLEAR: l_menge.
      PERFORM get_data.
      PERFORM TEST1.
      PERFORM print_data. "*Working fine
    *&      Form  TOP_HEADING
          text
    FORM top_heading.
    DATA : Z_RG LIKE J_1IMOCUST-J_1IEXRG,
           Z_DV LIKE J_1IMOCUST-J_1IEXDI,
           Z_EX LIKE J_1IMOCUST-J_1IEXCO,
           Z_KG LIKE J_1IEXCHDR-KUNAG,
           Z_NM LIKE KNA1-NAME1.
    SELECT SINGLE AJ_1IEXRG AJ_1IEXDI BKUNAG AJ_1IEXCO
      INTO (Z_RG, Z_DV, Z_KG, Z_EX)
      FROM J_1IMOCUST AS A INNER JOIN J_1IEXCHDR AS B
           ON  AKUNNR EQ BKUNAG
           WHERE B~EXNUM IN s_exnum.
    SELECT SINGLE NAME1
    INTO  (Z_NM)
    FROM  KNA1 WHERE KUNNR EQ Z_KG.
    WRITE:/1 'INDIAN RAYON AND INDUSTRIES LTD.'.
    WRITE: 78 ' VERAVAL'.
    WRITE: 113  Z_EX.
    WRITE:/1 'JUNAGADH ROAD, VERAVAL - 362266.'.
    SKIP.
    SKIP.
    WRITE:/9 'AAA-CI-1747H-XM-007'.
    WRITE:68  Z_RG.
    WRITE:105 Z_DV.
    WRITE:/9  'AR-I VERAVAL'.
    WRITE:78  Z_NM.
    WRITE:39  'JUNAGADH'.
    WRITE:/9  'AAA-CI-1747H-XM-007'.
    SKIP.
    WRITE:/127  s_are3 ,
            145  s_date1.
      SKIP.
      SKIP.
      SKIP.
      SKIP.
      SKIP.
      WRITE:/1  j_1iexcdtl-exdat, ' Viscose Rayon Filament Yarn.'.
    ENDFORM.                    "TOP_HEADING
    *&      Form  get_data
          text
    FORM get_data.
    DATA : BEGIN OF IT_INV OCCURS 0,
            exnum   LIKE j_1iexchdr-exnum,
            exdat   LIKE j_1iexchdr-exdat,
    End of it_inv.
      SELECT distinct matnr charg werks
             FROM j_1iexcdtl
             INTO CORRESPONDING FIELDS OF TABLE it_delivery
             WHERE exnum IN s_exnum
               and exdat in s_exdat
               AND werks eq '1010'.
      SELECT distinct exnum exdat
             FROM j_1iexcdtl
             INTO CORRESPONDING FIELDS OF TABLE it_inv
             WHERE exnum IN s_exnum
               and exdat in s_exdat
               AND werks eq '1010'.
      SELECT matnr
              count( * ) as cases sum( ecs ) as
             ecs sum( cess ) as cess  sum( exbas ) as exbas sum( exbed ) as
             exbed sum( menge ) as menge min( ecsrate ) as ecsrate sum(
             exaddtax1 ) as exaddtax1
             FROM j_1iexcdtl
             INTO CORRESPONDING FIELDS OF TABLE it_j_1iexcdtl
             WHERE exnum IN s_exnum
               and exdat in s_exdat
             AND werks eq '1010'
             group by matnr.
      IF sy-subrc EQ 0.
        SELECT a~matnr
               a~mvgr1
               a~mvgr3
               a~mvgr5
               a~mvgr4
               b~extwg
               b~matkl
               FROM mvke as a inner join mara as b
               on amatnr eq bmatnr
               INTO corresponding fields of TABLE it_mvke
               FOR ALL ENTRIES IN it_j_1iexcdtl
               WHERE a~matnr EQ it_j_1iexcdtl-matnr.
        SORT it_mvke BY matnr.
    SELECT sum( ecs ) sum( cess ) sum( exbed ) sum( exaddtax1 ) min(
    ecsrate ) min( bedrate ) min( exaddrate1 ) sum( exbas )
    into (zecs, zcess, zexbed, zexaddtax1, zecsrate, zbedrate, zexaddrate1,
    zexbas)
    FROM j_1iexcdtl
             WHERE exnum IN s_exnum
               and exdat in s_exdat
               AND werks eq '1010'.
        SELECT vbeln
               traid
               werks
               FROM likp INTO TABLE it_likp
               FOR ALL ENTRIES IN it_j_1iexcdtl
               WHERE erdat EQ it_j_1iexcdtl-exdat AND
                     werks EQ it_j_1iexcdtl-werks.
      ENDIF.
    ENDFORM.                    "get_data
    *&      Form  print_data
          text
    FORM print_data.
    PERFORM top_heading.
    CLEAR : l_menge, t_grosswt1, t_tarewt1, t_netwt1, t_grosswt,
    tz_grosswt1,tz_ccase,tx_netwt.
      DATA : YMATNR LIKE J_1IEXCDTL-MATNR.
      SORT  it_j_1iexcdtl BY matnr.
      MOVE: it_j_1iexcdtl-exnum TO l_exnum.
      LOOP AT it_j_1iexcdtl." WHERE exnum IN s_exnum.
      READ TABLE it_j_1iexcdtl WITH KEY matnr = it_j_1iexcdtl-matnr.
      if  YMATNR ne it_j_1iexcdtl-matnr.
        ON CHANGE OF it_j_1iexcdtl-matnr.
          REFRESH char_val_tab.
          DATA : ZBEZEI LIKE TVM3T-BEZEI,
                 YBEZEI like TVM4T-BEZEI,
                 ZINVNO type STRING,
                 ZINVNO1 TYPE STRING,
                 ZINVNO2 TYPE STRING,
                 TY_CCASE(4) TYPE P DECIMALS 0,
                 zbed like it_j_1iexcdtl-bedrate.
          READ TABLE IT_GROSSWT WITH KEY MATNR = IT_J_1IEXCDTL-MATNR.
          IF SY-SUBRC EQ 0.
                 TZ_GROSSWT1 = IT_GROSSWT-GROSSWT.
                 T_GROSSWT1  = T_GROSSWT1 + TZ_GROSSWT1.
                 TY_CCASE    = IT_GROSSWT-CCASE.
                 tx_netwt    = it_grosswt-netwt.
          ENDIF.
          READ TABLE it_mvke WITH KEY matnr = it_j_1iexcdtl-matnr.
          SELECT SINGLE BEZEI into zBEZEI
          from TVM3T
          where MVGR3 EQ it_mvke-mvgr3.
          SELECT SINGLE BEZEI into yBEZEI
          from TVM4T
          where MVGR4 EQ it_mvke-mvgr4.
          zexbed     = ( ZEXBAS * 8 ) / 100.
          zecs       = ( zexbed * 2 ) / 100.
          zexaddtax1 = ( zexbed * 1 ) / 100.
          LOOP AT IT_INV.
                ZINVNO  = IT_INV-EXNUM.
                CONCATENATE ZINVNO ZINVNO1 INTO ZINVNO2 SEPARATED BY ' '.
                CONCATENATE EXNUM  ZINVNO SEPARATED BY SPACE.
                AT END.
                CONCATENATE IT_INV-EXDAT INTO ZINVNO SEPARATED BY SPACE.
                ENDAT.
          ENDLOOP.
          WRITE:  1  it_mvke-mvgr1,
                  5  it_mvke-extwg+0(4) LEFT-JUSTIFIED,' ',it_mvke-mvgr5
    left-justified,
                  15  yBEZEI,
                  20  zBEZEI,
                  29  it_mvke-matkl+0(8)  LEFT-JUSTIFIED,
                  34  TY_CCASE            RIGHT-JUSTIFIED,
                  44  TZ_GROSSWT1         RIGHT-JUSTIFIED,
                  59  it_j_1iexcdtl-menge RIGHT-JUSTIFIED,
                  82  it_j_1iexcdtl-exbas RIGHT-JUSTIFIED.
           if sy-tabix eq 1.
                  write: 99 'BED   8%',
                  109 zexbed round 0      RIGHT-JUSTIFIED,
                  130  ZINVNO2 NO-ZERO,
                  140  it_likp-traid.
                  write:/99 'CESS  2%',
                  109 zecs round 0        RIGHT-JUSTIFIED,
                  130  it_inv-exdat.
                  write:/99 'SCess 1%',
                  106 '%',
                  109 zexaddtax1          RIGHT-JUSTIFIED.
           endif.
          SKIP.
          l_menge = l_menge + it_j_1iexcdtl-menge.
          l_exbas = l_exbas + it_j_1iexcdtl-exbas.
          l_exbed = l_exbed + it_j_1iexcdtl-exbed.
          l_ecs   = l_ecs + it_j_1iexcdtl-ecs.
          l_cases = l_cases + it_j_1iexcdtl-cases.
          l_exaddtax1 = l_exaddtax1 + it_j_1iexcdtl-exaddtax1.
          T_GROSSWT1 = T_GROSSWT1 + TZ_GROSSWT1.
          TT_CCASE   = TT_CCASE   + TY_CCASE.
          IF sy-tabix GT '10'.
            NEW-PAGE.
            PERFORM top_heading.
            CONTINUE.
          ENDIF.
          YMATNR = it_j_1iexcdtl-matnr.
        ENDON.
        ENDIF.
      ENDLOOP.
      l_amount = zexbed + zecs + zexaddtax1.
      tx_grosswt1 = t_grosswt1 / 2.
      Write: 10 'Invoice Total : ',
              34 TT_CCASE RIGHT-JUSTIFIED.
      WRITE: 45 tx_grosswt1 LEFT-JUSTIFIED.
      WRITE: 59 l_menge RIGHT-JUSTIFIED.
      WRITE: 82 l_exbas RIGHT-JUSTIFIED.
      WRITE: 109 l_amount RIGHT-JUSTIFIED,
             130 'CT3 No. ',s_ct3,' Dt. ',s_date.
      WRITE:/.
      WRITE:/.
      WRITE:/.
      WRITE:/.
      WRITE:/.
      WRITE:/.
      WRITE:/.
      WRITE:/.
      WRITE:/120 ' Veraval.'.
      WRITE:/.
      WRITE:/.
      WRITE:/120 s_exdat.
    ENDFORM.                    "print_data
    *&      Form  TEST1
          text
    -->  p1        text
    <--  p2        text
    form TEST1 .
      DATA : ZMATNR LIKE j_1iexcdtl-matnr,
             YMATNR LIKE j_1iexcdtl-matnr,
             ZWERKS LIKE j_1iexcdtl-werks,
             ZCHARG LIKE j_1iexcdtl-charg,
             ty_grosswt1 LIKE j_1iexcdtl-MENGE.
      CLEAR : l_menge, t_grosswt1, t_tarewt1, t_netwt1, t_grosswt,tz_ccase,
    tx_netwt, char_val_tab.
    REFRESH char_val_tab.
      SORT  it_j_1iexcdtl BY matnr.
      MOVE: it_j_1iexcdtl-exnum TO l_exnum.
    WRITE:/5 'MATNR', 25 'WERKS', 35'CHARG', 45'GROSSWT', 65'TAREWT',
    85'NETWT'.
    LOOP AT it_delivery.
        read table it_delivery with key matnr = it_delivery-matnr charg =
    it_delivery-charg.
        CALL FUNCTION 'QC01_BATCH_VALUES_READ'
          EXPORTING
            i_val_matnr    = it_delivery-matnr
            i_val_werks    = it_delivery-werks
            i_val_charge   = it_delivery-charg
          TABLES
            t_val_tab      = char_val_tab
          EXCEPTIONS
            no_class       = 1
            internal_error = 2
            no_values      = 3
            no_chars       = 4
            OTHERS         = 5.
        READ TABLE char_val_tab WITH KEY atnam = 'Z_GROSSWEIGHT'.
        IF sy-subrc EQ 0.
          MOVE  char_val_tab-atwrt TO l_grosswt.
        ENDIF.
        READ TABLE char_val_tab WITH KEY atnam = 'Z_TAREWEIGHT'.
        IF sy-subrc EQ 0.
          MOVE  char_val_tab-atwrt TO l_tarewt.
        ENDIF.
        READ TABLE char_val_tab WITH KEY atnam = 'Z_NETWEIGHT'.
        IF sy-subrc EQ 0.
          MOVE  char_val_tab-atwrt TO l_netwt.
        ENDIF.
        SPLIT l_grosswt AT ' ' INTO l_grosswt1 l_unit.
        SPLIT l_tarewt AT ' ' INTO l_tarewt1 l_unit.
        SPLIT l_netwt AT ' ' INTO l_netwt1 l_unit.
        it_j_1iexcdtl-grosswt = l_grosswt1.
        it_j_1iexcdtl-tarewt  = l_tarewt1.
        it_j_1iexcdtl-netwt   = l_netwt1.
        ty_grosswt1  = ty_grosswt1 + l_grosswt1.
        Write:/ it_delivery-matnr UNDER 'MATNR',it_delivery-werks UNDER
    'WERKS',it_delivery-charg UNDER 'CHARG', L_GROSSWT1 UNDER
    'GROSSWT', L_TAREWT1 UNDER 'TAREWT', L_NETWT1
    UNDER 'NETWT'.
        at new matnr.
            IT_GROSSWT-matnr = zmatnr.
            IT_GROSSWT-grosswt = tz_grosswt1.
            IT_GROSSWT-CCASE = tz_ccase.
            IT_GROSSWT-NETWT = tx_netwt.
            append it_grosswt.
            clear : tz_grosswt1,tz_ccase,tx_netwt.
        endat.
        tz_grosswt1 = tz_grosswt1 + l_grosswt1.
        tz_ccase    = tz_ccase + 1.
        at last.
            IT_GROSSWT-matnr = zmatnr.
            IT_GROSSWT-grosswt = tz_grosswt1.
            IT_GROSSWT-CCASE = tz_ccase.
            IT_GROSSWT-NETWT = tx_netwt.
            append it_grosswt.
            sum.
        endat.
        zmatnr = it_delivery-matnr.
    endloop.
    <b>Useful answers rewarded</b>
    Thanks & Regards,
    sunil kumar.

    Hi sunil,
    Clear internal tables after each append statement. your problem will get resolved.
    <b> Reward for helpful answers</b>
    Satish

  • Unable to read data from an excel document of 365*24 values ( all rounded to 4 decimal points)

    I have an excel sheet containing data of hourly loads in MW( rounded to 4 decimals) of one year.  So, I have 365*24 values that I want to import to Labview using Read from spreadsheet.vi. However what i get in the output array is 0's and randomly some unit values at very few places. I have checked the array size of the output array and it shows different array sizes for different yearly data.
    I am attaching the four excel spreadsheets .
    Plz help me with the issue I am facing.
    Attachments:
    Load-2012.xlsx ‏95 KB
    Load-2013.xlsx ‏94 KB
    Load-2014.xlsx ‏59 KB

    If you are using LabVIEW 2014, it includes the Report Generation Toolkit (which is also available as an add-on in earlier LabVIEW Versions).  This can read native Excel files, including .xlsx.  With a few functions (3 or 4, I think), you should be able to get the entire Table into a 2D array.
    Bob Schor

Maybe you are looking for