Skip to Content
Author's profile photo Shanthi Bhaskar

How to derive Update Mode & Request ID in the Transformation

Hi,

In Implementation or Support projects we all will have requirement where we might need to derive the Update mode in the Transformation.

Below is the code which would give the update mode.

DATA: LV_UMODE TYPE RSUPDMODE.

     CALL METHOD P_R_REQUEST->GET_UPDMODE

       RECEIVING

         R_UPDMODE = LV_UMODE.



LV_MODE now will hold F or D based on the Which DTP we execute.




Finding the Request ID of the Current load, we can use below code.


   DATA: N_REQUID TYPE RSBKREQUID.

    CALL METHOD P_R_REQUEST->GET_REQUID

      RECEIVING

        R_REQUID = N_REQUID.



N_REQUID will store the Request ID


Hope it helps.





Thanks,

Bhaskar Shanthi.

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Shanti,

      there is one more thing you should add in this context, because it saves a LOT of time during testing / Debugging...

      Put that at the beginning of your start- or endroutine:

      DATA:  LF_REQUID30 TYPE RSREQUID.   

      LF_REQUID30 = P_R_REQUEST->GET_REQUID30(  ).   

      IF LF_REQUID30 EQ 'DTPR_SIMULATION'.     

          BREAK <your-username>.    

      ENDIF.

      In this way you don't have to set breakpoints manually in the generated program 😉

      BR Martin

      Author's profile photo Shanthi Bhaskar
      Shanthi Bhaskar
      Blog Post Author

      Thanks Martin for the suggestion.

      Author's profile photo Former Member
      Former Member

      Hi Bhaskar,

      Where we need to write routine either in Start routine or end routine.

      Thanks

      Anjali

      Author's profile photo Shanthi Bhaskar
      Shanthi Bhaskar
      Blog Post Author

      You can do it either in Start or End routine..