Sunday, March 22, 2009

Marked Cell in Demand Planning Macros

I wanted to allow the users to choose a planning book cell, then click on a macro button to open a pop-up window with additional information related to the cell. But it does not seem to be possible to get the marked cell when developing planning book macros.

The standard macro functions PLOB_MARKED and COLUMN_MARKED work when selecting full rows and columns. Consider the following example macro:



It is possible to use that macro to identify a cell if the user selects both the row and column (pressing the control key to allow that kind of selection). But that is very user-unfriendly.



It turns out that most of the functionality for getting the marked cell in the macros is already available in the lower level macro functions. The standard function /SAPAPO/MARKED_ELEMENTS is used in the macro functions that return the marked row and column. That function also has information on the marked cell, so with some simple modifications it can be used for returning the selected cell.

It was easy to develop new functions to check the row (PLOB) for the marked cell and a function to check the column for the marked cell. Both call internally the modified /SAPAPO/MARKED_ELEMENTS and are based on the standard functions.

Then it is possible to develop macros that act on cells, to put the toolbar button for the macro and to open an ALV with cell detail information.



I still find it strange that marked cell macro is not available in the standard. Perhaps it is in some recent release. IMHO is a must have for planning books.

Labels: ,

3 Comments:

Blogger Unknown said...

Hello Pedro, how are you?
I've a doubt that maybe you already have been trough this. Getting in the planning book to build my structure, there is any selection ID to select. Debugging i've seen that there is any entry in the table /sapapo/tsselorg and I cannot find how this entries are maintained, i believe this is feeded automatically somehow. Do you have some experience on this?

Hope everything goes well with you and thks a lot for the last tip.

5:25 PM  
Blogger Sharon said...

Thanks for the helpful tips you wrote on this article.

Tracy, Status Now

11:44 PM  
Anonymous Anonymous said...

Hi Pedro,

I dont see this in 7.2 either. Are you by now aware of some standard function for marked cell.

7:51 PM  

Post a Comment

<< Home