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

picking fileds randomly from the input file.

Hi

I have a input file like below. Each record contains abt 40 fields and file may contain abt 30000 records

12345abcde!@#$%45678.............

23456bcdef@#$%^34567.............

.................................................

....................30000(records).........

But my business rek is........... I have to pick only 10 fileds(not necessarly first 10 and not necessarly side by side) from each record. How can we achieve this ??

whether message protocol to be used is file or file content conversion ?? How to pick random fields from the input file ?? But I have the knowledge of each field length......!!

Thanks

Kumar

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 05:36 PM

    Hey

    but why do u want to pick up only 10 fields?

    sorry but i m unable to understand the requirement,if at a particular time u want only 10 fields,then whats the use of sending more than 10 fields,the sender system must send only fields that are relevant.

    could you please explain the requirement

    Thanx

    Aamir

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hey

      see here is the thing,assuming that u know the position of the fields you need.

      now if u create ur data type based with only the fields you are concerned with,you will get error coz when u run the scenario,you will be getting more fields than the sender data type can handle.

      so your source XML file must be exactly similar to the sender data type,an exception to this is a bypass scenario,but thats not gonna work out in ur case coz u don't want all the fields on the receiver side,you only need specific fields.

      the solution is to create the sender type with all the fields you will be getting,but the receiver must have only the fields u actually need.do the mapping for only the fields u really need and leave the rest as it is on sender side.

      moreover creating a data type with 40 fields is not much:)sometimes we have to deals with much more than this

      Thanx

      Message was edited by:

      Aamir Suhail

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 08:45 PM

    Hello,

    What is on the receving side is it SAP and can you use proxy or trigger a RFC call then you can do that.

    Moreover if you expect a solution from SDN explain where you are stuck, on what basis you are picking those 10 fields and how this will vary from row to row in the same file or from file to file basing on any factor from the source file, what is the controlling factor which tells these 10 fields need to be picked? do explain all these may be they can comeup with a better solution.

    Regards,

    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.