cancel
Showing results for 
Search instead for 
Did you mean: 

MATLOC_SET() - Issues when changing alphanumeric fields

Former Member
0 Kudos

Hi All,

I want to enable planner to quickly change safety stock settings for advanced safety stock calculation and recalculate the safety stocks through a macro button in the planning book.

One part of this is to set the safety stock method. I am using the following code.


MATLOC_SET(
'MSDP_SB_METHOD' ;
CHAR_VALUES_INPUT( 'Enter_Safety_Stock_Settings' ;
'Safety_Stock_Method:'
) ; 
ACT_PRODUCT ; 
ACT_LOCATION ; 
ACT_VERSION 
) 

But it does not work. whenever I enter anything the field is set to zero.

I have tried the same code for the service level and other numeric fields and it works fine.

With other alphanumeric fields like ABC indicator it also does not work. This seems to be an issue with alphanumeric versus numeric fields, but I am not sure how to fix the error, because I can only find the operation MATLOC_SET() as an option to change product-location specific product master fields.

Please help.

Thank you,

Maria

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Maria,

You can use the macro function:

SB_BETA_POINT() - for adv safety stock method BS.

SB_ALPHA_CYCLE()- for adv safety stock method AT

SB_ALPHA_POINT()- for adv safety stock method AS.

SB_BETA_CYCLE()- for adv safety stock method BT.

The syntax would be(if BS):

SB_BETA_POINT( service level ; demand forecast ; forecast error demand (%) ; replenishment lead time ; forecast error replenishment lead time (%) ; days' supply ) returns the safety stock level for the Beta service level according to the point method.

To get the values for Service level,: demand forecast ; forecast error demand (%) ; replenishment lead time ; forecast error replenishment lead time (%) ; days' supply you can use the the function MATLOC()

You can store the values of the fields in auxillary KF and then call these in SB_BETA_POINT()

The above method can be used to run interactively only and not in background.

Thanks,Bopanna

Former Member
0 Kudos

Hi Bopanna,

My problem is not with the safety stock calculation but with the part of the macro before that = the change of the safety stock settings, specifically the safety stock method.

thanks,

Maria

Edited by: Maria Gehrke on Mar 4, 2010 2:54 PM

Former Member
0 Kudos

Hi Maria,

As per SAP ,MATLOC_SET() sets the "value" of the specified field and not the "characters".

http://help.sap.com/saphelp_scm50/helpdata/en/1d/310eadd0ee11d4b2e40050da385632/content.htm

As an eg:

MATLOC() returns content of numeric field

MATLOC_C() returns content of character field

Thanks,Bopanna

Edited by: bopanna_coorg on Mar 5, 2010 11:20 AM

Former Member
0 Kudos

Hi Bopanna,

What operation will I have to use instead of MATLOC_SET() to change alphanumeric product master fields?

I tried MATLOC_C_SET(), MATLOC_CSET(), and MATLOC_SET_C(), which do not seem to do anything.

Maria

Former Member
0 Kudos

Hi Maria,

Since I was unable to find a function, I suggested a work around in my first post or you may use a customised prog using abap.

Hope that helps.

Thanks,Bopanna

Former Member
0 Kudos

Hi Bopanna,

Thank you for your answers. Unfortunately, I do not know what workaround you are talking about to change the product master field for the safety stock method.

Thanks,

Maria