cancel
Showing results for 
Search instead for 
Did you mean: 

SAPscript symbol: Defining a dynamic output length instead a static one

Jarmo_Tuominen
Participant
0 Kudos

Hi,

In SAPscript you can use an output length specification to define how many bytes of the value should be printed. Syntax:

&symbol(length)&

Example:

<symbol> has the value 123456789:

&symbol(3)& -> 123
&symbol(7)& -> 1234567

You can also combine an output length specification with an offset specification. Example:

&symbol+4(3)& -> 567

Problem is that all the output lengths above are static, i.e., the lenghts have been defined in advance.

In my case I need to first print an underline, and then on the next line I print some text with a variable output length. However, the output length of both the lines should be equal. How can I achieve this? This should be easy, shouldn't it? I have been trying to solve this a long time, without any success. I have also googled a lot, but havent' been able to find any solution yet.

Is it possible to define the output length dynamically, e.g., define another variable, and assign some value in it, and then just print the value with that output length value?

Thanks in advance for your help.

Regards,

Jarmo Tuominen

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member205763
Active Contributor
0 Kudos

I dont think u can define lenght dynamicaly, but what u can do is use a do loop on the dynamic variable and print variable i.e ur underline in the loop, printing on dash at a time.