2010 May 30 7:05 PM
Hi,
Is it possible to upadate table KONP (Example :Field "KSCHL" = FRC1) by a Z programme.
Since FRC1 cannot be modified or entered manually (as per my requirement).
Thanks
Amba Prasad
Hi,
Is it possible to upadate table KONP (Example :Field "KSCHL" = FRC1) by a Z programme.
Since FRC1 cannot be modified or entered manually (as per my requirement).
Thanks
Amba Prasad
2010 May 31 8:37 AM
Hi,
<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="732967"></a>
look at this forum, this will def help you.
Regards
Bhavana
2010 May 31 10:40 AM
Hi Prasad,
I have tried this code and its working fine, please check this:
DATA: wa_konp LIKE STANDARD TABLE OF konp WITH HEADER LINE.
SELECT SINGLE * FROM konp INTO wa_konp WHERE knumh = '0000000002'
AND kopos = '01'.
CLEAR wa_konp-kschl.
IF sy-subrc EQ 0.
wa_konp-kschl = 'MWAS'.
MODIFY konp FROM wa_konp.
ENDIF.
Regards,
Md Ziauddin.
2010 May 31 3:29 PM
Hi Prasad,
IT IS NEVER RECOMMENDED TO UPDATE ANY SAP TABLES BY A Z OBJECT. - So, you can do a where-used-list on the table and can search for all the objects like Function Modules, Classes, etc which might update the tables.
If you are sure about the functionality and know all the tables that needs to be changed simultaneously in an Update Task, then you can go ahead with this. But do a proper SY-SUBRC check for all the Data Dictionary access statements and call
COMMIT WORK or ROLLBACK WORK accordingly.
Hope this helps.
Thanks,
Samantak.
2010 Jun 02 7:26 AM
YES PRASAD , IT IS POSSIBLE. and the above code is ok.But as Samantak told it is not absolutely not advisable to do this from Z
Thing is that if u do the code where and when will u run the code.That may give a furious result of other processes.Plz consult your Functional.
2010 Jun 02 5:57 PM
2010 Jun 03 7:14 AM
Hi,
in taken into consideration previous discussion ,
you can use FM " PRICING_DOC_UPDATE" to update inplace of zprogram to update konv directly
Regards,
Alpesh
2010 Jun 14 12:12 PM
Hi ,
you can update the standard tables with update , but please see to make use of lock objects before you attempt to update standard sap tables.
Regards,
Uma Dave
2010 Jun 14 12:32 PM
Hi,
Never Update SAP Standard tables using UPDATE. This will lead to data inconsistency.
Update the standard tables using BAPI or BDC only
Regards
Vinod