on 04-15-2010 8:56 AM
Hello,
I have to map a xml file to the IDOC SALESORDER_CREATEFROMDAT2.SALESORDER_CREATEFROMDAT202.
How I can map the the longtext from the XML file to the IDOC struktur.
Part of the XML file, there could be n times BPosition with n times longtext. The longtext must be map with a table. I some case its a mapping from nested to mornal table.
<BPosition>
<lpos>1</lpos>
<bbl_sap_nr/>
<milvonr/>
<kurztitel/>
<anzbest/>
<anzliefer/>
<kostenpflichtig/>
<longtext>
<line>pos1 zeile1</line>
<line>pos1 zeile 2</line>
</longtext>
</BPosition>
thanks for your help.
there could be n times BPosition
Do you wnat to have multiple (n) IDOCS for n BPositions? If yes then you can follow the method called IDOC Bundling. If no, then may be some more details about the requirement will be required.
with n times longtext. The longtext must be map with a table
The target field (in the IDOC) should also be repeating and then it will be a direct mapping between the source and target nodes with proper Context Handling.
I some case its a mapping from nested to mornal table.
Does it mean that you may have only one occurence of BPosition and/ or LongText? I dont think any other change is required for this....however if there will be a field (based on whose value) the target needs to be generated , the the same has to be implemented in the maping.
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I have to map this 1 XML to 1 IDOC
XML:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Milver xmlns:ns0="http://ccssap.bfi.admin.ch/milver">
<bestellung>
<besteller>
<bestellnr/>
<auftragdefit/>
<wempfdebit/>
<bestelldat/>
<lieferdat/>
<anzpos/>
<language/>
<adrzeile1/>
<adrzeile2/>
<adrzeile3/>
<adrzeile4/>
</besteller>
<Kopf>
<Lkopf>Kopf1 zeile1</Lkopf>
<Lkopf>Kopf1 zeile2</Lkopf>
</Kopf>
<BPosition>
<lpos>1</lpos>
<matnr/>
<milvonr/>
<kurztitel/>
<anzbest/>
<anzliefer/>
<kostenpflichtig/>
<bemerkung>
<line>pos1 zeile1</line>
<line>pos1 zeile 2</line>
</bemerkung>
</BPosition>
<BPosition>
<lpos>2</lpos>
<matnr/>
<milvonr/>
<kurztitel/>
<anzbest/>
<anzliefer/>
<kostenpflichtig/>
<bemerkung>
<line>pos2 zeile1</line>
<line>pos2 zeile 2</line>
</bemerkung>
</BPosition>
</bestellung>
</ns0:MT_Milver>
IDOC:
The Idoc have a segment for the longtext (table).I have to map, lpos, line into E1BPSDTEXT from SALESORDER_CREATEFROMDAT2. Its now more clear?
> Thank you very much! But I have to change the order like this?
> 1. lpos 2. line 3. line - useOneAsMany - > splitByValue(each value) -> ITM_NUMBER
You can do this also. The result should be the same
> And its possible to do this only if line isnt an empty string?
In that case do this:
1. line 2. contant("") -> EqualS -> not -> createIf -> removeContexts - E1BPSDTEXT
My function:
1. lpos 2. line 3. line - splitByValue(each value) -> useOneAsMany - > ITM_NUMBER
Problem with useOneAsMany funktion Error:
To Many Value in the first queue in the function usaOneAsMany- it must be the same number of context in both queue.
lpos is the position number and line the position text, now the position text is not obligatoy, so the <attribut> line don't exist in the xml.this causes the error, its possible to put a default empty line or how i can handel this error.
thanks
Edited by: Ofer Fritz on Jul 26, 2010 10:13 AM
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 | |
7 | |
7 | |
6 | |
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.