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: 

Smart Form Invoice

Former Member
0 Kudos

Hi Guys,

I need to print the multiple invoices along with the

terms and conditions page after the data gets printed.

My fields are gpag,avm_nr,inv_no,product,dis_amt,amount.

Need to print a seprate invoice whenever there is

change in one of gpag,avm_nr and inv_no.

Please guide.

Regards,

Harsha

8 REPLIES 8

Former Member
0 Kudos

Harsha,

Loop at the table and call the SMART Form at AT NEW command.

Regards,

Ravi

Former Member
0 Kudos

Hi harsha,

Do u mean to say printing the multiple pages for a single invoice based on the given fields.

If yes , do the sorting for gpag,avm_nr and inv_no in the table node ,the event sort at begin of table node will act similar to at new control break statments.use this event.

can u please be clear on ur requirement.

Regards,

savitha

Message was edited by: savitha m

0 Kudos

Thanks Ravi,Savitha,

I have tried both of your suggestions, I do have problems .

1. At end of inv_no may work, but I would like to avoid

the printer popup.

2. I guess all my layouts needs to be within the Main

window when I use sort events, finding it difficult

to print new-page as well as terms & conditions.

Regards,

Harsha

0 Kudos

Harsha,

1. You can always supprese the PINTER POPUP by setting the options in OUPUT_OPTIONS AND CONTROL_PARAMETERS.

2. I would suggest you call the SMART Form once for each customer and have TERMS and CONDITIONS as a separate SMART Form.

Regards,

Ravi

Note : Please mark the helpful answers

0 Kudos

HI Ravi,

I am not able suppress printer popup . Attached herewith

my sample code. SSF_Open also seems to be different in

my R/3 (4.6c) as it takes only input as import param.

DATA : control TYPE ssfctrlop,

control_parameters TYPE ssfctrlop,

output_options TYPE ssfcompop.

output_options-tddest = 'LOCL'.

control_parameters-preview = ' '.

control_parameters-no_dialog = 'X'.

control_parameters-no_open = 'X'.

control_parameters-no_close = 'X'.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = 'ZMASF_TIMES_JOB_INVOICE'

IMPORTING

fm_name = fm_name.

CALL FUNCTION fm_name

EXPORTING

control_parameters = control_parameters

output_options = output_options

TABLES

itab = itab

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.

0 Kudos

Harsha,

There is another preview flag in OUTPUT_OPTIONS also, something tdprev. Check that as well.

Regards,

Ravi

Note : Please mark the helpful answers

0 Kudos

HI,

No luck, its only eleminated the printer preview, but

not the dialog. This is very strange ? I dont know

wheres the problem

Harsha

0 Kudos

I will give it a shot and let you know.

Regards,

Ravi