Application Development and Automation 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: 
Read only

Smartform -Print

Former Member
0 Likes
1,107

Hi Experts

I have developed three smartforms,

I have two check boxes, fromwhich getting input of which form to be printed.

My requirement is if the user select the two check boxes and execute, i need to print the two forms by single execute.

Is it possible, can we do it using GET_PRINT_PARAMETERS'.

if so, how pls, explain me.

Thanks in advance.

Regards

Rajaram

11 REPLIES 11
Read only

former_member188827
Active Contributor
0 Likes
1,053

yes u can.

if c1 = 'X'.

set control paramters using get_print_parameters and den call smartforms.

elseif c2 = 'X'.

repeat da above procedure.

endif.

Read only

Former Member
0 Likes
1,053

Hi

In driver prg u have write like this :

if two checkboxes are checked then

call two FM one after the other.

(After activating the smartform u will get FM name)

Madhavi

Read only

0 Likes
1,053

Hi Madhavi

Thanks for your reply.

if check1 is not initial and check2 is not inital.

call smartform1.

call smartform2.

endif.

Can i do coding like this, will it work.

Regards

Rajaram

Read only

0 Likes
1,053

sure it will work, u try it and let me know if anything wrong

Read only

0 Likes
1,053

its working yar but one more doubt

its asking dialog window.

what r the necessary parameters should be passed to the fm

GET_PRINT_PARAMETERS

for avoiding dialog window.

i want to avoid dialog window and

my printer name is 'LP01'.

i need one copy, how to set these to the fm.

Pls help me.

Regards

Rajaram

Read only

0 Likes
1,053

CALL FUNCTION 'GET_PRINT_PARAMETERS'

EXPORTING

destination = '2571'

immediately = 'X'

release = ''

receiver = sy-uname

list_text = list_text

IMPORTING

out_parameters = print_parameter_set

valid = valid.

IF valid = 'X'.

NEW-PAGE PRINT ON PARAMETERS print_parameter_set NO DIALOG.

Read only

0 Likes
1,053

Hello Concern,

its Very Simple , I don't know why r u confuse , let me explain.

First Put the name of smart forms in Text element. like below.

Sm1 = Text-001. " Name of first Smart forms

sm2 = text-002.

sm3 = Text-003.

if ch1 = 'X'.

Call Function to get the module name in a variable with Variable SM1.

Call Smart Form itself

endif.

if ch2 = 'X'.

Call Function to get the module name in a variable with Variable SM2

Call Smart Form itself

endif.

like that only .

I suppose it will help you, if not let me know what is your confusion.

Regards

Swati Namdeo.

Read only

0 Likes
1,053

list_text = list_text

print_parameter_set

valid = valid.

IF valid = 'X'.

NEW-PAGE

the above parameters says unknown while cheking.

pls explain me what denote these and how to declare these parameters.

Regards

Rajaram

Read only

0 Likes
1,053

Hi

My first problem is solved yar,

now we r discussing that how to print the smartforms without loading the dialog window.

thats what what r the required parameters and what and how to declare those.

Pls help me on this.

Regards

Rajaram

Read only

0 Likes
1,053

DATA print type SSFCOMPOP.

data control_parameters TYPE SSFCTRLOP.

control_parameters-device = 'PRINTER'.

control_parameters-no_dialog = 'X'.

control_parameters-preview = ' '.

print-tddest = '2579'.

print-TDIMMED = 'X'.

print-tdnoprev = ' '.

print-tdnoprev = 'X'.

CALL FUNCTION '/1BCDWB/SF00000053'

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = CONTROL_PARAMETERS

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

OUTPUT_OPTIONS = print

USER_SETTINGS = ' '

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

  • EXCEPTIONS

  • FORMATTING_ERROR = 1

  • INTERNAL_ERROR = 2

  • SEND_ERROR = 3

  • USER_CANCELED = 4

  • OTHERS = 5

.

IF sy-subrc <> 0.

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

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

ENDIF.

Read only

Former Member
0 Likes
1,053

Hi this will help u.

Solution 1:

You can print a check box in different ways.. by inserting symbols and making window as check box..

once go through the thread u will get to k now differnt ways

Solution 2:

To use Check box in smartform do the following:

Change the editor to 'PC Editor' and take the menu.

in text editor of TEXT ELEMENTS..

Insert -> Characters -> SAP Symbols

in print preview u can't see these changes..

go through these links,hope help you to solve your problem

Refer to link

with regards,

Hema Sundara.

pls reward if helpful.