on 10-20-2010 9:49 AM
Hi Guys
We have a requirement that said:
IF ShortDescription is not u201CNULLu201D then
map ShortDescription
ELSE IF ShortDescriptionLang with LanguageCode u201CENu201D is not NULL
map ShortDescriptionLang
So what I did is:
if( ShortDescription != "NULL")
{
map ShortDescription;
}
else if( (ShortDescriptionLang != "NULL" ) && ( LanguageCode == "EN") )
{
map ShortDescriptionLang;
}
But everytime when pressing f7 to check for errors I get thid:
C:/usr/sap/PI1/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map0b27cd32dc2611df84e7000c2973cb67/source/com/sap/xi/tf/_MM_MATERIAL_TO_CATALOGUE_.java:441: '}' expected
Can someone suggest on how can I test this fucntionality cause one thing that I don't understand is the "map ShortDescription" and "map ShortDescriptionLang"
How do I put it on my if statement
Thanks,
Yonela
Hi,
This can be achieved with graphical mapping. I am not sure why are you using UDF for this.
1. Use If then Else. If Condition - If ShortDescription is not equal to NULL
2. Then Pass ShortDescription to target
3. Else Use Another if condition
4. If condition - ShortDescriptionLang with LanguageCode u201CENu201D is not NULL
5. Then Pass ShortDescriptionLang
If you use If then else in Step 3, then you can pass default value in Else Part.
Hope its clear. Let us know in case of any issues.
Warm Regards,
Gouri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Guys
On my File to Soap Scenario, I have imported EllipseMDataWS.wsdl and the MDM_MATERIAL.sxd, the .SXD is my Source and .WSDL is Target, the WSDL must return a response message.
Now the issue here is when configuring my SOAP Receiver, what must I put on the Target URL, and on the SOAP Action
Thanks,
Yonela
Hi All
On my SOAP to FILE Scenario, I want to map a fields that is on the Target Message like:
Sorce - Target
- CorrelationID
Action - Action
My CorrelationID is a unique ID that is generated in SAP PI against the message.
So How do I map using the UDF cause on my Source I dont have this fields.
On the sxmb_moni -> technical Routing i should see something like this.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:mas="http://za.co.abc/ellipseWS/masterdata/">
<soap:Header/>
<soap:Body>
<mas:MaintainCatalogueItem>
<mas:CorrelationID>C30B7EEF686E4758352E9E54732A6FD7</mas:CorrelationID>
<mas:Action>A</mas:Action>
Thanks
Yonela
Hi All
On my FILE to SOAP Scenario I awant to map a field from my Target to get a Message ID on the moni like in the code below:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","XHeaderName1");
String value = conf.get(key1);
return value;
My is like this:
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters()
.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP","Messageid");
String id = conf.get(key1);
return id;
But the when presing f7 I get error:
C:/usr/sap/#####/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map1fee8942e00c11df9d67000c2973cb67/source/com/sap/xi/tf/_MM_MDM_MATERIAL_TO_CATALOGUE_.java:591: cannot return a value from method whose result type is void return value; ^ 1 error
So is it possible for me to use statement like this:
("http://sap.com/xi/XI/System/SOAP","Messageid");
Thanks
Yonela
You dont required UDF for this requirement,
if you want to use UDF search in sdn how to write UDF and google it for syntax/
use equalS function and if then else function to check logic.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
> if( ShortDescription != "NULL")
This can't work.
> Can someone suggest on how can I test this fucntionality cause one thing that I don't understand is the "map ShortDescription" and "map ShortDescriptionLang"
If you do not understand the requirement of your customer, then ask him.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All
Thanks for replying, so another question ,is there a way that on my if statement after checking I can use the statement
(e.g map field; ) like in the function below.
if( ShortDescription != "NULL")
{
map ShortDescription;
}
else if( (ShortDescriptionLang != "NULL" ) && ( LanguageCode == "EN") )
{
map ShortDescriptionLang;
}
Thanks
Yonela
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.