How to Copy the specific record of one table to other table(same structure)
Hello,
i have develop a form and some buttons on it. Suppose that Form is based on TABLE_1, which has the fiollowing structure.
( Bill_No Number(5),
Bill_Date Date,
Bill_amount Number(6),
Description Varchar2(60)
My requirement is when i save the any record and after that i want to copy all the contents of that record to Table_2.
On the form there is a button named as Let say "Copy current Record to Table_2". So when i press the button, the record is copied from Table_1 to Table_2.
(Note: - Table_2 has the same structure as Table_1.)
Please help me to solve this problem.
Thanks in advance.
i would prefer a pure database-solution, means put a database-trigger BEFORE INSERT FOR REACH ROW on your table 1 and do the insert there.
If you do it in PRE-INSERT-Trigger in forms it will work for data entered via forms-application, but what happens if data is inserted via a different frontend?
CREATE OR REPLACE TRIGGER TRG_TABLENAME_BRI
BEFORE INSERT
ON TABLENAME
FOR EACH ROW
BEGIN
-- Do your insert here
INSERT INTO TABLE2 (
COL1,
COL2
) VALUES (
:NEW.COL1, -- (or OLD.COL1)
:NEW.COL2 -- (or OLD.COL2)
END;
/Edited by: aweiden on 22.09.2008 08:08
Similar Messages
-
How to copy the table1selected records into table 2 in webdynpro java.
Hi
how to copy the table1selected records into table 2 in webdynpro java.
venkat
Edited by: venkatpvr on Sep 23, 2011 11:53 AMHi Venkat,
You have 2 Value Nodes one for Table1 and second for Table2.
Table1 node having one more Value Attribute i.e check Box data type is Boolean. Now you are requirement are select records from Table1 Node and click on One Method that records will moves to Second Table2 Node.
Create One Method for getting the Records from 1-Table to 2-Table
CopytoTable2 ()
In this method you have to write code like this
If (wdContext.nodeTable1.Checkbox(true))
If(1. Check the Table1 Value Node Size()>0)
Get the Table1 records and set to table2 Value node.
Else
Please select check box// Error message
Hope this helps!!
Regards
Vijay K -
How to copy the Pricing conditions from one Distribution Channel to another
Generally we use VK11 transaction to create conditional records .
but I Need to Know whether is it Possible to copy the Pricing conditions from one Distribution Channel to another with same name and same internal Characteristics .
Since we have around 70+ of Condition type with different parameter Sequence.So Instead of Going for BDC whether is there any standard Funct Modules/programs/BAPIs to do this?
How to make a copy Condition types from One Distribution Channel to another.
since SAP has already provided to copy conditions from Customer to customer.
Likewise i need to know whether SAP is facilitating for these feature also.
Iam Dubious in this issue.
Hope Fully looking for the answers.
Harish.N- IDOC_INPUT_COND_A (you can create IDOC, but also call directly)
- call transaction / batch input (use transaction XK15, as used by LSMW)
- use group of function modules RV_CONDITION_COPY, RV_CONDITION_SAVE, RV_CONDITION_RESET + commit.
if you search SDN on 'RV_CONDITION_COPY' you'll find more info I believe.
Someone mentioned BAPI_PRICE_CONDITIONS as well. -
How to send the transport request from one client to other client?
Hello Friends,
I have generated one transport request in one of the client in Development server.Now as it is customizing request so unless and until i transport it to other client within the same server, Changes will not be visible in other clients.So how to transport this customizing request from one client to other client within the same server.
Thanking you guys in advance.
Regards,
JitendraHi Jitendra,
Release your Transport Request via SE10, then go to STMS & import the request first to your quality server, then to your production server.
Apologies for the incorrect inputs, please use SCC1 as advised by other forum members
Hope the above clarifies your query.
Regards,
Vivek
Edited by: Vivek on Mar 16, 2009 1:05 PM -
How to copy the output of procedure to a view or table
Hi...
I created a procedure using Hana Studio and it returns the multiple rows as output.
My query is , how to copy the output to a table or view when it is called like this "cal _SYS_BIC.procedureName "
Please go through the following image:
How to copy the output content to a table or view....
Thank u...Hi Mohan,
The logic is like, you can attach a view(so called column view) to any procedure which returns a result set. SO, instead of calling the procedure using CALL statement, you can simply query the VIEW to get the result set. Internally the procedure will be executed.
Have a look here :
http://help.sap.com/hana/SAP_HANA_SQL_Script_Reference_en.pdf
Eg :
You create a procedure using a result view ProcView to return its results.
CREATE PROCEDURE ProcWithResultView(IN id INT, OUT o1 CUSTOMER) LANGUAGE SQLSCRIPT
READS SQL DATA WITH RESULT VIEW ProcView
AS
BEGIN
o1 = SELECT * FROM CUSTOMER WHERE CUST_ID = :id;
END;
You call this procedure from an SQL statement as follows.
SELECT * FROM ProcView WITH PARAMETERS ('placeholder' = ('$$id$$', '5'));
Hope this helps you to solve the issue
Sreehari -
HOW TO COPY THE PREVIOUS RECORD TO THE CURRENT RECORD
Hi all,
i am using form 6i.
i have one multi record block. the user has to enter all the values and store it to the table.
My requirement is - if user is in some blank record, if user clicks the button then all the previous record values should be coppied to the record where the user has placed the cursor.
please help me..
Thanks..user13329002 wrote:
Except these columns all other columns should be copied when i press the button.So? Use duplicate_record and set the columns you don't want to copy to null or a value you want?
duplicate_record;
:my_block.creation_date := sysdate;
:my_block.modiefied_date := null;cheers -
How to copy the attribute values of one instance into another instance.
Say I have 3 instances and two attributes name ,id.
inst1 : id:1 ,name:abc
inst2: id:2 ,name:bcd
inst3: id:3 ,name:efg
now I want
inst: id:1 ,name:abc
bcd
efg
i.e is need to abort instance inst2 & inst3 before that copy the names bcd & efg to inst1.
Please let me know how to do this its very urgent.Hi,
The tricky part of this is to provide your third instance a way to find the other two instances. Finding instances in a process is a bit like finding rows in a database. When doing a SELECT statement in a database, you have a primary key that will guarantee you that you'll only retrieve one row. In Oracle BPM there are a couple ways to do this. One way is to use the instance's id (the predefined variable id.id) to search for the two instances. Another is to use a "correlation" to find the instances.
This example assumes you'd like to look at instances based on a search filter. This filter assumes that you have a customerId variable that both of the instances share. It only returns those instances currently inside the process (the SearchScope logic below being set to "StatusScope.ONLY_INPROCESS" in the logic below). The only incoming variable it needs is the "customerId" variable that has already been set to some value in the other instance. Note that this uses the Fuego.Papi.ClientBusinessProcess object. This logic creates a search filter and only returns instances that meet a certain criteria (the two instances in the process). Once you get the instance, the "getVar()" method retrieves the "name" instance variable. This assumes that you have an instance variable "customerNames" defined as a String array that you are using to store the names retrieved from the two instances. The "abort()" method aborts the two instances it finds in the search.
cbp as ClientBusinessProcess = ClientBusinessProcess()
connectTo(cbp, processId : "/NameOfYourProcessHere")
instF as InstanceFilter = InstanceFilter()
create(instF, processService : cbp.processService, viewId : "TypeSearch")
instF.searchScope = SearchScope(participantScope : ParticipantScope.ALL,
statusScope : StatusScope.ONLY_INPROCESS)
logMessage "Customer Id is: " + customerId using severity = DEBUG
addAttributeTo(instF, variable : "customerId",
comparator : IS, value : customerId)
for each inst in getInstancesByFilter(cbp, filter : instF) do
// get the value of the order's amount for the instance
instanceVarValue as Object = getVar(inst, var : "name")
customerNames[] = String(instanceVarValue)
logMessage "Customer name is: " + String(instanceVarValue)
using severity = DEBUG
// aborts the instance in the process
inst.abort()
endHope this helps,
Dan -
How to know the specific size of a field in oracle table
Hello,
oracle 11.2.0.3 on redhat
i have three tables with same structure, table0, table50, table100:
create table table0 (id number, shipment RAW(2000), options RAW(2000));
i inserted 10000 rows in each but with some differences:
table0 has 10000 id, but shipment and options has null values
table50 has 10000 id, but shipment and options has only 5000 rows, the other 5000 are null values
table100 has 10000 rows of id, shipment and options. No null values.
I want to know the specific size of each column, also the size of each row, to know the exactly size of the field.
for example:
row 1, column options of table100 has "asdfasdfagasdgasbabsdgoasdpgiahnwe1129u412094u12"
row 2, column options of table100 has "a".
both are raw datatype, but i think its space will has different size (bytes), how to know it? any query?
I found this query:
select owner,tablespace_name,segment_name,sum((bytes/1024/1024)) Bytes
from sys.dba_extents
where owner in 'MAA' and segment_type='TABLE' and segment_name ='TABLE00'
group by tablespace_name,owner,segment_name
order by owner,tablespace_name,segment_name, bytes; but i think it isn't my solution.thx mr. sb92075
i tried with vsize too but same result:
with table50
SELECT VSIZE(OPTIONS) FROM TABLE00;
VSIZE(OPTIONS)
1000
1000
1000
1000
*with table100
SELECT VSIZE(OPTIONS) FROM TABLE100;
VSIZE(C_ELECCION)
2000
2000
2000
2000
*it's the same size for 'a' like 'abcasdfjañldngaosnbaposnbpaosuqroiwejrklasndiaoshbaposdjgajs'?? It's hard for me to believe.
data is saved in blocks, a extents is a contiguos number of blocks and a group of extensions are segments. If you insert some text in a table field, Oracle create a extension and insert there the data but depend the bytes you insert Oracle will create one or more extents. How to know this specific space in that field? -
How to retrieve the specific string and store in a seperate table
hi all,
i have the following long text store in a internal table field.
"AAA1"
"AAA1"*********************************************
"AAA1"INSTRUCTIONS FOR STAGING TO PRINT PANEL LABEL
"AAA1"*********************************************
"AAA1" STAGING TO PRINT THE PANEL LABELS
"BBB1" (REQUIRED QTY. AS PER LOT TRVELER)
"BBB1" PANEL LABEL MUST BE A THERMAL LABEL
"CCC1" USING FOLLOWING SPECIFICATIONS:
"CCC1" *USE LABEL SIZE:1.25"X0.25"
"AAA1" *USE ZEBRA PRINTER(MODEL:90XI 11)
"BBB1" *USE FILE NAME:L:\BARONE\FORMATS\PANEL.lbl
"AAA1" Staging to apply labels on
"CCC1" breakaway tab of the panel
please advise the logic to retrieve only the "xxxx" field for this long text field so that i can store it in a separte field/table. we can do a sorting on the fields accordingly later.
the " " actually is open and close bracket in the system, i'm not able to get it display in the post here.
thanks.
Edited by: Reetha Pitchee Maridas on Jul 15, 2009 10:27 AM
Edited by: Reetha Pitchee Maridas on Jul 15, 2009 10:28 AMHi ,
Try using logical expression CA .
Below is a sample code
data :index1 type sy-fdpos ,
g_f_text type char255 ,
g_f_text2 type char255,
index2 type sy-fdpos .
g_f_text = '(AAA1)INSTRUCTIONS FOR STAGING TO PRINT PANEL LABEL'.
if g_f_text CA '('.
index1 = sy-fdpos .
endif.
if g_f_text CA ')'.
index2 = sy-fdpos .
endif.
index2 = index2 - index1 - 1.
index1 = index1 + 1 .
g_f_text2 = g_f_text+index1(index2).
write g_f_text2.
Please note that this is with the assumption that we need to take the first string enclosed in ( ).
Regards,
Arun -
How to transport the LSNW project from one client to other
I have done one LSMW in DEV 100 client now i want to move the same to other clients. and one more clarification .. is LSMW client dependent or client independent.
thanks in advance !You can "Export" and "Import" from one client to other client rather transport of an LSMW.
To do this, at first goto T.Code LSMW select the "Project", "Sub Project" and "Object" which needs to exported and then go to "Extras" (at top menu) and select "Export Projects" and save text file at desktop.
Now go to other client where you want this lsmw, at Target client, goto initial screen of LSMW and then go to "Extras" and select "Import Project", system asks you select text file. here you give above file and say "Import".
Now LSMW is ready use in target system as well.
REWARD IF FIND USEFUL -
How to copy the same address for multiple contacts in Address Book?
Hi! I got a question, I didn't find an answer for yet.
How to copy the post address from one contact to another, without manual entering. I mean if I have one contact with already entered post address, can I just copy it someway at once to another contact?
I don't want cards to merge, I need separate contacts, that may have different phones, e-mails, but the same post address. Please, advise.Thanks! yes, this is a solution I'm following now. But I was wondering about the similar way as it is made in Daylite or Contactizer - you create company with name and post address first, and then can create a contact for that company. And company name and post address will appear in contact name.
I just wonder why such a simple and useful solution isn't available in Address Book as default.
I know there are many scripts written for Address Book. Maybe there is something for this purpose? -
How to copy the photo with file name at window 7 and search specific one in iphone 4s?
How to copy the photo with file name at window 7 and search specific one in iphone 4s?
Clendenen02 wrote:
2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
In a Pictures folder
Name: Dark Knight, The.jpeg Comment: (2008) Genre: Action... <- copy comment
In a Movie Folder
Name: Dark Knight, The.m4v Comment: <- paste
and do this for all 700 files
This Bash script will do it.
Edit "PicDir" and "MovDir" to the location of your Folders
(Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
#!/bin/bash
PicDir=$HOME/Desktop/Pictures
MovDir=$HOME/Desktop/Movies
for f in $PicDir/*
do
if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
comment=$(mdls -raw -name kMDItemFinderComment "$f")
if [[ $comment != "(null)" ]]; then
picname=${f##*/}
movname=${picname%.*}.m4v
if [ -e "$MovDir"/$movname ]; then
xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
fi
fi
fi
done -
How to copy the positions and their relationships of one org.unit to other
f there about 20 organization units among which 6 org.units have same positions and same relationships ,i know that we can create one org.units and their relationships among 6 similar org.units and then copy the same position and relationships to other 5 org.units as well instead of individually creating positions and assigning relationships to them which results in wasting a quality time.but i dont know how to copy it? so please help me by informing me in details how to copy the positions n their relationships to other org units.
Hi.
This may sound like a bit of a pain in the *** but why not save the channel strip settings into your own folder then that way you can open them up in other songs and you have some channel strips to try out when you cant find anything else to fit. Plus its fun to open up lots of different audio onto the tracks and see what the effects sound like, Brian Eno style.....
Hope this helps -
How do I copy the DVR recorded content to Laptop or any external drive.
How do I copy the DVR recorded content to Laptop or any external drive. Pl suggest.
Thx.It is awkward but I have a Coax line out the DVR that goes to my Media Center Computer (which has the same multimedia software that is built into Vista) and then to my computer's TV tuner. (This is the same line out function that you use to send the DVR output to a VCR) Using my Media Center software, I can play the recorded DVR program and record that on my computer. Once in the computer, I can transfer the file by my wireless network to my laptop. It is a bit convoluted and requires a computer with a TV Tuner to record the program, but it can be done if I really want the item recorded to the computer.
-
Copy the inspection result from one lot to multiples lots!!
Hi SAP expert,
I want to copy the inspection result from one lot to multiples lots, currently i know how to setup the copy to another lot(SAML Response from SAP ID Service ) , but i dont know to do to multiples lot.
¿Someone can help me?
Thank youFirst you have to customizing the functionality of Copy of Inspection Results using the following path, where you have to entry the inspection types, plant .etc., where you want to have the functionality.
SPRO -> Quality Management -> Quality Inspection -> Make Settings for Copy of Inspection Results
Then when you are in Record Result screen you select Menu -> Edit -> Copy Inspection Results ,
then a pop-up window is displayed and you filled in with the inspection lot which has the results and then another pop-up window is displayed to select the characteristics that you want to copy.
A.P.
Maybe you are looking for
-
How to use Airplay Mirroring to Apple TV from MacBook Pro 5.1
How do you use "Airplay Mirroring" to an Apple TV from a MacBook Pro 5.1
-
Hi All, I have created an User Enhancement Module that does encryption and decryption of the Message. The keys for Encryption and Decryption has been accessed from the J2EE Keystore. The problem I am having is in accessing the Keystore. The part of t
-
Can you share your photos in iPhoto with other users on Mac and if so How?
I am trying to share photos in iPhoto from one user to another user on my Mac computer. Can this be done and how do you do it?
-
MDIFrame\Sheet behavior question
I'm using PB 11.5 and I've modernized the classic PB menus to appear more web-like in our applications. Instead of embedding the menu on the frame's menuname property. I have a user object on the Frame's workspace along with the MDIClient that calls
-
How to make Verizon aware of poor coverage area
I live in a relatively densely populated suburban community and yet we have very POOR service coverage in our neighborhood. I remember the days of frequently dropped calls. But now I am accustomed to never dropping a call. But lately, and it does