cancel
Showing results for 
Search instead for 
Did you mean: 

SAP script command for finding string length

Former Member
0 Kudos

Hi ,

Can anyone please let me know what is the equivalent command to strlen() in sap script editor. I need to find the string length of a symbol in sap script editor itself without writing the logic in print program or by calling any includes in the sap script editor.

Regards,

Deepthi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can use the character ' * ' to specify the length of a program variable whose string lenght is to be taken. The value of the symbol is then printed using the output length defined in the ABAP Dictionary.

eg, &var(*)&

(This will write the total lenght specified in the output lenght in Dictionary.Otherwise there is no syntax as strlen() in Script )

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Deepthi,

As an alternative, you can use the perform statement in SAPscript so that it will execute a subroutine you implemented in another report.In the subroutine, you can do everything you want.

Have a look at this link to find out how exactly.

http://help.sap.com/saphelp_40b/helpdata/en/d1/803279454211d189710000e8322d00/content.htm

Best regards,

George