cancel
Showing results for 
Search instead for 
Did you mean: 

Commit Work

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

rejish_balakrishnan
Contributor
0 Kudos

Hi

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

Perhaps it might work.