on 01-27-2016 1:15 PM
Hi, Can anybody help me to understand the use of SAP PI GMT tool Attributes and methods section? I develop couple of methods in Attributes and methods section with return types boolean, void ... when I am calling these from UDF's then system throws method not found exception. I feel coding java using IDE's will be more comfort then debugging this....
Thank you,
Mallikarjuna Rao Malisetti
Hi Mallikarjuna,
Attributes and Methods section is used if you would like to introduce some members (attributes or methods) that can be re-used in user defined functions within that message mapping.
Let's take a simple example. I introduced two instance members - one constant "DELIMITER" and one method addPrefix() (which uses this constant) in "Attributes and Methods" section:
Next, I make use of this method within the developed UDF named "adoptValue":
After this is done, I use UDF in mapping rule for one of target fields:
When testing this message mapping, the target field is populated with expected result following logic implemented in the method addPrefix(), which has been called from UDF "adoptValue":
And finally here is an outlook at generated source code of mapping custom section - elements introduced in the section "Attributes and Methods" become corresponding message mapping class members and are highlighted:
Regards,
Vadim
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.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.