Application Development 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: 

sap script

Former Member
0 Kudos

hi gurus,

as i m new to sap script ,when i m executing my driver program of script .....*****u know i copied the driver program***** .it is showing this type of error

error :

WRITE_FORM is invalid, OPEN_FORM is missing.....plz help me.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi ravi,

from ur question i got that u copied the program from one server to another.

thats y its showing open form is missing due to no such script is available in that server. confirm that first.

then the text element in the corresponding windows is not available thats y it is showing write form is invalid.

hope u understand this...

feel-free to ask furthur clarifications...

Thanking u

5 REPLIES 5

p291102
Active Contributor
0 Kudos

Hi,

Pls check ur created form is given correctly or not? Otherwise u have to check first

creating the form correctly and u have to give in the open_form FM in your report.

Thanks,

Shankar

Former Member
0 Kudos

hi

make sure you opened the form using open_form, given the correct name of the layoutset...pass the text element name of the window that you've called in open_form in the element (exporting) parameter of your write_form

Former Member
0 Kudos

Hi,

In the driver program,

u have to use these function modules.

Below is the example code:

CALL FUNCTION <b>'OPEN_FORM'</b>

EXPORTING

APPLICATION = 'TX'

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMS =

DEVICE = 'PRINTER'

DIALOG = 'X'

FORM = 'Z_FICO_CONFIRM'

LANGUAGE = SY-LANGU

OPTIONS = OPTIONS

  • MAIL_SENDER =

  • MAIL_RECIPIENT =

  • MAIL_APPL_OBJECT =

  • RAW_DATA_INTERFACE = '*'

IMPORTING

  • LANGUAGE =

  • NEW_ARCHIVE_PARAMS =

RESULT = RESULT

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

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.

.

CALL FUNCTION <b>'WRITE_FORM'</b>

EXPORTING

ELEMENT = VELEMENT

FUNCTION = VFUNCTION

TYPE = VTYPE

WINDOW = VWINDOW

  • IMPORTING

  • PENDING_LINES =

EXCEPTIONS

ELEMENT = 1

FUNCTION = 2

TYPE = 3

UNOPENED = 4

UNSTARTED = 5

WINDOW = 6

BAD_PAGEFORMAT_FOR_PRINT = 7

OTHERS = 8

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Hope this helps.

Reward if helpful.

Regards,

Sipra

Former Member
0 Kudos

hi ravi,

from ur question i got that u copied the program from one server to another.

thats y its showing open form is missing due to no such script is available in that server. confirm that first.

then the text element in the corresponding windows is not available thats y it is showing write form is invalid.

hope u understand this...

feel-free to ask furthur clarifications...

Thanking u

0 Kudos

thnx senthil....thnx alot..