Skip to Content

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

About replace stmt

Hi,

I have a string say 'C100C110C120*( 100-C130 )', in which c100,c110,c120... are different batch characteristics.

String and Batch characteristics may vary from batch to batch.

what i need to do is to replace these c100,c110 etc..with some values related to them .

ie: c100 with 500, c110 with 250, etc...

One way to do it is by using find and replace statements,

like

FIND 'C100' IN str.

if sy-subrc = 0.

REPLACE ALL OCCURRENCES OF REGEX 'C100' IN STR WITH '500'.

write str.

endif.

But there may be number of characteristics....and i need to repeat the above procedure n times for n number of batches.

so is there any alternative to do it???

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question