Skip to Content

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

IS-Retail: MATERIAL_MAINTAIN_DARK_RETAIL

Hello,

can anybody explain why this FM gives a success message, without updating the fields I wanted to change.

Thanks,

Manuel

report zewm.

data: gv_artnr type matnr,

gw_artnr type matnr,

gw_kz_prf type messagetyp,

gw_amara type mara_ueb,

gt_amara type table of mara_ueb,

gw_amerrdat type merrdat_f,

gt_amerrdat type table of merrdat_f,

gw_matnr_hdr type smatnr_hdr,

gv_matnr_last type matnr,

gt_matnr_hdr type table of smatnr_hdr.

gv_artnr = '000000020000098000'.

gw_matnr_hdr-matnr = gv_artnr.

gw_matnr_hdr-grund = 'X'.

gw_matnr_hdr-listd = 'X'.

gw_matnr_hdr-einkd = 'X'.

gw_matnr_hdr-verkd = 'X'.

gw_matnr_hdr-lovzd = 'X'.

gw_matnr_hdr-lofid = 'X'.

gw_matnr_hdr-posda = 'X'.

append gw_matnr_hdr to gt_matnr_hdr.

gw_amara-matnr = gv_artnr.

gw_amara-raube = 'Z2'.

gw_amara-hndlcode = 0001.

gw_amara-whstc = 02.

append gw_amara to gt_amara.

call function 'MATERIAL_MAINTAIN_DARK_RETAIL'

exporting

p_kz_no_warn = 'N'

kz_prf = gw_kz_prf

importing

matnr_last = gv_matnr_last

tables

matnr_hdr = gt_matnr_hdr

amara_ueb = gt_amara

amerrdat = gt_amerrdat

exceptions

t130m_error = 1

internal_error = 2

too_many_errors = 3

update_error = 4

others = 5.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

call function 'BAPI_TRANSACTION_COMMIT'.

Edited by: Manuel Steiner on Oct 9, 2008 12:00 PM

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