on 12-26-2007 1:31 PM
Hi all,
I have a real time idoc to file scenario with the idoc structure as below:
WP_PLU03
IDOC
Begin
EDI_DC40
E1WPA01
E1WPA02
......
Now as can be seen, EDI_DC40 is the header record common for the eniter idoc. But the segment E1WPA01 will repeat for each item sent from R/3. E1WPA01 in turn has many segments within it whcih corresponds to that one item.
Now the problem i am facing is, I did the mapping for all required fields from E1WPA01 to my file structure and it works fine if i send one 1 instance of E1WPA01. But when i send multiple instance of E1WPA01 for each item, my result in teh file should be 1 line of record for each E1WPA01. But this doesnt happen. It takes allE1WPA01 as 1 and gives only one record in the file.
How can this be overcome? this is a very common requirments? did i miss anything in the configuration?
Thnaks,
Yash
Hello,
You just need to put the parent context in your mapping.
Here you can find the solution :
http://help.sap.com/saphelp_nw70/helpdata/en/42/f7293b2dbe1a71e10000000a422035/frameset.htm
Regards,
Chris
Edited by: Christophe DUMONT on Dec 26, 2007 2:51 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yash !
Check your target data/message type to see if each element has the right occurance defined. You should have a parent element with occurance 0..unbounded for example, with simple elements within to allow the mapping to create one simple element for each occurance of the mapped data.
Regards,
Matias
ps: please award 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 Matias,
Now i am able to get different records in my target file for each item in the source idoc. I mapped the serment E1WPA01 (0...9999) to the Root(0 to unbounded) of my target structure and it worked. Under Root there are no other substructure as its a simple structure unlike idocs.
But now i have a different problem all together. For all fields with simple mapping, the value in each records are coming fine but for those fields (2-3 of them) which has some complex mapping using UDF,node function and some computaion based on multiple occarence of subsegments with E1WPA01 (advanced UDFs using array) what it does is it collects all fields from the source IDOC irrective of E1WPA01, does one computation and puts in the first record. In other records those fileds are left blank. What is desired is it takes all multiple occurance of subsegments within each E1WPA01 and put it accordingly in each record.
I hope you got my problem. if not, please give me you mail id and i will send you the screen shots of the configuration.
Please suggest a solution.
Thanks in adance.
Yash
Hi Yash !
You should be using an advanced UDF that receives and emits the complete queue, that is, receives multiple values and returns multiple values, all in form of string arrays. Then inside your UDFs, you should fill that returning string array accordingly with the requiered values, and next to the udf, you will need to manage contexts with "split by value" or " remove contexts" as you need.
Are you using "ResultList.CC" constant, for example to place a context change between each the returning array elements?
To send screenshots, I recommend you to go to imageshack.us, upload them there and post here the link.
Regards,
Matias.
Edited by: Matias Denker on Dec 26, 2007 11:48 AM
Hi Matias,
I have two instances (may be much more than 2) of the same segment in the idoc (E1WPA01) and each instance should create a new root in the target message structure as in the link below
Link: [http://img299.imageshack.us/my.php?image=image3ct6.png]
I have mapped the segment E1WPA01 with the root like this:
Link: [http://img176.imageshack.us/my.php?image=image2of6.png]
Hence it creates 1 root for each segment. But for complex mappings such as:
Link: [http://img337.imageshack.us/my.php?image=image1yu1.png]
the 2 input parameter to the UDF - KONDART and KONDWERT - the queue can be seen. the problem which i m facing here is in this queue, values from both the instnace of the segment E1WPA01 is taken together where each instance should be processed seperately. The first 4 values in the top queue(till VKP0) belongs to the filed KONDART of the 1st isntance of the segment and the 1st 4 values of the below queue (till 17) belongs to the field KONDWERT. Similarly the remaining belogns to the other segment. My logic in UDF is built taking only one instance at a time. Is there anyway i can distinguish between the two instance within my UDF?
I hope u understand my problem here.
Thanks,
Yash
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.