on 09-17-2007 3:06 PM
Hi everyone,
I'm looking for some wisdom on this mapping problem;
Source Message
row 0...unbounded
Refidx 0..1
prodid 0..1
date 0..1
field3 0..1
The REFIDX field identify the nature of the record;
- header
- detail
- summary
Therefore on the source xml message I will get a record for the header, a record for the detail and a record for the summary for each materials.
The Target Message is an IDOC
IDOX 0..unbounded
EDI_DC40 1...1
POSDW_-E1POSTR_CREATEMULTIP 0..1
POSDW-EBPTRANSACTION 0..9999999999
POSDW-EBPRETAILLINEITEM 0..9999999999
Base on the source message I want to create only one IDOC (target) and for each details from the source I want to send it to POSDW-EBPRETAILLINEITEM !
I've tried node functions to collapseContexts and to no avail!
Could you please help?
Thank you very much!
Hi Shubhankar,
Thank you for your solution! It worked!
<b>ProductId</b> -
>[SplitByValue]-->[RemoveContext]--> <b>IDOC</b>
But I'm having a hard time getting consistent occurrences for the underneath segments.
I do not have any problems with the target segment POSDW_E1POSTR_CREATEMULTIP 0..1
but the ones beneath this one like this;
<b>ProductId</b> -
> <b>EBPRETAILLINEITEM</b> 0...999999999
Therefore I'm expecting that for each ProductId where the record starts with the PREFIDX = DTL, there should be one occurence of EBPRETAILLINEITEM!
And I'm only getting one occurences when for one productid repeats itself every PREFIDX = DTL!
Do you have any solution on this one???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raj,
I'm sorry for the sample, Yes the Record3 should be read as follow;
Record3
-
REFIDX:SUM
ProdcutId: ABCD
Date : 2007/04/13
Taxes : 1.00
Total: 50.50
And yes the root node of the source is unbounded!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Emmanuel,
I was tring the almost the same thing. See the below link.
If your ProdcutId is coming in Sequence then you can use below rule:
ProdcutId [Change Context to higher node]---SplitByValue[Value Changed]---CollapseContext---Idoc
and if you want to populate ProdcutId under some field then use
ProdcutId [Change Context to higher node]---SplitByValue[Value Changed]---SplitByValue[EachValue]----Output_ProdcutId
If your ProdcutId is not coming in sequence then you have to write to UDF to return the unique value.
Please try and give your feedback.
Thanks
Shubhankar
Hi Raj,
I like we people ask questions to get a better understanding on problems!
To anwser you question, YES! You put your finger on the problem!
How would you suggest to map this solution?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Raj,
I want to create as many IDOC as the occurrence of a product ID that includes it's header record, detail record & summary record!
Example
Record1:
-
REFIDX: HDR
ProdcutId: ABCD
Date : 2007/04/13
Record2:
-
REFIDX: DTL
ProdcutId: ABCD
Date : 2007/04/13
quantity : 10
price: 5.00
Record3
-
REFIDX:SUM
ProdcutId: ABCD
Date : 2007/04/13
ProdcutId: ABCD
Date : 2007/04/13
Taxes : 1.00
Total: 50.50
Now I want one IDOC that has Product ID ABCD with it's underline segments!
How would I be able to achieve this?
Thank you in advance for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Emmanuel,
Please never mind that I'm asking these many questions. So it will be easier for us to suggest the solution.
From the source you can have more than one Product ID right? So each Product ID has its own header , detail and summary. Finally your IDOC must be unbounded based on the source. I mean if I have two Product[Header,detail,Summary] you need to create two IDOC's correct?
raj.
Hi There, as anyone have an answer on the following?
I want to create an IDOC for each occurrence of an product id record.
My source XML is as follow;
Row 0...Unbounded
REFIDX 0...1
ProductId 0..1
date 0..1
quantity 0..1
price 0...1
total 0...1
taxes 0...1
And the target:
IDOC 0..unbounded
EDI_DC40 1...1
POSDW_-E1POSTR_CREATEMULTIP 0..1
POSDW-EBPTRANSACTION 0..9999999999
POSDW-EBPRETAILLINEITEM 0..9999999999
Therefore I'm looking for one occurrence of an IDOC for each productid that are in the records.
I've tried to following to no avail;
ProductId -
> SplitbyValue -
> IDOC
Please I will really appreciate any help on that!
Thank you very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Prabhu, I'm very sorry but I don't understand the concept of IDOC bundeling???
The IDOC is 0...Unbounded and the Source message where I'm trying to do is to get for each ProductID, I want to create one IDOC eventhough that in my source message I'm getting for each product ID at least three records that represents an Header, Detail & Summary.
I've tried the splitbyvalue and to no success!!!
Could you tell me on how would the IDOC bundeling concept play a role in this solution?
Thanks you very much for your indulgence & help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Prabhu,
Do you mean the following;
REFIDX -
> SplitbyValue -
> IDOC ????
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
did u check by setting the context of Refidx to its parent and using the nodes functions like splitbyvalue etc i hope this could be done
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.