on 07-07-2009 3:55 PM
Hi,
is it possible to count the length of a symbol within a sapscript form itself? I know how to limit it but not sure if you can count how long it is currently?
e.g. 1234567890 = length of 10
I need to know this to allow word wrapping
Regards, Paul
hi, did u try to use STRLEN?? if it is not possible, i think that u have to assign the value of the field symbol to another variable and then use the STRLEN to get the lenght.
for more info about STRLEN type it and then use F1 to check the SAP info.
data: length type i.
length = strlen( variable ).
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
obviously not possible - was aware I could go back to print program but wondered if you could do this in sapscript.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
take the below example and follow as per this and come back for any further Query.
in text editor of script write
/: PERFORM CONTACT IN PROGRAM ZAMOUNT_ZF110_IN_AVIS1_C
/: USING ®UH-ZALDT&
/: CHANGING &DT&
/: ENDPERFORM
<< Unformatable code removed >>
regards,
venkat.
Edited by: Rob Burbank on Jul 8, 2009 8:57 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paul,
Already 3 persons have said use a perform to calculate the length
/: PERFORM function IN PROGRAM program.
I am the 4th. So you know what to do.
There are no standard solution for it in SAP-script.
or you have to do stupid things llike
if &VAR(1)& eq ' '.
if &VAR+1(1)& eq ' '
if &VAR+2(1)& eq ' '
if &VAR+3(1)& eq ' '.
etc.
Gr., Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paul,
you have to call a subroutine in your form then only you can do this way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, it is not possible without calling an abap subroutine.
/: perform <form> in programa <programa>.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not that I know of directly in the form itself, but in the form you could call a routine in a program to calculate the length.
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.