Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Script

madan_ullasa
Contributor
0 Likes
525

hi frnds,

I have defined 3 main windows... main 01, main 02, ....... how do i pass these names in the fun. module 'write_form' for the parameter 'window' ?

points assure to all replies..

regards,

Madan..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
499

hi madan,

call function 'WRITE_FORM'

EXPORTING

ELEMENT = 'MAIN'

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'MAIN01'(or main02..)

  • IMPORTING

  • PENDING_LINES =

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.

5 REPLIES 5
Read only

Former Member
0 Likes
499

hi,

u giev the name in 'WINDOW' attribute of ur write_form

tehja

Read only

Former Member
0 Likes
499

To switch between main windows:

  call function 'CONTROL_FORM'
       EXPORTING
            command   = 'NEW-WINDOW'
       EXCEPTIONS
            unopened  = 01
            unstarted = 02.

When you 'write_form' you don't pass the 01, 02. Whichever 'main' is currently active will be processed. So write in main01, use the above code to switch to main02, then write in main02, etc.

Read only

Former Member
0 Likes
500

hi madan,

call function 'WRITE_FORM'

EXPORTING

ELEMENT = 'MAIN'

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'MAIN01'(or main02..)

  • IMPORTING

  • PENDING_LINES =

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.

Read only

0 Likes
499

or do nothing. When MAIN01 is filled it will automatically go to MAIN02, then MAIN03. They are all window MAIN.

Read only

Former Member
0 Likes
499

Hi

You needn't create 3 main windows. 1 main window is sufficient.

when main window is filled with data, remaining data will be moved to next window.

Reward points if helpful.

Regards,

Swathi.