Skip to Content
Author's profile photo Former Member

Fix ‘Initial’ Period Column in SNP Planning Book


As of SCM 5.0, there was a feature where planners in SNP Planning Book were able to lock the ‘INITIAL’ column in the Data View, so that the INITIAL period column is defaulted as the start column and not the next future period. There are couple of steps that would have to be done to lock the initial column;

  1. Set a user parameter in SU01 called /SAPAPO/SDP_STARTCOL to value ‘X’.
  2. Double-click the header of the initial column in the SNP data view.

But as of SCM 7.0, SAP has removed this very useful feature (OSS note 749791 until SCM 4.1 – Interactive Planning: Start Period). The requirement is to display the INITIAL column as the first column which would help users to check the initial values directly rather than scrolling back every time. There have been several discussions on SAP forums, but no one has been able to provide a good resolution to this issue. OSS messages have also been created and SAP had nothing more to say than “NOT SUPPORTED ANYMORE”.

Although it is a small fix, it causes lot of frustration among the user community and loss of productivity.

Default View – Without INITIAL Column


Requirement: INITIAL Column should be displayed, anytime the planner goes into the SNP Planning Book.


SAP provides the “Period from last selection” option in the user settings to remember the last column that was scrolled to but this does not satisfy the requirement of fixing the initial column. Also when changing the planning book or opening a new session, this does not work (works only when toggling between selection ids for the same planning book in the same session).


Resolution: Implement BADI

We implemented this custom functionality on our project and the users are very satisfied. Use advance macro BADI to fix the INITIAL column when selection is loaded to /SAPAPO/SDP94. This is user specific and settings have to be maintained at planning book, data view level. If required, it can be restricted to selection id level also.

Step 1: Add value 2 ‘Show Initial column’ (could be anything) to data element /SAPAPO/GRIDFOCUS

This is to ensure that standard functionality remains as such for option 1.


Step 2: Implement the BADI /SAPAPO/ADVX and write custom code in method USER_EXIT_MACRO


Step 3: Custom logic in method USER_EXIT_MACRO

The INITIAL column is the first column in the planning table and setting column no. = 1 will set the initial column as the first column when opening loading a selection id in /SAPAPO/SDP94.

The planning book, data view etc. can be obtained using the following function modules

Planning book and data view ->  /SAPAPO/MSDP_PB_GET_ADV_MVIEW (pass i_adv_layout and i_adv_view which are available in the interface import parameters)


Read the user settings id from table /SAPAPO/SDPSETKO by passing the planning book, data view, user id and selection id (when required to set the parameter based on selection id, if not leave selection id as blank).

Read the user settings value based on the user settings id from table /SAPAPO/SDPSETDE. The setting type ( /SAPAPO/SDPSETDE-TYPE ) for “Period from last selection” is FCS. The value for the type will be in field LC Test: Value ( /SAPAPO/SDPSETDE- VALUE1 ) and equal to ‘2’ if set accordingly.

The object to modify is c_s_actview-agc_ctrl1 and the field is INIT_COL. Set the field INIT_COL value to 1.

Step 4: Insert BADI macro in the planning book – data view

Go to /SAPAPO/ADVM. If there are macros already existing for the planning book – data view, just add a new BADI macro and include it in the DEFAULT list to execute. If no macros are available, create a new macro with the BADI macro and include it as a DEFAULT macro and activate the macro.


Step 5: Assign Parameter 2 Lock Initial Column in User Settings.

As mentioned before this is for a specific Selection ID or if the Selection ID is left blank, then it applies to all.7.JPG

Step 6: Load Planning Data in the Planning Book with Data View

The Initial Column should be displayed as the start column.



By implementing the custom BADI, it is possible to lock the Initial Column.

Assigned Tags

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


      If I've understood correctly, this modification can be implemented in both SCM 5.0 and 7.0. I took a look at the interface /SAPAPO/IF_EX_ADVX in both versions and it seems that there is no such field as init_col in parameter c_s_actview-agc_ctrl1. Did I miss something, or is the field name incorrect?

      It appears that the same result could be archived by changing value of field first_col to value of field element_id found in table agc_attr1. There are several lines with same element_id, the one with smallest value in column element seems to do the trick.



      Author's profile photo Babu Kilari
      Babu Kilari

      This is a great article. Thank you for sharing this with us

      Babu Kilari

      Author's profile photo Former Member
      Former Member


      there is another possibility to make the Initial column visible at start, using user functions in macros. In the macro builder you can define own macro functions within the menu "EDIT -> Edit User Functions...". It is important to include the structure c_s_actview into the function Interface.

      Within the user function the following coding can be used:

      field-symbols: <fs_ctrl1> type /SAPAPO/AGC_CTRL_STR.

      read table c_s_actview-agc_ctrl assigning <fs_ctrl1> index 1.

      if sy-subrc = 0.

         <fs_ctrl1>-first_col = 1.

      end if.

      Best regards


      Author's profile photo Cyrille WOICKI
      Cyrille WOICKI

      Dear readers,

      it seems that the overview section is incorrect as the purpose of the note 749791 has never been to display the initial column but to insure that after a scroll change, it is kept when loading the data of a planning object to the grid.

      The standard design in interactive planning has always been to display the first bucket in the future.


      Cyrille, SAP SCM development support.

      Author's profile photo Kumar Shanmugam Prem
      Kumar Shanmugam Prem


      This is a great document. Able to achieve this setting successfully.

      But not sure why this works only when we load data in selection window in a data view. And not when we access the SDP94 or select the data view (before loading data in selection window).

      Please let me know in case if anything is missed here.