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: 

how to fetch print and print preview variables

Former Member
0 Kudos
176

hi everyone,

my requirement is as soon as sales order created. printout of that sales order will be taken at the same time email should be send to that particular customer.

the problem is the email is sent as soon as we check the print preview itself.

but the mail should be sent afte the pressing print button only.

how to fetch print or print preview by program

regards

karthe

6 REPLIES 6

Former Member
0 Kudos
71

hi,

how to fetch print preview value, i have checked get_print_parameters function modulue also its not working.

regards

karthe

Former Member
0 Kudos
71

Hi,

we have structure in print progarm like control_parameters.

create the structure with type CONTROL_PARAMETERS

like L_control_params type (type of control_parameters)

and then pass these vaues

L_control_param-no_dialog = 'X'.

L_control_param-preview = Space

then pass these strcure to the function module of smart forms

hope this will help you.

Regards,

Kiran Kumar

0 Kudos
71

hi kiran,

thanks for your reply,

control parameters also not workin is there any function modulues for

fetching print or print preview

thanks & regards

karthe

0 Kudos
71

Hi everyone,

I have tried open form and close form

The itcpp-tdspoolid eq '0' for both print and print preview.

I have set the open form

dialog = 'X'.

have i got to set anything in open form.

this is my open form and close form.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

DIALOG = 'X'

.

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 'CLOSE_FORM'

IMPORTING

RESULT = itcpp

.

IF SY-SUBRC ne 0.

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

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

else.

if itcpp-tdimmed eq 'X' and itcpp-TDSPOOLID ne ''.

endif.

regards

karthe

0 Kudos
71

hi everyone,

i have passed tdnewid = 'X'

in open_form

then also new spool request is generated.

how to get the values of print and print preview buttons.

regards

karthe

0 Kudos
71

hi everyone,

thanks for everyones response i got the solution.

sy-ucomm eq 'PRNT' for print and 'view' for preview

regards

karthe