cancel
Showing results for 
Search instead for 
Did you mean: 

Need to write udf

Former Member
0 Kudos

Hello All.

I have requirement where i will pass PO to RFC and get 4 o/p fields.

i need to check

if field 1 2 and  are blank and 4 is not blank then result is X

else

result = y,

Can anyone help me in writing udf.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member182412
Active Contributor
0 Kudos

Hi Naveen,

For all fields after field use mapWithDefault function before map it to this UDF.

Execution Type: Single Values


public String mapResult(String field1, String field2, String field3, String field4, Container container) {

  if (field1.isEmpty() && field2.isEmpty() && !field4.isEmpty())

  return "X";

  else

  return "Y";

  }

Regards,

Praveen.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks praveen and inaki

issue resolved both solutions are working

Regards

Naveen

former_member192851
Active Participant
0 Kudos

Hi, mark this as answered pls

iaki_vila
Active Contributor
0 Kudos

Hi Naveen,

No UDF is nedeed. Check this example:

Change name, city and employee with your field1, field2 and field4.

Regards

former_member207701
Participant
0 Kudos

This can be achieved using standard function only no need of UDF.