Code To Update the Table in ECC from Webdynpro
Hi All,
I want to know, the table is dispalyed in the webdynpro browser when we calls the Adaptive RFC Model.
after i want to add one more row in the webdynpro and just clicking on add button the row will be updated in the ECC server(backend) for that how can i write the coding, regarding this issue can you please help me.
ThanX All,
Hi Sriram,
Assuming you have a table filled with records by adding one by one, If you want to update a table in SAP ECC, follow these steps.. i think already you are triggering the action for the button in view(for table updation) to method in controller or created a custom controller and mapped the model node.
1. Initialize the main model node and bind the model node with the intialised object like
Zbapi_MainModelNode_Input input = new Zbapi_MainModelNode_Input();
wdContext.nodeZbapi_MainModelNode_Input ().bind(input);
2. Now loop the table node and set the values with corresponding class in the generated model (from webdynpro explorer) and initialize like
IPrivateControllerName.ITableElement myTab = null;
for ( int i = 0; i < wdContext.nodeTable().size();i++)
myTab = this.wdContext.nodeTable().getTableElementAt(i);
Bapi_structname name = new Bapi_structname();
name.setFieldName1(myTab.getFieldName1);
name.setFieldName2(myTab.getFieldName2);
input.addT_Bapi_(name);
Finally execute the BAPI..
wdContext.currentZbapi_MainModelNode_Input tElement().modelObject().execute();
Hope this solves your issue - Update the Table in ECC from Webdynpro.
Regards,
Manjunath
Edited by: Manjunath Subramani on Nov 20, 2009 4:26 PM
Edited by: Manjunath Subramani on Nov 20, 2009 4:27 PM
Similar Messages
-
Hi Gurus,
I maintained the JCEP ( A/R Cess %) as 3%. While iam saving the Excise invoice the system is throwing the error like error updating the table condition table 372
Gurus plz give u r suggestions.
regards,
jyothi.
Edited by: jyothi. on Feb 25, 2008 7:26 AMHi Murali!
Even I am facing the same problem while working in ECC 6.0 environment. I am continuing in the same post as I feel it is most relevant post to continue the issue instead of opening a new issue.
I tried to maintain a different access sequence for the condition type JEXP i.e a new Access sequence(ZJEX) and also a new condition tpe (ZJEP). We don't have other Excise condition type in our Pricing procedure.
In the access sequence except condition table 372, I have maintained all other condition tables.
We have maintained the values against table 357- Country/Plant/Control Code.
Still the error is persisiting. Can you put some light on the issue.
I have even traced the values being hit in the tables directly. There is no relation of table 372, then why is it being cause of the error.
Thanks in advance,
Regards,
Karthik. -
How to write a procedure for update the table
Hi all
can any body please tell me how to write a procedure to update the table......
I have a table with about 10,000 records...........Now I have add a new column and I want to add values for that like
registration Code Creidits
13213 BBA
1232 MCS
I had add the creidit now i want to update the table.........the new value want to get by SQL like
Creidit = select creidit from othere_table...........
Hope u can understand my problem
Thanks in advance
Regards
Shayan
[email protected]Please try the following --
update Program_reg a
set TotalCreidit = ( select tot_cr <Accroding to your logic>
from Program_reg b
where a.Registration = b.Registration
and a.Enrollment = b.Enrollment
and a.code = b.code
where a.Registration in ( select distinct Registration
from Program_reg );
N.B.: Not Tested....
Regards.
Satyaki De. -
Code to update a table using sqlldr
Hi all,
can anybody give the code to update a table using sqlldr with an example
thank youYou want add the new line and modified the existing line (based on empno) from file e:\scripts\sql\emp2_ext.dat into table emp2 :
7782,CLARK,MANAGER,7839,09/06/81,80000,,10
8000,ORACLE,DATABASE,,11/02/07,99999,,20Then :
SQL> conn system/mypwd
Connected.
SQL>
SQL> create directory my_dir as 'e:\scripts\sql';
Directory created.
SQL>
SQL> grant read,write on directory my_dir to scott;
Grant succeeded.
SQL>
SQL> conn scott/mypwd
Connected.
SQL> create table emp2_ext
2 (EMPNO NUMBER(4),
3 ENAME VARCHAR2(10),
4 JOB VARCHAR2(9),
5 MGR NUMBER(4),
6 HIREDATE DATE,
7 SAL NUMBER(7,2),
8 COMM NUMBER(7,2),
9 DEPTNO NUMBER(2)
10 )
11 ORGANIZATION EXTERNAL
12 ( TYPE ORACLE_LOADER
13 DEFAULT DIRECTORY my_dir
14 ACCESS PARAMETERS
15 ( records delimited by newline
16 badfile my_dir:'emp2_ext.bad'
17 logfile my_dir:'emp2_ext.log'
18 fields terminated by ','
19 missing field values are null
20 ( empno, ename, job, mgr, hiredate char date_format date mask "dd/mm/yy",
21 sal, comm, deptno
22 )
23 ) LOCATION ('emp2_ext.dat')
24 ) ;
Table created.
SQL>
SQL> select * from emp2_ext;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7782 CLARK MANAGER 7839 09/06/81 80000 10
8000 ORACLE DATABASE 11/02/07 99999 20
SQL> select * from emp2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7782 CLARK MANAGER 7839 09/06/81 24500 10
7839 KING PRESIDENT 17/11/81 50000 10
7934 MILLER CLERK 7782 23/01/82 13000 10
SQL> merge into emp2 a
2 using (select * from emp2_ext) b
3 on (a.empno=b.empno)
4 when matched then update set a.ename=b.ename,
5 a.job=b.job,
6 a.mgr=b.mgr,
7 a.hiredate=b.hiredate,
8 a.sal=b.sal,
9 a.comm=b.comm,
10 a.deptno=b.deptno
11 when not matched then insert (a.empno, a.ename, a.job, a.mgr, a.hiredate, a.sal, a.comm, a.deptno)
12 values (b.empno, b.ename, b.job, b.mgr, b.hiredate, b.sal, b.comm, b.deptno);
2 rows merged.
SQL>
SQL> select * from emp2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7782 CLARK MANAGER 7839 09/06/81 80000 10 --modified line
7839 KING PRESIDENT 17/11/81 50000 10
7934 MILLER CLERK 7782 23/01/82 13000 10
8000 ORACLE DATABASE 11/02/07 99999 20 --added line
SQL> HTH,
Nicolas.
Well, Hans has already give good explanation with docs links...
Message was edited by:
N. Gasparotto -
How to compare two table and update the table.
I have table A where i have
Table A
select ssn,lname,fname,dob,cadcode,date... from table A
SQL> /
LNAME FNAME DOB SSN Status SOCKETNO
King Jack 11111877 000000000
Sue PAT 01021867 087543217
Smit john 08061897
Table B
SOCKETNO SSN LNAME FNAME DOB CADCODE
C873 000000000 Sue Pat 03021988 C111
C123 Kate Allen 01011999 V111
D009 123987765 King Jack Y123
K897 678987765 Mike Mellon 01111877 V178
I have to compare two table based on the below conditions and update table A With Status =Y and SOCKETNO from table B if a matching record exists in Table B.
condition If SSN from Table A to table B matches OR
if SSN IS NULL OR ALL zeros then compare with FNAME and LNAME and DOB
How can i achive this in a stored procedure?Hi,
You have to make PROCEDURE anyway, you can use CURSOR as per your requirement.
The sample code can look like this:
CREATE OR REPLACE PROCEDURE UPDATE_A (PARAMS.....) IS
CURSOR Cur_SOCKET IS SELECT B.SOCKETNO, B.FNAME, B.LNAME, B.SSN, B.DOB
FROM A, B
WHERE (NVL(A.SSN,0) != 0
AND NVL(B.SSN,0) != 0
AND A.SSN = B.SSN)
OR ( NVL(A.SSN,0) = 0
AND NVL(B.SSN,0) = 0
AND A.FNAME = B.FNAME
AND A.LNAME = B.LNAME
AND A.DOB = B.DOB)
FOR UPDATE OF A.SOCKETNO, A.STATUS;
Var_SOCKET Cur_SOCKET%ROWTYPE;
Old_Var_SOCKET Cur_SOCKET%ROWTYPE;
BEGIN
OPEN Cur_SOCKET ;
LOOP
FETCH Cur_SOCKET INTO Var_SOCKET ;
EXIT WHEN Cur_SOCKET%NOTFOUND ;
IF Cur_SOCKET%ROWCOUNT = 1 THEN
UPDATE A
SET STATUS = 'Y',
SOCKETNO = Var_SOCKET.SOCKETNO
WHERE CURRENTOF Cur_SOCKET ;
ELSIF (NVL(Old_Var_SOCKET.SSN,'X') = NVL(Var_SOCKET.SSN,'X') AND
NVL(Old_Var_SOCKET.FNAME,'X') = NVL(Var_SOCKET.FNAME,'X') AND
NVL(Old_Var_SOCKET.LNAME,'X') = NVL(Var_SOCKET.LNAME,'X') AND
NVL(Old_Var_SOCKET.DOB,'X') = NVL(Var_SOCKET.DOB,'X')) THEN
INSERT INTO A (....FIELDNAMES...) VALUES (.....VALUES....) ;
END IF ;
Old_Var_SOCKET.SSN = NVL(Var_SOCKET.SSN,'X') ;
Old_Var_SOCKET.FNAME = NVL(Var_SOCKET.FNAME,'X') ;
Old_Var_SOCKET.LNAME = NVL(Var_SOCKET.LNAME,'X') ;
Old_Var_SOCKET.DOB = NVL(Var_SOCKET.DOB,'X') ;
END LOOP;
CLOSE Cur_SOCKET;
END ;Regards,
Arpit -
Doing new JTable doesn't "update" the table on the screen
Hello
I am writing a program in java/swing which has several "layers" of panels. In the constructor method of the frame (using JInternalFrame) I create a new instance of JTable, place it inside JScrollPane which is then inside JSplitPane and then place that as the frame content pane.
In this program I run an sql command and the table is the result from that. Every time I execute a query it should update the table with the new results.
What is bothering me now is that when I execute a query I call new JTable() on the variable that held the JTable() object created on startup. When I create a new instance of JTable() and place it in this variable nothing seems to happen. What I need is some kind of "refresh" button. I tried to construct the whole window again but then the program started behaving odd so I gave up that method.
So, does anyone know how to do this?
The code behind this class can be found at http://www.heilabu.net/kari/Session.java (little commented, sorry :/)
You can see the table being constructed in the constructTable() method.
If I am a bit unclear I apologize, don't know all these technical words in english ;)
Thanks in advance!You really need to use a table model. The table you created is great and once that is in you shouldn't mess with it. Instead, when you create the table be sure to create it sort of like this:
DefaultTableMode dtm = new DefaultTableModel(<various constrcutors use the one suited for you>);
JTable table = new JTable(dtm);
To set different data on the table set it in the table model and then refresh the table, also through the table model. This works perfectly every time.
dtm.setDataVector(---) <- 2 methods, one for vectors and one for arrays...
dtm.fireTableChanged();
the folowing code shows exactly how to use it
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
public class RandomTable extends JFrame
GridBagLayout gbl = new GridBagLayout();
JPanel buttonPanel = new JPanel(gbl);
JTable table = null;
DefaultTableModel dtm = null;
JScrollPane tableSP = new JScrollPane();
JButton randomButton = new JButton("Randomize");
Object[] headers = { "a", "b", "c", "d", "e" };
public RandomTable()
this.getContentPane().setLayout(gbl);
randomButton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent evt)
dtm.setDataVector(randomStrings(), headers);
this.dtm = new DefaultTableModel();
this.table = new JTable(dtm);
this.dtm.setDataVector(randomStrings(), headers);
this.tableSP.getViewport().add(table);
this.buttonPanel.add(randomButton, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
this.getContentPane().add(buttonPanel, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0,GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(3, 6, 6, 6), 0, 0));
this.getContentPane().add(tableSP, new GridBagConstraints(1, 1, 1, 1, 1.0, 1.0,GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(6, 6, 3, 6), 0, 0));
this.setSize(300, 300);
public Object[][] randomStrings()
Random rand = new Random();
int rowCount = Math.abs(rand.nextInt())%50;
int colCount = headers.length;
Object[][] array = new Object[rowCount][colCount];
for(int row = 0; row < rowCount; row++)
for(int col = 0; col < colCount; col++)
array[row][col] = Long.toString(Math.abs(rand.nextLong())%100);
return array;
public static void main(String[] args)
RandomTable rt = new RandomTable();
rt.setVisible(true);
} -
How to update the table when change list item in classic report
hi ,
i worked with apex 4.2 and i create normal classic report with one select list(named loved)Column ,now i want to update table when user change the list with new value ,i can't create dynamic action to do this,i create check box with primary key and loop for check item to update the table but i can't get the value of list item. and for more speed the user want to do this when change the list value.
my question
1- how to do this by javascript and get the value from list item and update the table with new value
2- is i must use API to create list item so i can get the value of item in report or what.
Thanks
AhmedI coded the following to give you direction:
1. In the "Element Attributes" section of the DEPTNO column, I call a javascript function as:
onchange = "javascript:updateTable(this);"2. I wrote a simple javascript function that shows an alert when the user changes the select list as:
<script language="JavaScript" type="text/javascript">
function updateTable(pThis)
var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
alert('Row# - '+ vRow + ' has the value - ' + pThis.value);
</script>Now, you can call a AJAX on-demand process inside the javascript function to update the database value. -
Error updating the table condition table 372 in J1IIN
Hello all,
I am facing the problem in the transaction code J1IIN (In CIN).
I have maintained the condition type JEXP ( A/R BED %) as 16% with the Key combination Country/Plant/Control Code (Table 357). While iam saving the Excise invoice the system is throwing the error like Error updating the table condition table 372
I have gone through the post given by Ms. Jyoti few days back and tried to do some changes in the customisation.
I tried to maintain a different access sequence for the condition type JEXP i.e In the access sequence except condition table 372, I have maintained all other condition tables.
Still the error is persisiting. Can anyone put some light on the issue.
I have even traced the values being hit in the tables directly. There is no relation of table 372, then why is it being cause of the error.
Gurus plz give ur suggestions.
Thanks
SrinivasHello Srinivas/Sandeep
Please ensure that access sequence in the condition type JEXC has got the table 372. If it is not there please maintain it.
The standard access sequence used in all duty condition type
is JEXC which has got the table 372 this will get updated once
you save your excise invoice.
If the issue is resolved, kinldy close the message.
Regards
MBS -
How will get the source code of all the tables in a given schema using SQL?
Hi All,
How can we get the source code of all the tables in a given schema using SQL?
Thanks in Adv.
JunuTry something like...
set heading off
set pagesize 0
col meta_data for a96 word_wrapped
set long 100000
SELECT DBMS_METADATA.GET_DDL(object_type, object_name, owner) ||';' AS meta_data
FROM dba_objects
WHERE owner = '<SCHEMA NAME>'
AND object_type not in (<list of stuff you do not want>); -
FM to update the table HRPAD25
Hi All,
Is there any FM to update the standard table HRPAD25? I need to update the values entered by the user on the LSO Followup screen in this Table. I have enhanced this screen in LSO_PSV2 with an additional field 'Score'. How do i update the table HRPAD25? Is there any BADI or FM to do this. Any input on this will be of great help.
Thanks and regards,
PavithraHi Eric,
I do have some similar kind of requirement where in i am asked to use the IDOC COND_A02. The point where i am stuck is in populating the custom segment field values which we need to be passed with the IDOC. I am able to execute the IDOC from WE19 but both the exits EXIT_SAPLVKOE_001 and EXIT_SAPLVKOE_002 were not getting triggered.
We need this IDOC to be generated whenever there is a change in the Pricing Conditions (PB00 DISC1 DISC2). Please let me know how can i populate the custom segment values and trigger the IDOC.
Good Day,
Thanks & Regards,
Uday S. -
Update the VBUND in BSEG from FB50
Hi ,
Thanks for the reply....
Is there any substitution programs or exists to update the VBUND in BSEG from FB50???
We need to update the VBUND from T880-RCOMP. where we need write this peace of code?
Thanks,
SridharHi
You can use BTE : Business Transaction Events: SAMPLE_PROCESS_00001120, you have to copy it and activate it using the SAP transaction FIBF, and on the copy of this bte (you can see it and copy it on SE37) you can do some code that modifies the content of field BSEG-VBUND. (don't forget to make a condition to limit the substitution for your company).
Regards
Yassine NEJMY -
Hi,
I have 1500 Tables in the Database, Once we clone from Prod to Test. we need to update the tables in TEST Environemtn for secutiry reasons...
There are 40% big tables with million records...
we have script for updating .....COMMIT is at the end of the script, after updating the all tables......
But which is the best option....putting COMMIT is after updating every table...or after updating all tables.....
please sched some light on thisThe best option is the option which guarantees completeness and consistency.
Sybrand Bakker
Senior Oracle DBA -
T-Code to update condition table for delivery & transport scheduling to SCM
Hello,
Could you tell the T-code to update condition table for delivery & transport scheduling to SCM system
These are the some SAP fileds
/SAPCN1/KOTABNR (Condition Table)
/SAPCND/KAPPL(Application)
/SAPCND/KSCHL(Condition type)
/SAPCND/KOLNR(Access sequence)
Thanks in Advance
RK
Edited by: RK on Jun 9, 2009 5:58 PMHI
The TCODE for this is /SAPAPO/ATP_GCM.
Regards
Anurag. -
How to find program/TCODE which has updated the tables
Hi All,
Is there any way to find out program or transcation which has updated the tables.
BR
Kamalyou can see in the table CDHDR or CDPOS which will give you the transaction code and program names.
Regards,
Krishna -
How to update the table value in the valuechange event?
I have an input field in the datatable with the valueChangeListener
<rich:dataTable id="cart" value="#{cart.cartList}" var="item">
<h:inputText value="#{item.cost}" id="qty" valueChangeListener="#{items.updateCost}" onchange="submit()">
<h:outputText value="#{item.errorMsg}"> </h:outputText>
in the backing bean
Item item = (Item) model.getRowData();
// do some update, if the cost too larger, change to max_cost
item.setCost(max_cost);
item.setErrorMsg("Error Msg");
After calling the valuechange method, the screen output doesn't update the cost.
How to update the table value in the valuechange event?As you're misusing the valueChangeListener to set another input field, you need to skip the update model values phase. Otherwise the value set in the valueChangeListener will be overridden by the submitted value. You can do this by calling the FacesContext#renderResponse() inside the valueChangeListener method. This will shift the current phase immediately to the render response phase, hereby skipping the update model values and invoke application phases.
Maybe you are looking for
-
Windows AAMEE-created installer files install, then uninstall all products
I am trying to use AAMEE 3.1 to create CS6 installer files that will be used in creating a Windows 7 image. Every version of the installer file that I have tried does not work. In every case, the product(s) is installed and then subsequently uninsta
-
Media list required for PI 7.1 including EHP1 for AIX, DB2.
I am in the process of downloading software for PI7.1 including EHP1. But I identified below two links in service market place. Which is one is the correct link for getting combined pack of PI 7.1 including EHP1 for fresh installation? https://websmp
-
Seeing Time Capsule from Apple TV
Hi all, I'm trying to get my Apple TV to see the files being shared on Time Capsule. I have no problem seeing and sharing files between my Macs and can happily play media files using a Western Digital player, but I can't seem to find a way of gettin
-
Business Content -is needed for QA and Production System
I am working in BW3.5 system. BI content 3.5.3 is installed in BW Development system. Is it necessary BI content needs to be installed all the system like BW QA and BW production system. I am going to activate necessary objects only in BW Development
-
I set this up the day (June 20) that Directv agreed to partner wi Apple for HBOGO. I have an Apple TV 3. I was able that day to add movies to my Watchlist. I have now watched them and have the ability to Remove them but the Add does nothing. I br