cancel
Showing results for 
Search instead for 
Did you mean: 

DP Macro - possibility to change master data (cvc attribute) ?

Former Member
0 Kudos

Hi,

I am looking for a way to change an infoobject attribute (cvc master data) from out of the planning book.

As I've seen, there's the possibility to change the product master by using the function MATLOC_SET.

Problem is, we are not planning on level of location product, our planning level is product - salesorg, so the product master can't be used to cache the data.

So I'm looking for a direct way to change attributes triggered by operations in PB.


To avoid any discussion: yes, it has to be triggered from the PB!

Does anybody know a way to do this?

As a workaround, I thought about filling a table entry that is later selected by a master data load.

But I even did not find any solution to write to a table.

It would be great if someone could help me.

Thanks for your effort!

Kind regards

Christoph

Accepted Solutions (1)

Accepted Solutions (1)

former_member209769
Active Contributor
0 Kudos

Hi Christoph,

MATLOC_SET would update the APO material master data. This is not directly linked to your CVCs in DP planning area in any way as far as I can think. CVCs could get derived from material master data but there is no direct linkage between material master in APO and a similiar looking CVC in DP. Product-Sales Org level is not relevant for APO, but in DP you can create CVC any way you like as it doesn't have any direct linkage to other APO functionality.

I am not sure what your requirement is, but attributes are master data for the CVC, and they are changed (read updated or maintained) normally in rules during data transfer (not during loading data or while planning in DP). Attributes would NOT be affected by any activity you do in planning view. They are used for selection and display purpose only.

I am not aware of any way in which attributes can be changed when someone comes to DP planning view, and it's also very tough to think why this is needed as characteristic/attribute are inputs to DP, and not an output of the DP process.

I assume in some macro you are doing something and you also want to change the attribute at this time, but I don't think that this would be possible. If you share your business requirement, then may be there is some other approach to meeting the same.

Thanks - Pawan

Former Member
0 Kudos

My business requirement is the use of several forecast models.

We are calculating which one was the best regarding the past and switch to the best model.

Since the user's want to have an overview of which products are assigned to a model, we can't use the standard-functionality.

It must be possible to have the forecast model as an attribute, so the Forecast Manager can select them within the PB.

I discussed a way for this with my BI-colleague.

He suggested to set a DSO between our export cube (where the specific model is exported as a value) and read over it during the filling of DP-attribute master data.

This would work, but I hoped to be able to use the same macro that calculated the best model and sets the value in PB for changing the attribute also.

former_member209769
Active Contributor
0 Kudos

Hi Christoph,

I understood your requirement, but as I mentioned CVC/attributes are input data in DP. You maintain them at some point of time and then USE them during the DP planning process. We don't (and as far as I would think, we can't) change them DURING the planning process.

For a particular product, in the end the forecast would be done only using a particular forecasting model (whichever you would find to be best). So, selections are indeed normally based on attributes e.g. XYZ attribute or might be based on "forecastability" kind of attribute. If you want, you can also have forecast model as an attribute. This is fine.

Keep in mind that attribute is master data for a characteristic, not a CVC (so a forecast model attribute would be maintained for product or for Sales Org, but not for a combination of these 2 chars). These attributes need to be determined and maintained for the particular characteristic BEFORE you would use them in DP. This is what your BW colleague is also saying. Once you have the attribute value maintained, then your forecast manager could use it for selection directly or you could also create selections based on the same.

Thanks - Pawan

Answers (1)

Answers (1)

rajkj
Active Contributor
0 Kudos

Hi Chris,

Macro function MATLOC_SET will update /SAPAPO/MATLOC table fields only. Since you wanted to update an InfoObject value, you can't use it.

Probably, you can use a User Exit macro that can be triggered from PB and allows you to access all the data (PLOBS of data view). In your program, then use BI API to manipulate the Info Object. There might be a chance of locking issue, in that case, you need to use a custom table. Anyways, there might be different design choices when you are allowed to call your own routines within a PB.

Please check the link below for details on user exit macro.

https://service.sap.com/sap/support/notes/418801

Thanks,

Rajesh