‎2007 Mar 28 6:49 AM
Hi All,
I have to find nos of literals in a given code.How can i scan through the code and find out actual nos of literals used.
‎2007 Mar 28 6:52 AM
All the literals are put in ' ' single quotes.
If you are using the new abap editor then they are shown in the colour green.
Regards,
Manish
‎2007 Mar 28 6:54 AM
Hi,
declare a variable for that literal
data v_lit(10) type c value 'asgdfdhjkf'.
find the length of that string in which you have tosearch these literals.
v_length = STRLN ( String).
do v_length times.
if string CP(contains patters) or CS (contains String) v_lit.
count the occurances into a variable here.
endif.
enddo.
reward if useful
regards,
Anji
‎2007 Mar 28 7:30 AM
can u elaborate it more.
I have to count all literals in any given code.the length of string will vary.
Is it possible to use Search?