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: 

form continuous printing

Former Member
0 Kudos

HI Experts,

I developemed a smartform, BY that form the records need to be print continuously.

for example my internal i have 10 customers after i excute for each customer the dialog command is displaying to print. when i press the print button it is printing one customer details and comming back again to dialog command to print.

i want all these records to print continuously until the all customers finish.

is there any procedural steps to do this pls advise .

thanq.

points will be rewarde.

4 REPLIES 4

Former Member
0 Kudos

I think you have put function module in print program in a loop.

Instead of this, pass the customer internal table to smartform function module tables parameters.

Inside the smartform, create the windows inside the customer internal table loop.

0 Kudos

hi,

I am developing a smart form in which the amc details are displayed.

the input given in the selection screen is doc num -vbeln.

in my print pgm i have used select options to get the vbeln range.

Now how do i passthis vbeln range to the smart form?

if its a parameter then i can pass it in smartform - > form interface -> import.

but for select-options,how can i pass it?

Also i need to know the procedure to print the range of doc numbers continuously.

the printout has to be taken continuously for the given range of vbeln in print pgm selection screen.

Eg: doc no is from 1 to 5 in select options,then doc no from 1 to 5 ie: 5 pages should get printed continuously if the LOCL is given and print button is clicked.

plz give me ur suggestion on this issue.

Regards,

P.S.Chitra

Former Member
0 Kudos

Instead of putting the Function Module generated by smartdoem into a loop of internal table ITAB(SAY)

loop on itab in the smartform itself,,,

I mean pass the IT to the smartform and then in the loop of ITAB u do ur previous logic

Awards points if helpful

former_member182485
Active Contributor
0 Kudos

Hi,

I also faced exactly same problem so I have solid solution

U have to just play with the CONTROL_PARAMETERS of the FM .

 Count the number of records in that internal table.

DESCRIBE TABLE itab LINES g_lines.

 Populate structure X_CONTROL_PARAMETERS.

Set a counter count.

Loop at itab.

Count = count + 1.

If count = 1.

x_control_parameters-no_close = ‘X’.

Else.

x_control_parameters-no_open = 'X'.

x_control_parameters-no_close = 'X'.

Endif.

If Count = g_lines.

CLEAR x_control_parameters-no_close.

Endif.

CALL FUNCTION p_fmname

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMETERS =

CONTROL_PARAMETERS = X_CONTROL_PARAMETERS

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

USER_SETTINGS = ‘X’

V_SPRAS = G_SPRAS

IS_AR_DATA = P_ADR_DATA

EXCEPTIONS

FORMATTING_ERROR = 1

INTERNAL_ERROR = 2

SEND_ERROR = 3

USER_CANCELED = 4

OTHERS = 5.

IF SY-SUBRC <> 0.

<error handling>

ENDIF.

Endloop.

Reward points if useful.

Regards

Bikas