Current Position:Home > How to use commit work in class cl_bls

How to use commit work in class cl_bls

Update:11-30Source: network consolidation
Advertisement
Hi,
When i have used commit work after email sent,
it goes into dump.
Here is the code segment:
  try.
    -------- create persistent send request ------------------------
      send_request = cl_bcs=>create_persistent( ).
    -------- create and set document -------------------------------
      pdf_content = cl_document_bcs=>xstring_to_solix( pdf_tab ).
      document = cl_document_bcs=>create_document(
            i_type    = 'PDF'
            i_hex     = pdf_content
            i_length  = bytecount
            i_subject = sub ).  "#EC NOTEXT
    add document object to send request
      send_request->set_document( document ).
    --------- add recipient (e-mail address) -----------------------
    create recipient object
      recipient = cl_cam_address_bcs=>create_internet_address( recip-recip ).
    add recipient object to send request
      send_request->add_recipient( recipient ).
    ---------- send document ---------------------------------------
      sent_to_all = send_request->send( i_with_error_screen = 'X' ).
     commit work.
      if sent_to_all is initial.
        message i500(sbcoms) with recip.
      else.
        message s022(so).
      endif.
  ------------ exception handling ----------------------------------
  replace this rudimentary exception handling with your own one !!!
    catch cx_bcs into bcs_exception.
      message i865(so) with bcs_exception->error_type.
  endtry.
What could be the reason?
Is there any way to use commit work in class while sending email as in SO_NEW_DOCUMENT_ATT_SEND_API1 fm?
Thanks.

The Best Answer

Advertisement
Hi,
I have used
submit program.....
but in update task i have used it.
"Z_SD_ORDER_UPDATE".    program is a print driver program.
However error says:
There is probably an error in the program
"Z_SD_ORDER_UPDATE".  
This program is triggered in the update task. There, the
following ABAP/4 statements are not allowed:
-  CALL SCREEN
-  CALL DIALOG
-  CALL TRANSACTION
-  SUBMIT
I used submit as:
  WAIT UP TO 2 SECONDS.
  SUBMIT rsconn01 WITH mode = 'INT'
                  WITH output = ' '
                AND RETURN.
Instead of submit i want to use commit work but i also get a dump after commit work too.
How can i use commit work in above code?
Thanks.
  • How to use commit work in class cl_bls Update:11-30

    Hi, When i have used commit work after email sent, it goes into dump. Here is the code segment:   try.     -------- create persistent send request ------------------------       send_request = cl_bcs=>create_persistent( ).     -------- create and set

  • How can we remove the commas from the Formula value in SAP BW BEx query Update:10-11

    Hi All, How can we remove the commas from the Formula value in SAP BW BEx query We are using the formula replacing with characteristic.The characteristic value needs to be display as number with out commas. Regards Venkat.Do you want to remove the co

  • In import commit 100000 records Update:10-11

    Dear Friends, Please let me know whether in import any method is there to commit records for an interval of records say 100000. If we use commit=y and each table has 5M records, it take multiple days to complete. And if we don't give commit=y, it req

  • Comma delimited in Sql query decode function errors out Update:10-11

    Hi All, DB: 11.2.0.3.0 I am using the below query to generate the comma delimited output in a spool file but it errors out with the message below: SQL> set lines 100 pages 50 SQL> col "USER_CONCURRENT_QUEUE_NAME" format a40; SQL> set he

  • Splitting comma seperated column data into multiple rows Update:10-11

    Hi Gurus, Please help me for solving below scenario. I have multiple value in single column with comma seperated values and my requirement is load that data into multiple rows. Below is the example: Source Data: Product         Size                  

  • DS sends updates to DB only in commit (can't find modified data in same TX) Update:10-11

    Hello experts! We have a physical data service mapping a simple Oracle database table. When we update one record in the database (invoking submit on the DS), and use a function in that same dataservice to get the refreshed record, the updated column

  • SQL Developer can't commit edited data in Table Data pane Update:10-11

    When I try to commit changes in "Data" pane for selected table SQL Developer gives me a strange error: One error saving changes to table "TABLENAME".: Row XXX: Data got commited in another/same session, cannot update row. I can see in

  • Materialized view - REFRESH FAST ON COMMIT - UNION ALL Update:10-11

    In a materialized view which uses REFRESH FAST ON COMMIT to update the data, how many UNION ALL can be used. I am asking this question because my materialized view works fine when there are only 2 SELECT statement (1 UNION ALL). Thank you.In a materi

  • After call commit sql , data can not flush to disk Update:10-11

    I use berkey db which support sql . It's version is db-5.1.19. 1, Open a database. 2. Create a table. 3. exec "begin;" sql 4. exec sql which is insert record into table 5. exec "commit;" sql 6. copy database file (SourceDB_912_1.db and

  • How to Capture Commit Point in Forms Update:10-11

    Dear Members, We are on E-Business Suite 11.5.10.2. We are trying to change the behavior of AP Invoice Work Bench form through CUSTOM.pll. When you try to reverse an existing distribution line, then oracle does a lot of validations and many triggers