‎2005 Apr 05 5:18 AM
Hi all,
I need a dynamic box size on Main Window, here are the conditions
if I Script layout output is going Beyond one page then I need BOX1 on Main Window, otherwise, if output is limited to one page then BOX2.
Here i am trying to display line items in main window A a Tabular format using boxes. If line itmes are filling half the page, then half page size box should get printed.
How can i get this?? any ideas?
Thanks
Message was edited by: Vipin Nagpal
‎2005 Apr 05 7:19 AM
HI,
If you count the number of line items in program then you will be able to put "IF" condition in sapscript to decide where to show box1 or box2.
If you know the number of line items that will be shown on one page if item increased then that you will show box1 if number of records are less than that can be shown on one page than you will show box2.
Regards
wasim ahmed
‎2005 Apr 05 7:30 AM
Hi
Instead of using static box; calculate the position of Y coordinate by using ABAP subroutine in Script.
you can refer the following code for the same.
/: PERFORM 'XXXXXX' IN PROGRAM 'ZXXXXXX'
/: USING &FLAG&
/: USING &PAGENO&
/: CHANGING &YP&
/* FOR FIRST PAGE
/: IF &PAGE(C)& = 1
/* THE TOP LINE
/: POSITION PAGE
/: POSITION XORIGIN '4.5' CH YORIGIN '44.0' LN
/: SIZE WIDTH '68' CH HEIGHT '0' LN
/: BOX FRAME 10 TW
The 1st vertical line
/: POSITION PAGE
/: POSITION XORIGIN '4.5' CH YORIGIN &YP& LN
/: SIZE WIDTH '0' CH HEIGHT '1' LN
/: BOX FRAME 10 TW
/*
/* The 2nd vertical line
/: POSITION PAGE
/: POSITION XORIGIN '24.0' CH YORIGIN &YP& LN
/: SIZE WIDTH '0' CH HEIGHT '1' LN
/: BOX FRAME 10 TW