Skip to Content
0
Former Member
Mar 09, 2009 at 10:11 PM

COMMIT_IN_POSTING Dump

2136 Views

Hi Experts,

I am trying to send an E-mail of Notification -'IW52' . But, I am getting COMMIT_IN_POSTING error to my SAPInbox. Please, give me some idea . The code is as below .

My open_form:

lw_options-tdprogram = sy-repid.

lw_options-tdgetotf = c_true.

CALL FUNCTION 'OPEN_FORM'
    EXPORTING
*   APPLICATION                       = 'TX'
   ARCHIVE_INDEX                     =  TOA_DARA
   ARCHIVE_PARAMS                    =  ARC_PARAMS
      device                          = 'PRINTER'
     dialog                           = lf_dialog
    form                              = t390-form
*   LANGUAGE                          = SY-LANGU
     OPTIONS                          = lw_options

My close_form is:

FORM close_form_mail CHANGING ct_otf_data TYPE tt_otf_data
                              cw_options  TYPE itcpp.

  CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                           = cw_options
*     RDI_RESULT                       =
     TABLES
       otfdata                         = ct_otf_data

And I am converting the OTF to PDF and sending mail using FM SO_NEW_DOCMENT_API1.

CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
      format                = 'PDF'
      max_linewidth         = 132
    IMPORTING
      bin_filesize          = l_doc_size
    TABLES
      otf                   = otf_data
      lines                 = lit_pdfdata


  CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
    EXPORTING
      line_width_src              = 134
      line_width_dst              = 255
    TABLES
      content_in                  = lit_pdfdata
      content_out                 = lit_pdfdata_wide

*---> Call FM to send email

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data              = wa_document_data
      commit_work                = c_true
    TABLES
      packing_list               = it_packing_list
      contents_bin               = it_contents_bin
      contents_txt               = it_contents_txt
      receivers                  = it_reclist

  SKIP.