on 03-28-2012 7:21 AM
Hi All,
I have been struggling to get a solution for this problem. Please help.
--> I have an IDOC to Flat file scenario. The flat file structure is mentioned below. The header and trailer come only once per file. The item segment repeats based on a few conditions. The catch is I am unable to generate a record number at every line. The record number has to be continous from the header to the last item. The first field of every line in the flat file is he record number.
--> Also the firlst field of the Trailer record is the Record Count, i.e. The total number of records in that flat file. Please help.
header - record number , ************* , ************
item1 - record number , ************* , ************
item2 - record number , ************* , ************
item n - record number , ************* , ************
Trailer- record Count , ************* , ************
Did you try using Global variable and increment it each time you create target node in a UDF.
-Amol
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had written a wiki on this some time back - http://wiki.sdn.sap.com/wiki/display/XI/Count+of+Records+-+%27Count+on+the+easiest+way+through%27
let me know if that helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shabarish,
I have to count all the records in the target structure. There are some nodes which may or may not get generated depending on a few conditions.
So in a particular flat file if I have 1 header and 4 items and 1 trailer then the Flat file should look like this:
0001******************** (header)
0002******************** (item)
0003******************* (item)
0004******************* (item)
0005******************* (item)
0005****************** (trailer) -- here the trailer denotes total number of records in the file except the trailer.
Hi Gopal
I have a scenario IDOC to File
requirement is :
in Idoc one line item repeats multiple times then thous many xml files has to be generate in receiver location.
Ex: line item 5 times repeated 5 xml files in one location.
the above one is my structure
if ZRDSPICK to repeats 5 times 5 xml files
but i am getting 5 messages in one file but required 5 different files
In mapping i kept occurrence 0-UB
signature occurrence 0-UB
ICO occurrence 0-UB still same prob
can please help
Hi
In mapping you change context to whole idoc, and use function
BR
Maciej
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try this - the source msg should have line items to correspond to your target item structure. take the name of the line item segment and do a collapseContext followed by index function , then add 1 to it for header.
in case of header, map it to constant 1.
in case of trailer, above logic of item and instead of adding 1 add 2 to get the total record count.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.