‎2007 Mar 21 7:59 AM
Hi
I have value "ffg" for a field and want to replace second or 3 rd charatcer with "g" Aand update the table assume mara.
How can we update standard table..can we do directly?
Thanks in advance.
‎2007 Mar 21 8:03 AM
Hi
You must use BAPIs in this case of updating any standard SAP table.
Please use
<b>BAPI_MATERIAL_EDIT</b>. Read the standard documentation
Hope this will help.
Please reward suitable points, incase it suits your requirements.
Regards
- Atul
‎2007 Mar 21 8:02 AM
Hi RK,
Your question is quite unclear.........
If you want to modify the table from program then there should not be any problem as you would be using all the primary key to Modify that Entry in the Database Table.
Regards,
Kunjal
‎2007 Mar 21 8:03 AM
Hi,
Std tables are to be updated using the relavent transaction.
for example if you wants to update MARA table you have to go to MM02 t code and have to change the relavent field.
Once you change on the screen by default it will get updated. So no need to write any code.
that is the right methoid for updation of any field in SAP using the related Transaction.
regards,
Anji
‎2007 Mar 21 8:03 AM
Hi
You must use BAPIs in this case of updating any standard SAP table.
Please use
<b>BAPI_MATERIAL_EDIT</b>. Read the standard documentation
Hope this will help.
Please reward suitable points, incase it suits your requirements.
Regards
- Atul
‎2007 Mar 21 8:17 AM
Hi rk,
1. First of all we should not update standard tables, directly via sql.
(Sap does not recommend this)
2. However, if we want to do this process, then we should do like this.
3.
a) Create one internal table, SAME AS database table.
b) Select * From DBTAB into ITAB.
c)
Loop at Itab.
itab-field1+2(1) = 'g'.
MODIFY DBTAB FROM ITAB.
ENDLOOP.
4. The above logic will update the whole database table, (one by one record in a loop).
regards,
amit m.
‎2007 Mar 21 2:43 PM
Hi
My requirement is like this
There is a field labor in mara and has value "FFG",now i want to check condition like this
if i_zdbt-field = 'condition'
update second character of mara-labor with "g".
This is my req.
Thanks in advance
‎2007 Mar 21 2:48 PM
if i_zdbt-field = 'condition'
mara-labor+1(1) = 'g'.
endif.
~Suresh