on 02-11-2013 10:37 AM
Dear experts,
I am integrating SAP ECC to SAP TM where i have downloaded standard content in which one input file has multiple stage and one IDOC is getting triggered
but client wants that for each stage there should be one IDOC triggered and corresponding stage should come in that.
I have changed IDOC occurance and imported XSD
Now i am able to generate multiple IDOC only additional party field is not getting generated properly
My mapping is as below: 2 values 5 and 6 are coming based on that WE and LF should get pass and it should create 2 nodes on receiver side
till the node If without else values are flowing properly but if i see the queue for remove context this shows only one value WE 3 times.
This WE is coming 3 times because i have 3 stages in incoming field so 3 IDOC will get generated
Here value should come as WE 3 times and LF 3 times.
Please suggest me what should i change in this mapping...
Thanks
Sandeep Sharma
Hi,
It is the default behavior of "if" function.Nothing wrong in it.
Replace with small udf.
Regards
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Replace ifwithoutelse std fn with below udf.pass TStage and RCode values by removing the context as inputs.
Use the below sample udf .Change the below code if you require.
public void Test( String[] TStage, String[] RCode,ResultList result, Container container) throws StreamTransformationException{
int counter= RCode.length;
int count = TStage.length;
for(int i =0;i<count;i++)
{
for(int j=0;j<counter;j++)
{
result.addValue(RCode[j]);
}
result.addValue(ResultList.CC);
}
O/P:
WE
LF
---
WE
LF
---
WE
LF
Regards
Venkat
Hi Sharama,
there might be a issue with context, check the context for "transportation stage" because you are using splitbyvalue for rolecode then you are using if-else condition so please check the context for that and also paste the full mapping screenshot below if-else also.
Regards
Gagan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi I tried the logic but not working
My requirement is there may come no of Transportaion stages in in the sender payload . Based on those stages no of Idocs should get triggered . Say for ex here in this payload 3 Transportaion stages
i am able to create 3 idocs based on Transporatation stage. Inside each stage E1ADRM4 node should be there.That i am able to do
Now there is extension to this requirement:\
There is another field additional party is coming. Based on occurrence of additional party, inside each IDoc those many no of nodes E1ADRM4 should be created .
Here in my case inside 3 idocs: since i have 2 additional parties coming in sender payload so in each payload 2 E1ADRM4 node should get created.
This additional party is mapped to subnode of E1ADRM4 node
Please suggest how to go
User | Count |
---|---|
87 | |
10 | |
9 | |
9 | |
9 | |
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.