‎2007 Mar 23 6:00 AM
Hi All,
How to use multiple main windows in SAP Scritp?
Thx,
Sofia
‎2007 Mar 23 6:08 AM
Hi,
create main window in windows.
in page windows goto->create element then select main window.
like that we can use.
we can't create multiple main windows.only we can reuse the main window from 00 to 99 times.
regards,
bharat.
‎2007 Mar 23 6:05 AM
Hi Sofia,
You can have multiple Main window using the Element Line i.e Main 00,Main 01 where 00,01 are the element line
MAIN - A layout set can have only one MAIN window which is created by default. This window can flow over multiple pages.
But all the main window contains the same structure either you have to use Elements or create a new window
Regards,
Priyanka.
‎2007 Mar 23 6:05 AM
hi sofia
u can hav only one main window on a single page.u can create one more window only in d next page..if u hav further doubts get bac to me
with regards
vijay
‎2007 Mar 23 6:08 AM
Hi,
create main window in windows.
in page windows goto->create element then select main window.
like that we can use.
we can't create multiple main windows.only we can reuse the main window from 00 to 99 times.
regards,
bharat.
‎2007 Mar 23 6:14 AM
hi,
You can create mutiple main windows when we want to print address details etc.You can create 99 main windows on a script.you can use multiple windows using following code.
tables:
adrc.
*"Selection screen elements............................................
select-options:
s_adno for adrc-addrnumber. " Address number
*" Data declarations...................................................
"----
Work variables *
"----
data:
w_count type i, " Count
w_size type i, " Size
w_result type i, " Result
w_from type adrc-addrnumber. " From
*" Data declarations...................................................
"----
Data declaration of the structure to hold address data *
"----
data:
fs_adrc type adrc.
"----
Internal table to hold address data *
"----
data:
t_adrc like
standard table
of fs_adrc.
perform select.
perform open_form.
perform write_form.
perform close_form.
----
Form select *
----
This subroutine retrieves data from yash_programmer table *
----
There are no interface parameters to be passed in this subroutine *
----
form select .
select *
from adrc
into table t_adrc
where addrnumber in s_adno.
if sy-subrc ne 0.
message text-001 type 'E'.
endif. " IF SY-SUBRC NE 0
endform. " SELECT
----
Form open_form *
----
This subroutine used to call open form for form *
----
There are no interface parameters to be passed in this subroutine *
----
form open_form .
call function 'OPEN_FORM'
exporting
form = 'YH634_060201'
exceptions
canceled = 1
device = 2
form = 3
options = 4
unclosed = 5
mail_options = 6
archive_error = 7
invalid_fax_number = 8
more_params_needed_in_batch = 9
spool_error = 10
codepage = 11
others = 12.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif. " IF SY-SUBRC NE 0
endform. " OPEN_FORM
----
Form write_form *
----
This subroutine used to call write_form for form *
----
There are no interface parameters to be passed in this subroutine *
----
form write_form .
describe table t_adrc lines w_size.
loop at t_adrc into fs_adrc.
add 1 to w_count.
w_result = w_count mod 9.
if w_result eq 1.
w_from = fs_adrc-addrnumber.
endif. " IF W_RESULT EQ 1
call function 'WRITE_FORM'
exporting
element = 'ADDRESS'
exceptions
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
bad_pageformat_for_print = 7
spool_error = 8
codepage = 9
others = 10.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif. " IF SY-SUBRC NE 0
endloop.
endform. " WRITE_FORM
----
Form close_form *
----
This subroutine used to call close_form for form *
----
There are no interface parameters to be passed in this subroutine *
----
form close_form .
call function 'CLOSE_FORM'
exceptions
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
others = 6.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif. " IF SY-SUBRC NE 0
endform.
regards,
veeresh
Message was edited by:
veereshbabu ponnada
‎2007 Mar 23 6:16 AM
you select the window as a Main window. Right side of the window you get the box in the you choose that window as Main Window.
bye..
‎2007 Mar 23 6:17 AM
hi
u can split the main window into multiple windows..
in page windows...
edit -
>mainwindow.
there give the number of windows u want to split
in number option.
give the width and height
it will split the main window into the number times.
hope this helps...
‎2007 Mar 23 6:19 AM
Hi Sofia,
In SAP Scripts first you create one window and make it the main window, later you can create a maximum of 98 main windows which are actually replicas of the first main window.
So in total, there can be a maximum of 99 Main windows.
Hope this resolves your query.
Reward all the helpful answers.
Regards