‎2006 Nov 14 10:17 PM
Hello Experts,
I need update database table MCHA from an internal table.
the code is:
<b>data: begin of i_afko occurs 0,
date1 like mcha-fvdt2,
end of i_afko.</b>
the contents of this internal table:
date1:
-
20061113
<b>data: begin of i_mcha occurs 0,
charg like mcha-charg,
end of i_data</b>.
i have one record in this internal table like this:
charg
-
132960
now i have to update table <b>MCHA</b> with <b>date1</b> value where <b>charg = i_mcha-charg.</b>
could any one of please tell me how can i update that?
Thanks a lot.
‎2006 Nov 14 10:33 PM
sap strongly discourage direct updates to sap standrad tables, such as MCHA. Because of the way the tables are related to others it is very dangerous to manipulate them independently.You should use a standard transaction or write a program to call such a transation or a bapi.
However, MCHA does not have a field called DATE1 anyway...which field do you want to update?
‎2006 Nov 14 10:33 PM
sap strongly discourage direct updates to sap standrad tables, such as MCHA. Because of the way the tables are related to others it is very dangerous to manipulate them independently.You should use a standard transaction or write a program to call such a transation or a bapi.
However, MCHA does not have a field called DATE1 anyway...which field do you want to update?
‎2006 Nov 14 10:48 PM
neil,
the thing is our business is needing to maintain a date calcualted through one of our programs on BATCH record's (MCHA-FVDT2) on Basic Data 2 tab.
If I wanna call a transaction(msc2n) to change the batch record through my program, would it be a better idea?
‎2006 Nov 14 10:53 PM
Unfortunately, MSC2N can't be used in batch input (according to OSS). They suggest using old transaction MSC2 instead.
You might also try BAPI_BATCH_CHANGE.
rob
‎2006 Nov 14 10:58 PM
‎2006 Nov 14 10:38 PM
Hi,
mcha-date1 = i_afko-date1.
update mcha.
I hope this helps.
Shreekant.