CSV Lookup to validate the .TXT file

Hi All,
I am trying to validate the input file's A.txt customerID to other existing B.txt files CutomerID. Once if the input file matches the target files customerID then I am going write this output file as C.txt file.
Hope we can do this with the help of CVS Lookup. If we need to use the CVS Lookup what all are the thing need to setup and how I need to create a .java file in NWDS or just any text editor I can achieve this? And I can import it in the Imported Achieves in ESR.
We can do this using the UDF.
I checked all the below links and I am not clear about this.
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417300)ID1453571650DB01760580483263408018End?blog=/pub/wlg/2800
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417300)ID1453571650DB01760580483263408018End?blog=/pub/wlg/2926
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417300)ID1453571650DB01760580483263408018End?blog=/pub/wlg/2781
I checked with other blog too and they are importing some java .jar file as a DRIVER  in the Imported Archive. Where can I get that DRIVER.jar file to import it in to my Imported Archive in ESR.
Please can any one throw the light on it. Thanks for all you inputs.
Thanks,
Jane F.
Edited by: Jane Fraga on Oct 7, 2009 5:12 PM

Hi Ramesh,
Yes I can understand that, their is no CSV Lookup. Instead of that in this examples they are using the JDBC Lookup and check the CSV or txt file.
Can you check this blog:
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417300)ID1453571650DB01760580483263408018End?blog=/pub/wlg/2800
He is using the DRIVER file in the Imported Archives in ESR. Name of the imported file is DRIVERS.
[Message from the above blog:
Once we have the Driver we have to import that jar file in the Imported Archive area available in the Integration Repository.
Once we have imported this file now we can consider the CSV file as a Database table and access it in the Mapping program using a simple user-defined java program. ]
Thanks,
Jane F.

Similar Messages

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • Error while importing the .txt file for SAP script to another system.

    Hi Gurus,
    I'm trying to import the .txt file exported (using RSTXSCRP) from one system to another.But getting the following error on the destination system  (4.6C).I'm able to import the same file on all other releases (Like 470 500,600,604).
    "ERROR: Invalid start marker: SF instead of SFORM "
    Kindly assist..
    Jasvir

    Hi,
    Usually when you download the file and open it with notepad, the first line is like
    SFORMZINVOICE
    ie SFORM followed by form name
    Check this in your downloaded file
    Regards

  • The .txt file has formatting issues that need to be resolved

    Transaction ZEHS20 runs a program that assigns a CCL Group to a specification header, based on its Active Ingredients. The transaction can be run in the background if desired with output being emailed to the user.The .txt file has formatting issues that need to be resolved. can u  pls Help me to resolve this issue.
    Thanks

    What is the formatting issue like? Could you please elaborate a bit more.
    If it is because of varying lengths in the data then it can be handled by utilising a CONCATENATE RESPECTING blanks.

  • Error with the data format in the TXT file, sending as an Email attachment

    Hi all,
    I have an problem in the data formating in the TXT file while sending as an attachment via an email by using the FM "SO_DOCUMENT_SEND_API1".
    For eg:
    The data in the TXT file is looking like as follows:
    0 0 0 0 2        L O U D S P E A K R   O T H E R   3 8 W h i t e                  0 0
    0031  L O U D S P E A K R   O T H E R   3 8 Black                               0 000
    38    L O U D S P E A K R   O T H E R   3 8 Brown                                  0 00040
    L O U D S P E A K R   O T H E R   3 8 Brown                                         0 00042
    and so on
    But it should come as :
    0 0 0 0 2  L O U D S P E A K R   O T H E R   3 8 W h i t e
    0 0 0031   L O U D S P E A K R   O T H E R   3 8 Black
    0 00038    L O U D S P E A K R   O T H E R   3 8 Brown
    0 00040    L O U D S P E A K R   O T H E R   3 8 Brown
    All the internal tables are correctly filled.
    The code is as follows:
    gwa_objtxt = 'Please find attached DATA EXTRACT Sheet'.
      append gwa_objtxt to git_objtxt.
    describe table git_objtxt lines gv_cnt.
      clear git_doc_data.
      read table git_objtxt index gv_cnt.
      git_doc_data-doc_size = ( gv_cnt - 1 ) * 255 + strlen( gwa_objtxt ).
      git_doc_data-obj_langu = sy-langu.
      git_doc_data-obj_descr = lv_mtitle.
      append git_doc_data.
      clear git_packing_list.
      refresh git_packing_list.
    git_packing_list-transf_bin = space.
      git_packing_list-head_start = 1.
      git_packing_list-head_num = 0.
      git_packing_list-body_start = 1.
      git_packing_list-body_num   = gv_cnt.
      git_packing_list-doc_type = 'RAW'.
      append git_packing_list.
      Clear : gv_cnt.
      Describe table git_objbin lines gv_cnt.
      git_packing_list-transf_bin = 'X'.
      git_packing_list-head_start = 1.
      git_packing_list-head_num = 1.
      git_packing_list-body_start = 1.
      git_packing_list-body_num = gv_cnt.
      git_packing_list-doc_type = 'TXT'.
      git_packing_list-obj_descr = 'ATTACH.TXT'.
      git_packing_list-obj_name = 'book'.
      git_packing_list-doc_size = gv_cnt * 255.
      APPEND git_packing_list.
      clear git_receivers.
      refresh git_receivers.
      git_receivers-receiver = gv_eid.
      git_receivers-rec_type = 'U'.
      append git_receivers.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = git_doc_data
          PUT_IN_OUTBOX              = 'X'
          COMMIT_WORK                = 'X'
        TABLES
          PACKING_LIST               = git_packing_list
          CONTENTS_BIN               = git_objbin
          CONTENTS_TXT               = git_objtxt
          RECEIVERS                  = git_receivers
        EXCEPTIONS
          TOO_MANY_RECEIVERS              = 1
          DOCUMENT_NOT_SENT                = 2
          DOCUMENT_TYPE_NOT_EXIST      = 3
          OPERATION_NO_AUTHORIZATION = 4
          PARAMETER_ERROR                    = 5
          X_ERROR                                      = 6
          ENQUEUE_ERROR                        = 7
          OTHERS                                        = 8.

    please give the code of
    contents bin =  git_objbin " how  this is getting populated.
    0 0 0 0 2 L O U D S P E A K R O T H E R 3 8 W h i t e <b>0 0</b>
    0031 L O U D S P E A K R O T H E R 3 8 Black
    0 000
    38
    from this im not able to understand is this over population or concatenation problem
    y dont u make a append to the final table
    like
    data : begin of itxt occurs 0, ,
    s1(132) type c ,
    end of itxt.
    loop at itab.
    itxt-s1+0(4) = itab-f1.
    itxt-s1+4(6) = itab-f2.
    itxt-s1+10(8) = itab-f3.
    itxts1+18(4) = itab-f4.
    append itxt.
    clear itxt.
    endloop.
    exchange this to the contents bin of hte Fm .
    regards,
    vijay.
    can u please mail the text file and the expected o/p to my mail id [email protected]  so that i can see the same from the data provided i m not able to check the result properly .

  • Is there a size limit for the txt files to be viewed in the ipod ?

    when I pass a text file (.txt) in the notes folder, then I try to see it on my ipod nano, I can see just a part of it, the beginning. Is there a size limit for the .txt files to be viewed in the ipod nano? How to increase it?

    4kByte file size, 1000 notes max.

  • LSMW update vendor account just if the actual (old) is in the txt file

    I want to update the vendor account but just if it is the same I have in the txt file.
    My txt file is the fllowing for example:
    Vendor - Old Account - New Account
    A2
    A123
    A321
    A1
    A133
    B321
    A3
    A144
    C321
    So, for each vendor if the actual bank account number is (old account in the file) replace the actual (old account) with the new account.
    In the CODE text for LSMW (check my attach) I have this:
    IF FK02A-BANKN_01 = CTAS-BANKN. FK02A-BANKN_01 = CTAS-BANKNNUEVO. ENDIF.
    Where:
    FK02A-BANKN_01 is the FK02 text for vendor account
    CTAS-BANKN is in my file and structure defined the OLD ACCOUNT
    CTAS-BANKNUEVO in my file and structure defined the NEW ACCOUNT (the one should be now)
    But it is not replacing, if i check converted data, this field is empty. So the if is not working. Ideas?
    I changed it by
    FK02A-BANKN_01 = CTAS-BANKN
    or
    FK02A-BANKN_01 = CTAS-BANKNNUEVO
    and it works, but put the old or the new code of course, not doing the comparation with the old and replacing with the new.

    exact, similar to what I showed and described in my blog LSMW Long text load by Direct Input method
    and you must not forget that the account in the database is stored with leading zeros in case of numeric account and less than 10 long, so there is another potential risk that it wont match without doing an extra conversion of your source field content.

  • How XI will read the .txt file

    Experts,
    i AM WORKING ON A FILE BAPI synchrounous scenario.
    Sender will drop the required file on XI directory and XI will pull the file and map it with the BAPI u2013 and crate services  entries in SAP SCM. If errors are encountered during the process they are returned to the client in a report or as erroneous file.
       *I have a .txt file( tab delimitted file)  in the folowing structure
    H                       NAME                        date            ***                 data_txt                         676869*
      C             a                           b             c
      C             d                           e             f
    H                      name                           Account            brat                     abcc                             12333
      C             a                             b               c
      C             d                             e               f                          hjhdkf
    like this  multiple entries, ll be getting .
    Based on H ( indicator), Have to get the data. How will I do in XI file  adapter?  Please help me how should I design the file adapter so that It can read the .txt file.
    I have created the sender data type similarly to the structure of BAPI.
    Note; H indicates teh Header and D indicates teh sublines. Together it is called one service entry. Aagain Next 'H' indicates the strat of next service entry.
    Thanks
    Veeru

    Nutan,
      I want the flat file  data in teh following xml format
    <Records>
        <Header>
             <Item>
                    <data1>1</data1>
                    <data2>2</data2>
              </item>
       </header>
    <Header1>
             <Item>
                    <data1>1</data1>
                    <data2>2</data2>
              </item>
       </header1>
    </Records>
    Records-- o to unbounded
    Header--- 0 to 1
    header1-- 0 to 1
    Item--- 0 to unbounded
    My input .txt file ,  fields are separated by a tab. I mean its a tab delimitted file.
    The main tag Records is 0 to unbounded.
    How to do the content conversion for the  same.
    Thanks
    Veeru
    Edited by: viru srivastava on Dec 20, 2009 2:56 AM

  • How to Determine File Code page of the txt file generated thru UTL_FIle

    Hi
    I want to know the file code page of the txt file that I have generated in Oracle using UTL_FILE.
    E.g., OUT_FILE := UTL_FILE.FOPEN(DIRNAME,vFILENAME,'W',2000);
    What is the way to do so? I have read on internet that if we want to know the code page of a file then we just have to open in any browser like IE and just check the encoding from there. Is this the correct way to know the encoding?
    Also, I want to know that whether file code page is dependent on OS or the source from which the file is being generated?

    "The Oracle character set is synonymous with the Windows code page. Basically, they mean the same thing."
    Source:http://www.databasejournal.com/features/oracle/article.php/3493691/The-Globalization-of-Language-in-Oracle---The-NLSLANG-variable.htm
    Means, in oracle we says character set which is = window's code page.
    "Determine the code page of your Oracle database ( = select parameter, value from nls_database_parameters and look for parameter NLS_CHARACTERSET)."
    Source:http://media.datadirect.com/download/docs/slnk/admin/intlangsupp.html
    Which already said by Pierre above.
    HTH
    Girish Sharma

  • How to validate the Xml File With Java

    Hi,
    Can pls tell me. I want to validate the XML File for the Some Mandartory TAG. if that if Tag null i want to generate error xml file with error and i want move another folder with java. pls help me as soon as possible

    Use a validating parser (any recent Xerces, for one) and switch on the validation feature. Very much vendor-specific, so look at the docs of your parser. Oh, you do have a schema for these documents, don't you?

  • Validate the input file against a given schema inside an orchestration and producing 2 different files based on the validation result

    HI All,
    I have a situation.
    I need to validate the input file against a given schema inside an orchestration and producing 2 different files based on the validation result.
    A predefined success schema in case of  validation success and negative schema structure for validation failure.
    any advice ?

    Hi Rachit,I following the blog
    http://dietergobeyn.be/validating-biztalk-messages-orchestration/ and stuck in few things
    I created a helper class with the name Validation and following code
    [Serializable]
        public class Validation
            private bool _isValid = true;
            public bool Validate(XmlDocument document, Type schema)
                XmlSchemaSet set = new XmlSchemaSet();
                if (typeof(SchemaBase).IsAssignableFrom(schema) && !schema.IsNested)
                    set.Add((Activator.CreateInstance(schema) as SchemaBase).Schema);
                ValidationEventHandler eventHandler = new ValidationEventHandler(HandleValidationError);
                document.Schemas = set;
                document.Validate(eventHandler);
                return _isValid;
            private void HandleValidationError(object sender, ValidationEventArgs ve)
                _isValid = false;
    public static bool ValidateMessage(XLANGMessage msg)
    XmlDocument xDoc = new XmlDocument();
    xDoc = (System.Xml.XmlDocument)msg[0].RetrieveAs(xDoc.GetType());
    Type t = typeof(Schemas.External.Invoice_v3_1);
    Validation validation = new Validation();
    return validation.Validate(xDoc, t);
    First thing, Do i need to write the ValidateMessage method inside the helper class or not ??
    If inside, how to add the reference of schema files in the statement (Type t = typeof(Schemas.External.Invoice_v3_1);)
     I tried adding the reference of my schema project but it is showing error.
    And what is to be written in the ValidateMessage expression shape in Orchestration ?
    Really appreciate your help.

  • Where to put the .txt file in order to read it

    think ur prog can read the data.. but it said
    java:9: unreported exception java.io.FileNotFoundException; must be caught or declared to be thrown
    FileInputStream sStream = new FileInputStream("data.txt");
    so where to paste the .txt file if i want to read it
    same folder with my .java file?

    u must put the .txt file in order to read it as an
    argument to java command at runtime this code may help
    u out
    import java.io.*;
    class Demofin     
    {public static void main(String[] args) throws
    IOException
         int i;
         FileInputStream fin;
              try
                   fin=new FileInputStream(args[0]);
              catch (FileNotFoundException e)
              {System.out.println(" file not found");
              return;
              catch (ArrayIndexOutOfBoundsException e)
                   System.out.println("usage demofin filename.txt");
                   return;
              do
              {i=fin.read();
              if(i!=-1)System.out.print((char) i);
              while (i!=-1);
                   fin.close();
    }Use tags..

  • How to run and pass parameters to exe file from the .txt file

    hi,
     i am facing problem with passing parameters to the .exe file which is run by labview.firstly i have  .txt script with parameters which i have to pass to .exe file. This .exe file is also a software and that script is written for it.And now i have to create  programm in labview which should fullfill following points.
      1. I have to use one knob named 'Run script'.If i pressed the knob ,it should open the Browser where i can choose .txt script file.
      2. .exe application should open(Path already chossen).
      3. after passing the parameters .exe application should closed.
      4.And labview now should update his parameter
    I can just open .exe file using Exce.vi but i dont getting any idea to do more than this.can somebody please help me?
    Solved!
    Go to Solution.

    This depends on the exe file. Does it retrieve the information as standard input or does it require the information as command line arguments?
    Depending on this, you can read the txt-file in LV (using the file functions) and pass the content to the System Exec.vi.
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Is there a way to create a button on the front panel that would automatically open the txt file data is being stored to?

    I am saving data read from FieldPoint to a .txt file. Is there a way to create a button on the front panel so that when the user pushes this button it automatically opens the .txt folder in notepad? I want to bypass the user having to find the file in the computer in order to open it.

    Hi jem,
    I suggest that you break this up into three seperate questions and re-post to this list. That way you get more ideas from others that may have better insites than myself.
    Re:the sysexec
    The Sysexec will allow you to execute a dos command. This is the equivalent of going to
    Start>>>Run
    What you should do is find the proper DOS command sysntax that is required to open a text file in notepad or your favorite editor. Once you know what a good DOS command is, you should pass that string to the Sysexec.VI. The Sysexec has an input that allows you to choose if the code waits for the command to complete or if it should just start the program and let it run in the background. Sysexec will open its own window to run the command you speci
    fiy.
    Ben
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • SAP GRC - Exporting rules from GRC - how to read the .txt file generated ?

    Hi there,
    I am using GRC Compliance Calibrator and have downloaded the default Global rules defined in Compliance Calibrator using the Rule Architect -> Utilities->Export rules.
    This gave me a massive txt file with a lot of tables and data. Reading through this forum, I did figure out that lines starting with M are the header rows for the tables and D rows are the data rows.
    My question is, how do i figure out what each of the Virsa tables stand for (e.g. VIRSA_CC_FUNCACT, VIRSA_CC_FUNCPRM) ?
    I tried SE11 and looking up these tables in the SAP environment associated with this CC install, however it says that the table was not found.
    Could someone please point me to :
    A) A list of the common Virsa CC tables and their descriptions ?
    OR
    B) How can i find what these tables stand for online or in the SAP environment?
    Many thanks !

    Hi Santosh,
    There is no option available to export only the customized rule sets to another system. The export rules option will give all the rules that are available in that system.
    You can do in the below manner
    a) Extract the data from Export rules
    b) Open that text file in a spreadsheet and edit the spreadsheet [Remove the rule sets & the rules not required in production system]
    c) Save the spreadsheet in UTF-8 text file
    d) Upload them in the production.
    The above procedure is bit complex and cumbersome -as changing the text file is risky. Even a space will not generate any rules in the RAR. I would suggest rename the new rule set in different naming convention and upload in your test environment before uploading the text files  in Production.
    But, using the Export and Import option you cannot upload only the customized rule set as the extract happens for the entire rules sets available in the system.
    Thanks and Best Regards,
    Srihari.K

Maybe you are looking for

  • 10g installation in vista 76% complete error

    Hi all when i installing Oracle 10.2 on vista ultimate after 76 % complete i get this error: Enterprise manager configuration faild due following error- error starting Database control Refer to the log file at d:\oracle\product\10.2.0\db_1\cfgtoollog

  • HT2518 transfer from MacBook Pro to Hard Drive

    I used to store films from my Pc to an iomega HD multimedia, now I have this MacBook Pro and I can't transfer films to the same Hard Drive. Does it have a specific formate just to be used in a PC ?

  • Menu/end jump going haywire

    I have 2 stories, each has a different menu and end jump. when I set them in the connections/target window, one story works correctly and the other does not. what in the world is going on? I run into glitches like this in DVDSP all the time, if you s

  • Staging photos for processing

    I'm trying to create a staging area for newly imported photos that I haven't processed yet. I've been using the projects within folders method for organization. After I process my images, I tried dragging the project to the appropriate folder and all

  • Upgrading from ACNS to WAAS on a 674

    Looking for the steps to change over to Waas on a ACNS formated system. Anybody out there completed these steps,  being done via Console connection.