on 10-08-2012 9:38 AM
Hello Experts,
I have recently developed a Invoice Idoc to CSV file interface.
I have a requirement to redirect the target CSV file to different directory when Inovice amount i.e.. E1EDSO1/SUMME from source IDOC is equal to 0.
Can any one please tell me how to accomplish this without using Dynamic configuration.
Regards
Hi Sridhar,
public String Redirect(String var1, String SUMME Container container) throws StreamTransformationException{
DynamicConfiguration conf = (DynamicConfiguration)container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
int i= Integer.parseInt(SUMID);
if(i== 0)
{
String TDir="Alternate folder path";
conf.put(key, TDir);
}
else
{
String TDir="Regular folder path";
conf.put(key, TDir);
}
return "";
}
Let me know the result.
Regards
Hari.
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 use condition in Interface determination .Then you need to create 2 different CC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sridhar ,
1. One interface determination , with 2 diffrent receivers based one condition either one could be selected .
2. Two different receiver agreement .
(Else )
But you can try to define Variable Substitution for Target Directory/File Name
http://help.sap.com/saphelp_nw73ehp1/helpdata/en/44/6a316af5a23672e10000000a114a6b/content.htm
Hi Sridhar ,
Let me make my self clear; i need to create two CC, two receiver conditions in Interface determination and 2 receiver agreements.
I misinterpreted , In your case it is simple condition hence
1. In Receiver determination ( Type standard )
1. create condition with E1EDSO1/SUMME = O then assign an business component [ For this you need to create and Interface determination and receiver agreement .
2. create another condition with E1EDSO1/SUMME not equals O then assign an business component [ For this you need to create an Interface determination and receiver agreement .
Hence 2 different cc with different directory paths . Hope this clarifies .
But it is better to use dynamic config /Variable substitution .
Please revert in case of any issues ..
you have to refer SCN before posting this kind of Questions( can you please help me with the condition in Receiver Determination ) because no of threads are availble in SCN.
for ex refer : abhishek salvi Blog
Hi ,
As said , there are number of blogs ,
The following blogs image shows how to define .. Just get into the system you can easily define but using given options
http://scn.sap.com/servlet/JiveServlet/showImage/38-50187-60025/ReceiverDetermination.JPG
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.