Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

MATERIAL_MAINTAIN_DARK - Change flag to initial

Former Member
0 Likes
1,686

Hey @ll,

I have a problem with the function module MATERIAL_MAINTAIN_DARK. I try to change some material master stuff within an report and use this function module. Everything went fine expect one thing. How could I set flags to initial?

For example: We do have flags within our MARC table on user specific fields. And if I want to set them within my report, everything works as designed. But if I try to unflag them (set initial), the function module does nothing with them. In my oppinion this is because the function module does not handle empty (initial) fields while updating the data. But how could I make this possible, so that I can unflag these flag for material master in the report?

Please do not tell me, that I could use BAPI_MATERIAL_SAVEDATA because I tried it as well and MATERIAL_MAINTAIN_DARK works fine expect my issue.

Another example:

Flag in table MARC is initial -> set this flag in the report -> Flag in MARC will be set to 'X' -> Everything is fine!!!

Flag in table MARC is set to 'X' ->unflag this in the report -> MARC field is unchanged set to 'X' -> Issue!!!

Thanks a lot for help!

Andy

Hey @ll,

I have a problem with the function module MATERIAL_MAINTAIN_DARK. I try to change some material master stuff within an report and use this function module. Everything went fine expect one thing. How could I set flags to initial?

For example: We do have flags within our MARC table on user specific fields. And if I want to set them within my report, everything works as designed. But if I try to unflag them (set initial), the function module does nothing with them. In my oppinion this is because the function module does not handle empty (initial) fields while updating the data. But how could I make this possible, so that I can unflag these flag for material master in the report?

Please do not tell me, that I could use BAPI_MATERIAL_SAVEDATA because I tried it as well and MATERIAL_MAINTAIN_DARK works fine expect my issue.

Another example:

Flag in table MARC is initial -> set this flag in the report -> Flag in MARC will be set to 'X' -> Everything is fine!!!

Flag in table MARC is set to 'X' ->unflag this in the report -> MARC field is unchanged set to 'X' -> Issue!!!

Thanks a lot for help!

Andy

6 REPLIES 6
Read only

Former Member
0 Likes
1,258

Hello Andreas Choma ,

If the field that you are trying to update is a customer specific field onMARC table then you need to follow some steps for the data to get saved in the table.

Example :- Need to create some structures(may be ABAP developer would have already done that during the append structure creation on the MARC table) for the bapi to work fine we need to find a BAPI with EXTENSION_INN table parameter for passing custom data for those new user specific fields.

Hope this helps.

Thanks,

Greetson

Read only

0 Likes
1,258

Hello Greetson,

there is no need to change any on the BAPI cause other user specific fields work fine.

Read only

former_member194669
Active Contributor
0 Likes
1,258

Can it possible to change flag field in MARC by Y or N? instead of X or SPACE.

Read only

0 Likes
1,258

Hello a®s,

than I have to change the MARC structure and I dont want to

@LL:

How about those table AMFIELDRES the function module use? I tried to use it to flag the fields as "Reset to initial" but it doesnt work either...

Thanks

Andy

Read only

0 Likes
1,258

I have used this to reset my purchasing bloccks and works fine

for the call

amfieldres = gt_resetfld

for setting the fields in the gt table

if lt_data-unblock = 'Y'.

gt_resetfld-fname = 'MARC-MMSTA'.

append gt_resetfld.

gt_resetfld-fname = 'MARC-MMSTD'.

append gt_resetfld.

As long at the rest of the call is working fine the fields should reset. Did you verify that except for the reset the rest of the call did work?

Deep

Read only

Former Member
0 Likes
1,258

Hi Andy,

I have an issue with Material_maintain_dark FM .Here i want update MARM-UMREZ .I tried with many ways and I am unable to upde can you suggest me what parameters are need to be passed in this .

Please help me out .

Thanks,

Suman