on 2017 Nov 22 6:55 PM
Hi Gurus,
I have to design a simple FILE to proxy interface.
The file has a header with field names, and everything is separated by comma.
This is the way the file is coming:
A,B,C
1, name1, id
1, name2, id
1, name3, id
So header is A,B,C and rest are the values that need to be maped (rows).
This is easy to do with FCC, but there are some cases like this:
A,B,C
1, name1, id
2, name2, id, name3, id
1, name4, id
3, name5, id, name6, id, name7, id
1, name8, id
As you can see, the first number tells the quantity of repetitive columns B and C and I need this information to be in my structure.
Is anyone able to let me know if there is a way to catch all the data of the .csv with File Content Convertion?
I hope I was clear, otherwise just let me know.
Thanks!!!!
can you translate this flat file into expected xml?
A,B,C
1, name1, id
2, name2, id, name3, id
1, name4, id
3, name5, id, name6, id, name7, id
1, name8, id
what are the max no of occurrence of names and id in one row? 3 times is the max?
3, name5, id, name6, id, name7, id
Regards,
Muni
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you know the count, then you can put field names to capture in FCC, when values are present, it will get populated,when values are not there then it won't appear in the xml. you can control this using NameA.missingLastFields and NameA.additionalLastFields
https://help.sap.com/saphelp_nw73/helpdata/en/44/682bcd7f2a6d12e10000000a1553f6/frameset.htm
else read the file by line by line, in the mapping format the message using udf.
you can convert whole input into input xml like below
<Record>
<line>A,B,C</line>
<line>1, name1, id</line>
<line>2, name2, id, name3, id</line>
<line>1, name4, id</line>
<line>3, name5, id, name6, id, name7, id</line>
<line>1, name8, id</line>
</Record>
https://blogs.sap.com/2005/08/16/configuring-generic-sender-file-cc-adapter/
Regards,
Muni
User | Count |
---|---|
69 | |
9 | |
8 | |
7 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.