on 2005 Nov 10 8:06 PM
Hi,
What is the name of the database table where the BW Master Data Documents are stored? Furthermore, I need to be able to get the last changed date of the document in the database table.
I know that the Master Data Repository uses database table BWCONTMAST. But this table doesn't have a date.
I really need the date because I will be writing an ABAP program to delete old documents.
Thanks.
Hi,
there is not just one table for master data documents. All the tables related to master data documents start with RSOD* and end with *MA. May be that helps searching... You can find the creation date of a document in table RSODPHIOMA.
I do not recomend using the tables directly for ABAP. There is a function module available (RSOD_DOC_MAST_CHANGE) to create documents. You can use Function module SKWF_IOS_DELETE to remove the physical documents from the database.
Hope that helps
Stephan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
you need to code something like:
SELECT OBJECT_ID FROM RSODLOPRMA
WHERE ... (depends on your document names)
Fill internal table L_T_IOS of structure SKWF_IO in this select.
Then:
CALL FUNCTION 'SKWF_IOS_DELETE'
EXPORTING
X_DELETE_CHILDREN = 'X'
IMPORTING
ERROR = E_S_ERROR
TABLES
IOS = L_T_IOS
BAD_IOS = E_T_BAD_IOS.
If you have runtime problems because of two many documents, you can add IN BACKGROUND TASK after the CALL FUNCTION.
Does this help?
Regards
Stephan
My problem is filling internal table of type SKWF_IO. Structure SKWF_IO has 4 components: OBJTYPE, .INCLUDE, CLASS, and OBJID.
CLASS would be 'BW_LO_MAST'
OBJID would be the long alphanumeric
What goes in OBJTYPE and .INCLUDE?
I tried populating CLASS and OBJID and left OBJTYPE and .INCLUDE empty. The function suceeded with sy-subrc=0 but the document is still there.
Can you provide more details on populating the internal table of type SKWF_IO?
Thanks.
I hardcoded data in my ABAP program to see how the function works. But I haven't been successful. Here's my code:
-
DATA: mytab type SKWF_IO OCCURS 0 WITH HEADER LINE.
mytab-objtype = 'L'.
mytab-class = 'BW_LO_MAST'.
mytab-objid = '42C92336997D6DCDE100000096EB1F7E'.
CALL FUNCTION 'SKWF_IOS_DELETE'
EXPORTING
X_DELETE_CHILDREN = 'X'
IMPORTING
ERROR =
TABLES
IOS = mytab
BAD_IOS =
.
IF sy-subrc = 0.
write: / 'success'.
ENDIF.
-
I logged out of the system. Came back in and viewed the documents in RSA1. The document I'm trying to delete is still there.
Any suggestions?
Hi,
as the logical and physical document have different object IDs, you indeed need to run the function module twice.
I have just checked the SAP Coding, there is another FM called SDOK_LOIOS_DELETE_WITH_PHIOS, may be that is more easy to use. I have never used it in a project, but a little test has shown that here the logical and the physical document are deleted. As input you need the object key of the logical document and the class (BW_LO_MAST for master data).
Regards
Stephan
User | Count |
---|---|
61 | |
11 | |
7 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.