Multiple input lines

How can I get multiple input lines?
I'm brand new to java and I have searched the web for a little while to find how I can do this. But I couldn't find a thing.
Until now I have used JOptionPane to have my inputs, is there another way to get input?

Better yet try this:
import java.io.*;
import java.util.*;
class Inputline1
     public static void main(String args[]) throws IOException
            JOptionPane.showMessageDialog(null,"Enter in strings, 'stop' to stop","Multiple Input",JOptionPane.INFORMATION_MESSAGE);
            ArrayList str=new ArrayList();
               String tempInput="";                  
               String output="";
                while(!(tempInput.equalsIgnoreCase("stop"))){
               tempInput=JOptionPane.showInputDialog(null,"String input: ","Multiple Input",JOptionPane.INFORMATION_MESSAGE);
                if(!(tempInput.equalsIgnoreCase("stop")))
                           str.add(tempInput);
                   for(int x=0;x<str.size();x++){
                       String tempInput=(String)str.get(x);                   
                        output+="/n"+tempInput;
}What I'm using is called an ArrayList. Simply put...it's an array that you don't say how big it is...it automatically knows by how many elements you add to it. It holds objects, and in your case Strings. When you're getting an object from the array you need to typecast is (that's why i have (String) in front of the str.get(x). Because arraylists only hold objects you need to tell it what kind of object you're getting from it when you're assigning your variable. Useful methods are .add() adds an object to the list and automatically resizes it, .remove() removes and object to the list and automatically resized it, .get() retrieving a copy of the object from the list, and .size() returns the length of the list. Check the API for details on it obviously. Well I hope that helped.

Similar Messages

  • SqlLoader: how to create multiple records out of one CSV input line?

    A question concerning the SQL-Loader.
    I need to load data from a CSV file where one of the CSV values determines how many records should be inserted.
    Example of the input data:
    KEYWORD;2;REC1_COL1_X,REC1_COL2_X;REC2_COL1_X;REC2_COL2_X
    KEYWORD;3;REC1_COL1_Y;REC1_COL2_Y,REC2_COL1_Y;REC2_COL2_Y;REC3_COL1_Y;REC3_COL2_Y
    KEYWORD;4;REC1_COL1_Z;REC1_COL2_Z,REC2_COL1_Z;REC2_COL2_Z;REC3_COL1_Z;REC3_COL2_Z,REC4_COL1_Z;REC4_COL2_Z
    If the KEYWORD is found, then the next value determines how many value pairs will follow, and therefore how many rows should be created in the affected DB table.
    As a result I hope to achieve this:
    SELECT Column1, Column2 FROM testTable
    REC1_COL1_X,REC1_COL2_X
    REC2_COL1_X;REC2_COL2_X
    REC1_COL1_Y;REC1_COL2_Y
    REC2_COL1_Y;REC2_COL2_Y
    REC3_COL1_Y;REC3_COL2_Y
    REC1_COL1_Z;REC1_COL2_Z
    REC2_COL1_Z;REC2_COL2_Z
    REC3_COL1_Z;REC3_COL2_Z
    REC4_COL1_Z;REC4_COL2_Z
    I learned how to import data using Oracle SQL loader for cases where one input line more or less matches a (new) row in a DB table. But how to handle this?

    Hello 784948.
    Assuming that the delimiter is a comma, and also assuming that the number of pairs is limited to four, you could use the following tested control fileLOAD DATA
    APPEND
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '1'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER
    , PairCountColumn  FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '2'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '3'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '2'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '3'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '4'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '3'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '4'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , InputColumn1
    , InputColumn2
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    INTO TABLE testTable
    WHEN (1:7) = 'KEYWORD' AND (9) = '4'
    FIELDS TERMINATED BY ","
    TRAILING NULLCOLS
    ( KeywordColumn    FILLER  POSITION(1)
    , PairCountColumn  FILLER
    , FillerColumn1    FILLER
    , FillerColumn2    FILLER
    , FillerColumn3    FILLER
    , FillerColumn4    FILLER
    , FillerColumn5    FILLER
    , FillerColumn6    FILLER
    , InputColumn1
    , InputColumn2
    )Luke
    Please mark the answer as helpful or answered if it is so. If not, provide additional details.
    Always try to provide create table and insert table statements to help the forum members help you better.
    Edited by: Luke Mackey on Aug 5, 2010 1:23 PM (always better to test before posting)

  • Multiple Schedule Lines for Individual Qty in Standard Order

    Hello All,
    I have a Client Requirement to Set up the Standard Order for a Material which will be sold on Single Quantity every Month.
    This will have to occur from the same Order. For this Multiple Schedule Lines are required to be generated as per Monthly Delivery Schedule.
    I know this functionality comes under Scheduling Agreements where we can deliver goods as per confirmed Schedule Lines for the Month.
    But Client Requirement is to set up this functionality in Standard Order Only as setting up scheduling agreements calls for mapping of New Order Types which is not feasible.
    So Can you provide with your valuable Inputs as to whether this can be possible through Standard Order in the system.
    Looking forward to your esteemed reply!!
    Warm Regards,
    Onkar Khedekar

    Dear Onkar:
    If you don't want to use Schedule agreements, you can enter several schedule lines for each item in "Schedule line" tab at  item level.
    Enter in this tab each schedule line per month.
    But be aware which date you enter becuase this requirement will be transfered to MRP.
    Check it and revert.
    Jose Antonio Martinez

  • Delivery date variance for multiple schedule lines in EKET

    Hi experts,
    can anyone tell me what dates  are used (from EKET, EKBE or any other table)  to calculate delivery date variances when there are multiple schedule lines in EKET table. I am able to match single schedule line POs but not POs having multiple schedule lines.
    thanks in advance,
    purvang

    can anyone provide input on this?

  • Multiple input arguments in User defined funcions

    Hi Experts,
       I have a file to proxy sceanrio.Have to do one to one mapping of all the corresponding fields except 3 fields. for eg
    1)  - <Services>
              <DisplayValue>Tax>Business Tax</DisplayValue>
           </Services>
    Sender                                                                            Receiver
    =====                                                                            ========
    Tax                                                                                Functions
    under the services tag the "Tax" is one of the  sender's field .I need to map this "Tag" to the receiver field called as "function".My question is: can we do wz some user defined functions  or we have to use java functions.If we use Java,what way we can implement in PI 7.1 because,i guess we can not use the multiple input arguments.
    2)  similarly,
        - <LineOfBusiness>
               <DisplayValue>Consumer Markets>Retail</DisplayValue>
          </LineOfBusiness>
    Sender                                                                            Receiver
    =====                                                                            ========
    Retail                                                                               Sector
    Retail is one of the sender field.it should be mapped wz another field "Sector" at receiver side.how to pick up the retail field and map it to the receiver side.Is there any user define function for this or we have to write java code if we have to go for Java,how it will be implemented in PI 7.1
    3)  similarly,
    - <GeographicLocation>
    <DisplayValue>Americas>North America>Null>United States & Virgin Isl.>United                 States,US,USA,United States of America</DisplayValue>
      </GeographicLocation>
    Sender                                                                            Receiver
    =====                                                                            ========
    Americas                                                                           Region
    North America                                                                    Sub region
    Null                                                                                Area
    UnitedStates,US,USA,United States of America                    Territory
    As u all can see,the above corresponding sender fields should be mapped to Receiver fields.It all has coem under one line in XML.How to pick it up and map 1 to 1 at  the receiver side bcoz receiver wants it as a separate fields.Is there any user define function for this or we have to write java code if we have to go for Java,how it will be implemented in PI 7.1
    Experts,please help me out as this is a live scenario.
    Thanks in Advance
    Veeru

    Hi,
      here is the partial structure.pls have a look.
    <Services>
      <DisplayValue>Tax>Business Tax</DisplayValue>
      </Services>
    - <LineOfBusiness>
      <DisplayValue>Consumer Markets>Retail</DisplayValue>
      </LineOfBusiness>
    - <GeographicLocation>
      <DisplayValue>Americas>North America>Null>United States & Virgin Isl.>United States,US,USA,United States of America</DisplayValue>
      </GeographicLocation>
    I have to do mapping b/w tax and some receiver field and it is a 1 to 1 mapping.how to extract teh field "tax" from that beause there is also a field name "business tax ".
    same with the field name  "Retail" .
    and also with the field names Americas>North America>Null>United States & Virgin Isl.>United States,US,USA,United States of America
    I have to extract one-one field and map to corresponding single fields at the receiver side.
    Have i presented properly.
    Please help me out.
    Thanks
    Veeru

  • Service Procurement with Multiple Service Line items

    Dear Experts,
    We have the following Business Scenario. Request your inputs in addressing this issue.
    Business scenario : Most of the Procurement for our client is of services. So, we need to configure services with multiple service line items. This Shopping cart to create PR in ECC. PR to PO conversion to take place in ECC. Now onwards client needs Supplier integration for confirmation of services and sending invoices by Vendor.
    Guidance required in the following
    1 In Shop functionality if we select services, PR is being created in ECC with only one Service Line item. Whereas if we go for Request functionality, then always it is routing to Bidding process (which is not required for client). Can we create SC with multiple service line items with out request functionality?? Or Can we root the Request functionality with out Bidding process??
    2 If we convert the PR to PO in ECC (Classic Scenario), can we go for SUS integration. In such case which is the best way of supplier integration. Can you please guide us on basic steps on installation (can we go for different client in the same server) and configuration.
    Request your inputs in this regard
    Thank you,
    Ravi

    Hello,
    We suffered the same problem in our company.  We have found a way to work with the SRM shopping cart multiple line rollup to ECC single line purchase order.
    If the multiple shopping cart line items contain the same location code and cost assignment they will rollup into one ECC purchase order.  The system seems to 'think' it is helping you by consolidating your information.
    In the Basic Data section of the shopping cart there is a Service line item field.  If you enter something in each in that field for each line it will keep it's own line in ECC.
    Your implementation may differ slightly from ours but I recommend playing with the location code, cost assignment and Basic Data service line fields until you can see a pattern.  Basically you need to find a method to make each line a separate entity so they don't rollup.
    Good luck,
    Corinne

  • Multiple Input ports - Single Form

    Hi,
    I have a RFC which has multiple input ports. How do i use a single form to provide data to all the input ports.
    Regards
    Bharathwaj

    Hi,
    you can create the single form direct, if you pull a line out of the RFC, then the form must be created with the fields. If not, then you have to create it manually and map the fields with the input port.
    Best Regards,
    Marcel

  • Multiple VAT line in a single invoice

    Hi all,
    I have a requirement that, the customer request the vendor invoice generate multiple VAT lines base on difference expense account even with the same tax code.
    Example,
    Assume the tax rate is 10% and we have invoice with 3 expense line.  Therefore the document entries will be input like following
    Cr AP 110
    Dr Expense1 30 (Tax code V1)
    Dr Expense2 70 (Tax code V1)
    Dr VAT input account 3
    Dr VAT input account 7
    Does any expert know anywhere in the VAT tax configuration can generate the above setup.
    Thanks.

    Hi,
    Every Tax code will have Transaction Keys defined in FTXP
    Check the active Transaction Key in the transaction OBCN
    Assuming that you are using same tax code and only on transaction key is active...
    If the posting indicator in OBCN is 2, you will have one tax line item per invoice
    If the posting indicator in OBCN is 3, you will have one tax line item per expense entry
    So... In your scenario, you will need to create a new tax code to achieve the desired effect

  • How do I setup Multiple Inputs on a single card into multiple tracks (devices) in Adobe Audition?

    With a single Audigy 2 Card, how do I setup to record from two of the inputs (line-in and mic) into separate tracks in Adobe Audition 1.5?
    I am trying to get the different inputs to list as different devices in Adobe Audition 1.5 so that I can record to multiple tracks simultaneously with different input.
    Is it possible?
    Any help is appreciated.
    Thank you

    I need to know the same thing when using an Audigy2 ZS Platinum Pro. Neither the users manual nor the website provide anything more technical than how to hook up speakers wires.
    If you cannot multitrack from the multiple inputs, is the IEE 1394 (firewire) port capable of 6 pin connection to a Yamaha digital mixer with an MLan digital I/O card. If so, will the 16in/16out from the MLan pass through and be recognized by Adobe Audition?
    Thanks

  • Open Sales Order  table with multiple schedule line....

    YUSUF BHORI wrote:
    Hi Experts,
    In Sales Order there are multiple schedule line for single item.
    Where and in which table i can find open qty for order ,material, item and schedule line items.
    I Want open items for each schedule line. For One vbeln, posnr there multiple etenr.
    Urgent,
    Yusuf.

    Hai,
    Join VBAK & VBAP and store data in an internal table GT_VBAP to get Sales order numbers, items, materials.
    Get Open Sales order items from VBUP into GT_VBUP  where VBUP-GBSTA  NE  'C'.
    LOOP at GT_VBAP.
    Read table GT_VBUP with key vbeln & posnr.
    If sy-subrc <> 0.
      delete GT_VBAP.
    endif.
    ****Fill your Final Report Internal table with required field values **Append into that internal table
    ENDLOOP.
    Now Select WMENG BMENG from VBEP into GT_VBEP for all entries in GT_VBAP.
    LOOP AT  GT_VBEP.
    *******Again Modify your Final Report internal table with these values
    ***VBEP-WMENG is Ordered Qty
    ***VBEP-BMENG is Confirmed Qty
    ************Open Qty     = Ordered Qty      = Confirmed Qty***
    ************Open Qty     = VBEP-WMENG = VBEP-BMENG.***
    ENDLOOP.
    Edited by: Eswara Rao Aakula on Dec 24, 2007 9:56 AM
    Edited by: Eswara Rao Aakula on Dec 24, 2007 9:57 AM

  • Payable open interface-Multiple distribution lines

    Hi,
    As i know there is no distribution interface table in R12,there are only AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE.When i insert one line for one invoice header,it is creating one distribution line.
    Now my requirment is i want insert multiple distribution lines for invoice line.
    Is it possible?If yes,tell me the way...
    Is there any alternative ways?
    Thanks
    Praveen

    Hi Praveen
    How are you inserting the records into Interface Table ?
    Is it through SQL LOADER or a simple Insert Command from a PL/SQL Block ?
    While loading Multiple Distribution Lines for a Invoice Header in AP_INVOICES_LINES_INTERFACE Table we can pass the same HEADER_ID for Multiple Invoice Lines.
    Ex
    BEGIN
    INSERT INTO AP_INVOICES_INTERFACE(INVOICE_ID,INVOICE_NUM)VALUES(100,100);
    INSERT INTO AP_INVOICE_LINES_INTERFACE(INVOICE_ID,INVOICE_LINE_ID,LINE_NUMBER)VALUES(100,100,1);
    INSERT INTO AP_INVOICE_LINES_INTERFACE(INVOICE_ID,INVOICE_LINE_ID,LINE_NUMBER)VALUES(100,101,2);
    COMMIT;
    END;
    Please do let me know if you face any problems.
    Regards
    Nakul.V

  • Unable to enter multiple Schedule lines for BOM material in Sales Order

    Hi All,
    We have a Sales Order where in which we cannot add additional schedule lines for BOM material.
    The schedule lines are greyed out, user was able to add schedule lines earlier.
    I have checked all assignments in VOV6, VOV7 and everything seems to be fine and no changes have been made to item category being used.
    Please provide a solution for this.
    PFB link in which similar situation posted in this community but the final resolution method is not discussed.
    http://scn.sap.com/message/13201504#13201504
    Regards,
    Samiksh

    Hi Samiksh,
    Pls check for that particular customer, only complete delivery allowed(c) is set in the CMR or CMIR. If so, you can't enter multiple schedule lines for that customer.. it would be grayed out in the sales order schedule lines except confirmed line.
    or check the problematic sales order at item level shipping tab if the par del/item is set to 'C'
    With regards
    S.Siva

  • Regarding multiple schedule lines in sales order with same date

    Hi All,
    we create the Orders from RFC and the orders are going to Multiple Schedule lines for the same date.
    period       delivery date          ordered quan       confirmed quantity
    D     10/11/2007                10                    0
    D     10/11/2007                 0                     10
    here for the same date in first line it is not confirming and in the second line it is confirming the quantity for the same date.
    On what conditions it is possible??????
    Any one have the solution for this Please send it to me [email protected]
    Regards,
    Prasad

    Just check the schedule line details i.e go to schedule line---shipping. You will find that although the del. date is same in both the case but the timings were different e.g material availability time etc will be different in both these lines. So though the dates may be same its time difference that's causing the second schedule line.
    Reward points if useful

  • How to create multiple schedule lines for configurable products

    Hi -
    We have enabled variant configuration and would like to have multiple scheudule lines created , but it seems that only one line is avaialble, is there any way to configure the use of multiple schedule lines? 
    Note - we are not using KMAT material types, rather triggering a unique kit compoments within Sales BOM.
    We have been able to make the necessary adjustments to allow the creation of the Scheduling agreement and have the BOM explode correctly, but just am not able to trigger multiple sched lines.
    thanks
    Bill

    Your context node shall contain all these fields like country,city,etc as different attributes.so in your view configuration,add all these fields whatever you require from the AVAILABLE FIELDS section to the DISPLAYED FIELDS section.NOw all these attributes would be added in diff rows.What you need to do is,select the first attribute,lets say COUNTRY,click on this attribute and then on the buttn SHOW FIELD PROPERTIES.Thsi will show you the label name etc.Here you change the label name to NATIONALITY.Also ,it will show you the row no,cloumn span of the field and column span of the label.You need to reduce the column span of the field value.Ie if the column span is from D TO H,reduce it from D TO F.Now goto the next attribute eg CITY and in the same way,goto the attribute properties.Here ,There is a check box SHOW LABEL,uncheck this,and now goto the row no and the cloumn span.Make the row no same as that of the COUNTRY FIELD.The column span should howevrbe statring from where the column span of country field ended.Ie Teh column apsn of counrty field ended at F .So for CITY,the column span should start from G to amybe H.Now this is how you need to accomodate the other fields also in the same row,by changing the row no and column span in the field properties.
    Suvidha

  • How to acquire serial data on a digital input line with good performance?

    Hello,
    we have a performance problem with our realtime controller. Our objective is, to read a 24-bit long digital waveform from a digital input line. To do this, we supply a clock signal (236 KHz)  to the PFI1 Line of our DAQ Board. On each rising edge of the clock, a new bit is set on the digital input DI0.
    Our hardware which transmits the data, is triggered through a digital output from our realtime controller. On each edge on this output, the hardware starts a serial transmission of 24-Bits.
    Everything works fine except the bad performance of our realtime controller. We want to acquire the 24-Bits in a 1ms timed loop. To measure performance we wrote a test program. In that, we only triggered the hardware and transfered the data to the realtime controller. The task which is doing this job, has a approx. CPU-Load of 30%, which is, in my humble opinion, very high. The task is not waiting for data or anything else! We have earlier implemented a control which is also using a 1ms timed loop. This control is sampling 2 analog input signals, 2 counters. Futhermore it's sending telegrams with CAN and doing many calculations. The strange thing is, this much huger program has a CPU-Load of 25%. Does anybody know where the problem is?
    For the better understandig I attached our test-program to this text.
    We're using:
    PXI-8175 realtime controler
    PXI-6221 Multifunction DAQ
    Thanks!
    Regards, 
       Crest!
    Attachments:
    dig_test.zip ‏51 KB

    Hello,
    First of all 30% CPU-Load is normal because the DAQmx-driver needs a lot of resources.
    In your programm you should place a wait (for example with 1ms) into the while-loop which causes
    lower CPU-Load.
    If this is not enough you should build your vi like in the following example.
    Regards,
    Christian
    Attachments:
    Read Dig Port.vi ‏51 KB

Maybe you are looking for

  • Slow Mail and more

    Hi In the last two days it takes about 1 min to send an email from mail via our server. Prior it was almost instant. If I go to the xserve and open server admin, it takes about 2 min to show the information. Everything else on the server runs at norm

  • How can I change the order of pictures in a slideshow?

    Also is it possible to insert new photos at specific points of an already existing slideshow?

  • E61i browser can't login to Friendster, E65 can, W...

    here's the case, my sister use E65 and connect through our WLAN at home and able to login to friendster.com website. Whilst i'm using E61i, at the login page, it just refresh the page again and again after click on the login button. i'm surprised bec

  • Printable brush chart. Is there a PDF that I can print

    I have made my own brush folder with the few brushes I like... but is there a way to see all the brushes at one time.. maybe a PDF file that could be printed?

  • APP-INV-05447: No open period found for date entered

    Hi All I try to do Inter-Organization Transfer in OPM. But I got this error "APP-INV-05447: No open period found for date entered". What shall I do for this error? I controlled Inventory Calendar. The period is open. Thanks