on 07-28-2008 11:48 PM
Hi,
I have three mainwindows(M1,M2,M3) in sap script.
All the three windows should be in single page and sapscript has only one page.
I need to print some text in M1 and need skip M2 and print some text in M3. and based on some values i need to skip M1 those should be printed on M2 only.
Basically how can we control text to print on required mainwindow only .
Regards,
Rams
Hi,
Use control command NEW-WINDOW FOR jumping between mainwindows.
Thanks,
Phani Diwakar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you just create different text elements in windows and use the function module write_form to control the display...
for eg
if condition 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = TE1
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN1'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
OTHERS = 9
.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = TE2
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN2'
IMPORTING
PENDING_LINES =
EXCEPTIONS
ELEMENT = 1
FUNCTION = 2
TYPE = 3
UNOPENED = 4
UNSTARTED = 5
WINDOW = 6
BAD_PAGEFORMAT_FOR_PRINT = 7
SPOOL_ERROR = 8
OTHERS = 9
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try to use three different text elements for three main windows. and then call write form basing on conditions according to your requirements in your driver program with corresponding text elements.
Hope this will give you some idea,
Regards,
Aswini.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rams,
You can make use of the control command new-window. it moves to next main window.... if it is the last window in the page then new-window works as new-page.
Regarding skipping of the window.. i have an idea but didnt work on it...
in the text element place if condition before display
if <condition>
new-window.
else
<display data>
new-window.
endif
regards
padma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
You can use the NEW-WINDOW command to call the next main window explicitly, even if the current main window is not yet full. If you are in the last main window of the page, the command has the same effect as the NEW-PAGE command.
Syntax:
/: NEW-WINDOW
Regards
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.