cancel
Showing results for 
Search instead for 
Did you mean: 

Delete existing overlapped request with ABAP routine

Former Member
0 Kudos

Hi,

i would like to delete overlapped request from InfoCube regularly with an ABAP routine. (i checked the "Request Selection Through Routine" check-box). As far as i know i can check successful request in RSSELDONE table, but how can i reach the current selection criteria? I'd like to compare them with RSSELDONE table content. How can i make difference between previous and current upload in RSSELDONE table?

Could you send me a sample ABAP code?

Thanks a lot

Richard

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Richard

i don't understood your problem:

You want load a cube and if your load has the selection that are included in your cube, you want delete the request of the cube?

alessandro

Former Member
0 Kudos

Alessandro,

almost...

I loaded data from different companies (with EAI), for different month. I'd like to delete previous uploads which have similar selection for same company and same fiscal period. But the full selection contains many fields not only these two, and the other fields are different in every uploads. Therefore i cannot use the standard deletion method, because the selection isn't totally same.(I already test it) Therefore I need an ABAP routine.

Regards,

Richard

Former Member
0 Kudos

Richard,

in the table rsiccont you have all the request include in your cube. In rsseldone you have all the request (include and deleted).

The function RSSM_DELETE_REQUEST delete your request from the cube and the function BAPI_IPAK_GETDETAIL define the selection for your actual load.

alessandro

Former Member
0 Kudos

In the update rule you don't can delete the request because because you have many records.

if the cube is not compressed and not with aggregate you must create a program after the load of cube that delete the request.

or..

in your infopackage you can post an abap routine in a selection, read the request of the cube in table rsiccont, read the selection, call the function ipak_get_detail and call the function for delete the request of the cube.

alessandro

Former Member
0 Kudos

Alessandro,

great! table rsiccont is a really useful table. Thanks.

but i don't want create a brand new ABAP program, i'd like to use "Request Selection Throught Routine" check-box, and i'd like to create a routine there.

Could you help me a sample code, how can i do it?

Thanks a lot

Richard

Former Member
0 Kudos

SELECT * FROM RSICCONT INTO TABLE IRSICCONT

WHERE ICUBE = ''.

DESCRIBE TABLE IRSICCONT LINES L_LINES.

IF L_LINES GT 0.

SELECT * FROM RSSELDONE INTO TABLE IRSSELDONE

FOR ALL ENTRIES IN IRSICCONT

WHERE RNR = IRSICCONT-RNR

AND YOUR FIELD = .... IE. 0COSTCENTER

ENDIF.

call function ipak_get_detail with your infopackage.

read table irsseldone with key ....(your fields selection)

if sy-subrc eq 0.

call function delete request with the request of irsseldone.

alessandro

Former Member
0 Kudos

Hi,

the routine already works, but unfourtanetely it deletes the current request too (not only the previous one), because RSICCONT table contains it.

How can I exclude the current request?

Has you any idea?

Thanks a lot

Richard Tunkel

Former Member
0 Kudos

Richard,

read the table rsreqdone with your request,

alessandro

Former Member
0 Kudos

Alessandro,

how do you know the current request number?

Richard

Former Member
0 Kudos

Richard:

two ways,

1 order by descending

2 see the status of request, if it's yellow...

alessandro

Former Member
0 Kudos

Hi Richard,

goto table rsreqicods. The one with the highest timestamp for your cube should be the one you won't delete.

regards

Siggi

somnathkumar
Active Participant
0 Kudos

Have you had a look at the standard functionality available in a infopackage for automatic deletion of overlapping requests in a cube?

http://help.sap.com/saphelp_bw30b/helpdata/en/f8/e5603801be792de10000009b38f842/frameset.htm

Isn't this your requirement?

Former Member
0 Kudos

Hi,

unfourtunately not. The requests are not punctually same therefore the system cannot delete them automatically. I already tested it. I need ABAP routine, other solution didn't work.

Regards,

Richard