Use of Oracle Triggers as Deltamechanism for Custom Tables
Hi Colleagues,
we have a 50 million records Y-Table in SAP ECC 6.0 with Oracle 10.2.0.2.0.
The Y-Table have no update, timestamp or numeric pointer fields for using the SAP generic delta feature.
So we will use the Oracle trigger feature: CREATE TRIGGER <trigger_name> FOR <table_name> to get the Y-table keys of inserted, updated or deleted records.
Are there any side effects or warnings for this?
Thanks and regards,
Wolfgang
Hi,
my Ora-Trigger-Solution works well on R/3 development system.
On quality assurance system it dumps with ORA-04098.
It looks like, that required object privileges have been never granted.
Do someone know, what priviliges or authorisations have to be maintained and where to maintain this?
Thanks and regards,
Wolfgang
Similar Messages
-
How to populate date & time when user enter data for custom table in sm30
Can anyone tell me How to populate system date & time when user enter data for custom table in sm30..
Req is
i have custom table and using sm30 user can enter data.
after saving date i want to update date & time in table
Pls let me know where to write the code?
Thanks in AdvanceYou have to write the code in EVENT 01 in SE54 transaction. Go to SE54, enter your Ztable name and in the menu 'Environment-->Events'. Press 'ENTER' to go past the popup message. In the next screen, click on 'New Entries'. In the first column, enter 01 and in the next column give some name for your routine(say UPDATE_USER_DATE_TIME). Then click on the souce code icon that appears in blue at the end of the row. In the code, you need logic like below.
FORM update_user_date_time.
DATA: f_index LIKE sy-tabix.
DATA: BEGIN OF l_total.
INCLUDE STRUCTURE zztable.
INCLUDE STRUCTURE vimtbflags.
DATA END OF l_total.
DATA: s_record TYPE zztable.
LOOP AT total INTO l_total.
IF l_total-vim_action = aendern OR
l_total-vim_action = neuer_eintrag.
MOVE-CORRESPONDING l_total TO s_record.
s_record-zz_user = sy-uname.
s_record-zz_date = sy-datum.
s_record-zz_time = sy-uzeit.
READ TABLE extract WITH KEY l_total.
IF sy-subrc EQ 0.
f_index = sy-tabix.
ELSE.
CLEAR f_index.
ENDIF.
MOVE-CORRESPONDING s_record TO l_total.
MODIFY total FROM l_total.
CHECK f_index GT 0.
MODIFY extract INDEX f_index FROM l_total.
ENDIF.
ENDLOOP.
ENDFORM. " UPDATE_USER_DATE_TIME
Here ZZTABLE is the Z table and ZZ_USER, ZZ_DATE, and ZZ_TIME are the fields that are updated. -
Add Table maintenance program for custom table to an existing func group
Hi Guys,
Can I add Table maintenance program for custom table to an existing function group or I need to create a new
function group for each custom table.
Thanks,
miniYou can add to an existing function group, there's nothing technically to stop you doing this. However, consider that this is creating generated function modules in this function group and you would be wise to avoid using a function group containing manually created modules.
I personally always create a new function group, using the name of the table as the name of the function group.
Regards,
Nick -
Is table maintenance generator only for custom table?
hi ,
i have doubt is table maintenance generator only for custom table?hi swamya,
Table Maintanance Generator is used to create/change/delete table entries in a particular table.
In the production system, end-users will not be having access to transaction codes like SE11 and SE16. Developers will not be having access to many transaction codes including the above two.To view the contents of the database table, we will use SE16n in Production system. All these authorizations will be maintained by BASIS team, by creating access profiles.So in order to edit or create the contents of a database table, we should go for table maintenance generator. In real time, authorizations will be maintained in production system.
The second reason is, we can edit or create multiple entries at a time, using tablemaintenance generator.
Apart from that we have options like 'Enter conditions' in table maintenance screen SM30.
hope this helps in clearing ur doubt.
Regards
Saurabh -
Creating TPR for customized table
Hi,
I want to create transport a customized table to QA from Dev box.
I know how to create transport request for reports and smartforms and all.
But How do I create transport request for customized table ?
Is it thorugh SM30 ?
Please help me...this depends on the Table maintenance dialog for the table. (utiliteis->table maint generator).
If it has the recording routine set as 'standard' then SM30 will automatically create a transport when you hit the save button after perfroming maint on the table.
For 'no, or user..' you will have to manually add entries to a transport.
Go to SE10. Display your transport. Double click on the development/correction line. Now you can see a list of objects belonging to the task. Hit the 'display/change' toggle button. Add an entry with program id R3TR and object TABU. Enter the table name in the object name. Double click opn the function icon to the right of the object name. Double click in the empty table key area. This pops to allow you to enter the keys you require to transport. -
Transport Request for Custom Table??
Hi all,
I got the requriment for Custom Table.
"The table should have attributes such as the table contents can be transported from DEV to QA to PROD. Also the table can be maintained individually in QA or PROD too"
I have understood that I need to have "Delivery Class" as "C". But i want to know what should Transport request type: (Workbanch or Customizing)
thanks in advnace.You say <i>"the table can be maintained individually in QA or PROD too" I have understood that I need to have "Delivery Class" as "C".</i>
If table must be maintained in QA and PRD, you need "Delivery Class" as "A". With "Delivery Class" as "C" you can only maintain table in DEV and transport entrie changes to the other systems.
Regards. -
F4 help for custom table field - to be used when populating data thru SM30
Hi,
I have a custom table with 5 fields - say A, B, C, D and E. While populating data to the table through SM30, I need to create a F4 help for the field C. A custom function module needs to be used.
I have created a module for the same in the event PROCESS ON VALUE-REQUEST of the function group of the table.
But the F4 for field C depends on the values put in fields A and B.
I am not able to get the values of fields A and B from within the module PROCESS ON VALUE-REQUEST.
Please help me to create the F4 help.hii,
This is the piece of code i have used in one of my SM30 to get f4. mopdify according to ur need and use.
revert back for further help.
w_dynpread-fieldname = 'ZSITEDCDATA-SITE'.
APPEND w_dynpread TO i_dynpread.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = 'SAPLZSITEDCDATA'
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = i_dynpread
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 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.
READ TABLE i_dynpread INTO w_dynpread INDEX 1.
IF sy-subrc IS INITIAL.
SELECT land1 FROM t001w
INTO TABLE i_site
WHERE werks EQ w_dynpread-fieldvalue.
IF i_site[] IS NOT INITIAL.
DATA: lv_line TYPE i.
CLEAR lv_line.
DESCRIBE TABLE i_site LINES lv_line.
IF lv_line GT 1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZSITEDCDATA-SITE_COUNTRY'
dynpprog = 'SAPLZSITEDCDATA'
dynpnr = sy-dynnr
window_title = 'Site Country'
value_org = 'S'
TABLES
value_tab = i_site[]
return_tab = i_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
READ TABLE i_return INTO w_return INDEX 1.
IF sy-subrc IS INITIAL.
zsitedcdata-site_country = w_return-fieldval.
ENDIF.
ENDIF.
Thanks ,
Gaurav -
Source of data for custom tables in Oracle Apps
Hi,
Is there any way to find the source of data for the Custom tables. The source can be either any function, procedure, package or a trigger or any other process. The reason why I need to know about it is because we have some custom tables that are used by some custom Reports. Sometimes those reports comes out blank because the data in these custom tables is blank. So I need to know which processes are populating data in these custom tables. Any help would be really appreciated !!
Thanks,
KMIs there any way to find the source of data for the Custom tables. The source can be either any function, procedure, package or a trigger or any other process. The reason why I need to know about it is because we have some custom tables that are used by some custom Reports. Sometimes those reports comes out blank because the data in these custom tables is blank. So I need to know which processes are populating data in these custom tables. Any help would be really appreciated !!I do not think there is a direct way to find out the source of the data unless your custom processes are documented.
You may enable AutditTrail (search the forum for links/docs) and see if this would help.
Thanks,
Hussein -
For custom tables should we use UTC for date/time fields
A general question.
Can anyone confirm that SAP does seem to be moving towards storing date/time in UTC format?
We're building custom tables and we're making it a standard to store date/time fields in UTC format.
Regards,
LavaughnHello Lavaughn,
I can not speak for SAP, but from my personal experience TimeStamps are the state of the art to store time date info in db tables. Even with date/Time fields a conversion to the local timezone is necessary. Of course you can reuse your db definition on dynpros. But since UI and business logic will be divided anyway this is also not really a valid point.
Best Regards
Klaus -
Selection screen for custom table
We have developed a custom table and user want to have a selection selection screen similar to SE16. There are 9 fields in the table and user can enter data to the selection screen with any combination. My question is how do I filter based on the user input ? DO I need to write multiple SQL for different combination of selection screen parameter within IF ELSEIF statement ? If so then there will be huge number of SQL within IF & ELSEIF statment for 9 selection parameter. Please suggest if you have any better ideas.
Even after using select-option along with IN statement in where clause , it did not work.
I used following selection screen defination :
SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECT-OPTIONS: P_PCBUS FOR MARA-ZZPC_BUSINESS NO-EXTENSION NO INTERVALS,
P_PCBUS1 FOR MARA-ZZPC_BUS_SUB1 NO-EXTENSION NO INTERVALS,
P_PLNFMT FOR MARA-ZZPLNG_FORMAT NO-EXTENSION NO INTERVALS,
P_PRDB FOR MARA-ZZPROD_BRAND NO-EXTENSION NO INTERVALS,
P_SEASCD FOR MARA-ZZSEASON_CODE NO-EXTENSION NO INTERVALS,
P_SNP FOR MARA-ZZSUP_NET_PATH NO-EXTENSION NO INTERVALS,
P_MAT_DC FOR MARA-MATNR NO-EXTENSION NO INTERVALS,
P_MAT_MG FOR MARA-MATNR NO-EXTENSION NO INTERVALS.
SELECTION-SCREEN: END OF BLOCK B2.
and SQL statement :
SELECT ZZPC_BUSINESS
FROM ZTB_RTL_TO_WHS
INTO TABLE TA_ZZPCBUS
WHERE ZZPC_BUSINESS = P_PCBUS
AND ZZPC_BUS_SUB1 IN P_PCBUS1
AND ZZPROD_BRAND IN P_PRDB
AND ZZPLNG_FORMAT IN P_PLNFMT
AND ZZSEASON_CODE IN P_SEASCD
AND ZZSUP_NET_PATH IN P_SNP
AND ZZD_MATNR IN P_MAT_DC
AND ZZM_MATNR IN P_MAT_MG.
While executing program, I only enterd value for the field P_PCBUS. Though record present for that value, I rcvd SY-SUBRC = 4.
ANy Idea?
Edited by: J. Bakshi on Jul 14, 2009 10:17 AM -
Create BAPI for Custom Table in BW - Urgent
Hello BAPI gurus,
I am Portal Developer and not an ABAP developer. I am creating a Web Dynpro screen to insert data into a transparent table in BI ODS.
I need to create a BAPI to insert/update/delete and select the values from the custom table. We dont have an ABAP developer in house, so I am trying to create the BAPI my self. I would really appreciate if some one can give me steps to create a BAPI, and links to any documents.
I think I have to create a Function Module using SE37. Is there a way to generate code based on the table structure or do I have to write Manually. If any one has an example of code to do insert/update/delete and select, I would really appreciate.
Thanks
RaghuHi Raghu,
Yes you can create a BAPI using Se37 and for deleting,Update or selection we have UPDATE,DELETE,SELECT statements. Just do F1 after writing those keywords and you will get the syntax. All the data you need to update needs to be passed using the IMPORT parameters.
hope it helps!!!!
David. -
ALE/IDOC Change Pointers for Custom Table
Hello all,
There is a requirement for my client, to trigger IDOC based on the Custom Table changes. The custom table has a maintenance view and will be updated/modified/deleted randomly by user. Now, i need to track the changes in that table and should trigger IDOC for the changes. The Message type i am using for this is MATMAS, as I need to incorporate changes to the same IDOC.
Is it ok to modify BDCP/BDCPS tables to update the changes from custom table? The Custom Table changes can be tracked through DBTABLOG......and i have my logic to trigger the IDOC
The question is: If i do modifications to BDCP and BDCPS, how this will impact? In future SAP upgrade/enhancements will this affect anyway? Can any one of you share your experience regarding this. Thanks.Hi Raja,
You can send IDOC based on table maintenance event
I think you can code in event 02, to generate IDOC.
Check below link:
http://help.sap.com/saphelp_nw04/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
Regards,
Nisha Vengal. -
Change pointers for customizing table
Hi,
Requirement is when ever a new entry is created/updated/deleted from the customized table 'ztable' an IDOC need to be generated.
Any one can help me out the proper steps to solve this.
Full points will be rewarded to the correct answer.
Urgent please !!!
Regards,
Suman1. In T-Code add all the table and its fields to a message type.
2. Create a program for triggering a Idoc.
3. In the program call the functional module 'CHANGE_POINTERS_READ' with the above message type, This FM will return those table fields that are changed to a specific date.
4. Pass read_not_processed_pointers parameter of the 'CHANGE_POINTERS_READ' as 'X' to get the latest changes. Ex:
CALL FUNCTION 'CHANGE_POINTERS_READ'
EXPORTING
message_type = gc_message_type
creation_date_high = s_erdat-high
creation_date_low = s_erdat-low
creation_time_high = gc_time_high
creation_time_low = gc_time_low
read_not_processed_pointers = 'X'
TABLES
change_pointers = lt_chgptrs_tab.
lt_chgptrs_tab will have all the table fields that are changed .
5. Trigger a Idoc with those values.
6. In the triggering is successful call FM 'CHANGE_POINTERS_STATUS_WRITE ' and pass those table fields that are sent through Idoc to write in database that the changes are already sent through Idocs. Ex:
CALL FUNCTION 'CHANGE_POINTERS_STATUS_WRITE'
EXPORTING
message_type = gc_message_type
TABLES
change_pointers_idents = gt_pointer_id.
COMMIT WORK.
gt_pointer_id will have all the change pointer if from lt_chgptrs_tab table that are send through Idocs. -
Profile count zero for custom table related attributes
Hi,
We added a custom table as an assignment block in the business partner and we are using this in segmentation.
If I connect with the standard marketing authorisation role, when I create a profile using attributes of this table it returns a count of 0.
If I connect using my user with (sap_all) I have no problem with the count.
Do I need to add a specific authorisation object for the custom table or should this be handled automatrically in EEWB?
In the authorisation trace I cannot find anything significant to help.
regards
TimIndeed, an authorisation issue, object S_TABU_DIS required.
-
How to maintain default values for custom table fields -- Urgent
Hi all,
I've a requirement wherein i need to create a Z table (with maintainence view) in which i'll have date and time as two of its field which should have current date and current time as default value. Can somebody suggest as how am i to maintain the date and time fields defaulting to current date and current time.
Incase if someone is unable to intrepret what i'm trying to say, please query me, i'll elaborate it further.
Please give in your quick inputs which is highly valuable to me and also will be highly appreciated.
Thanks in advance,
Vaishnavi VaradarajanWe have a following custom table which contains the fields Date on which record was created and Name of the person who created the object. We would like to have these to be filled up with SY-DATUM and SY-UNAME respectively.
Using the events, we can achieve this.
Please refer the following link:
http://abapliveinfo.blogspot.com/2007/12/events-in-table-maintenance-in-sap.html
Also,
Write a form routine in table maintanance generator.
1. SE11 > utilities > table maintenance generator
2. environment > modification > event
define the event and form routine to make use of the tigger. in the form routine define an object for the class and call the relevant method.
Or u can do it as:
Table maintenance generator is basically used to do table operations like (insert, delete, modify...).
if you create table maintenance for your table it will build a module pool program, by using you do the above operations.
below is the procedure to create table maintenance generator.
1) Create one function group.
2) after activating your Ztable, choose 'Utilities'----> 'Table maintenance genrator'.
3) then give the authorization group and function group created abobe in the next screen.
4) Then choose the "create" button in your application tool bar, which will creates the module pool program.
5) then create one Tcode by chosing "Transaction with parameters( parameter transaction)".
6) in transaction field give "SM30", select the check box "Skip initial screen".
7) in the below of that screen you can find the "Default values" frame.
8) there under the "name of screen field" select the "View name' and 'update".
9) in value column against to "view name" give you table name, and against to "Update" put 'X' in capital letters.
save it then you can straight away use this newly created Tcode to maintain your table.
Note:- 1) make the modification while saving the data into your table using this newly generated program to carry out your validation (even though it looks like standard program; no need to enter the access key).
2) if you do any changes to your table and press the activate button automatically the table maintenace generator will be goes off, you need to create this again.
cheers,
Maybe you are looking for
-
Having Problems With The Neo2 ? Read This!!!!
Hi, i just bought a neo2 motherboard, with a p4 2,6 HT and 512 mb Kingston hyper ram ( 2 peaces of 256, else it won't use the dual bandwith :D) In the beginning everything seemed fine, until i got some sudden reboots and other vague stuff. I read it
-
Hi everyone, My logic in prepareForDML() updates some attributes (shown in the snippet below) based on whether an insert or update is taking place. But, when I delete a line, I get the following error: JBO-27101: Attempt to access dead entity in EO.
-
"File Not Found" MPG4 / Protected (?) songs unable to play on PC or on iPod
I burned about 150 songs from my iTunes Music Library on another computer onto CDs and then inserted the CDs into a new computer with my iTunes Music Library on it. The songs on these CDs DO NOT play in the iTunes Library or on the iPod, although the
-
Embedding HTML file in folio causes other indesign files to be embedded into article
For our upcoming issue we have the following files: COVER_Apr.indd COVER_horz.indd Calendar_Apr.indd Chef_Tournedos.indd Home_hybrid.indd Kristen_Campo.indd List_April.indd Look_Back.indd Masthead_Apr.indd Pam_Sherman_Touch.indd Review_Lucano.indd Sh
-
Guitar going in the line in on an x-
Hello all?I am just curious as to how well?my guitar?is going to perform through my Xtrememusic card. I am going to use a Behringer blues stomp box between guitar and PC, a blues pedal that outputs at k ohm. Is this going to work ok?. I have the driv