Problem

In SAP Standard, after the BEx transport request is released, there is no new BEx transport request automatically created by the system and you have to manually create a new one via transaction RSOR (see this blog for details).

However, the person who released the old BEx transport often forgets to do this, so the error message RSO 827 with message text ‘BEx transport request ‘&1’ is not available or not suitable‘ will be shown in BEx Query Designer trying to open a query in the DEV system. In this case we have to follow the steps mentioned above and restart BEx Query Designer afterwards, which is pretty annoying if this happens too often.

Solution

I created a small BAdI implementation for BAdI CTS_EXPORT_FEEDBACK via transaction SE19 to automate the manual activities (implementation name = ‘ZCTS_EXPORT_FEEDBACK’) with the following code:

*---- sy-uname = DDIC, sy-mandt = '000', asynchronous execution
    DATA: lv_old_bex_request TYPE trkorr,
          lv_new_bex_request TYPE trkorr.

    CHECK sy-sysid = 'SBQ'. "restrict execution to only your DEV system here
    CALL FUNCTION 'RSCC_RSADM_ACC'
      EXPORTING
        fieldname  = rs_c_rsadmin-bex_request
        action     = rs_c_actionadm-sel
      CHANGING
        adminvalue = lv_old_bex_request
      EXCEPTIONS
        OTHERS     = 1.
    IF sy-subrc = 0.
      IF lv_old_bex_request IS INITIAL.
        CALL FUNCTION 'CTS_API_CREATE_CHANGE_REQUEST'
          EXPORTING
            description = CONV text60( |{ sy-datum(4) }{ sy-datum+4(2) } Standard BEx request| )
            category    = 'K'    "Workbench
            client      = '010'
            owner       = 'DKLE'
          IMPORTING
            request     = lv_new_bex_request.
        IF lv_new_bex_request IS NOT INITIAL.
          CALL FUNCTION 'RSCC_RSADM_ACC'
            EXPORTING
              fieldname  = rs_c_rsadmin-bex_request
              action     = rs_c_actionadm-upd
            CHANGING
              adminvalue = lv_new_bex_request
            EXCEPTIONS
              OTHERS     = 1.
        ENDIF.
      ENDIF.
    ENDIF.

In this example a Standard BEx request with description ‘YYYYMM Standard BEx request’ will be created

Notes

  • Code may not work in releases lower than 740. If it does not work, replace the CONV operator and string expression with what your system is capable of.
  • You should insert a condition into your code that it is only running in the DEV system (see the first CHECK statement)
  • The implementation is called on release of every non-local transport request, not only the old BEx transport request! You have to add coding if you want to limit execution of the above coding to the release of the old BEx request only.
  • The client and owner of the transport request is set explicitly, because using sy-mandt and sy-uname will create the request in client 000 for user DDIC (no developer can see it in his SE01 transport request list).

 

I hope you will find it useful.

To report this post you need to login first.

2 Comments

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

  1. Donnie Burhan

    Hi Daniel,

    This seems to be a quite convenient tool to have if the automatic recording option is not switched on.

    Could you tell me when does this code will execute? Is it when opening BEx query which already transported on the old TR, after the old TR is released, or when?

    CHECK sy-sysid = 'SBQ'.

    I’m not sure if we require this because I think that this code should stay in the DEV environment, as no changes should be made on the subsequent environment. But yes, in case that someone mistakenly transport this code, this can act as stopper.

    (0) 
    1. Daniel Klein Post author

      Hi Donnie,

      this code/BAdI implementation will be executed upon release of any non-local customizing/workbench transport request via SE01/SE10, including release of the old BEx TR.

      There are several other reasons why we always transport this code also to the QSS and PROD system:

      • Having it backed up
      • No action is required if the system landscape is changed
      • No action is required on copy of e.g. the PROD system to a new DEV/QSS system.
      • All systems are equal in terms of codeline (except for experimental code only in DEV system)

       

      Regards

      Daniel

      (0) 

Leave a Reply