2013 Jan 23 7:44 AM
Hi All,
I am getting "START_FORM is invalid, OPEN_FORM is missing " error message while printing a production order via CO03.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = space
form = print_co-forml
language = print_co-spras
OPTIONS = print_opts
EXCEPTIONS
canceled = 01
device = 02
form = 03
OPTIONS = 04
unclosed = 05.
While debugging "OPEN_FORM" is giving exception FORM with sy-subrc value 3.
This is arising because no entry with the form name is available in STXH table.
What could be the problem? Please help me.
Thanks,
Vengadesh R
2013 Jan 23 8:28 AM
Hi,
SY-SUBRC = 3, this means that the SAP Script that you have provided is not present in the client in which you are writing the code.
SAP Scripts are client dependent. So first transport the SAP Script from the source client to target client using SCC1.
Hope this helps. If the problem still persists let me know.
Thanks,
Tooshar Bendale
Hi All,
I am getting "START_FORM is invalid, OPEN_FORM is missing " error message while printing a production order via CO03.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
device = 'PRINTER'
dialog = space
form = print_co-forml
language = print_co-spras
OPTIONS = print_opts
EXCEPTIONS
canceled = 01
device = 02
form = 03
OPTIONS = 04
unclosed = 05.
While debugging "OPEN_FORM" is giving exception FORM with sy-subrc value 3.
This is arising because no entry with the form name is available in STXH table.
What could be the problem? Please help me.
Thanks,
Vengadesh R
2013 Jan 23 8:00 AM
Hi boss,
For working with sap script you have to call the script first with FM OPEN_FORM . Please have a look below sample code.
** Open form function calling for initial use.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZC101_CSD107'.
** Start looping to start printing the sap script
LOOP AT IT_VBAP.
** On change of VBELN start new page.
AT NEW VBELN.
CALL FUNCTION 'START_FORM'
EXPORTING
FORM = 'ZC101_CSD107'
STARTPAGE = 'P1'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'E1'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'HEADER'.
ENDAT.
** Calling function for printing the item details
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'E2'
FUNCTION = 'SET'
TYPE = 'BODY'
WINDOW = 'MAIN'.
** Calling function for ending the form.
AT END OF VBELN.
CALL FUNCTION 'END_FORM'.
ENDAT.
ENDLOOP.
** Call FM to close the form.
CALL FUNCTION 'CLOSE_FORM'.
Regards,
Praveen Chitturi
2013 Jan 23 8:16 AM
Thanks for the reply Praveen. My code is similar to this.
My problem is OPEN_FORM is giving me an exception with sy-subrc = 3. Due to this exception START_FORM is giving an error message "START_FORM is invalid, OPEN_FORM is missing".
2013 Jan 23 8:23 AM
hello,
Please check this for your sy-subrc = 3 error
Form does not exist
The form specified in the parameter FORM does not exist or there is no active
version of this form.
best regards,
swanand
2013 Jan 23 8:28 AM
Hi,
SY-SUBRC = 3, this means that the SAP Script that you have provided is not present in the client in which you are writing the code.
SAP Scripts are client dependent. So first transport the SAP Script from the source client to target client using SCC1.
Hope this helps. If the problem still persists let me know.
Thanks,
Tooshar Bendale
2013 Jan 23 8:38 AM
Thanks Tooshar. It was a problem because of clients. In my testing client script is not available. I transported it using SCC1. now it is working fine!
2013 Jan 23 8:32 AM
Hi ,
Check output device in your printer settings.
is it LP01 or something else ?
Regard's
Smruti
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |