on 06-14-2006 9:30 AM
Dear all,
I have a file to idoc scenario. my xml structure which gets mapped to idoc looks like :
<?xml version="1.0" encoding="UTF-8"?>
<ns0:INBOUND_SALEDATA_MT xmlns:ns0="https://sapretail-pos.com/saledata">
<PU01>
<StoreCode>C3021</StoreCode>
<Date>20060613</Date>
<PU02>
<Material>2050000017216</Material>
<QTY>1</QTY>
<VALUE>100</VALUE>
<PU03>
<Kondition>POS1</POS_Kondition>
<Kondition_Value>100</POS_Kondition_Value>
</PU03>
<PU03>
<Kondition>POS2</POS_Kondition>
<Kondition_Value>100</POS_Kondition_Value>
</PU03>
<PU04>
<BATCH>abcd</BATCH>
</PU04>
</PU02>
</PU01>
</ns0:INBOUND_SALEDATA_MT>
PU01 is my header segment.
PU02 is under PU01 which can occur multiple times depending on number of articles
PU03 and PU04 is under PU02 and PU03 can occur at a maximum of 5 times and it may or may not be there
Kindly suggest how should my text file looks like,,and the parameters to pass in file content conversion
reg
sorabh
hi satish,
thnx for the reply.
i'll repeat the structure again for my text file
<pu01>
store_code (mapped to partner number in we20)
date (mapped to date of parent segment in idoc)
<pu02>
matnr (mapped to material in first subsegment.)
<pu03>
condition (mapped to condition in subsegment of
1st segment can occur 5 times)
<\pu03>
<pu04>
batch (mapped to extended segment. pu03 and
pu04 are at same level)
<\pu04>
</pu02>
<pu01>
now tell em how can i have my text file and the mapping.
this is a very urgent requirement for me
reg
sorabh
sorabh.aggarwal@gmail.com
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorabh
You take your file structure like this:
INBOUND_SALEDATA_MT(Lets say this is message type)
DT_SALES(your data type and it should be 1..unbounded)
and under this you take all the fields as flat and they should be 1..1 like
StoreCode(1..1)
Date(1..1)
Material(1..1)
QTY(1..1)
VALUE(1..1)
Kondition(1..1)
Kondition_Value(1..1)
and in mapping you do like this:
you map the lower most structure say (pu04) to Remove context(in node function) and this to DT_Sales so that depending upon the numbre of times it comes the loop keeps repeating. Also you use OneAsMany for all the fields except those in PU04. While using this node function you keep the context to the lowest level in your case it is PU04.
So in the communication channel you give Recordset Structure as DT_SALES and in content conversion parameters if you are expecting .csv file then you can specify DT_SALES.fieldSeparator as ',' and if you are expecting the fixed length then DT_SALES.fieldFixedLengths.
If you still find any problem let me know your mail id I will let you know how exactly you have to do.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sorabh,
Create a flat structure like achieve your requirement throu the node functions this will work don't have like header item level in your data type ..
use ONEASMANY, Removecontext functions.
thankx,
Shree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys,
i get a mapping exception in sxmb_moni as Xi is not able to take nested segment.
The structure is like <pu01> occurence 1..1
<pu02> occurence (1..unbounded)
<pu03> occurence (0...5)
<\pu03>
<\pu04> occurence (0..1)
<\pu04>
<\pu02>
<\pu01>
i am unable to get this kind of structure from text file.
my text file looks like
1#C3021#20060612
2#A125655#100#17
3#POS1#447.647059
4#abcd
2#A125655#178#1874
3#POS1#46
3#POS2#46
4#abcd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sorabh,
Go thru this link,
http://help.sap.com/saphelp_nw04/helpdata/en/0f/80243b4a66ae0ce10000000a11402f/frameset.htm
Thanks,
Yaseen M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can have text file as follows.
PU01,StoreCode,Date
PU02,Material,Qty,Value
PU03,KOndition1,....
PU04,Batch,....
PU02,....
PU03,....
PU03,....
The content conversion record structure will be
PU01,1,PU02,,PU03,,PU04....
You will specify key field value, field names, end separator and field separator for each of the segments PU01, PU02, PU03 and PU04.
Thanks,
Prateek
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 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.