cancel
Showing results for 
Search instead for 
Did you mean: 

purchase order

praveenreddy_bk
Participant
0 Kudos

Example my Purchase order number is like this :

1) KL0000098654------ I need to Convert 10 digit Purchase order

First two Alphabetical Must be there I need to remove two Zerosof left side ( After Alphabetical ) .

2)If the purchase order number begins with the prefixes C, CB, D, F, H, I, K, KK, KN, KY, L, RM, Y, YC and T. The IDOC should not be posted to R3 Back end system.

Is there any Java code for this.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Answers:

Q2)

Source---> if (startswith(Check the condition)) then fail the mapping (else) create the target.

Thanks.

Boopathi

Answers (1)

Answers (1)

former_member193376
Active Contributor
0 Kudos

1) KL0000098654------ I need to Convert 10 digit Purchase order

First two Alphabetical Must be there I need to remove two Zerosof left side ( After Alphabetical ) .

Hi

You write a UDF

input our idoc no

String a = String.valueOf(idoc_no);

String b,c,len, result;

len = idoc_no.length;

if (a != "")

{

b = a.substring(0,1); // am storing your first 2 char

c = a.substring(4,len); // am ignoring the 2 zeros and storing the no after the zero

result = b + c; // concatinating the first 2 char and remaining no without the 2 zero

return result

}

Hope this will help you.

Thanks

Saiyog

Edited by: Saiyog Gonsalves on Jul 11, 2008 7:40 AM

praveenreddy_bk
Participant
0 Kudos

I need java code which must satisfy the both the conditions.