cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic box position in SAPscript

Former Member
0 Kudos

Hello,

I need to put a box in the Main window after I print all line details and other things on the invoice. How can I find the current line position (Y position), so I can pass it to the POSITION command.

Thanks

Igor

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Rich, Sam and Rob,

Thanks for you reply. This is exactly what I need.

I need to print totals box after the details on the same page of the invoice. The number of detail lines (and pages) is variable. That's why I have to put it in the Main window.

Now it is printed on separate page (next page), but they want it on the same page as details if it fits.

I was thinking about counting lines, but since there is a logo, address, headers, details, etc and all are printed in different fonts, this will be very difficult exercise.

Any more ideas?

Thanks

Igor

Former Member
0 Kudos

Yes, it's difficult, but I've done it with a logo. If you have some standard text at the top, and/or in the body, you can figure out the spacing for the groups of lines rather than line by line.

Rob

Former Member
0 Kudos

I don't think you can find the y position, but you can keep track of it. Each time you write a line, add an amount to a variable (say YPOS). The amount to add will depend on the font and may change from line to line. In the form, simply code:


/:  BOX YPOS &YPOS& LN HEIGHT '3.25' LN INTENSITY 10

You will have to change the height and intensity to what you need (I suppose they can be dynamic too.

Rob

Former Member
0 Kudos

Hi Igor,

As far as my knowledge is concerned, there is no way in SAPSCRIPT to dynamically change the size or position of the box.

Cheers,

Sam

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

I am not sure that what you want to do is possible with SAPscript. At least, I've never seen it done. What exactly is the requirement, you need to move a BOX up/down the page at runtime?

Regards,

Rich Heilman