Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to increase the constant value and extra alpha character for each loop without UDF .

How to increase the constant value and extra alpha character for each loop without UDF .

Example : presently XYZ/MM --- > XYZ/MM

we need to change

XYZ/MA

XYZ/MB

XYZ/MC

XYZ/MD

XYZ/ME

XYZ/MF

or

XYZ/YESL

XYZ/LKSJ

XYZ/JSHL  ( any random unique. )

thanks

Tags:
Former Member
Former Member replied

Hi Finaly we have fixed using UDF

--------------------------------------------------------------------------------------------------------

final String AB = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

Random rnd = new Random();

StringBuffer sb = new StringBuffer(a);

for (int i = 0; i < 4; i++) {

            sb.append(AB.charAt(rnd.nextInt(AB.length())));

        }

        return sb.toString();

------------------------------------------------------------------------------------------------------------

Thanks  for all the support.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question