cancel
Showing results for 
Search instead for 
Did you mean: 

Graphical mapping Tool Attributes and methods

former_member189354
Contributor
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

vadimklimov
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

former_member186851
Active Contributor
0 Kudos

Hello Malikarjuna,

FYI...