How to update the database table using webdynpro??
Hi,
Can anybody helm me in updating database table....by entering the values on the output screen of webdynpro component??should i use any commit statement in function module ,which i used to update.
hi martina....
consider you are having two input fields bound to attr1 and attr2.
now after pressing the save button:
just read teh two attributes to field1, field2 using code wizard. then
<db name>-<fieldname1> = <field1>.
<db name>-<fieldname2> = <field2>.
insert <dbname>.
---regards,
alex b justin
Similar Messages
-
How to update the ztable by using table handling function
how to update the ztable by using table handling function
It is very urgent ...............................
thanks in advancesee the below code for the direct ztable update
Report ZUPDATE_PRPS.
tables: zprps.
parameter: p_wbs like zprps-pspnr,
p_value like zprps-fakkz default 'X'.
data: wa_fakkz type zprps-fakkz.
*START-OF_SELECTION
start-of-selection.
call function 'CONVERSION_EXIT_ABPSP_INPUT'
exporting
input = p_wbs
importing
output = p_wbs
exceptions
not_found = 1
others = 2.
select single fakkz
into wa_fakkz
from zprps
where pspnr eq p_wbs.
if sy-subrc eq 0.
update zprps set fakkz = p_value where PSPNR eq p_wbs.
if p_value is initial.
message i999(za) with 'Billing element field has been unchecked'.
else.
message i999(za) with 'Billing element field has been checked'.
endif.
else.
message i999(za) with 'WBS element not found'.
endif.
reward points if it is usefull .....
Girish -
I want to update the Custom table using the data available in ITAB.
Hi,
I want to updaste the Custom Table which is created by me (Ztable) using the data available in itab.(which i got from defferent standard tables)
I want to update the custom table using the itab data How is it possible?
Is any possible by using Modify ?
DPK.example here
modifying datbase table useing internal table
advises before updating this datbase table plz lock that table to avoid incosistency
write the logic for modifying
Modify the database table as per new dunning procedure
MODIFY fkkvkp FROM TABLE lt_fkkvkp .
and finally unlock the table
example
*To lock table for further operations
constants: lc_tabname TYPE rstable-tabname VALUE 'FKKVKP' . "FKKVKP
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
tabname = lc_tabname
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc EQ 0.
To fetch all the contract accounts for customers of the segment
Households/SME.
PERFORM fetch_contract_accounts using lc_tabname .
ENDIF. " IF sy-subrc EQ 0.
*wrote the logic
Modify the database table as per new dunning procedure from internal table
MODIFY fkkvkp FROM TABLE lt_fkkvkp .
*unlock the tbale
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
TABNAME = uc_tabname . -
Regardig error while updating the database table
hi experts,
i m trying to update the database table from the values containig in my internal table ,,,but the system is giving this error plz help me::::
The type of the database table and work area (or internal table)
"ITAB_UPDATE" are not Unicode convertible. Unicode convertible.
my internal table name itab_update and the database table name yitab.i m using this statement::
modify yitab from itab_update.Hi
1. You have to Declare the Itab with the same structure as DB table.
2. Use the statement
Modify <DBtable> from TABLE <itab>.
or
Update <DBtable> from TABLE <itab>.
Hope this will solve.
Reward .....if so.
Regards. -
Change the data in fieldcat and update the database table in alv oops
Hi,
my requirement is i have displayed a fieldcat in change mode and when i change the data and click on save it has to be updated the database table..
this has to be done using alv oops...Hi,
This code will reflect all the changes into the internal table that is being displayed.
* to reflect the data changed into internal table
DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
Now after this code is executed the internal table is modified as per the changes done in alv output.
Now you can use this internal table to update the database table.
Hope this helps you.
Regards,
Tarun -
Mapping the CMP Fields with the Database Table using Websphere???
Hi,
How to Map the CMP Fields with the Database Table using Websphere
thru ejb.jar.xml???
Thanks,
JavaCrazyLoverHi,
How to Map the CMP Fields with the Database Table using Websphere
thru ejb.jar.xml???
Thanks,
JavaCrazyLover -
Hi All,
i need to do direct update to the database table and the table has apprx 60,000 records . i am getting all records from database table to internal table and has to chnage the one of the field value and pass it to the database table . So i am looping the internal table and what is the best approach to update the database table is it to use UPDATE Pa0001 SET KOSTL = it_0001-KOSTL from table it_0001 each time in the loop to update each record and commit work which hits database for each record or use the statement UPDATE pa0001 from table it_0001 and if count = 1000 then COMMIT work in this way it will hit the database for every 1000 records . Appreciate your suggestions,
Thanks,
Latha.My Code to update PA0006 is :
DATA: t_pa0006 TYPE STANDARD TABLE OF pa0006 INITIAL SIZE 0,
wa_pa0006 LIKE LINE OF t_pa0006,
w_lin TYPE i.
FIELD-SYMBOLS: <fs_pa0006> LIKE LINE OF t_pa0006.
SELECT * FROM pa0006 INTO TABLE t_pa0006 WHERE uname = 'PKHAROR'.
LOOP AT t_pa0006 ASSIGNING <fs_pa0006>.
<fs_pa0006>-stras = 'My Street'.
ENDLOOP.
DESCRIBE TABLE t_pa0006 LINES w_lin.
UPDATE pa0006 FROM TABLE t_pa0006.
IF sy-subrc EQ 0.
COMMIT WORK.
WRITE:/ w_lin, ' Records have been updated..'.
ENDIF.
Reward points for useful answers
Regards
Pradeep
Regards
Pradeep -
Update the database table inside an user exit.
Hi Experts,
I have a issue where i have to update a custom table in an User exit.
I am using Lock object for ENQUE/DEQUE.
I have tried to use statements like UPDATE/MODIFY inside the user exit.
But the problem is that it's not updating the database table at the same time.
I know if i use COMMIT WORK it can update at the same time but it's not advisable to use COMMIT inside a work.and also it gives a short dump.
The real issue is that this custom table is read for batch creation at the same time for different users.
Now if it the program does not update the database table at the same time then other users also read the same data and create the same Batch number..
While requirement is to create a different/unique batch numbers.
Program is updating the table but it's taking time..so in between other users are creating the same batch number.
Please guide me what would be the best solution for this.
Regards,
Amit Kumar SinghThanks for your quick reply.
My actually requirement is like that.
I have to create a Process Order using tcode COR1.
After passing some input value it goes inside an User Exit.
There one Custom table is maintained which stores some fields like month,year,numeric key field,etc.
The new batch number is created using the combination of these table fields.
Once a new batch number is created it increment the numeric key field number by one.
Issue is we have to update this new numeric field value into the database field so that other users can read a diffrent numeric field value.hence it will create a new/different batch number.
Here i am not able to update the database table inside this User Exit.
Table is geeting updated but after some time and out of this User Exit.
Please suggest what's required in that case?
Regards,
Amit Kumar Singh
Edited by: Amit Singh on Feb 3, 2009 11:33 AM -
Field value is getting double while updating the database table
Hi Experts,
A simple doubt :
there is a standard program through which a zfunction module is getting triggered, through this zfunction module i am updating the database table.
Now what happening is one of the field(KCQTY) value in database is getting double at a time when i am executing the Program with same variant only.
I have also done the CLEAR & REFRESH internal tables starting of the Function module.
Can you please help me out.
Max points wil be awarded.
thanks
rico.Hi Nicole,
this is the part of the coding where you can see how the field KCQTY is getting moved in the loop statement.
DELETE IT_CE20002B_815 WHERE
KONDA = SPACE OR
WERKS = SPACE OR
VVB01001 < 0.
LOOP AT IT_CE20002B_815.
INDX = SY-TABIX.
CONCATENATE IT_CE20002B_815-PERBL0(4) IT_CE20002B_815-PERBL5(2)
INTO MONAT.
MOVE itab_ce20001b-perbl TO monat.
CLEAR S815.
READ TABLE IT_ZPL_MCS5 WITH KEY KONDA = IT_CE20002B_815-KONDA
BINARY SEARCH.
SELECT SINGLE * FROM S815 WHERE VRSIO = '000'
AND SPMON = MONAT
AND KONOB = 'APO'
AND MVGR2 = IT_CE20002B_815-KONDA
AND PRODH = IT_CE20002B_815-PRDHA
AND WERKS = IT_CE20002B_815-WERKS.
AND VTWEG EQ CO_VTWEG_99.
BREAK SAMEE.
IF SY-SUBRC EQ 0.
Eintrag in S810 existiert
IF S815-AEMENGE <= IT_CE20002B_815-VVB01001.
wenn die Auftragseingangsmenge kleiner gleich der Kontingentsmenge
wird die Kontingentmenge in das Steploop übernommen
MOVE IT_CE20002B_815-VVB01001 TO W_T_DATA_815-KCQTY.
*Liste ausgeben
PERFORM AUSGABE4.
PERFORM AUSGABE4_815.
ELSE.
Ausgabe Fehlermeldung, wenn die Auftragsmenge größer als die
Kontingentmenge ist.
*Liste mit fehlermeldungen ausgeben, Kontingent trotzdem übernehmen
MOVE IT_CE20002B_815-VVB01001 TO W_T_DATA_815-KCQTY.
PERFORM AUSGABE_FEHLER4.
PERFORM AUSGABE_FEHLER4_815.
delete it_ce20002b index indx.
continue.
ENDIF.
ELSE.
Es existiert kein Eintrag in S810, dann direkt eingeben
MOVE IT_CE20002B_815-VVB01001 TO W_T_DATA_815-KCQTY.
MODIFY IT_CE20002B_815 INDEX INDX.
*Liste ausgeben (Kein Eintrag in S810)
PERFORM EINTRAG2.
PERFORM EINTRAG2_815.
ENDIF.
*Übergabestructur für die Weiterverarbeitung durch das Copymanagement
*im Functionsbaustein wird gefüllt.
W_T_DATA_815-SPMON = MONAT. "itab_ce20001a-perbl.
W_T_DATA_815-KONOB = CO_KONOB_APO.
READ TABLE IT_ZPL_MCS5 WITH KEY KONDA = IT_CE20002B_815-KONDA
BINARY SEARCH.
IF SY-SUBRC EQ 0.
W_T_DATA_815-MVGR2 = CO_MVGR2_999.
ELSE.
W_T_DATA_815-MVGR2 = IT_CE20002B_815-KONDA.
ENDIF.
W_T_DATA_815-WERKS = IT_CE20002B_815-WERKS.
W_T_DATA_815-PRODH = IT_CE20002B_815-PRDHA.
W_T_DATA_815-VTWEG = '99'.
W_T_DATA_815-KUNNR = '9999999999'.
W_T_DATA_815-KCQTY = IT_CE20002B_815-VVB01001.
W_T_DATA_815-BASME = IT_CE20002B_815-VVB01_ME.
JR181005 - begin of ins.
w_t_data_810-matkl = it_ce20002b-matkl.
JR181005 - end of ins.
APPEND W_T_DATA_815 TO TAB_DATA.
CLEAR IT_CE20002B_815.
ENDLOOP.
thanks for reply
rico -
Rfc enabled function module for the updating the database table
Hi,
I need one rfc enabled function module for the updating the database table from the legacy system.currently i am using the rfc_read_table to read the database table.similarly i need for the update.Hi
I believe you need to create one by yourself
Max -
How to update the FB01L transaction using the FM bapi_acc_document_post
Hi All,
How to update the FB01L transaction using the bapi_acc_document_post but there is no ledger group field in the bapi function module.
Please help me how to do it.hi,
use batch input method for the same.
check this.
[https://forums.sdn.sap.com/click.jspa?searchID=19107237&messageID=884744] -
How to find the database table behind the xtags varibles?
if in xtags we find that some varibles are not having the right data coming from xml -> database tables so how can we find out the names of database table behind it .
<!-- <xtags:variable id="msds" context="<%=specs%>" select="//header/msds"/>
<a href="/MSDS/<%=msds%> target="#">MSDS</a>
-->
now how to find the database table and the column name of database table from which the value of id msds is coming
Here they have stored the name of pdf file . from this code pdf file is displayedHi,
Thanks for your response. It is PM related. When I run a T Code - IK18, the field Total Counter Reading field appears. I am looking for that particular fields actual table name and field name. I think I have found it in IMGR table. Now I want to get IMRG-READG in my report, but there is no common fields in neither MKPF or MSEG table. So what can I do to connect IMRG table with either of them ? -
How to fix the financial table using script
Hi All,
How to fix the financial table using script, (for example see below table. i have fixed manually, my document having more than 50 tables)
%, ) are hang aligned.
$ are left aligned as like below.
Regards,
VeluHi Velu
The quality of your screenshot came out pretty bad
Maybe send another higher resolution one which on a smaller part of the table and show the hidden characters -
Using Tabstrip update the database table
Hi Guy's,
I created two screens(100 & 110).
Click 1 pushbutton HRP1000 related information is displayed.
Click 2 pushbutton it displays HRP1001 relatd information.
worked to read the data from the Database tables and output displayed sucessfuly . However i want to entered data in those fields wants to update to database table.
Please friends help me how to work this senario.
Thanks and Regards,
Sai.Hi Guy's,
To update the database records, wrote the logic in PAI
WHEN 'SAVE'.
INSERT HRP1001.
INSERT INTO HRP1001 VALUES wa_P2.
it displaying an error message " the work area wa_p2 is not long enough.
and also i tried using it_p2
it displaying an error message " you can't use internal table as work area".
Please help me friends it is very urgent.
Thanks and Regards,
Sai. -
How to update two database tables when using DatabaseProvider
I'm a begginer and I've made an application which uses a database. In one page, I have a table which I've took it from "woodstock basic" palette. I was using DatabaseProvider to populate the table with data from a database table called "copii". My code is:
//i'm check all the rows in the table to see if the field "IDCOPIIC" =0 and if true I will put the value of "newCopiiId"
do {
if (copiiDataProvider.getValue("IDCOPIIC").equals
(new Long(0))) {
copiiDataProvider.setValue("IDCOPIIC", new Long(newCopiiId));
newCopiiId++;
} while (copiiDataProvider.cursorNext());
copiiDataProvider.commitChanges();
My problem comes now because I have another database table tided with a foreign key by this one and I want to update this one too when I'm updating the "copii" table. I don't know how to do it ...I've tried in many ways but is impossible. Can anyone help me ! I'm desperate...I cannot figure it out how I could insert, update in two tables in the same time when I'm using DataProvider .
Thanks in advance!Hmm.
Not sure where your going with the <select> menu.
The description you made:
"Both have an id column, which is presumably the record's primary key, but you need to create a relationship by storing the primary key of one table as a foreign key in the child (related) table. For example, you should insert the primary key of the first table in the second table as user_id. That enables you to identify which username and password are related to an individual listed in the second table"
Seems to be the direction that I'm looking for.
Now my question is how do I insert the primary key of the first table in the second table as user_id?
>
>"For example, you should insert the primary key of the first table in the second table as user_id"
Since both tables have an id column and they both are the primary key, do I just change the name of the second tables id column to "user_id" then?
Or is there an actual "insert the primary key to another table" function that I don't know about?
Maybe you are looking for
-
X58 pro i7 pci express 2.0 issue with sata controller
hello i installed rosewill rc-225 (marvell controller) pci express 2.0 x1 card. my crucial m4 ssd maxes out at 271MB/s it is installed in the x16 slot. i tried gen 1 x1 slot i was getting pathetic 130MB/s what is going... on new egg people with this
-
How to get restore disk for Equium L40-U10?
I have lost the restore disc for my toshiba equium L40-U10, and didnt create one upon first boot of my o.s. I am wondering were i can obtain a restore disc i can use to revert my laptop to factory settings from? thanx.x
-
Safari Display doesn't cover screen
My Safari displays in Portrait in the middle of the screen. I need it to display in landscape and cover the whole screen when I'm on the internet.
-
Flash Player 14 : FLV alpha videos have black background!!!
Please correct this bug. All flv videos with alpha are now played with a black background. It's work with all previous Flash player versions...
-
Numbers still unable to sort large files
It only took about 30 seconds to discover Numbers 09 still does not have the capability to sort large files (10,000+ rows by 15 columns). I originally thought I had discovered a workaround but that fizzled as well since it was a "one shot" with all s