on 2009 Apr 30 8:10 AM
Hi All,
Multiple ARTMAS05 IDOCs sent from SAP to PI and to be sent to a flat file (All idocs data in one flat file) (EHP1 for PI 7.0 is applied)
output should be 3 target nodes
but I am getting 4 target nodes as there are 4 plants
I mapped like this PLANT collapse contexts Fixvalues(MM31 or MM32 = true) EQUALS Constant(true)
If
Then
IDOC.
e.g-->
Source
ARTMAS05
IDOC
E1BPE1MARCRT (0u2026..Unbounded)
PLANT = MM31
E1BPE1MARCRT
PLANT = MM32
E1BPE1MARCRT
PLANT = MM35
E1BPE1MARCRT
PLANT = MM38
IDOC
E1BPE1MARCRT (0u2026..Unbounded)
PLANT = MM30
E1BPE1MARCRT
PLANT = MM39
E1BPE1MARCRT
PLANT = MM40
E1BPE1MARCRT
PLANT = MM42
IDOC
E1BPE1MARCRT (0u2026..Unbounded)
PLANT = MM21
E1BPE1MARCRT
PLANT = MM31
E1BPE1MARCRT
PLANT = MM32
E1BPE1MARCRT
PLANT = MM38
Source
E1BPE1MARCRT (0u2026..Unbounded)
Target
node (not field) say FDETAIL (0u2026Unbounded)
Please help me how to correct it.
For Each IDOC just check the Plant (MM31 & MM32), If any one of it is found then one IDOC for the target node should be created.
But my case I am getting the target node for each occurrence of the plant which I should notu2026
Please Suggest meu2026
Regars
Sridhar
Hi the problem is solved,
I have used UDF and applied the following code, by passing the input1 as plant (count (context IDOC)), and plant vlaue (context IDOC)....
String strVal="false";
int j = Integer.parseInt(a[0]);
for (int number = 0; number < j; number++)
{
if ( plant[number].equals("MM31") || plant[number].equals("MM32") )
{
strVal="true";
break;
}
}
result.addValue(strVal);
Thanks and Regards,
sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sridhar,
U are getting 4 'PLANTS' . Based upon four PLANTS u need to update the two PLANTS( When trigger (MM31 or MM32).
As my suggestion u need to maintain the CONDITION in CONDITION EDITOR in Receiver Determination.
IF PLANT = MM31 it trigger to receiver.
IF PLANT = MM32 it trigger to same receiver.
Regards,
Sateesh N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I thought you expecting two nodes in the target for each MM31 and MM32.
Use below one.
PLANT(Change the context to IDOC)Fixvalues(MM31 or MM32 = true)EQUALS--Constant(true) sortcollapsecontextcreateIfTarget.
in Sort function you should select--type of comparision:Case Insensitive
Order: descending
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.
Hi,
Use the following UDF type Value.
String strVal="false";
if(a.equals("MM31") || a.equals("MM32"){
strVal="true";
}
return strVal;
and use this UDF in the follwoing mapping
plant->UDF->removecontext->IF(true) Then IDOC(source) -> IDOC(target)
Regards,
Prasanna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
You need to write a UDF as you have many plants in one IDOC.
Write an UDF to check the all the plats in an IDOC and at the first occurence of MM31 or MM31 return TRUE.
And do the mapping as follow:
Plant (Context to IDOC)-> UDF(Select context) to check the plant and return true/false-> CreateIF-> Target node.
Regards,
Shweta.
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 do like this in mapping
For each idoc just check
plant equals to M31
OR>IF>Then mapPlant->createif>target
plant equals to M32
Regards,
Chandra.
Edited by: Chandra on Apr 30, 2009 10:25 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Map like below.
PLANTFixvalues(MM31 or MM32 = true)EQUALSRemovecontextCreateif--target
Constant(true)----
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.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
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.