Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Makt table field Maktx not getting update

Hello Experts!

Iu2019m trying to update a few material tables (mara, marc, mard & makt) after having values from the text fields. Iu2019m not sure why these values are not getting update in those tables. So far Iu2019ve just try to update u2018maktxu2019 field of makt table. Even though in debug Iu2019ve checked through Move-correspoding statement it goes through (sy-subrc = 0) still MAKT table doesnu2019t update for that particular material number. Here is my code.

Also Iu2019ve declared this Module upder PAI.

MODULE update_req INPUT.

IF matnr IS NOT INITIAL.

CASE okcode.

*======================================================

WHEN 'CHNG'.

*transfer values from fields to gt_mara

MOVE: mara-mtart TO gt_mara-matnr,

mara-mbrsh TO gt_mara-mbrsh,

mara-meins TO gt_mara-meins.

APPEND gt_mara.

*update database table mara from gt_mara.

MOVE-CORRESPONDING gt_mara TO mara.

MOVE: marc-werks TO gt_marc-werks,

marc-pstat TO gt_marc-pstat,

marc-ekgrp TO gt_marc-ekgrp.

APPEND gt_marc.

MOVE-CORRESPONDING gt_marc TO marc.

MOVE: mard-lgort TO gt_mard-lgort.

APPEND gt_mard.

MOVE-CORRESPONDING gt_mard TO mard.

MOVE: makt-spras TO gt_makt-spras,

makt-maktx TO gt_makt-maktx.

APPEND gt_makt.

MOVE-CORRESPONDING gt_makt TO makt.

*======================================================

ENDCASE.

ENDIF.

ENDMODULE. " update_req INPUT

Can somebody please tell me what wrong with my code or what should I do to make it working?

Thanks.

Former Member
replied

Don't try to update the SAP Standard tables. As a consequence, you can loose the integrity of the data.

User BAPI as suggested by the Vijay or Create a Small BDC for the MM02. You can look at this post: [MM02 BDC - Select Specific Material Master View |http://help-abap.blogspot.com/2008/09/mm02-bdc-select-specific-material.html]

You can update the Text in the Basic View, which will in turn update the MAKT

For MARC, you might have to update the Plant view.

Regards,

Naimesh Patel

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question