Skip to Content

In times of UI5 and HANA update modules are more and more obsolete I think. Nevertheless there are some applications or uses-cases where saving data via update modules is reasonable.

In one project we built a processing machine for classification figures. The figures are calculated on a monthly base and create a lot of financial and CO bookings. Thousends of them. Booking this data takes several minutes up to an hour. Data is increasing and booking takes longer and longer.

As the update task takes place in the background the user has no indication when the bookings are done.

TH_POPUP And V2

The function module TH_POPUP would be great to inform the user when the update task has ended. But: How to know that the update task has come to an end?

The bookings are done with a V1 update module. V1 update modules have highest priority and will be processed before any V2 update module.

So it is possible to register a V1 update module plus a V2 update module. After the V1 has been processed, the V2 function will be executed. In this V2 update module I called the TH_POPUP function with the simple message “update task done”.

The internal behaviour of V1 and V2 update modules ensures that the V2 modules will be processed when all V1 updates are done.

User Not Logged On?

Using function module TH_DISPLAY_USER_LIST you can find out whether the user is still logged on or no. If not, you might want to send an email? Or maybe inform specific departments via mail?

  TRY.
      DATA(sendrequest) = cl_bcs=>create_persistent( ).
      sendrequest->set_sender( cl_cam_address_bcs=>create_internet_address( 
         i_address_name = |SAP System { sy-sysid }| 
         i_address_string = 'no-reply@domain.com' ) ).
      sendrequest->add_recipient( i_recipient = cl_cam_address_bcs=>create_user_home_address( 
         i_commtype = 'INT' 
         i_user     = sy-uname ) ).
      sendrequest->set_document( cl_document_bcs=>create_document( 
         i_type = 'RAW' 
         i_text = VALUE #( ( line = 'update done' ) ) 
         i_subject = 'Update done' ) ).
      sendrequest->send( ).
    CATCH cx_bcs.
  ENDTRY.
To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply