Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom program to delete the RED request from the cube .

Former Member
0 Kudos
166

Hello Techies ,

is there any program we can develop to delete the red request from the cube .

i have one cube 'ZDCDHB_1' and i have two red requests , but i dont want to delete them manually instead run the custom program and delete the red requests .

waiting replies .

Thanks in advance .

3 REPLIES 3

former_member302911
Active Participant
0 Kudos
119

Hi Praveen,

Check the correct answer of this thread: http://scn.sap.com/thread/3334420

Regards,

Angelo.

Paulo_Vantini
Participant
0 Kudos
119

Hi Praveen,

I made a sketch code below to delete the red requests.

You can improve it to use select-options in order to process more than 1 request from the cube through a loop at the FM. Also, it is necessary to process the messages to an output of the results.

Hope that helps.

REPORT  Z_DELREQ_INFOCUB.

DATA: v_request TYPE RSREQUNR,

      v_infocube TYPE RSINFOCUBE.

PARAMETERS: p_req TYPE RSREQUNR,

            p_infoc TYPE RSINFOCUBE.

START-OF-SELECTION.

  v_request = p_req.

  v_infocube = p_infoc.

  IF v_request IS NOT INITIAL AND v_infocube IS NOT INITIAL.

    CALL FUNCTION 'RSSM_DELETE_REQUEST'

       EXPORTING

         REQUEST                          =   v_request

         INFOCUBE                         =   v_infocube

*      EXCEPTIONS

*        REQUEST_NOT_IN_CUBE              = 1

*        INFOCUBE_NOT_FOUND               = 2

*        REQUEST_ALREADY_AGGREGATED       = 3

*        REQUEST_ALREADY_COMDENSED        = 4

*        NO_ENQUEUE_POSSIBLE              = 5

*        CUBE_IN_PLANNING_MODE            = 6

*        OTHERS                           = 7

               .

     IF SY-SUBRC <> 0.

*      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

     ENDIF.

  ENDIF.

0 Kudos
119

Also,

use this program to find previous requests from the cube:

SAP BW Knowledge Sharing: ABAP program to find previous request in cube and delete

Regards.