on 01-08-2010 2:10 PM
Hi Experts,
When the Purchase_order_type is coming like HIGH,REGULAR,NEW,BOUNCED. In this case i need to generate 2 idoc, based on HIGH is one and Other than HIGH is one, even though if it's REGULAR,NEW,BOUNCED.
I can't generate. pl suggest
rgds
selvam
Hi,
Try to apply the below logic..
Purchase_order_typeremovecontextfixvaluesSplitbyValue(ValueChange)collapsecontext--Target
FixValue:
REGULAR -
> C
NEW -
> C
BOUNCED -
> C
Regards,
Prakasu.M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
i already mentioned. I got 4 idoc when 4 different Purchase_order_type,it's working fine. Here the problem is i need only 2 idoc based on Purchase_order_type=HIGH for one. Remaining 3 category of Purchase_order_type i want only one idoc.
Here already set occurrence for unbounded. please suggest.
rgds
selvam
Well then in this case best solution could be just duplicating the IDOC in mapping. And in this case can use the std IDOC rather using the external definition.
Right click on the IDOC select "Duplicate Subtree", by this way there will be two IDOCs.
Now on first IDOC use condition if Purchase_order_type=HIGH then create the IDOC.
Similarly put conditions on second IDOC and check if Purchase_order_type NE HIGH then create the second IDOC.
And do rest of the mappings in each IDOC as per your need.
Regards,
Sarvesh
Hi Sarvesh,
Thanks for ur reply...
When Purchase_order_type=HIGH there is no problem. But Purchase_order_type NOTEQ to HIGH it's creating 3 idoc.
Bcoz i have 3 different category like Regular,New and Bounced. For this case also i want only one idoc, under i have to repeat the line items. Line item repeating i don't have problem.
Other than HIGH i need to make a group then i'll get single idoc... how can i do?
please suggest...
rgds
selvam
If you are using duplicate substring method, as I mentioned my previous reply then on second IDOC put conditions with simple "ifWithoutElse" and check PO type not equal to HING then map a constant 1 to IDOC segment, so that every time it generate only single IDOC (second IDOC).
IF----> Purchase_order_type NOTEQ to HIGH---> THEN--->(Constant "1")---->Second IDOC
>
if purchase_order_type--->equal to HIGH--->then--->purchase_order_type---->idoc1
In above mapping also just use constant 1 instead of using purchase order type e.g.
if purchase_order_type->equal to HIGH->then->constant 1-->idoc1
Mapping for second IDOC looks ok.
Just correct the mapping for IDOC 1 and it will work.
Hi,
sender Database input like this:
cq_no Purchase_order_type Line_no
1 High 1
1 High 2
1 New 3
1 Bounced 4
1 Regular 5
2 High 1
2 New 2
3 High 1
3 Bounced 2
in this case based on cq_no category if the purchase_order_type is equal to High for one idoc, and not equal to High for one idoc.In this same case purchase_order_type get repeated with different line_no,so for that time line itms should get repeated under the same idoc based on line_no.As well as non-High category all details comes under single idoc.
when cq_no is changed again the same above conditions should applied...
now i got two idoc's but line item's are not getting repeated properly...even am bit confused how to apply the logic with cq_no...
pl suggest...
rgds
selvam
Hi Sarvesh,
my expected output like this:
cq_no purchase_order_type line_no output(idoc)
1 HIGH 1 ||
1 HIGH 2 || 1st idoc with two line items
1 New 3 ||
1 Bounced 4 || 2nd idoc with three line items
1 Regular 5 ||
2 HIGH 1 || 3rd idoc
2 New 2 || 4th idoc
3 HIGH 1 || 5th idoc
3 Bounced 2 || 6th idoc
please suggest....
rgds
selvam
Hi,
Please make sure you will sort the data in your select query.
Now, you need to have two idocs in mapping. Click on Duplicate Subtree to have second IDOC. Now lets assume, your first IDOC represents mapping when ORDER TYPE is HIGH and your second IDOC represents mapping when your ORDER TYPE is not equal to HIGH that is NEW, BOUNCED, REGULAR etc.
I have defined Source and Target data type as follows.
Source Data Type:
SDN
<Row>
<CQ_NO/>
<ORDER_TYPE/>
<LINE_NO/>
</Row>
Target Data Type:
SDNTarget
<IDOC>
<Node>
<CQ_NO/>
<ORDER_TYPE/>
<ItemNode>
<LINENO/>
</ItemNode>
</Node>
</IDOC>
Mapping for IDOC 1:
IDOC:
Order Type -->Fix Values --> remove context
Fix Values (This should have default u201Cfalseu201D and HIGH = true)
Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
Output of point 3 --> Split by value (value changed) -->collapse context
Output of point 4 will be first input to u201CStart withu201D function and second input will be constant u201Ctrueu201D
Output of Point 5 --> create if --> IDOC
Node:
Map with constant
CQ_NO:
Order Type --> Fix Values --> remove context
Fix Values (This should have default u201Cfalseu201D and HIGH = true)
Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
Output of point 3 --> Split by value (value changed)
User Format By example. Pass CQ_NO (Context of CQ_NO should be at Row) as first input and second input should be output of point 4.
Pass Output of format by example that is point no 5, to collapse context --> Split by value (Each Value) --> CQ_NO
ORDER_TYPE
Order Type --> Fix Values --> remove context
Fix Values (This should have default u201Cfalseu201D and HIGH = true)
Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
Output of point 3 --> Split by value (value changed)
User Format By example. Pass ORDER_TYPE (Context of CQ_NO should be at Row) as first input and second input should be output of point 4.
Item Node:
Order Type --> Fix Values --> remove context
Fix Values (This should have default u201Cfalseu201D and HIGH = true)
Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
Output of point 3 --> Split by value (value changed)
Output of point 4 will be first input to u201CStart withu201D function and second input will be constant u201Ctrueu201D
Output of Point 5 --> create if --> IDOC
Node:
Order Type --> Fix Values --> remove context
Fix Values (This should have default u201Ctrueu201D and HIGH = false)
Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
Output of point 3 --> Split by value (value changed)
Output of point 4 will be first input to u201CStart withu201D function and second input will be constant u201Ctrueu201D
Output of Point 5 --> create if --> Node
CQ_NO:
Order Type --> Fix Values --> remove context
Fix Values (This should have default u201Ctrueu201D and HIGH = false)
Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
Output of point 3 --> Split by value (value changed)
User Format By example. Pass CQ_NO (Context of CQ_NO should be at Row) as first input and second input should be output of point 4.
Pass Output of format by example that is point no 5 --> Split by value (Each Value) --> CQ_NO
ORDER_TYPE
Order Type --> Fix Values --> remove context
Fix Values (This should have default u201Ctrueu201D and HIGH = false)
Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
Output of point 3 --> Split by value (value changed)
User Format By example. Pass ORDER_TYPE (Context of CQ_NO should be at Row) as first input and second input should be output of point 4.
Pass Output of format by example that is point no 5 --> Split by value (Each Value) -> ORDER_TYPE
Item Node
Map with constant
LINE_NO:
Order Type --> Fix Values --> remove context
Fix Values (This should have default u201Ctrueu201D and HIGH = false)
Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
Output of point 3 --> Split by value (value changed)
Output of point 4 will be first input to u201CStart withu201D function and second input will be constant u201Ctrueu201D
Output of point 5 --> Split by value (each value)
Output of point 6 should be passed to if condition of u201CIf without elseu201D and in then pass LINE_NO with context Row
Output of Point 7 --> Split by value (Each Value) --> Line No.
This will give desired output.
Let me know if you need screen shots.
Warm Regards,
Gouri
In first IDOC:
Line No:
Ordertype--> Fix Values --> remove context
Fix Values (This should have default u201Ctrueu201D and HIGH = false)
Concatenate Output of point 1 with CQ_NO (Context of CQ_NO should be at SDN)
Output of point 3 --> Split by value (value changed)
User Format By example. Pass Line_no (Context of Line_NO should be at Row) as first input and second input should be output of point 4.
Pass Output of format by example that is point no 5 collapse context --> Split by value (Each Value) --> LINE_NO
Hi.
How did you map the IDOC?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.