cancel
Showing results for 
Search instead for 
Did you mean: 

SAP SCM APO DP - Planning Book

Former Member
0 Kudos

In my Planning Book, i have to process (calculate adjustments) at a particular Characteristic level.

I need a provision which makes it very obviously visible to me whether a particular characteristic level value has been processed or not. Say for example, i have to process at Size Group Code level. There are 10 values for this SGC and i process each of these one-by-one. Once i have processed one, i need to have an indicator that shows it is processed. That is, if i stop the activity after processing 4 values,and then change level or log off and revisit the Planning Book again later on, if i try to load data at one of those 4 values and i should be able to make out immediately that those are processed and i must take up the fifth value.

Notes is ruled out as actually the 'characteristic' i am dealing with is a Navigational Attribute.

Alerts also wont be directly visible (we have to click a tab to see it).

What i am planning to do is some sort of colour coding. That is after i process one value, i can press a tab which changes the colour of that row to say red.

<b>The question is that if such a thing is worked out, would that colour remain for that row in that characteristic selection if i change to another characteristic level (or log off) and then revisit and load at the earlier level?</b>

Obviously this would mean that i would need another tab to 'decolour' that row at the end of the month (before i start the processing of those 10 values all over again for next month).

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

To re-emphasize, i must be able to change the colour of the row after i have done the processing and that colour change must be permanent even if i change levels or log-off, untill i myself manually 'decolourize' it.

Former Member
0 Kudos

Hi,

Try with function CELL_BG(x) and set a color. Have a exit macro that changes all cells to white again using CELL_BG(2). This however has problem if youhve other functions that are generating a color code.

Former Member
0 Kudos

use the macro function VALUE_OF_ROW_CHANGED()

VALUE_OF_ROW_CHANGED( X ; Y1 ; ... Yn ) returns 1 if the user has changed one or more key figure values in columns Y1 through Yn of row X in the current planning session since last pressing Enter. In the attributes of the row, enter Row Attributes as the data source.

you can take the output of this and use it to color your macro using visu's method of CELL_BG()

This macro might only remember the current planning session. So if you use a Keyfigure to save the value 1 or 0 into it and then use the 1 to represent a color it might work

Former Member
0 Kudos

Thanks Haris and Visu. But that basically is the issue. For any worthwhile solution i have to introduce a new real key figure which will retain the changed value (1 or whatever). Without that the colour change is valid only for that planning session. Nonetheless, thanks for the help.

Former Member
0 Kudos

no worries..

see if you can use any Spare KF or a KF that is not visible on the planning books

if its that necessary use a new version for your plannign area and use a KF out of it

Former Member
0 Kudos

I have resorted to some adjustments and now the requirement is to have a new key figure of the data type Time (/ Date) (while defining the key figure). I am still not sure how to use this option in key figure. The help says 'this key figure type is used as a time (/ date)'. <b>Is it possible to have a macro which when run will update this key figure with the timestamp? Or date?</b>

Former Member
0 Kudos

the macro DATE(TODAY) will update it with todays date when you execute it.

but this will update it everytime you run the macro unless you find a way of saving it elsewhere once it is populated and does not change after that

I dont understand what you mean by "how to use <b>this option</b> in key figure"

are you still using the concept discussed above or is this about the date KF?

Former Member
0 Kudos

Thanks Harish. The answer was very helpful. I was able to use MONTH( TODAY ) function in my macro. Somehow DATE( TODAY ) was not working. ANyway, i hope this should do.

What i meant by "how to use this option" was with reference to defining a new key figure with data type DATE or TIME. What impact does it have? In this case i can run this macro for any key figure irrespective of whether its data type is DATE or just Quantity.

Former Member
0 Kudos

If you dont want to use existing Qty Kf , You can also convert dates to characters using DATE_TO_CHAR ()

" DATE_TO_CHAR (Number of days )

Number of days: Number of days since 0001/01/01.

DATE_TO_CHAR () returns the date as a string. The function calculates the date starting at 0001/01/01 and adding the Number of days. The system uses the date format that is saved in user master data"

Am not sure why Date(today) did not work. According to the Macro its supposed to give you a string which is the number of days from 01/01/0001

You can also use Day(today) to give the day- DAY(TODAY) = 11

Former Member
0 Kudos

<b>DATE( TODAY )</b> gets activated in macro workbench. But when i execute it in the planning book, there is no change in the key figure value.

<b>DATE_TO_CHAR( TODAY )</b> also gets activated in the macro workbench. But when i execute it in the planning book, i get some ABAP error. That macro is not even run fully.

Also, if i have to use any other argument for the <b>DATE_TO_CHAR()</b> macro, what should i use? Yes, the number of days is the prescribed one. But how will i get the number of days value? Thinking of this i used TODAY as an argument, but that gave that error.

Former Member
0 Kudos

Hi Prashant

Sorry about that DATE( TODAY ) and DATE_TO_CHAR (TODAY) doesnt work directly.

The result can be arrived at directly from just using TODAY. for eg TODAY = 732,780

DATE() works for fixed values only

Former Member
0 Kudos

Hi Harish

Thanks for clarifying. I was getting jitters thinking what i was doing wrong. Now it makes sense. But the problem is TODAY function is not the perfect thing for me. MONTH( TODAY ) is still fine. But i would need something which can populate my key figure with the actual date as in 13.04.2007 or 13042007 or actual time 20:15:45 201545 or something like this when i run the macro. I believe i might be asking for too much.

Former Member
0 Kudos

no worries

use a concatenation- there must be some function for this- of DAY(TODAY), Month(TODAY), YEAR(TODAY) to get the date

Former Member
0 Kudos

STRINGS_CONCATENATE()

Former Member
0 Kudos

Whoa. This sounds possible now. Let me try it. Will confirm it after that. But nonetheless, thanks a lot. You have been extremely helpful.

Former Member
0 Kudos

It is time i get spanked on my head with a ladle coz like Oliver Twist i keep coming back for "more"

What is the syntax for this function STRINGS_CONCATENATE()??

Is it possible to use DAY( TODAY ), MONTH( TODAY ), YEAR( TODAY ) in this?

I tried finding out this function description and syntax in the SAP Library help, but could not locate it.

But at least with this there is a ray of hope

Former Member
0 Kudos

syntax from help: STRINGS_CONCATENATE('string1'...'stringn') inserts blanks between several character strings to produce one string

I suppose it will work the same way "concatenate" works in excel

havent used it really.... am not sure if this works with dates... am sure a few trials will bring out the way it works (try with some strings first)

give it a shot and lets know if and how it works