on 06-16-2008 8:25 AM
Hi, I'm using SAP BC 4.7. I try to convert XML-File into an own Idoc.
The structure of XML-File is: one Header and N positions.
I've a problem to map the position recordlist from XML-File to the idoc.
In a LOOP-Step I map the positions in a recordlist, but in the Recordlist there is only the last record.
The flow looks the follwing:
map (Routing Rule Flow. Add your changes after this node.)
ftp
bytesToString
StringToDocument
documentToRecord
Map
BRANCH
Map
LOOP with two Map-Steps
Map
TransformHierarchyToFlat
Transport Service: OutboundProcess (Don't change the label(or name) of this node)
I tried to use out-array in the LOOP-Step, but it's created an Objectlist and I could not converted it to the Idoc.
Also I tried to use without out-array in the Loop-Step, but there ist only the last record in recordlist.
What can I do?
Thanks in advanced.
Frank
Hi,
I didn't understand this flow as you are using your logic. I just understand that you want to map the xml records to some IDoc which you are receiving using the routing rules you defiened in Administrator console.
Thats why your first step is that map and you are getting the thing there.
My concern is that, when you are looping over the xml records are you adding the values correctly to the resulting IDoc. I mean to say is that when you are mapping values from xml Record to IDoc , Is the values adding or its just over writing. Check this out will solve your problem
I guess its over writiing\.
Regards
Aashish Sinha
PS ; reward points if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aashish Sinha,
thank you for fast answering
sorry, that I am not clearly expressed.
I want to convert a XML-File into a Idoc structure an send it to SAP system.
I receive the XML-File by FTP. I tried some things and the way I wrote works.
I map the the position records into a recordlist reference. Then I loop over this recordlist an map all entries into a Idoc recordlist reference. This Idoc recordlist includes only the position part. After this I map these recordlist into the really Idoc structure.
How can I add the values correctly into the Idoc? I only map it.
If there is a easier way to map XML to Idoc, pls. let me know.
I'm just learning.
Thanks.
Frank
Hi,
>>I'm just learning
:).. Its relief now. ha ha.
OK. getting file from a SAP BC is ok, you used FTP and then you getting the xml file.
Now convert this xmlString to Document and try writing the whole document to your resulting structure as document and then convert it from document to recordlist and then append it to your empty IDoc structure.
The thing is that, you can directly use xmlString to make a documentlist. That is 2 step work. then loop over that document list and then write it to another or use this document list to convert to IDoc recordlist directly. I hope there must be some componets and then map to IDoc.
Hope this will help you.
Regards
Aashish Sinha
PS ; reward points if helpful
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.