Skip to Content
Author's profile photo Georgia Vanin

Macro – Row “Total” not editable in /SAPAPO/SDP94

This blog explains how to create a macro which will make row “Total” not editable in transaction /SAPAPO/SDP94.

Based on the following true table:

AGG_LEVEL ACT_LEVEL RESULT
X 1 Edit
0 0 Edit
1 0 No Edit
  • Use function “ACT_LEVEL” inside the “If” condition. If ACT_LEVEL (  ) > 0, this means that the level is not the total level.
  • Then choose the Row that you want to use this functionality and change the attribute.
  • Inside that you will use function ROW_INPUT ( 1 ). If X = 1, the status of the row is set to Ready for Input.


  • Then use ELSEIF Agg_level (Your characteristic)  = 0. This means you will check if you are on the detailed level of a selection. In that case you should be able to edit.
  • The last step is to use the ELSE condition. Put Row as an attribute.
  • Inside that you will use function ROW_INPUT ( 0 ). If X = 0,  the status of the row is set to Read-Only (write-protected).

Note that I also used the function ROW_BG to change the background color of the row. See example below:

/wp-content/uploads/2016/02/ter_884451.png

You should put this macro in the events “Level change” and “Start” because when you open /SAPAPO/SDP94 and when you change the level the macro will be executed.

/wp-content/uploads/2016/02/events_882367.png

And here is the result in /SAPAPO/SDP94 transaction. The gray background color means that you can’t change the row. The green background color means that the row is ready for input:

a) When you open /SAPAPO/SDP94 and load only one product (the caracteristic that I’ve insert on the ELSEIF), you will be able to change the total:

AA.png

b) If you open /SAPAPO/SDP94 and load more than one product you will not be able to change the total:

/wp-content/uploads/2016/02/bb_889881.png

c) If you select details (all) you will not be able to change the total again as expected:

/wp-content/uploads/2016/02/cc_889882.png

Assigned Tags

      6 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Thanks Georgia Vanin.  thanks for your effort.

       

      Pravin M

      Author's profile photo Georgia Vanin
      Georgia Vanin
      Blog Post Author

      Hope this helps you

      BR, Georgia

      Author's profile photo Former Member
      Former Member

      Yes Indeed. there is one concern, if we load only 1 product , the KF is un-editable. I believe you already working on the same.

       

       

      Pravin M

      Author's profile photo Georgia Vanin
      Georgia Vanin
      Blog Post Author

      Yes, now I changed the macro and updated the blog to work if only one product is loaded. Best regards, Georgia

      Author's profile photo Former Member
      Former Member

      Thanks a lot

      Pravin M

      Author's profile photo Suhas Mhaskar
      Suhas Mhaskar

      Hello Georgia,

       

      I would like to use a similar macro. However, business requirement is that the editable key figure should be non editable as well for users to update data (manually in planning book) after a particular date.

      I tried to use CELL_INPUT (0) function in a macro, but it doesn't work if I run that macro in background, since due to the 'Total non editable' macro which is in Start & Level Up macro,it is not able to make the Keyfigure non editable.

       

      Would be great if you could suggest a a way where both logic can work i.e :

      a) Total Row is non editable

      b) Forecast Row is also non editable after a particular day. Eg after 3rd day of the month.

       

      Regards,

      Swapnesh Dave