on 01-11-2006 3:42 PM
Hello,
I have to define a file2Idoc scenario for orders. The file is a CSV, the IDoc ORDER05.
The problem is the structure of the file, there is no prefix for header or item, the header and item is mixed in one row, without itemnumber. The only key field is the order number.
There are more than one order in a file, but it´s sorted by the order number.
Any idea?
In a select statement we would use the grouping-by clause.
Hi Thomas,
In the CSV file lets consider the first line which contains the header and item.
Say if you are having the no of fields that corresponding to the header then you can put that many no of fields into your header structure and the rest you can move to the item structure.
This can be achieved only if in the file line item, there are 9 commas for the 10 fields for the header and then this can be extended for your item fields too..
Cheers
JK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi JK,
I know this possibility and used it in further project, but here the structure of the file is fixed. The customer do not want to change it.
The structure looks like this:
Client,BillToNo,ChipToNo,OrderNo,ProductNo,Quantity
There are several rows in one file for the same order, and no position number.
I think I have to read row by row, but then in the mappping I have to check when the order number is changing. In an ABAP internal table it´s easy, but how to do this in the graphical mapping?
I think I have to read row by row, but then in the
mapping I have to check when the order number is
changing. In an ABAP internal table it´s easy, but
how to do this in the graphical mapping?
Thomas,
You can use a two-step mapping; If you read the rows one-by-one then you can use the Node function "splitByValue" which allows you to insert a context change based on events (your event will be the existence of a new order no. in the input, for this check you can use a simple Java routine). After that you will have individual rows grouped by Order No. Then you need to pass this first output to the second mapping which will do the real mapping/apply business-logic you need to do.
Cheers,
Roberto
No need for BPM.
You can put as many message mapping as you need in an interface mapping (the result of the previous mapping being the source of the following mapping).
To remember values use the <a href="http://help.sap.com/saphelp_nw04/helpdata/en/75/8e0f8f3b0c2e4ea5f8d8f9faa9461a/content.htm">GlobalContainer</a> object in a UDF.
Alex
Use a generic file adapter configuration .Pick up the file and do a java mapping for generation intermediate structure and use message mapping to do one-one.your problem will be solved.
/people/sravya.talanki2/blog/2006/01/10/re-usable-frame-work-in-xi
/people/sravya.talanki2/blog/2005/08/16/configuring-generic-sender-file-cc-adapter
/people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping
3 weblogs will be helpful for u.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.