BACKGROUND

DUMP : DYNPRO_SEND_IN_BACKGROUND

We may get the above mentioned DUMP in case of Inbound IDOC / RFC Call / Background Job.

These inbound IDOC / RFC Call / Background Job may be used for creation of some documents like Invoice, Sales Order or Purchase Order.

Now we might have made some extra Z enhancement in user exits or BADIs where you have used a POP-UP screen for some sort of user confirmation. For Example, we frequently use FM “POPUP_TO_CONFIRM” for this. Or may be we have called a screen which requires some user actions(inputs).

When a screen which requires an input is called in background, the system gives the above mentioned DUMP. This happens because  there is no user connection in case of inbound IDOC / RFC Call / Background Job. The inbound IDOC was may be triggered from a 3rd Party Non-SAP System or the RFC Call was made from a different System.

You will get a DUMP like this:

dump screen.png

HOW TO HANDLE THIS SITUATION

While providing any POP-UP screen, we need to check the User Type.


We may follow the steps below:


1) We will get the user ID in this variable sy-uname.

2) There is a table USR02 where we will find logon details of any user.

3) There is a field USTYP, which will tell us what kind of user it is.


Below are the possible type of users.

type of users.png

We can put a simple code to check what kind of user it is. If it is a Dialog User(A), then only provide the POP-UP screen or else don’t. We can handle the action automatically with some logic according to the requirement.

/wp-content/uploads/2015/06/table_724449.png

We can also create a function module which you can just call when needed. Refer below Picture.

FM.png

To report this post you need to login first.

5 Comments

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

  1. Suhas Saha

    What if a normal (read: dialog) user schedules the background job? I don’t think this check is going to work.

    Can we not use:

    • SY-BATCH variable and/or
    • CL_SALV_MODEL=>IS_OFFLINE( )

    as an alternative to check if the GUI is available for the pop-up to be displayed.

    (0) 
    1. Supratim Das Post author

      Hi Suhas,

      Thanks for your inputs.

      I had faced this issue in User Exit and BADIs of Sales Order and Purchase Order. So, user scheduling a job won’t be applicable in this case.

      But yes, to make this more robust, we should check sy-batch and cl_salv_model=>is_offline(). What you told is absolutely correct in case of background jobs

      Both SY-BATCH & CL_SALV_MODEL=>IS_OFFLINE( ) are ‘X’ in background job.

      But my concern is also with Inbound IDOC and RFC call. What will be the value of SY-BATCH & CL_SALV_MODEL=>IS_OFFLINE( ) is these two cases ?


      (0) 
      1. Suhas Saha

        But my concern is also with Inbound IDOC and RFC call. What will be the value of SY-BATCH & CL_SALV_MODEL=>IS_OFFLINE( ) is these two cases

        I would have checked these before thinking of other alternatives.

        Honestly, i have no idea about what values these will return. You should check those.

        (0) 
      2. Rudra Roy

        I believe FM SAPGUI_PROGRESS_INDICATOR handles most of the cases including RFC call. Have a look at the code in this FM.

        (0) 
        1. Supratim Das Post author

          There is a lot to learn from the FM you mentioned. I have used this FM in many reports but never checked it’s code.  😛


          Thanx a lot Rudra….. 🙂

          (0) 

Leave a Reply