05-24-2006 1:40 PM
hi,
i have 2 pages in my sap script.
both the pages have the same "main" window.
i have given box command in the begining of this main window:
/:BOX XPOS '.5' CM YPOS '0' CM WIDTH '25' CM HEIGHT '1' CM FRAME 0 TW INTENSITY 15
/:BOX XPOS '.5' CM YPOS '0' CM WIDTH '25' CM HEIGHT 0 TW FRAME 10 TW
/:BOX XPOS '.5' CM YPOS '1' CM WIDTH '25' CM HEIGHT 0 TW FRAME 10 TW
The problem i am facing is :the box is coming at the right place for 1st page, but at the top of the page for the next window. i think it must be taking y coord. from the top of the page for the next window.
Please give a suitable solution for this,
thanks in advance,
Ravindra
05-24-2006 2:03 PM
Hi Ravindra,
The xpos and ypos are counted from the left top most corner of the WINDOW and not the PAGE.
i think in your case the main window in the first page has some other window above it and the second page doesn't have any other windows above it.
Regards,
Ravi
05-24-2006 2:31 PM
hi, ravi,
thanks for the reply,
actually, the layout of 1st and 2nd page is exactly same.
also, the position of all the windows is same in both pages
thanks, Ravindra
05-24-2006 2:06 PM
wat is the position of ur main window in the 2nd page???
that decides where ur box comes in 2nd page
05-24-2006 2:29 PM
hi, Bikash,
thanks for the reply,
the position of all the windows in 1st and 2nd
page are same.
Ravindra
05-24-2006 2:07 PM
Hii Ravindra
try this
BOX WIDTH 0 FRAME 10
BOX HEIGHT 0 FRAME 10
BOX WIDTH 5 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
BOX WIDTH 7 CM HEIGHT 5 CM FRAME 10 TW INTENSITY 10
Use the box command with zero width for vertical lines.
plzz reward helpful ones.
Revert back for more help
Regards
Naresh
05-24-2006 2:28 PM
hi, naresh,
thanks for thhe reply,
i tried ur solution..
but again, it is taking the top left corner as origin
for the next page,(<b>and not top left corner of the main window</b>).
thanks, Ravindra
05-24-2006 2:13 PM
May be you can use the IF condition.. and print the boxes accordingly..
like..
/: if &page& = 1
<print the box as per the 1st page MAIN dimensions>
/: else
<print the box as per the next page MAIN dimensions>
/: endif.
05-24-2006 2:32 PM
hi, sravanthi,
thanks for thhe reply,
we cannot do that, since the window used in both pages is same.
thanks, Ravindra
05-24-2006 2:32 PM
hii Ravindra,
try this out
/: POSITION XORIGIN '11.21' YORIGIN '5.31' MM
/: SIZE HEIGHT '2' MM WIDTH '76' MM
/: BOX FRAME 10 TW INTENSITY 10
This can be usefull if you gave several boxes that share the same parameters.
If you want to set the position realtively to the window use POSITION WINDOW
to set the position to the top/left start of the window. Then use POSITION
to set the current position relatively to the start of the Window.
Note that you uses "+" or "-" in the ORIGIN position to the set the position relatively.
/: POSITION WINDOW
/: POSITION XORIGIN '5' MM YORIGIN '10' MM
the position is now 5 MM from the left and 10 MM from the top of the window
NOTE: After using the position command you can move the current position
realtively to the last used position
/: POSITION XORIGIN '10' MM YORIGIN '20' MM
Now the position will be X = 15 and Y = 30
Drawing a line. You can draw a line by setting the Height or Weidth to 0
and add a frane. E.g. a horizontal line:
/: SIZE HEIGHT '0' MM WIDTH '200' MM
/: BOX FRAME 10 TW XPOS '11.21' MM YPOS '14.81' MM INTENSITY 100
i guess this will help
revert back for more help
Regards
Naresh
05-24-2006 2:39 PM
hi naresh,
thanks again for ur reply..
but the problem with it is that we are using the same
main window in both pages; and in first page , the
position of the box is as desired.
now if we change the code in the main window as u say, the
position of the box in the first page will be affected.
also, when seen in the settings> form painter>graphical form painter, the position is correctly displayed in both the pages.
Rgds,
Ravindra
05-24-2006 2:38 PM
Hi Ravindra,
Put the box commands within a Text Element. then before calling the Write_Form from the program for data in the main window, call this Text element using write_form.
this should work..had same problem some time back...
05-24-2006 2:43 PM
Hi Bikash,
thanks again for ur reply..
but the box is already within a text element(520), and the print program is RFKORD00, which cannot be modified.
Rgds,
Ravindra
05-24-2006 2:53 PM
then shift the box commands from ther to the top of the editor before all the text elements...
since u r not modifying the print program this problem is arising..
anyway try out...
05-24-2006 2:56 PM
Hii Ravindra ,
now make a duplicate of the current form and try removing the windows below MAIN window..this will clear out if the problem is because of other windows
Regards
Naresh