‎2007 Feb 14 5:49 PM
hi guys,
i just got a problem with updation of Database table EINE. I got some price details
and these details have to be updated to EINE-NETPR.
i am using select statement to select price details and using update command to update EINE-netpr.
update EINE where netpr = itab-netpr. ( simillar to this )
if sy-subrc = 0.
commit work.
endif
But, still when i checked the entries in EINE, netpr ( price ) is not updated.
I checked in debug mode and update command works well but its not updating EINE in real when i am checking the entries in it.
can any one please help me, do u think UPDATE command can be used to update Data base tables or do u think i need to add any other commit work statements after update or can any one tell me exactly how to update the database tables.
please send me a piece of code if possible.
thank you
pavan kumar
‎2007 Feb 14 5:53 PM
Hi,
It is not good practice to do direct table udpates..
Instead use a BAPI or standard sap FM to update the standard sap tables..
Thank,
Naren
‎2007 Feb 14 5:56 PM
Hi,
You can use in this way also ..
<b>UPDATE EINE SET NETPR = 'A310'
WHERE field = XXX</b>
Regards
Sudheer
‎2007 Feb 14 5:56 PM
Hi,
Agree with Naren that it is not good practice to update SAP table directly. Try to use BAPI or BDC to update EINE.
But you can try like this.
UPDATE EINE SET NETPR = ITAB-NETPR
WHERE <your condition>.
Regards,
Ferry Lianto
‎2007 Feb 14 5:57 PM
Hi,
DO NOT try updating the table entries through update command or by going into debug modein your SE11 table entries.
We do not know which standard tables get afffected dur to this change.
As Narendran suggested, you can use the standard FMs to update the field.
Regards
Subramanian
‎2007 Feb 14 5:59 PM
thanks for your answers, but can you please tell me how do u use BDC to update the data base in my requirement or is there any standard BAPI available to update it.
thanks
pavan kumar
‎2007 Feb 14 6:02 PM
What is the standard transaction that updates this table?
Rob
‎2007 Feb 14 6:05 PM
‎2007 Feb 14 6:04 PM
‎2007 Feb 14 6:06 PM
Hi Pavan,
Please try this FM perhaps they may help.
ME_DIRECT_INPUT_INFORECORD
ME_DB_UPDATE_INFORECORDS
ME_UPDATE_INFORECORD
ME_UPDATE_INFORECORD_COND
ME_UPDATE_INFORECORD_PD
Regards,
Ferry Lianto
‎2007 Feb 14 6:26 PM
thanks for your answers, but if i use any one of the function modules i suppose these function modules specified are only used to update the info record right?
what i mean is, i can use any one of these function modules only after select statement just to update i.e instead of UPDATE command right?
thanks
pavan kumar