cancel
Showing results for 
Search instead for 
Did you mean: 

UDF in SAP PI

Former Member
0 Kudos

Hi Experts,

I am writing a UDF for testing purpose which is like this.

int ABAPCount = 0,PICount =0;

for (int i =0;i<Design.lenght;i++)

{

if(design<i>.equals("ABAP"))

ABAPCount++;

else if (Design<i>.equals("PI"))

PICount++;

}

if(ABAPCount !=0)

result.addValue("BS_FILE_RECEIVER");

if(PICount >=0)

result.addValue("BS_FILE_RECEIVER2");

But it is showing error as "cannot resolve symbol symbol : variable design" under if and for statements.

Can anyone please tell me the reason ?

Any kind of suggestion will be appreciated.

Thanks

Rabi

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Rabi,

I guess one of your input to the UDF is as shown below


String Design[]

Then you need to alter your code as shown


int ABAPCount = 0,PICount =0;
for (int i =0;i<Design.length;i++)
{

if(Design.equals("ABAP"))
           ABAPCount++;
else if (Design.equals("PI"))
            PICount++;
}

if(ABAPCount !=0)
result.addValue("BS_FILE_RECEIVER");

if(PICount >=0)
result.addValue("BS_FILE_RECEIVER2");

regards

Anupam

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Only one thing to do..

Replace "design" with 'Design"

Regards,

Manjusha

PriyankaAnagani
Active Contributor
0 Kudos

Hi,

>>>>for (int i =0;i<Design.lenght;i++)

Have you declared parameter name as Design..... and also make sure that it is case sensitive and the length spelling is wrong...you specified it as 'lenght'

Regards

Priyanka

Former Member
0 Kudos

>>cannot resolve symbol symbol : variable design

check ur variable name...i guess it should be "Design"

Former Member
0 Kudos

Hi,

Variable "design" is declared ??

Please, remember that Java is "case sensitive", then write variables in the same key that you're declared them. ( Design -> not design ).