cancel
Showing results for 
Search instead for 
Did you mean: 

abou sapscript

Former Member
0 Kudos
70

hi

what is the name of function module for output configration for print .and what should export and import parameter for that.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

HI Anutosh ,

1. the FM OPEN_FORM is used for opening a Form for printing.. there you specify the form name and other options like device type , Dialog which prompts a dialog for inputing the device name and so on..

eg,

call function 'OPEN_FORM’

exporting

form = 'S_EXAMPLE_1’

2.the WRITE_FORM as the name implies is to write on the form it calls the element and window on which you make your output.

eg,

call function 'WRITE_FORM'

exporting element = 'HEADING'

type = 'TOP'

window = 'MAIN'

function = 'SET'

for heading

call function 'WRITE_FORM'

exporting

element = 'BOOKING’

type = 'BODY’

window = 'MAIN'

for body

3. CLOSE_FORM closes the form finally.

call function 'CLOSE_FORM'

ps:reward points if it helps you

regards

satesh

Former Member
0 Kudos

hi satesh

how will we specify printer name through open_form.

regards

anutosh

Former Member
0 Kudos

Hi Anutosh,

At OPEN_FORM in Export parameters "OPTIONS"

CALL FUNCTION 'OPEN_FORM'

EXPORTING

form = w_form "Form Name

language = sy-langu "Language

options = itcpo "Print Configuration

-


-


i.e. ITCPO-TDPRINTER is printer name you will define.

All the answers are pointing to that only.

Hope this may help you.

Lanka

Former Member
0 Kudos

Hi Anutosh ,

As Lanka Specified it can be directly specified in the open_form or it can be given at runtime by setting.

dialog = 'X' in open_form..

which prompts a dialog where you enter the device name..

you can explore the other functionalities by just looking at the FM OPEN_FORM in se37 and looking at its other options..

ps reward points for helpful answers

regards

satesh

abdul_hakim
Active Contributor
0 Kudos

Hi

Use OPEN_FORM for open form printing.

WRITE_FORM for writing the contents

CLOSE_FORM for close form printing.

Abdul

Former Member
0 Kudos

Hi,

As suggested by others Please use"options" for Print parameters config. in function OPEN_FORM.

Please go through the link for more information:

<a href="http://www.sappoint.com/abap/ssintro.pdf">Sap Script</a>

Regards,

Lanka

alejandro_lpez
Contributor
0 Kudos

Hi,

You can define basic print configuration when call the function module to open the form, using the fields of table itcpo

CALL FUNCTION 'OPEN_FORM'

EXPORTING

form = w_form "Form Name

language = sy-langu "Language

options = itcpo "Print Configuration

dialog = w_dialog "View dialog window 'X'

EXCEPTIONS

canceled = 1

device = 2

form = 3

options = 4

unclosed = 5

mail_options = 6

OTHERS = 7.

Example using Table ITCPO:

itcpo-tdimmed = 'X'. "print immediately

itcpo-tddelete = 'X'. "delete after printing

I hope this help you.

Alejandro