cancel
Showing results for 
Search instead for 
Did you mean: 

delete master data

Former Member
0 Kudos

Hello All,

How do I delete master data records (0customer) <b>in background</b>?

These records <b>are not</b> used in any Infoprovider or report, but the "Delete Data" process (from popup menu) fails on "time limit"...

Tnx a lot,

Ofer.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

When you opt to delete, the system automatically schedules a background job.

Ravi Thothadri

Former Member
0 Kudos

Thank you all,

Riccardo - I couldn't find a background option from within "maintain master data". The delete button responds quite fast but then, the save operation gets "time limit".

VIshwa - I couldn't find <b>selective deletion</b> (this is what I need) in RSD1.

Is there such option?

Olivier - Can I use RSDMD_DEL_BACKGROUND with <b>selective deletion</b>?

Ravi - You're right. But I can't get to this stage. I get "Maximum runtime exceeded" before the system schedules a background job.

Any other ideas??

tnx.

Former Member
0 Kudos

why don't you use the program?

Yes you can selectively delete master data but you'll have to use now the function module RSDMD_DEL_MASTER_DATA and populate the internal table I_T_CHAVL with your characteristics values.

Create a little ABAP calling this FM in order tu run it in background.

hope this helps...

Olivier.

Message was edited by:

Olivier Cora

Former Member
0 Kudos

Thanks Olivier,

How do I populate the internal table I_T_CHAVL with my chars values (e.g. account_group=z100)?

Thanx for your help.

Former Member
0 Kudos

Hi,

if you are just runing the FM via SE37 then click on the internal table icon, enter your value and go back; you'll see 1 entry in the testing screen.

If you are developping an ABAP report:.


TYPES: ly_CHAVL         type RSCHAVL.
DATA:  gt_CHAVL_DEL    type table of ly_CHAVL.
DATA: lv_chavl LIKE RSGENERAL-CHAVL.

lv_chavl = 'z100' "attention if your IOBj accepts lower case chars...

APPEND lv_chavl TO gt_CHAVL_DEL.

    CALL FUNCTION 'RSDMD_DEL_MASTER_DATA'
      EXPORTING
        I_IOBJNM                    = 'ACCOUNT_GROUP'
*       I_FLG_DELETE_ALL            = ' '
        I_FLG_DELETE_SIDS           = 'X'
*       I_FLG_DELETE_SIDS_ASK       = ' '
        I_FLG_DELETE_TEXTS          = 'X'
        I_T_CHAVL                   = gt_CHAVL_DEL
        I_FLG_DIALOG                = ' '.
*       I_FLG_FORCE_DELETE          = ' '
*       I_FLG_SIMULATION            = ' '
*       I_WITHOUT_PROTOCOL          = ' '
*     IMPORTING
*       E_RESULT                    =
*       E_T_SIDVAL_USED             =
*       E_T_PROTOCOL                =
*       E_T_ULIST_DIM               =
*       E_T_ULIST_ATR_NAV           =
*       E_T_ULIST_HIE               =
*       E_T_ULIST_HIE_NODE          =
*       E_T_ULIST_QUERY             =
*       E_PROT_OBJECT               =
*       E_PROT_SUBOBJECT            =
*       E_PROT_EXTNUM               =
*     EXCEPTIONS
*       ILLEGAL_INPUT               = 1
*       IOBJ_ERROR                  = 2
*       SID_ERROR                   = 3
*       PROGRAM_ERROR               = 4
*       ENQUEUED                    = 5
*       QUEUE_ERROR                 = 6
*       NO_CHKTAB                   = 7
*       CHKTAB_NOT_GENERATED        = 8
*       NO_AUTHORITY                = 9
*       RSDPW_ERROR                 = 10
*       OTHERS                      = 11
             
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

hope this helps...

Olivier.

Former Member
0 Kudos

Olivier,

Thank you for your effort.

What I ment is I intend to selective delete unused records (about 5000) from 0CUSTOMER, where ACCOUNT_GRP='Z100' (ACCOUNT_GROUP is an attribute IObj of 0CUSTOMER).

What should the I_T_CHAVL table look like? How do I create ti?

tnx again.

Former Member
0 Kudos

ok, I got it now;


