Skip to Content
author's profile photo Former Member
Former Member

Commit Work

Hello Experts,

I have created a smartform object, inwhich if I press print, It should save it as pdf file and if I press preview button, it should get print preview. I execute it through VF31. If I press preview preview comes, but when I come back and press print, pdf save as window doesn't come. The reason is the previous job(preview) is not getting committed and If I go in debug and if I delay the execution, it works properly.

For that after preview I wrote 'commit work' statement which gives proper result. But I should not use commit work, as it may update some other data while executing in background and all. Can u sujjest any other solution for this. Should the process commitment be indicated in any of the printing form function module parameter.

my FM call is

CALL FUNCTION lf_fm_name

EXPORTING

ARCHIVE_INDEX = toa_dara

  • ARCHIVE_INDEX_TAB =

ARCHIVE_PARAMETERS = arc_params

control_parameters = l_ctrl

  • MAIL_APPL_OBJ =

MAIL_RECIPIENT = ls_recipient

MAIL_SENDER = ls_sender

output_options = l_device

user_settings = space

is_bil_invoice = ls_bil_invoice

IS_NAST = nast

is_repeat = repeat

w_total1 = l_total

IMPORTING

document_output_info = l_document_output_info

job_output_info = l_job_output_info

job_output_options = l_job_output_options

TABLES

t_rebate = t_rebate

  • 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.

  • error handling

cf_retcode = sy-subrc.

PERFORM protocol_update.

  • get SmartForm protocoll and store it in the NAST protocoll

PERFORM add_smfrm_prot.

ENDIF.

Should I change any exporting parameter in this smartform call and can I get it?

Regards,

Venkat

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Feb 16, 2009 at 01:39 PM

    Hi

    Try with user settings parameter .Also see what is the default settings in FM for space for this.

    Perhaps it might work.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 03:43 AM

    I tried with "wait up to 0 seconds" and the database fot committed without using "commit work"

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.