How to Insert the value in oitm table
Dear Members,
In Item Master, i have created a combobox next to Price List through SDK. if i select a particular value in the combobox and click Add Button in itemMaster, the selected value has to go to oitm table. i dont want to put separate table for that.any body can help me in this regard.
Thanks in Advance
hi,
for eg create a field in OITM table as UDF
TOOLS >>> UserDefinedFields >>> Manage User Fields >>> Master Data >>> Items >>> Items
create UDF Field so that a field UDF will be created in the table OITM (Table for ItemMaster).
Use the Following Code in ItemEvent.
If pVal.FormType = 150 pVal.BeforeAction = False And pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD Then
Try
Dim oitem As SAPbouiCOM.Item = SBO_Application.Forms.Item(pVal.FormUID).Items.Item("214")
Dim oitem2 As SAPbouiCOM.Item = SBO_Application.Forms.Item(pVal.FormUID).Items.Item("107")
Dim oitem1 As SAPbouiCOM.Item = SBO_Application.Forms.Item(pVal.FormUID).Items.Add("UserItem", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
oitem1.Left = oitem2.Left
oitem1.Width = oitem2.Width
oitem1.Top = oitem.Top
oitem1.Height = oitem.Height
oitem1.LinkTo = "215"
oitem1.Visible = True
oitem1.DisplayDesc = True
Dim oCombo As SAPbouiCOM.ComboBox = oitem1.Specific
oCombo.DataBind.SetBound(True, "OITM", "U_UDF")
oCombo.ValidValues.Add("M", "M")
oCombo.ValidValues.Add("L", "L")
oCombo.ValidValues.Add("E", "E")
Catch ex As Exception
SBO_Application.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
End Try
End If
after binding UDF field to Combobox it adds to database automatically on clicking add.
regards,
varma
Similar Messages
-
How to retrieve the values from a table if they differ in Unit of Measure
How to retrieve the values from a table if they differ in Unit of Measure?
If no data is read
- Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
If no quanity in result internal table
- There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
- - Remove the CORRESPONDING, so quantity will fill the first field adqntp1. ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
- - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
* Fill the internal table
SELECT msehi adqntp
INTO TABLE internal table
FROM lipso2
WHERE vbeln = wrk_doc1
AND msehi IN ('KL','K15','MT').
* If required move the read quantity in the appropriate column.
LOOP AT internal_table ASSIGNING <fs>.
CASE <fs>-msehi.
WHEN 'K15'.
<fs>-adqnt2 = <fs>-adqnt1.
CLEAR <fs>-adqnt1.
WHEN 'MT'.
<fs>-adqnt3 = <fs>-adqnt1.
CLEAR <fs>-adqnt1.
ENDCASE.
ENDLOOP.
- You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
Regards,
Raymond -
Insert the values form one table to another
Hi.,
I am using jdev11.1.5
I had created a reaadonly VO using the follwing querry
select distinct fp_bu,fp_year,fp_period, decode(gdh_status,'R','Yes','No') distribution,decode (aj_status ,'N','Yes','No') Recursion,
decode(RSUPHD_STATUS,'P','Yes','No') Supplier,decode(RCDOC_STATUS,'P','Yes','No') Customer
from gl_dist_hd,fin_periods,appl_journals,rec_suplr_doc_hd,rec_cust_doc_hd
where fp_bu = gdh_bu(+) and
gdh_bu = aj_bu(+) and
aj_bu = RSUPHD_BU(+) and
RSUPHD_BU = RCDOC_BU(+) and
fp_year = gdh_year(+) and
gdh_year = aj_year(+) and
aj_year = RSUPHD_DOC_YEAR(+) and
RSUPHD_DOC_YEAR = RCDOC_DOC_YEAR(+) and
fp_period = gdh_period(+) and
gdh_period = aj_period(+) and
aj_period = RSUPHD_DOC_PERIOD(+) and
RSUPHD_DOC_PERIOD = RCDOC_DOC_PERIOD(+)
ORDER BY fp_period asci had created a button [post]
when the user clicks the button it must insert the values of table CursorC1 into GlJrnlHd
i had tried a querry in AMImpl
ViewObjectImpl vo = this.getGlJrnlHd1();
Row newRow = vo.createRow();
ViewObjectImpl c1 = this.getCursorC1_1();
Row cr1 = c1.getCurrentRow();
newRow.setAttribute("GjhBu", cr1.getAttribute("GrhBu"));
newRow.setAttribute("GjhPlant", cr1.getAttribute("GrhPlant"));
newRow.setAttribute("GjhJrnlType", cr1.getAttribute("GrvlJrnlType"));
newRow.setAttribute("GjhJrnlNo", cr1.getAttribute("GrvlJrnlNo"));
newRow.setAttribute("GjhJrnlSfx", cr1.getAttribute("GrhJrnlSfx"));
newRow.setAttribute("GjhJrnlDate", "Null");
newRow.setAttribute("GjhYear", cr1.getAttribute("GrvlYear"));
newRow.setAttribute("GjhPeriod", cr1.getAttribute("GrvlPeriod"));
newRow.setAttribute("GjhDesc", cr1.getAttribute("GrhDesc"));
newRow.setAttribute("GjhAppl", "GLM");
newRow.setAttribute("GjhReversal", "N");
newRow.setAttribute("GjhStatus","N");
newRow.setAttribute("GjhCreBy", "NULL");
newRow.setAttribute("GjhCreDate", "NULL");
newRow.setAttribute("GjhUpdBy", "NULL");
newRow.setAttribute("GjhUpdDate", "NULL");
this.getTransaction().commit();i am getting null pointer exception at this line
newRow.setAttribute("GjhBu", cr1.getAttribute("GrhBu"));could anyone please help me to resolve this errorHi,
give a NPE check
ViewObjectImpl vo = this.getGlJrnlHd1();
Row newRow = vo.createRow();
ViewObjectImpl c1 = this.getCursorC1_1();
Row cr1 = c1.getCurrentRow();
if (cr1 != null){
newRow.setAttribute("GjhBu", cr1.getAttribute("GrhBu"));
newRow.setAttribute("GjhPlant", cr1.getAttribute("GrhPlant"));
newRow.setAttribute("GjhJrnlType", cr1.getAttribute("GrvlJrnlType"));
newRow.setAttribute("GjhJrnlNo", cr1.getAttribute("GrvlJrnlNo"));
newRow.setAttribute("GjhJrnlSfx", cr1.getAttribute("GrhJrnlSfx"));
newRow.setAttribute("GjhJrnlDate", "Null");
newRow.setAttribute("GjhYear", cr1.getAttribute("GrvlYear"));
newRow.setAttribute("GjhPeriod", cr1.getAttribute("GrvlPeriod"));
newRow.setAttribute("GjhDesc", cr1.getAttribute("GrhDesc"));
newRow.setAttribute("GjhAppl", "GLM");
newRow.setAttribute("GjhReversal", "N");
newRow.setAttribute("GjhStatus","N");
newRow.setAttribute("GjhCreBy", "NULL");
newRow.setAttribute("GjhCreDate", "NULL");
newRow.setAttribute("GjhUpdBy", "NULL");
newRow.setAttribute("GjhUpdDate", "NULL");
this.getTransaction().commit();
} -
How to insert the value axis in a EXCEL graph
Hello,
how can I do to insert the value axis (name) and graph tilte in a EXCEL graph using report generation in LabVIEW??
I'm using excel specific functions, but I don't find it anywhere.
THANKS.Hi,
the function Excel Set Graph Font.vi has an input parameter called Title that corresponds to the name of the axis selected through Axis Type parameter.
And the funtion Excel Insert Graph.vi has an input parameter called Graph Title.
You can see an example called Column Graph (Excel).vi in Find Examples>Toolkits and Modules>Report Generation. -
I'm using referential costraints in table creation.how to insert the value
Hi,
This is the table Script.
CREATE TABLE Trn_Invest_DividendSU(
DividendSU_ID NUMBER(10) DEFAULT 0,
DividendSU_LedgerType CHAR(1) DEFAULT ' ',
DividendSU_EntryDate DATE,
DividendSU_SU_Code VARCHAR2(20) DEFAULT ' ',
Scheme_Code VARCHAR2(20) References Mst_Invest_Scheme(Scheme_Code),
Share_Code VARCHAR2(20) References Mst_Invest_Share(Share_Code),
DividendSU_SchemeTypeID NUMBER(4) DEFAULT 0,
InvstMaster_ID NUMBER(4) DEFAULT 0,
DividendSU_DividentDate DATE,
DividendSU_EligibleSU NUMBER(10,5) DEFAULT 0,
DividendSU_NoSUTobe NUMBER(10,5) DEFAULT 0,
DividendSU_AverageSU NUMBER(10,5) DEFAULT 0,
DividendSU_Narration VARCHAR2(300) DEFAULT ' ',
DividendSU_BRVDate DATE,
DividendSU_DividendSU NUMBER(5,4) DEFAULT 0,
DividendSU_MJVStatus CHAR(1) DEFAULT ' ',
DividendSU_TotalDividend NUMBER(5,4) DEFAULT 0,
SalSU_Brokerage NUMBER(3,2) DEFAULT 0,
SalSU_STT NUMBER(4,6) DEFAULT 0,
DividendSU_RequestId NUMBER(8) DEFAULT 0,
DividendSU_Timestamp VARCHAR2(25) DEFAULT ' '
ALTER TABLE Trn_Invest_DividendSU ADD (CONSTRAINT Trn_Inv_DivSU_DividendSUID_PK PRIMARY KEY (DividendSU_ID));
ALTER TABLE Trn_Invest_DividendSU ADD (CONSTRAINT Trn_Inv_DivSU_SchemeType_Id_FK FOREIGN KEY (DividendSU_SchemeTypeID) REFERENCES Mst_Invest_SchemeType (SchemeType_ID));
ALTER TABLE Trn_Invest_DividendSU ADD (CONSTRAINT Trn_Inv_DivSU_InvID_FK FOREIGN KEY (InvstMaster_ID) REFERENCES Mst_Invest_Master (InvstMaster_ID));
ALTER TABLE Trn_Invest_DividendSU ADD CONSTRAINT Check_Id2_FK check
((Scheme_Code Is Null and Share_Code Is Null) OR
(Scheme_Code Is Not Null and Share_Code Is Null) OR
(Scheme_Code Is Null and Share_Code Is Not Null));
Note:
Scheme_Code is primary key in Sheme Master
Share_Code is primary key in Share Master
SH01 is available in Share Master.but insert statement will not accept.
insert into TRN_Invest_DividendSU(DIVIDENDSU_ID,DIVIDENDSU_SU_CODE,SCHEME_CODE,SHARE_CODE) values (1,'SH01',null,null)
The Following will be coming
ORA-02291: integrity constraint (SBNPINV.TRN_INV_DIVSU_INVID_FK) violated - parent key not found
Pls very urgent.
Thanks,
V.NagarajanHi,
I can not understand the need for this constraint excatly
ALTER TABLE Trn_Invest_DividendSU
ADD CONSTRAINT Check_Id2_FK check(
(Scheme_Code Is Null and Share_Code Is Null) OR
(Scheme_Code Is Not Null and Share_Code Is Null) OR
(Scheme_Code Is Null and Share_Code Is Not Null)
);If I am reading it correctly, you do not want value for both Scheme_code and Share_code at the same time. Only one of the values should be present for a particular row.
If I read it correctly, then this constraint needs to be modified so that you can specify values for both these fields in your INSERT statement.
Thanks,
Ankur -
How to insert a value into a table
I have an ordering system. It displays all the orders by
customer ID. If an order is complete, a check number is entered for
the corresponding line item, otherwise it is left blank.
My code uses the following code to display the form. All are
display fields only, except for the last one, where the check
number can be entered.
<cfoutput query="qryDetail" group="partNumber">
<tr>
<td valign="top" class="TitleText"
align="center">#lineItem#</td>
<td valign="top" class="TitleText"
align="center">#OrderNumber#</td>
<td valign="top" class="TitleText"
align="center">#partNumber#</td>
<td valign="top" class="TitleText"
align="center">#dollarformat(qryDetail.unitValue)#</td>
<td valign="top" class="TitleText" align="center">
<cfinput type="text" name="checkNumber#keyID#">
<input type="hidden" name="keyID"
value="#qryDetail.keyID#">
</td>
I use something like the following to update the table with
the check numbers entered.
<cfloop index="KeyID" list="#form.KeyID#"
delimiters=",">
<cfquery name="qryUpdate" datasource="dbName">
update tblChecks
set checkNumber = '#Evaluate("form.checkNumber#KeyID#")#'
where custID = '#form.custID#'
and KeyID = '#KeyID#'
</cfquery>
</cfloop>
Now we have another table that will contain the customer
order history. If the check number was entered for a particular
line item, I need to insert that line item nubmer into this table,
along with some other columns. I tried to use the same loop, then
other loops, but cannot seem to get this to work. Seems simple
enough, but I obvisouly am missing something.
How would I insert the line item number (only if a check
number was entered for that line item) into the table ?Here is the code with the queries commented out :
<cfloop list="#form.fieldnames#" index="field">
<cfif left(field, 11) is "checkNumber" AND
len(trim(form[field]))>
<cfset keyID = listlast(field, '_')>
<cfset lineItem = listgetat(field, 2, '_')>
<cfset checknum = form[field]>
<!---cfquery name="qryUpdate" datasource="dbName">
UPDATE tblChecks
SET checkNumber = '#checknum#'
WHERE custID = #form.custID#
AND KeyID = #keyid#
</cfquery--->
<cfoutput> loop is
field: <b>#field#</b><br>
checknum: #checknum#<br>
lineitem: #lineitem#<br>
keyID: #keyID#<br>
</cfoutput>
<cfelse>
<cfoutput>Else is
field: <b>#field#</b><br>
form[field]: #form[field]#<br>
len: #len(trim(form[field]))#<br>
</cfoutput><cfabort>
</cfif>
</cfloop>
This is the output. If I do not put in cfabort, the code just
drops thru and I never see any output display, so I use cfabort to
stop so I can see the output.
loop is field: CHECKNUMBER_11_218
CHECKNum: xxxxxxxxxxxxxxxxxxxx
lineitem: 11
keyID: 218
Else is field: CHECKNUMBER_1_24
form[field]:
I entered the x's into checknum for line item 11, so that is
correct.
I then took out the comments from the update query and tried
it again and it updated for line item 11 (you were right, I had to
take out the single quotes in the query). I then removed the
commets for the insert query and it did not insert. I tried the
whole thing again and tried to add to line item 10 and it dropped
straight to the else part, displaying :
Else is field: CHECKNUMBER_1_24
form[field]:
len: 0
So it seems the if statement if failing the second time thru
the loop :
<cfif left(field, 11) is "checkNumber" AND
len(trim(form[field]))>
This is my input statement :
<cfinput type="text"
name="checkNumber_#lineItem#_#keyID#">
I am really confused now. It seems to work the first time
thru the loop, then the second time it fails. -
How to get the value from Advanced table
Hi,
In the Advanced table have 2 LOV fields, I need LOV field value dynamically in the controller to validate the save button, if iam not selected any value in lov save button will not allow to save the data. In the table i am using 'Add another row'. How to get the lov field value in the process form request??? and how to do this requirement
Thanks
Naresh1. You can specify required property on LOV field to "yes". For events where you wish to disable the client side validations, set the property disable client side validation to "true".
2. If above behavior is not what you are looking for, then you need to handle in AM and not CO.
a. Call an AM method from CO.
b. In that AM method, get handle of VO.
c. Iterate the VO Rows and check for your validation rules.
-Prince
http://www.princekapoor82.blogspot.com -
How i insert the values in JTable
Hi,
Iam new to the swings i have a problem placing the values in JTable while retriving the values from DataBase .Anybody please suggest me..
i can retriving the values but how i place the vlaues..
This is My code
package com.teamone.healthcare;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.DriverManager;
import java.sql.Statement;
import javax.swing.JButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.WindowConstants;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableModel;
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.ResultSet;
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
public class ClientList extends javax.swing.JFrame {
private static final long serialVersionUID = 1L;
private JScrollPane list;
private JButton view;
private JButton close;
private JTable jTable1;
Connection con = null;
Statement st = null;
ResultSet rs = null;
* Auto-generated main method to display this JFrame
/*public static void main(String[] args) {
ClientList inst = new ClientList();
inst.setVisible(true);
public ClientList() {
super();
initGUI();
this.setVisible(true);
private void initGUI() {
try {
list.setBounds(161, 133, 371, 98);
list.getHorizontalScrollBar().setPreferredSize(new java.awt.Dimension(10, 59));
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
getContentPane().setLayout(null);
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = (Connection) DriverManager.getConnection("jdbc:mysql:///healthcare","yenmad","yenmad");
st = con.createStatement();
rs = (ResultSet) st.executeQuery("SELECT User_id, Username, Citizen_ID, First_Name, Phone FROM register_users");
while(rs.next()) {
int Userid = rs.getInt(1);
String Username = rs.getString(2);
String ClientId = rs.getString(3);
String ClientName = rs.getString(4);
//String Last_Name = rs.getString(5);
String ContactNumber = rs.getString(5);
System.out.println(Userid + ", " + Username + ", " +ClientId + "," + ClientName +","+ContactNumber);
} catch (Exception e) {
System.out.println("Exception: " + e.getMessage());
list = new JScrollPane();
getContentPane().add(list);
list.setBounds(0, 0, 644, 217);
TableModel jTable1Model = new DefaultTableModel(
new String[][] { { "", "", "","", "" } },
new String[]{ "UserId", "UserName", "ClientId", "ClientName", "ContactNumber"});
jTable1 = new JTable();
list.setViewportView(jTable1);
jTable1.setModel(jTable1Model);
close = new JButton();
getContentPane().add(close);
close.setText("Close");
close.setBounds(518, 231, 63, 28);
view = new JButton();
getContentPane().add(view);
view.setText("View");
view.setBounds(441, 231, 63, 28);
view.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
viewActionPerformed(evt);
pack();
this.setSize(652, 300);
} catch (Exception e) {
e.printStackTrace();
private void viewActionPerformed(ActionEvent evt) {
System.out.println("view.actionPerformed, event=" + evt);
new ViewClient();
}can i display this table values in vertical .. if yes how can i do that.. please suggest me..
this is the code iam using but it is displa in horizontally...
package com.teamone.healthcare;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.DriverManager;
import java.util.Vector;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.WindowConstants;
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.ResultSet;
import com.mysql.jdbc.ResultSetMetaData;
import com.mysql.jdbc.Statement;
public class ClientList extends javax.swing.JFrame {
private static final long serialVersionUID = 1L;
/*public static void main(String[] args) {
ClientList inst = new ClientList();
inst.setVisible(true);
public ClientList() {
super();
initGUI();
this.setVisible(true);
private void initGUI() {
try {
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
pack();
setSize(600, 500);
Vector columnNames = new Vector();
Vector data = new Vector();
try
this.setSize(500, 400);
// Connect to the Database
Class.forName("com.mysql.jdbc.Driver");
Connection connection = (Connection) DriverManager.getConnection("jdbc:mysql:///healthcare","yenmad","yenmad" );
// Read data from a table
String sql = "Select User_id, Username, Citizen_ID, First_Name, Last_Name, Phone from register_users";
Statement stmt = (Statement) connection.createStatement();
ResultSet rs = (ResultSet) stmt.executeQuery( sql );
ResultSetMetaData md = (ResultSetMetaData) rs.getMetaData();
int columns = md.getColumnCount();
// Get column names
for (int i = 1; i <= columns; i++)
columnNames.addElement( md.getColumnName(i) );
// Get row data
while (rs.next())
Vector row = new Vector(columns);
for (int i = 1; i <= columns; i++)
row.addElement( rs.getObject(i) );
data.addElement( row );
rs.close();
stmt.close();
catch(Exception e)
System.out.println( e );
// Create table with database data
JTable table = new JTable(data, columnNames);
JScrollPane scrollPane = new JScrollPane( table );
getContentPane().add( scrollPane );
JPanel buttonPanel = new JPanel();
getContentPane().add( buttonPanel, BorderLayout.SOUTH );
buttonPanel.setPreferredSize(new java.awt.Dimension(200, 66));
JButton View = new JButton();
buttonPanel.add(View);
View.setText("View");
View.setLayout(null);
View.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
ViewActionPerformed(evt);
JButton Close = new JButton();
buttonPanel.add(Close);
Close.setText("Close");
Close.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
CloseActionPerformed(evt);
} catch (Exception e) {
e.printStackTrace();
private void CloseActionPerformed(ActionEvent evt) {
System.out.println("Close.actionPerformed, event=" + evt);
this.setVisible(false);
private void ViewActionPerformed(ActionEvent evt) {
System.out.println("View.actionPerformed, event=" + evt);
new ViewClient();
} -
i want to ask u all.
what is the code for insert he value?
i mean in doublewhat is the code to insert value
example:
int base=Integer.parseInt(args[0]);
my question is how i make coding for double -
How to insert the data system created table throuch RFC
How can i Insert any data system created table like MARC T100w .... throuh RFC.
I created Funstion module.
MY Email Address : [email protected]
[email protected]Hello Chandan
It is pure madness to update or modify tables like MARC or T100W directly, whether on remote systems or locally.
If you need to update or modify such tables on remote system search for the appropriate <b>BAPI </b>(e.g. in case of MARC use BAPI_MATERIAL_SAVEDATA).
Regards
Uwe -
How to extract the values from WPBP table
Hi experts,
We are in preparation of a custom report.
In the report we want to have a value from WPBP table.
We want to extract the value of Capacity utilization level from WPBP table.
Could you please let me know the way to extract the value.
Please advice.
Regards,
Sairam.Hi Sairam,
Why do you try to get capacity utilization level from WBPB. Even if there is split in payroll capacity utilizatian level in WPBP shows the value in IT0008 basic pay.
So instead you can get the required information from table PA0008 Field for capacity utilization level is BSGRD
Regards;
Okan -
How to pass the values from internal table to field groups
hi all,
how can i pass the internal table values to field groups?
already field groups are holding some values.. INSERT STATEMENT IS NOT WORKING as it is ovewriting the existing values..
Use full answers will be rewared.
Thanks.
Moderator message - duplicate post locked
Edited by: Rob Burbank on Jun 23, 2009 9:51 AMHi,
You can use INSERT statement to put a work area of an Internal table in Field-group
and use Extract to get info out of it.
Hope it helps,
Raj -
How to copy the value of two tables into a view.
Hi Experts ,
I have a requirement in which i have been provided with two tables(T1,T2) of same table structure ,i need to copy their entries into a table view with the same structure as the two tables(T1,T2) .
suppose T1 has entries name age T2 has entries
A 20 D 40
B 30 E 46
C 40
the view should have all the entries,duplicate values no issues ...
Could you please suggest how can i do that ?
Thanks and Regards
Debashisif table have same structure then you can use
select * from t1
union all
select * from t2 -
How to insert a value in a table using another table
My table is like this
col1 col2 col3
india
Pakistan
my doubt is if i insert India in a table it will automatically insert India Id or code into another table
output i want is like this
col1 col2
10
20
please give the exact query.u will have to use triggers to achieve the functionality..
-
If Both tables having References then how to insert the data each other
Hai EveryOne..,
My Sample data.,
Create table emp (empno number primary key,ename varchar2(20));
Create table emp_dup (empno number references emp(empno),ename varchar2(20) primary key);
alter table emp add constraint ename_fk foreign key(ename) references emp(ename);
My Question is How to insert the data into these two tables?
Its a *"Circular Reference"* Concept.
Please ...
Thank You!!You need to set the DEFERRED clause of the constraint when you create your foreign key as DEFERRABLE by which you can move the constraint validation at transaction level.
In an interview point of view that could be a reasonable answer. But in real time this could be strongly questionable.
Here is an example
SQL> create table emp1 (empno number, ename varchar2(10))
2 /
Table created.
SQL> create table emp2 (empno number, ename varchar2(10))
2 /
Table created. Define Primary Key for two tables
SQL> alter table emp1 add constraint emp1_pk primary key (empno)
2 /
Table altered.
SQL> alter table emp2 add constraint emp2_pk primary key (ename)
2 /
Table altered. Add foreign key for two tables with DEFERRED clause set as DEFERRABLE
SQL> alter table emp1 add constraint emp1_fk foreign key (ename) references emp2(ename) initially deferred deferrable
2 /
Table altered.
SQL> alter table emp2 add constraint emp2_fk foreign key (empno) references emp1(empno) initially deferred deferrable
2 /
Table altered. Now here is the test case
SQL> insert into emp1 values (1, 'karthick')
2 /
1 row created.
SQL> commit
2 /
commit
ERROR at line 1:
ORA-02091: transaction rolled back
ORA-02291: integrity constraint (ARBORU.EMP1_FK) violated - parent key not found So the validation is done at Transaction level. Now let insert the value into both tables.
SQL> insert into emp1 values (1, 'karthick')
2 /
1 row created.
SQL> insert into emp2 values (1, 'karthick')
2 /
1 row created.
SQL> commit
2 /
Commit complete.
Maybe you are looking for
-
WRT 120 Internet Access Control Problem for itouch
I've just set up my router. Cannot seem to control access to the internet for my son's itouch. The router recognizes it on the map as a wireless device part of the network, but it will not show up in the menu that allows for internet access control.
-
Very slow Broadband speed please help!
Hello to all, I have recently joined BT from Sky and I am due to have Bt infinity installed mid October so hopefully my issue will be resolved then, however since joining BT Broadband I have had appalling internet speeds averaging 0.3 mbps! I can't e
-
MAC OS X Certificate Enrollment
I want to use this configuration for MAC OS X certificate enrollment. What is required on the Windows PKI side for this to work? Do I need NDES or something else? Thank you. MCITP Exchange 2010 | MCITP Lync Server 2010 | MCTS Windows 2008
-
How do I uninstall the iso8 update
how do I uninstall the iso8 update
-
Hi guys, I am preparing the sales scenario. I would like to know the hierarchies for sales representative and looking for fields in invoice Thanks & Regards Bhasin Naik