TYPES: ly_CHAVL         type RSCHAVL.
DATA:  gt_CHAVL_DEL    type table of ly_CHAVL.
DATA: lv_chavl LIKE RSGENERAL-CHAVL.

SELECT DISTINCT CUSTOMER
INTO TABLE gt_chavl_del
FROM /BI0/PCUSTOMER
WHERE OBJVERS = 'A'
  AND ACCNT_GRP = 'Z100'.
"the above will fill your inttable.
 
    CALL FUNCTION 'RSDMD_DEL_MASTER_DATA'
      EXPORTING
        I_IOBJNM                    = '0CUSTOMER'
*       I_FLG_DELETE_ALL            = ' '
        I_FLG_DELETE_SIDS           = 'X'
*       I_FLG_DELETE_SIDS_ASK       = ' '
        I_FLG_DELETE_TEXTS          = 'X'
        I_T_CHAVL                   = gt_CHAVL_DEL
        I_FLG_DIALOG                = ' '.
*       I_FLG_FORCE_DELETE          = ' '
*       I_FLG_SIMULATION            = ' '
*       I_WITHOUT_PROTOCOL          = ' '
*     IMPORTING
*       E_RESULT                    =
*       E_T_SIDVAL_USED             =
*       E_T_PROTOCOL                =
*       E_T_ULIST_DIM               =
*       E_T_ULIST_ATR_NAV           =
*       E_T_ULIST_HIE               =
*       E_T_ULIST_HIE_NODE          =
*       E_T_ULIST_QUERY             =
*       E_PROT_OBJECT               =
*       E_PROT_SUBOBJECT            =
*       E_PROT_EXTNUM               =
*     EXCEPTIONS
*       ILLEGAL_INPUT               = 1
*       IOBJ_ERROR                  = 2
*       SID_ERROR                   = 3
*       PROGRAM_ERROR               = 4
*       ENQUEUED                    = 5
*       QUEUE_ERROR                 = 6
*       NO_CHKTAB                   = 7
*       CHKTAB_NOT_GENERATED        = 8
*       NO_AUTHORITY                = 9
*       RSDPW_ERROR                 = 10
*       OTHERS                      = 11
             
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

you'll have to create an ABAP report with the above code.

hope this helps...

Olivier.

Former Member
0 Kudos

Olivier,

Thanks a lot.

Your suggestion helped a lot (points assigned).

Even though, I was left with quite a lot 0CUSTOMER records (with ACCNT_GRP = ' ', which was my "selective deletion patameter") that were not deleted. Is there any easy way to find out in which Infocube or report they are (probably) used?

Thanks again,

Ofer.

Former Member
0 Kudos

Hi,

did you try displaying the log in SLG1 / Obj = RSDMD, SubObj MD_DEL?

The log should tell you why a SID wasn't deleted and where it was used.

You should enhance the program: define the elements necessary in order to have all the return parameters (the IMPORTING) of the function module filled.

I believe the function module has populated the log anyway otherwise enhance your program.

hope this helps....

Olivier.

Former Member
0 Kudos

Olivier,

Many thanks.

I got it now. Problem solved.

Ofer.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

You can delete this Master data with SID values.

Again SID values will be generated afresh when you reload the Master Data

Anyway, you can only delete master data if you have no data into the transactional data target (ODS or CUBE) where this master data is contained.

Hareesh

Former Member
0 Kudos

Hi,

use program RSDMD_DEL_BACKGROUND with SE38.

variant:


P_IOBJNM      <your IOBJ>       
P_CHABNM      <your IOBJ>
P_DELSID      X "if you want to delete SIDs             
P_DELTXT      X "...text           
P_OBJ         RSDMD        
P_SUB         MD_DEL       
P_EXT         <your IOBJ>   
P_NOPROT      X "if you don't want to log             

you'll be able to see the deletion log in SLG1 and the entries you have entered for P_OBJ...

hope this helps...

Olivier.

Message was edited by:

Olivier Cora

Former Member
0 Kudos

Hi

you can go for selective deletion under Masterdata maintainance RSD1.

Regards,

VIshwa.

Former Member
0 Kudos

Hi Ofer,

Not sure but if go into Maintain Master Data and you select a set of records and select delete the system will ask you if direct or in Background.

Try.

Ciao.

Riccardo.