Insert delete or update entry in Custom table from KONV entry changed
Hi All,
I have custom table ZKONV with only few required columns and should have same number of records as KONV has at any point in time.
KONV is a cluster table so its not readable from ORACLE level. So ZKONV is created. But I dont know how to keep these both tables in sync.
I need to perform insert delete or update entry in Custom table if insert delete or update happens on cluster table KONV from any transactions.
As KONV is a cluster table and does not have changed time stamp I am not able to know the number of records changed in perticulat time period.
Thanks,
Thanks for reply,
There is a Outside SAP system which needs to read KONV data to feed into their system, but as KONV is cluster table they are not able to read it from ORACLE level.
To solve this we are thinking to create a transparent Z-table and will fill it with KONV and catch Update, delete or Insert statement and do same on ZKONv.
Is this possible some how? by some database event or something....
Similar Messages
-
Adding entries to Custom table from IDOC User-Exit
Hi All,
I need to add an entry into a Ztable, based on the entries in the IDOC.. The user-exit available to me is EXIT_SAPLVEDF_002. But it is called a number of times... Is there any way to update the Ztable getting the data from different segments?..
Please help..
Regards.
AshaThe table INT_EDIDD type EDIDD conatined the interface tables of the FM contain all the segmanent data, you can read that and populate the Z table respectively ...
Thanks,
Adi. -
Delete an uploaded file (in custom table) from a report
Hi,
I have a report of uploaded files (the files are saved in my own table, not in APEX_APPLICATION_FILES) - I'd like to add a delete link to each file in my report so that the user can delete a particular file.
How do I go about doing this?
Thanks.Melissa,
It is now working. You missed couple of things:
1. javascript in the header
2. you were pointing to the page 1 and your process was on the page 2
3. you passed the value to a non existing item on the page 3
4. the request which would fire the delete process was triggered by a wrong request
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://htmldb.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Insert, Delete and Update options in Table control
Experts,
I have writen code for Insert, Delete and Update options in Table control. They are not working properly...
can any one send the code for the above please...
Thanks in advance..Hi,
Following steps will help you.
1.TOP-INCLUDE
DATA: ITAB1 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
DATA: ITAB2 LIKE KNA1 OCCURS 0 WITH HEADER LINE.
DATA: WA LIKE KNA1.
DATA: ANT TYPE I,CUR TYPE I.
DATA: OK_CODE TYPE SY-UCOMM.
CONTROLS: TABCTRL TYPE TABLEVIEW USING SCREEN 100.
IN FLOWLOGIC
PROCESS BEFORE OUTPUT.
LOOP AT ITAB1 CURSOR CUR WITH CONTROL TABCTRL.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CLEAR_DATA.
LOOP AT ITAB1.
MODULE MOVE_DATA.
ENDLOOP.
ADD OK_CODE IN ELEMENT LIST. CLICK ON LAYOUT AND ADD TABLE CONTROL(name it as TABCTRL) AND PUSHBUTTONS AS FOLLOWS.
SELECT THE FIELDS FROM PROGRAM. SAVE CHECK AND ACTIVATE.
CLICK ON FLOWLOGIC EDITOR FROM APPLICATION TOOL BAR.
DOUBLE CLICK ON MODULE CLEAR_DATA.
write the in this module as below.
CLEAR ITAB2. REFRESH ITAB2.
DOUBLE CLICK ON MODULE MOVE_DATA.
write the code in this module as below.
APPEND ITAB1 TO ITAB2.
ACTIVATE PAI AND WRITE THE CODE AS BELOW.
CASE OK_CODE.
WHEN 'FETCH'.
SELECT * FROM KNA1 INTO TABLE ITAB1 UP TO 20 ROWS.
TABCTRL-LINES = SY-DBCNT.
WHEN 'ADD'.
GET CURSOR LINE CNT.
CNT = TABCTRL-TOP_LINE + CNT - 1.
CLEAR WA.
INSERT WA INTO ITAB1 INDEX CNT.
WHEN 'MODIFY'.
GET CURSOR LINE CNT.
READ TABLE ITAB2 INDEX CNT.
LOOP AT ITAB2.
MODIFY KNA1 FROM ITAB2.
ENDLOOP.
SELECT * FROM KNA1 INTO TABLE ITAB1.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
SAVE,CHECK AND ACTIVATE ALL.
CREATE TCODE AND EXECUTE.
contact if u hv any issues regarding this code.
reward points,if it is useful.
Thanks,
Chandu. -
How to find out the volume of the data updated in the custom table
Hi,
I need to find out the the volume of the data inserted or updated in the the custom table(Y tables).I have tried by the sm37.the job running in to update the table but i didnot get thde amount of the data.and if get the volume of the data which being updated in the custom table is there any option to control that amount to being updated?
Thanks in advance .....waiting for the respone.Hi Sreenivas.
How did you find the solution to this? Trying to do the same thing!
Cheers,
Tom -
Inserting a single field in a custom table
hi all,
can u tell me hw could i insert a single field in the custom table.
i have abt 6 fields in the custom table.
5 fields are already populated...
i have to insert one field ..i dont want to use insert statement.
thanx in advanceHI,
You can use UPDATE statement
UPDATE ztable SET SIXTH_FIELD = 'value'
WHERE key_field = 'asdf'.
Thanks
Naren -
Updating another custom table from create screen
Hi,
In create screen i have some fields which has to be updated in another custom table. I created package and procedure in it and i am passing the parameters into it.But somehow it is is updating 4 filed and remaining two are not updated.
How to check that what are the values passed in the package,so that i can find out the reason behind it.
Kindly reply asap..Put some debug statement and check the root cause.
http://oracleanil.blogspot.com/2009/04/favourite.html
And if you are running page locally then use
System.out.println("Test");Thanks
--Anil
http://oracleanil.blogspot.com -
How to MODIFY A CUSTOM TABLE FROM A FLAT FILE
Dear Friends,
I have a requirement where i have to upload data from excel file to my custom table so i have used a FM
'TEXT_CONVERT_XLS_TO_SAP' and i have collected data into a internal table , till here i am able to get data correctly , now i hae to upload this data into a custom table .
the flat file is having 6 fields and the custom table is having
8 fields , for uploading the data into this custom table from the internal table where i have collected above iam getting problem . Actually iam using a modify statement to update the custom table .
the flat file which i have collected into the internal table is as below :
IDNo. Name Date Location Designation Dept
101 Raja 4/12/2007 Delhi Manager HR
102 James 4/12/2007 Delhi Clerk HR
Custom table is having the below fields
IDNO. Name Date Location Designation Dept Manager
101 Raja
now when i run the program iam getting the problem while usign the modify statment is the ID no which is already having
a record as IDno = 101 and manger = Raja.......with the other fields name , date, location,designation and dept as blank.
if i want to fill this fields from my flat file the modify statment
just filling all the fields for the ID no = 101 and manager field which already having Raja as being overwritten by space .....
becasue this field is not being there in the flat file.
the code iam using as follows.
The flat file is having with the below structure
TYPES: BEGIN OF t_emp_data,
IDNO(11) TYPE c,
Name(13) TYPE c,
Date(20) TYPE c,
Location (40) TYPE c,
Designation(40) TYPE c,
Dept(40) TYPE c,
end of t_emp_data.
The Custom Table(ZEMP_DATA) is having with the below structure
TYPES: BEGIN OF t_emp_data_table,
IDNO(11) TYPE c,
Name(13) TYPE c,
Date(20) TYPE c,
Location (40) TYPE c,
Designation(40) TYPE c,
Dept(40) TYPE c,
Manager(20) type c, -- this is the extra field in table
end of t_emp_data_table.
data :
it_empdata TYPE STANDARD TABLE OF t_emp_data,
it_empdata_tmp TYPE STANDARD TABLE OF t_empdata_tmp,
wa_empdata_tmp type t_empdata_tmp,
wa_empdata type t_emp_data.
loop at it_empdata into wa_empdata.
move-corresponding wa_empdata to wa_empdata_tmp.
modify ZEMP_DATA from wa_empdata_tmp .
endloop.
could any one please let me know what i have to do inorder to not get the manager field data not being overwritten with the modify statment , for the IDNo. 101 . I want the data which is already ( manager = Raja) shouldnt not be get overwritten with Space.
please help me in this regard
Regards
Madhuri.Hi,
use a slect statement before
"move-corresponding wa_empdata to wa_empdata_tmp."
select manager
from ztable
into wa_empdata_tmp-manager
where id = 100.
regards,
lavanya -
Need help- need to read a customer table from the payroll schema
Hi gurus,
I need to read an amonunt from a customer table in the payroll schema. Is it possible to input TABLE XXXX in the schema, or is impossible to read from a customer table?Do I need to create a report to upload the amount in an infotype?
Thanks in advanced for for support!You should create your own custom operation (based on operation TABLE) to read your custom table from a Payroll PCR.
If your custom table's name is longer than 5 characters, you may be required to use operations VAOFF and/or VALEN prior to your custom operation in the PCR. -
Lock Objects Problem while updating entries in custom table
Hi Friends,
Iam updating a custom table ztable from internal table entries.
ie : Modify ZTABLE from table ITAB.
Now the entries are updating and inserting perfectly..
But my problem is i need to use lock objects before doing this..
I have created a lock obect EZTABLE with all th ekey fields of the table.. ie : it has 2 key fields
item & matnr .
Now how to use lock objects here.. do i need to loop the internal table and use enque & deque function module each and every time in loop or use it out side the loop..
Can any one explain me this..
Regards,
Kumarhi kumar,
**check if the equipment is already locked by user, if yes, trigger a mail
CALL FUNCTION 'ENQUEUE_EIEQUI'
EXPORTING
MODE_EQUI = 'E'
MANDT = SY-MANDT
equnr = lv_equi_temp
X_EQUNR = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc <> 0.
lv_subrc1 = sy-subrc.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CALL FUNCTION 'DEQUEUE_EIEQUI'
EXPORTING
MODE_EQUI = 'E'
MANDT = SY-MANDT
equnr = lv_equi_temp
X_EQUNR = ' '
_SCOPE = '3'
_SYNCHRON = ' '
_COLLECT = ' '
ENDIF.
try like this to check if the object is locked....
u can also use
call function 'ENQUEUE,.
do the needful changes update the database then commit work
then call function 'DEQUEUE'
hope this helps,
tanmaya -
Unable to delete last entry in Custom table
Hi,
I have one custom table which allows only some specific entries to be maintained in the table.I have used a standard table as a check table for dis.I found no issue while maintaining entries in the table.But when i try to delete the last entry in the table i get the message "No entry exist".Long textNo entries were found when importing data from the database.
Kindly help.Hi,
If it is not possible through table maintainence then write a small Z program to delete the entries in devlopment system and then if then if you want you can transfer those to other systems.
delete from ZTABLE where {give your condition for the last record}.
Regards,
Sandipan -
How to find delete entries in custom table
Hi,
We have a custom table with table maintenance in Production. Some one deleted all the entries from the table. Can you please let me know how to retreive the old entries from the table and how to check who deleted the entries.
Thanks
Ramahi rama,
Please refer to the below given link,
[http://help.sap.com/saphelp_nw70/helpdata/en/43/0510abcda521abe10000000a1553f6/content.htm]
I think it will sove ur problem,
Reward points if usefull,
Thanks,
Kalyan. -
Validation of entry in custom table
Hi ppl,
I have one requirement where users can maintain value into a custom table. While entering a new value, if the similar primary key entries already exist in the table then there is a requirement of giving a pop-up box to the user informing that a similar kind of entry already exist and if he wants to overwrite. If the user clicks yes, then the new record should be saved and also one of the field in old record should be modified.
I have written an event in the table maintenace by which i am able to get the pop-up and the old entry gets modifed but when the PBO module gets triggered inside a standard include i get the error mssage " Record already exist". The error is obvious as the same primary keys are used in the second entry too but i am just curious to know if there is any way by which this standard error could be overcome so that the user should get only my pop-up box and not the standard error message.
Regards,
Venkathey,
You are getting the standard text because you are going to insert into the table.You cannot suppress the standard message but you can do some other thing.You take the values in the table to the internal table and before insertion into the table you should check the value which the user had entered and then check the value and the key.Thus you can catch that before the insertion into the table.
You can use the READ statement with key for reading the database.if the sy-subrc is 0 you can understand a value is there in the table.
Hope this will be helpful.
Regards,
Midhun Abraham
Edited by: Midhun Abraham on Oct 5, 2008 5:23 AM -
For all entries on custom tables
i have created 2 custom tables::zhospital_info n zpatient_info..
zhospitalinfo tab fields:::_
doc_name::prim key
patient_name:::prim key
place::prim key
zpatientinfo tab fields::_
ZDATE ::prim key
JOINING
MEDICINE
PRICE
QUANTITY
DOC_NAME ::for key
PATIENT_NAME::for key
PLACE ::for key
and inserted some values to the table contents..
this is my logic:::
TYPES: BEGIN OF ZHOSPITAL_INFO,
DOC_NAME TYPE ZDOC_NAME,
PATIENT_NAME TYPE ZPATIENT_NAME,
PLACE TYPE ZPLACE,
END OF ZHOSPITAL_INFO.
DATA: W_HI TYPE ZHOSPITAL_INFO.
DATA:T_HI TYPE STANDARD TABLE OF ZHOSPITAL_INFO.
TYPES: BEGIN OF ZPATIENTL_INFO,
ZDATE TYPE ZDATE,
JOINING TYPE ZJOINING,
MEDICINE TYPE ZMEDICINE,
PRICE TYPE ZPRICE,
QUANTITY TYPE ZQUANTITY,
DOC_NAME TYPE ZDOC_NAME,
PATIENT_NAME TYPE ZPATIENT_NAME,
PLACE TYPE ZPLACE,
END OF ZPATIENTL_INFO.
DATA: W_PI TYPE ZPATIENTL_INFO.
DATA:T_PI TYPE STANDARD TABLE OF ZPATIENTL_INFO.
TYPES: BEGIN OF FTAB,
DOC_NAME TYPE ZDOC_NAME,
PATIENT_NAME TYPE ZPATIENT_NAME,
PLACE TYPE ZPLACE,
DATE TYPE ZDATE,
JOINING TYPE ZJOINING,
MEDICINE TYPE ZMEDICINE,
PRICE TYPE ZPRICE,
QUANTITY TYPE ZQUANTITY,
END OF FTAB.
DATA: W_FTAB TYPE FTAB,
T_FTAB TYPE STANDARD TABLE OF FTAB.
SELECT DOC_NAME
PATIENT_NAME
PLACE
INTO TABLE t_hi
FROM ZHOSPITAL_INFO .
IF NOT t_hi IS NOT INITIAL.
SELECT DOC_NAME
PATIENT_NAME
PLACE
ZDATE
MEDICINE*
PRICE
QUANTITY FROM ZPATIENTL_INFO INTO TABLE t_pi FOR ALL ENTRIES IN
t_hi
WHERE DOC_NAME = t_hi-doc_name.
ENDIF.
LOOP AT t_pi INTO w_pi.
MOVE-CORRESPONDING: w_pi TO W_FTAB.
READ TABLE t_hi INTO w_hi WITH KEY DOC_NAME = W_FTAB-DOC_NAME.
MOVE: w_hi-patient_name TO W_FTAB-PATIENT_NAME,
w_hi-place TO W_FTAB-PLACE.
APPEND W_FTAB TO T_FTAB.
ENDLOOP.
LOOP AT T_FTAB INTO W_FTAB.
WRITE:/ W_FTAB-DOC_NAME,
W_FTAB-PATIENT_NAME,
W_FTAB-PLACE,
W_FTAB-DATE,
W_FTAB-JOINING,
W_FTAB-MEDICINE,
W_FTAB-PRICE,
W_FTAB-QUANTITY.
ENDLOOP.
req output:::when i enter doc_name the related info accr to doc_name from the both tables should be display..
m getting no errors but i cant execute my prog..
please check out my code...
thanx in adv..Hi,
The problem is in the select statement:
SELECT DOC_NAME
PATIENT_NAME
PLACE
ZDATE
MEDICINE
PRICE
QUANTITY FROM ZPATIENTL_INFO INTO TABLE t_pi FOR ALL ENTRIES IN
t_hi
WHERE DOC_NAME = t_hi-doc_name.
Change this to SELECT DOC_NAME PATIENT_NAME PLACE ZDATE MEDICINE PRICE QUANTITY FROM ZPATIENTL_INFO INTO CORRESPONDING FIELDS OF TABLE t-pi FOR ALL ENTRIES IN t_hi WHERE DOC_NAME = t_hi-doc_name.
I hope the above code will help you...
Also i hope to tell the following for performance issues and also a good programming practice:
LOOP AT t_pi INTO w_pi.
MOVE-CORRESPONDING: w_pi TO W_FTAB.
READ TABLE t_hi INTO w_hi WITH KEY DOC_NAME = W_FTAB-DOC_NAME.
MOVE: w_hi-patient_name TO W_FTAB-PATIENT_NAME,
w_hi-place TO W_FTAB-PLACE.
APPEND W_FTAB TO T_FTAB.
ENDLOOP.
Please do a sy-subrc check after READ statement always...
LOOP AT t_pi INTO w_pi.
MOVE-CORRESPONDING: w_pi TO W_FTAB.
READ TABLE t_hi INTO w_hi WITH KEY DOC_NAME = W_FTAB-DOC_NAME.
If sy-subrc = 0.
MOVE: w_hi-patient_name TO W_FTAB-PATIENT_NAME,
w_hi-place TO W_FTAB-PLACE.
clear w_hi.
Endif.APPEND W_FTAB TO T_FTAB.
ENDLOOP.
Please revert back for clarifications.
Best Regards,
Suresh -
Simple insert, delete and update not working after oracle 10g installation
Hello,
I made a new installation of Oracle 10g (10.2.0.1.0) and created a schema . Now i try to insert or update data using simple queries, but unfortunately nothing happens. I tried inserting or updating data even via sqlplus, but unfortunately the same result. Query takes infinite time to end, so i had to manually end it every time... No errors... No warnings... but takes long time... I have given all the required permissions to the schema but the same result. Can somebody help me figure out the problem?
Tried creating a new table and the insert and delete are working fine... think the problem is with this table... Imported the rows of the table from another online database. I dont understand how this might be a problem.
Edited by: user13333704 on Mar 15, 2011 1:26 AMHowever how do you generate awr reports and how to find the session wait?TO generate the AWR report
sql> ?/rdbms/admin/awrrpt
http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/autostat.htm#BABDHAGF
The event column in v$session , in v$active_session_wait will show you the session wait event.What the session was actually waiting for.
HTH
Anand
Maybe you are looking for
-
How to use variables in data slices?
Hello, in BI-IP I have tried to use variables in a data slice. The user should fill these variables. How can one use and fill these variables? Thank you Daniel
-
Time Capsule "already in use."
Recently, my iMac (2.93 GHz Intel Core 2 Duo, OS X 10.8.3) stopped connecting to my Time Capsule 802.11n. It keeps trying, and I keep receiving the alert window saying "The backup image '/Volumes/William's Time Ca/William's iMac.sparsebundle' is alr
-
[IDC S5] Run a script - get the extension Folder
Hi All I'm novice in Extension Builder and may be my questions seems stupid... I want to run a JSX for ID, located in a sub folder of my extension. I use the "doscript()" method but I don't know how to refer to my ".jsx" If I set a File variable what
-
ERROR:The applet Tennisball does not have a public constructor Tennisball()
hi all...sorry...i encountered this java error msg with the following code.....n the error msg tat was generated is that i do not have a public constructor which i already have...can some1 please enlighten me..?? import java.applet.*; import java.awt
-
I have installed Oracle 9.2 on W2000 Server. I have created an asp web page by dreamweaver accessing Oracle hr sample. When I use the 'using DSN on testing server' to connect to Oracle, it gives me the error ORA-12638. I have set the security for IUS