Master Data Deletion using ABAP
Does anybody have an idea of which function is called when master data is deleted?
I would like to automate master data deletion
Any suggestion is welcome!
Thanks
Ioan
Hi Ioan !
Try to look at the FM 'RSDMD_DEL_MASTER_DATA'(in the pgm LRSDMDU12)...but pay attention to the other elements that the system certainly checks in order to complete this type of process !
Bye,
Roberto
Similar Messages
-
BPC Master Data Deletion through ABAP code
Hi All,
I have a requirement of deleting the orphan nodes for one of the dimension in BPC using ABAP code.
Please let me know any standard program or classes for deleting the master data from dimension.
Regards
Pratibha BiradarHi Pratibha,
Here is the code to add master data, you can change the flag to 'D' to delete, i have not checked it for delete, it is working for adding.
DATA: ls_message TYPE uj0_s_message,
lt_messages TYPE uj0_t_message,
l_success TYPE uj_flg,
l_appset_id TYPE uj_appset_id,
l_dimension_id TYPE uj_dim_name,
lo_member_mgr TYPE REF TO if_uja_member_manager,
lo_dimension TYPE REF TO if_uja_dimension_manager,
lo_master_data_store TYPE REF TO if_ujam_master_data_store,
lo_context TYPE REF TO if_uj_context,
ls_dimension TYPE uja_s_dimension,
lt_errors TYPE uja_t_members_error,
lr_members TYPE REF TO data,
lr_data TYPE REF TO data.
FIELD-SYMBOLS:
<lt_member_data> TYPE STANDARD TABLE,
<ls_member_data> TYPE any,
<lv_field> TYPE any.
TRY.
lo_context = cl_uj_context=>get_cur_context( ).
cl_uj_context=>set_cur_context(
i_appset_id = l_appset_id
i_module_name = lo_context->d_calling_module
is_user = lo_context->ds_user
lo_dimension = cl_uja_bpc_admin_factory=>get_dimension_manager(
i_appset_id = l_appset_id
i_dimension_id = l_dimension_id
lo_dimension->get(
EXPORTING
if_with_hier_maxlevel = abap_false
IMPORTING
es_dimension = ls_dimension
CREATE OBJECT lo_master_data_store TYPE cl_ujam_master_data_store.
* creating masterdata table
lr_members = lo_master_data_store->get_table_buffer( ls_dimension ).
ASSIGN lr_members->* TO <lt_member_data>.
* Add members to <LT_MEMBER_DATA>, these are the member that will be saved.
CREATE DATA lr_data LIKE LINE OF <lt_member_data>.
ASSIGN lr_data->* TO <ls_member_data>.
* Fill each field, such as ID, and EVDESCRIPTION, update other fields here as well as
* any properties that need to be updated.
ASSIGN COMPONENT 'ID' OF STRUCTURE <ls_member_data> TO <lv_field>.
IF sy-subrc = 0.
<lv_field> = 'ProductD'.
ENDIF.
ASSIGN COMPONENT 'MBR_NAME' OF STRUCTURE <ls_member_data> TO <lv_field>.
IF sy-subrc = 0.
<lv_field> = 'ProductD'.
ENDIF.
ASSIGN COMPONENT 'EVDESCRIPTION' OF STRUCTURE <ls_member_data> TO <lv_field>.
IF sy-subrc = 0.
<lv_field> = 'Product D Update'.
ENDIF.
ASSIGN COMPONENT 'PARENTH1' OF STRUCTURE <ls_member_data> TO <lv_field>.
IF sy-subrc = 0.
<lv_field> = 'TotalProduct'.
ENDIF.
ASSIGN COMPONENT 'OBJVERS' OF STRUCTURE <ls_member_data> TO <lv_field>.
IF sy-subrc = 0.
<lv_field> = 'A'. "Version flag, should be "A" for Active
ENDIF.
ASSIGN COMPONENT 'ROWFLAG' OF STRUCTURE <ls_member_data> TO <lv_field>.
IF sy-subrc = 0.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""Here you can change it to 'D' for Deleting """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
<lv_field> = 'I'. " This is an action flag, I=Insert, M=Modify """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
ENDIF.
APPEND <ls_member_data> TO <lt_member_data>. " Add to the table.
* Create member manager
lo_member_mgr = cl_uja_bpc_admin_factory=>get_member_manager(
i_appset_id = l_appset_id
i_dimension_id = l_dimension_id ).
* Save the members UNCOMMENT ONLY when you want to write the data!!!!!
* lo_member_mgr->save(
* EXPORTING
* ir_members = lr_members " List of members to save
* IMPORTING
* et_errors = lt_errors
* NOW PROCESS THE DIMENSION
DATA: ls_dimensions TYPE uja_s_dim_name,
lt_dimensions TYPE uja_t_dim_name.
CLEAR ls_dimensions. REFRESH lt_dimensions.
ls_dimensions-dimension = l_dimension_id. " Add dimensions to the list
APPEND ls_dimensions TO lt_dimensions.
lo_member_mgr->process(
EXPORTING
it_dim_list = lt_dimensions
if_set_offline = abap_false
if_validate = abap_true
IMPORTING
ef_success = l_success
et_message_lines = lt_messages ).
CATCH cx_uj_no_auth .
ENDTRY.
hope this will help,
thanks,
Rishi -
Issue with master data deletion
Hi,
In one of our report, there is a filter option on country.The help values on this filters shows some country codes along with country Text values.These codes were once used before the codes with text were maintained.We dont want these codes to appear in the selection options.
Filter looks like this :
AE
AZ
Austria
Australia
B
Belgium
Now, once the texts were maintained, we deleted the data from cube and reloaded it however, the filter option still shows those codes.
I checked in the cube entries and these codes are no where used.
These codes are however, still lying in the dimension table.
how can we get rid of these country codes in the selection option.
Query already have option of having only posted values in Infoprovider as selection input.
I hav tried RSRV elementary test "Entries not used in dimension table" n this didnt work.
Any clue ?
Regards,
TapishDbl click 0COUNTRY infoobject, under 'Business Explorer' tab, select Only Values in InfoProvider' for 'Query Def Filter Value selection' & 'Query Execution Filter Value selection'. See whether this works.
ELSE
Delecion of the master data
Deleting Master data -
Hello Experts,
I know this is not a new topic to be posted in forum as we can find lots of threads on the same. But i tried different ways and could not succeed and so there is no other way except to post what i did and get suggestions from you all. Any help will be greatly appreciated and rewarded.
Now coming to the scenario where i am in: There are two invalid master data values in SID table (no attributes for this, => SID and value). I tried deleting the two values
1. using functional module RSDDCVER_USAGE_MDATA_BY_SID. But this resulted in short dumps with messsage INVALID TAB NAME
2. using program RSDMD_DEL_MASTER_DATA: Though i could delete values in development in few seconds, this program took more than 3hrs and did not complete. When i checked the process in SM66, it was deleting unused dimension Ids in other dimension of infocube in which this object is being used.
3. i could not try "maintain master data" of infoobject from RSA1 since i dont have authorization to do it.
i think the only way is to delete using a custom program. Any thoughts, any experiences please share and do let me know in case of any details.
thanks,
MadhavHi Madhav,
I don't have a specific answer for you, but I had a similar problem with master data deletion. It was with 0Vendor and I just wanted to delete all the unused entries, but running the RSDMD_DEL_MASTER_DATA program would always give a short dump. Same think if I tried to delete using the Delete Master Data button on InfoObject.
Applying the latest SPs worked for me. We are on BW 3.5 (NW2004), SP 18.
Good Luck.
Dave -
MAster data deletion throws a dump
hi,
I am trying to delete the records for a Master info object but when i click on the thrash button , the records are not seen but when i try to move on -it asks me to save and then i tried with Sid and with out but whatever i do , it throws out the following dump .
I am eagerly looking forward for a solution to this.
Thanks a lot in advance,
DUMP ERROR When trying to DELETE MASTER DATA
Runtime Errors UNCAUGHT_EXCEPTION
Exceptn CX_RSRV_METADATA_ERROR
ShrtText
An exception that could not be caught occurred.
What happened?
The exception 'CX_RSRV_METADATA_ERROR' was raised but was not caught at any
stage in the
call hierarchy.
Since exceptions represent error situations, and since the system could
not react adequately to this error, the current program, 'SAPLRSDDCVER4', had
to
be terminated.
Error analysis
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_RSRV_METADATA_ERROR', was
neither
caught nor passed along using a RAISING clause, in the procedure
"GET_ODS_METADATA" "(FORM)"
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
An exception occurred
Missing RAISING Clause in Interface
Program SAPLRSDDCVER4
Include LRSDDCVER4F04
Row 473
Module type (FORM)
Module Name GET_ODS_METADATA
Trigger Location of Exception
Program SAPLRSDDCVER4
Include LRSDDCVER4F04
Row 498
Module type (FORM)
Module Name GET_ODS_METADATA
Source Code Extract
Line SourceCde
468 ----
469 * -->I_ODSOBJECT ODS object
470 * <--C_ODS_SID SID of Infoprov ODS object
471 * <--c_atab_name name of active data table
472 ----
473 FORM get_ods_metadata
474 USING i_odsobject TYPE rsdodsobject
475 CHANGING c_bexfl TYPE rs_bool
476 c_ods_sid TYPE rsd_sid
477 c_atab_name TYPE tabname
478 RAISING cx_rsrv_sid_creation_error.
479
480 DATA:
481 l_s_odso TYPE rsd_s_odso.
482 * l_ods_sid TYPE rsd_sid,
483 * l_atabname TYPE tabname,
484 * l_o_odso TYPE REF TO cl_rsd_odso.
485
486 CALL METHOD cl_rsd_odso=>get_info_static
487 EXPORTING
488 i_odsobject = i_odsobject
489 i_objvers = 'A'
490 IMPORTING
491 e_s_odso = l_s_odso
492 EXCEPTIONS
493 odso_not_found = 1
494 iobj_not_found = 2
495 internal_error = 3
496 OTHERS = 4.
497 IF sy-subrc <> 0.
>>>> RAISE EXCEPTION TYPE cx_rsrv_metadata_error
499 EXPORTING
500 msgty = sy-msgty
501 msgid = sy-msgid
502 msgno = sy-msgno
503 msgv1 = sy-msgv1
504 msgv2 = sy-msgv2
505 msgv3 = sy-msgv3
506 msgv4 = sy-msgv4.
507 * RAISE metadata_error.
508 ENDIF.
509
510 c_bexfl = l_s_odso-bexfl.
511
512 IF c_bexfl = rs_c_true.
513
514 *for ODS objects no SID is evaluated
515 *get sid of ODS object
516 CALL FUNCTION 'RRSI_VAL_SID_SINGLE_CONVERT'
517 EXPORTING
Thanks,
SSHi,
Make Sure that the Master data ur deleting must not be used by any transaction data
there is function module can be used RSDMD_DEL_MASTER_DATA, we have create a program for this,
check thread
Master data Where-used
search 'delete master data' and 'sdn forum', you may see some discussion about this topic
Cleanup of Master Data
How to see where all the master data is being used
Deleting Master Data at Single Record Level
http://help.sap.com/saphelp_nw04/helpdata/en/3b/f817385bf3be74e10000009b38f842/content.htm
Deleting Master Data and Texts for a Characteristic
http://help.sap.com/saphelp_nw04/helpdata/en/80/1a6365e07211d2acb80000e829fbfe/content.htm
-Shreya
-Shreya -
"master data deletion for requisition" before master data loading
Hello Gurus,
in our bw syetem , for process chains for loading master infoobjects, all include "u201C master data deletion for requisition" ABAP
process except for one process chain. my question is:
why that process chain for master data loading is different from others as for lacking "master data deletion for requisition" in it?
so it does not matter if you include " master data deletion for requisition" ABAP process in process chain for master data loading ?
Many thank.Hi,
ABAP Process means some ABAP program is being executed in this particular step.
It's possible that for all of your process chains except for that one requirement was to do some ABAP program processing.
You can check which program is executed by following below process:
Open your process chain in planning view -> Double click on that particular ABAP process -> Here you can see program name as well as program variant.
Hope this helps!
Regards,
Nilima -
Identifing duplicate master data records using the MDM Import Manager
hi all
I read the Topis "How to identify duplicate master data records using the MDM Import Manager</b>"
i tried to create import maps and to set rules. but when i import them it creates the new vendor records for each rule with rest of the fields blank.
when i import vendor data all the three fields i.e Match rate , match type and match group are blank.
My Question is :
I am getting vendor data from SAP R/3.
In which source (in lookup xml file or data xml file) do i have to include these above three fields and how all the rules will be reflected in repository?Hi Sheetal
Here we go when do you Import any data (vendor master) please follow the following steps;
1. First of all apply the map to the source data
2. In the Match Record tab there are 3 possiblities
a.[Remote Key] : Checks the current source rec with
repository along with all the fields - This is
default
b.Remove [Remote key] - by double click the same; and
choose any single fields like Vendor Number or
name - Then the current record will be matched
with the repository based on the field.
c.Instead of single field you can choose combination
also.
3. Based on the Match results, match class will be set
automatically;
a. None
b. Single
c. Multiple
4. Then Match Type
a.Exact-All the individual value matches are Equal.
b.Partial-At least one value match is Equal and at least one Undefined; no value matches are Not Equal.
c.Conflict-At least one value match is Equal and at least one value match is Not Equal.
5. then chek the Import status and Execute the import.
Hope this helps you.
cheers
Alexander
Note: Pls dont forget reward points. -
Can we restrict a master data characterstic using another master data chara
Hi All,
Can we restrict a master data characterstic using another master data characterstic, if they were both compounded together. There are two fields viz.., A,B in r/3 master data table in which A and B combinely serve as a key. In BW side i have created a master data object for A and compuded object B ot it. So that i am getting all the data from r/3 table. But in query designer when i am trying to restrict object A values by object B, in a structure i am not getting any data. If i do same out of structure i am getting data in report. Please help in overcoming this problem.
Regards,
RajkandulaHi,
Yes it should display data, but it is not displaying. If i am doing the same restriction out side of a structure i am getting data. But whilr trying to do so, i am not getting that. The reason why i am bothering about structure is 'Objext B have 10 different values and i want 10 coloumns in report in whicg Obj A must display respective data when i restrict it by B' , whicg i can do this only if i use structure else i can't restrict B that many times .
I hope u got my problem and plz give help me in this.
Regards,
Rajkandula -
MDM Material Master data creation using Guided Procedures
Well, i searched a lot on the forums but didnt get any thing.
My requirement is to use MDM Java APIs for creating material master data using Guided Procedures. However, i got one nice document "[How to create master data centrally using guided procedure|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/92811997-0d01-0010-9584-f7d535177831]". This doc discuss about business partner creation and also have a link to downloadable file. But now when i click on this download link, it says download expired !
Can anyone please post a valid link to these deployable files?
Or anyone could post some usefull materail or links on the above mentioned requirement?
Kindly reply, any help will be highly appreciated.
Regards,
Ameya
Edited by: Ameya Pimpalgaonkar on Sep 27, 2008 11:29 AMWow, that was indeed a quick reply i have ever got on SDN. Thanks for the excellent link jitesh. However, where will i get the deployable files that it selects in the Import GP/CAF contents step of the demo? those are the webdynpro components files. One is SCA and other is SDA. Where will i get them?
Kindly post the link to those files if u have them or else send it across.
Regards,
Ameya
Edited by: Ameya Pimpalgaonkar on Sep 27, 2008 11:53 AM -
Changing Field Label length for Data Element using ABAP code.
Hi Experts,
We have a scenario where we have to update the maximum length of the various Field Labels (Short, Medium, Long..) for a Data Element using ABAP code.
Does anyone know how to do this ? Is there a Function Module available for this purpose ?
Appreciate your valuable inputs.Hi ,
Use the view
DD03M
Give
TABNAME as table name,
DDLANGUAGE = EN / sy-langu
and order by position. (for correct sequencing)
You will get description of the fields (short,medium, long etc). You will also get the length and other details. -
Master data sharing using ext. star schema
Hi,
I have undetrstood the concept of extended star schema.
I understand,
One of the advantages of extended star schema is, that the master data can be shared, meaning, since the master data is stored separately, other star schema's can also share this master data provided it is of the same relevance( with same infoobjects used in this star schema).
Confirm if my understanding is right and if right,
Any idea or suggestion how to demonstrate this ?
Points will be given for good answers.
thanks.
bwlearnerHey,
If u could map this with programming.
MASTER DATA Tables are like GLOBAL declaration and InfoCubes (Fact Tables) are like LOCAL declaration. Any number of IncoCubes can access one particular Master Data Table.
Assume Sales data coming from 5 regions. Here 0CUSTOMER & its attributes will update the same Master Data Table. The data fields will be stored in the Infocube. So all the 5 InfoCubes access the same Master Data tables using the Dimension & SID tables.
Clear ?
Best Regards....
Sankar Kumar
+91 98403 47141 -
InfoUser Master Data Export using scc8
Hi Team,
Iam doing User Master Data Export using scc8 .I have 1 question regarding this:
1)When i took export using scc8 only 1 TR is created in cofiles folder and i cant see that TR in data-files folder.
Can anybody help me in this??
More info:
We are going to rebuild the system so we need to preserve the user master record data.
Regards,
Abhilash
Edited by: gundala$ on Feb 29, 2012 8:10 AM
Edited by: gundala$ on Feb 29, 2012 8:10 AMHi,
Kindly go through the following link.
http://forums.sdn.sap.com/thread.jspa?threadID=1310350
Anil -
Creating Master Data Centrally Using Guided Procedures
Is it possible to create master data centrally using GP say for example creating Material master data without using MDM? Is there a stand out of box delivered scenario exist without MDM. I did see the article Create Master Data Centrally Using Guided Procedures but it uses MDM.
Any help appreciated.Wow, that was indeed a quick reply i have ever got on SDN. Thanks for the excellent link jitesh. However, where will i get the deployable files that it selects in the Import GP/CAF contents step of the demo? those are the webdynpro components files. One is SCA and other is SDA. Where will i get them?
Kindly post the link to those files if u have them or else send it across.
Regards,
Ameya
Edited by: Ameya Pimpalgaonkar on Sep 27, 2008 11:53 AM -
Master Data Deletion - Data used in query
Hi all,
I work with BI 7. I noticed a strange thing. I wanted to delete data from a master data object, but the operation is not allowed. If I see the logs for "where used list", I see a query. I deleted data from DSO objects and infocubes, and I thought it was enough.
Any idea?
Thanks a lot.Hello Gianluca,
To be able to delete master data, no transaction data must exist for this master data, the master data must no longer be used as attribute value, hierarchies to this master data must not exist, and it must not be used in a query.
If you look at a record in the SID table, you can check the usage flag DATAFL. If the value is X, it is used or has been used by another BW oject.
But to answer your question, do delete the master data, it must no longer be used in a query.
Best Regards,
Vincent -
Master data deleted dispite it is used in other Cubes
Hello everybody,
I deleted master data by the classic way: right-click on the characteristic --> delete master data --> with sid.
(not with other ways!!!)
Thinking that the system will not delete the master data that is used in Cubes.
I reloaded new master data.
After a complaint from a power user that he cannot make a drill down with this characteristic in one report, i begin to investigate.
Firstly, i tested all the reports where this characteristic is used and all the reports did the same error.
After i went is to display data of one of the infocube where this characteristic is used and when i select this characteristic for the output, nothing returns as result.
After that i checked the values of the characteristic sid's in the cubes and i see that the range of the char sid's in the cube do not correspond to the range of the sid's in the sid table of the characteristic.
In fact, none of the characteristic sid of the cube where present in the sid table of the characteristic.
Why? probably because when i deleted the master data, the system deleted all the records, but why also those that are present in the cube?
When i go to SLG1 and select the correct Object, as message for this deletion: "All entered data was deleted"
Any suggestion, advise is welcome.
Thanks
Regards,Hi,
The way you have used, I would expect that it will not delete the used master data in other cube. If possible reload your master data but I think this will not resolve your issue as new SID values will get created. Just give a try.
Regards,
Durgesh.
Maybe you are looking for
-
Acrobat 9 Pro 9.3.4 update breaks app language setting
Hi there, I'm using the English/French/German version of Acrobat 9, with the language usually set to German. After updating to 9.3.4 it is no longer possible to use any language except English. I can neither change it in the preferences nor use "chos
-
I teach in an 18 station music tech lab. Recently several computers have had a problem with the Sample Editor. When they open a sequence in the sample editor the file will not play. The song line pointer moves, but no sound. This is happening in seve
-
Search option in tracklist/playlist in nokia 5310 ...
Hi, I am having nokia 5310 xpress music. I am looking for the search option in playlist. sometimes playlist is too long and you are looking for a particular song to be player then I need to scroll down the whole list to find the related song. I am ha
-
My PDFexport always has an error when signing in .
my PDFexport always has an error when signing in . What can I do to troubleshoot
-
Safari won't open since update
I don't think I have the same plug-ins listed for previously posted answer. The Internet Plug-ins that I don't recognize are npg.plugin, nsIQTScriptablePlugin.xpt, QuartzComposer.webplugin, SharePointBrowserPlugin.plugin, and SharePointWebKitPlugin.