2006 Aug 23 4:17 PM
Hi experts,
i am working with sap scripts.My sap script and print program has been configered.How can I view the out put to view my layout.
Please suggest me.
Thanks
rahul
2006 Aug 23 4:20 PM
Hi,
to view the o/p layout in se71 itself
click on utilities->printing test->print preview
if you want to see the o/p after execution
call the form in se38 then activate and execute it.
for this in se38 program call the function modules
<b>OPEN_FORM,WRITE_FORM,CLOSE_FORM.</b>
call function 'OPEN_FORM'
exporting
device = 'PRINTER'
dialog = 'X'
form = 'YSAM' """"your script name"""
language = SY-LANGU
.
call function 'WRITE_FORM'
exporting
function = 'SET'
type = 'BODY'
window = 'MAIN'
.
call function 'CLOSE_FORM'
IMPORTING
RESULT =
RDI_RESULT =
TABLES
OTFDATA =
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.
Regards,
Sowjanya.
Message was edited by: sowjanya suggula
Message was edited by: sowjanya suggula
2006 Aug 23 4:58 PM
I am using standard print program.I think there is no open_form.
shall i copy that form and call fm open_form..
Give suggestion.
i am working with fi customer statement
2006 Aug 23 5:39 PM
Hi sowjanya,
After excecuting print program.I am getting error like
Form(form name) language EN is not active and has no errors.
What should I do?
2006 Aug 23 5:47 PM
Go to transaction SE71 into Header and Change option...
In the form menu you would see the option for activate the form....please click on the same
--in the header data you would than see the status of the form as Actived - Saved.
Message was edited by: Anurag Bankley
2006 Aug 23 5:59 PM
In testing client I am getting messages like The form set is missing.What does it means?
thanks
2006 Aug 23 4:33 PM
hi,
You can see the output by calling the print program itself as it is already configured. The print program should have open_form(which calls the form), write_form(which writes the data selected in the print program onto the form) and close_form(which finally closes the form). It will display the dialog box in which you need to enter output device name and click print preview.
You can also see the script layout is SE71 only. Utilities->printing test->print preview. Here you will not be able to see the data (only layout can be seen) as the data is selected in the print program.
Regards,
Richa
2006 Aug 23 4:36 PM
Hi rahul,
You can set print preview using table ITCPO that which is sent to tables parameters of function module OPEN_FORM. Example:
DATA:wa_options TYPE itcpo.
wa_options-tdpreview = 'X'."Print Preview
wa_options-tdimmed = 'X'.
wa_options-tddelete = 'X'.
wa_options-tdprogram = sy-repid.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
dialog = w_dialog
form = w_formulario
language = sy-langu
options = wa_options
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.
Regards,
Alejandro.