Skip to Content
author's profile photo Former Member
Former Member

Data validation using either FCC or Mapping

Hi Friends,

My requirment is

774.89 3.54 15.07 4.87 2.93 4.86 5.42 3.56 -18.64 15.75 5.94 2.11 4.74 5.57 4.27 15.73 -1.46 -17.19Z

768.94 &.52 17.05 6.93 3.76 3.03 4.59 2.98 -20.00 15.91 6.14 4.01 3.24 3.44 1.87 13.96 -3.01 -16.97Z 254

771.55 3.52 15.21 7.74 0.86 3.24 4.54 4.02 -15.42 17.40 9.60 0.81 2.73 6.40 6.07 20.45 2.51 -17.93Z

770.33 3.53 13.26 3.51 5.12 4.94 4.81 3.51 -19.76 12.57 4.20 4.52 4.94 2.69 0.50 13.86 -2.94 -16.80Z

770.33 3.^3 13.26 3.51 5.12 4.94 4.81 3.51 -19.76 12.57 4.20 4.52 4.94 2.69 0.50 13.86 -2.94 -16.80Z

770.33 3.53 13.26 3.51 5.12 4.94 4.81 3.51 -19.76 12.57 4.20 4.52 4.94 2.69 0.50 13.86 -2.94 -16.80Z

770.33 3.53 13.26 3.51 5.12

From the above data

1. Second line has a special character & and it has crossed more than the fixed length, so the whole line is to be removed.

2. Fifth line is also having a special character, so the whole line of record should be deleted before it updates to ECC Table

3. Last row has incomplete row or some fields are empty. So, last row should also be removed or deleted

Am working on a scenario FILE - PI - ECC (abap proxy). With the above conditions the data should be validated.

How can I fulfill this requirement?

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2009 at 02:26 PM

    Hi,

    what You can do is:

    -Build a module(java app) to delete those lines before the messages would taken by File adapter(FCC).

    -Buil a javamapping to delete those lines but not use FCC, use only File.

    Regards

    Ivan

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      First read the whole file into xi and do two mappings. In the first mappings check the total length of the record and if the record is less than the total fields fixed lengths then ignore it. Now you have all the equal lenghts records with some special characaters also. Now after this condition in the same mapping use a udf with regular expresssion with [a-z][A-Z] so that other then in between lower a to z and upper a to z, anything is there you can ignore the record. For this udf please check this blogs on how to use regular expressions:

      /people/wojciech.gasiorowski/blog/2006/11/01/the-power-of-regular-expressions-in-graphical-mapping-xi

      /people/morten.wittrock/blog/2006/04/14/an-introduction-to-regular-expressions-in-java

      Now from this mapping we have removed all teh extra lines which has special characters and record length is less than equal to the original one. Now since it is a fixed length file you can take substrings and map them in a second mapping.

      Else after the first mappign you write the file to a shared drive, then create other interface which picks this good file and does the mapping and complete your process.

      Hope this makes sense to you.

      Regards,

      ---Satish

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2009 at 02:48 PM

    Hi Chennai,

    The best option would be to read the whole file into xi and then check for any character like & or ^ and then ignore it. For the second line you can use .additionalLastFields as ignore so that the line field 254 will not read and for the last line you can use the parameter .missingLastfields as ignore so taht it will not worry about the missing fields. So give a try and let us know.

    Once when you read the file into xi then you can use a udf to check for the special character and ignore it.

    Regards,

    ---Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 10, 2009 at 12:28 PM

    Hi All

    Thanks very much. Its done at PROXY and not used any UDF.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.