Skip to Content

Summary

In the Planning Tool SAP BPS there was the option to enter Plan-Data for Characteristics which were not present in the SAP BW. With SAP IP this is no longer possible and any attempt to enter new Master Data into Planning Queries fails since a background validation of the entered values against the master data tables (/BIC/S*) is performed.

The solution described below shows a way to overcome this limitation by the creation of an own Master Data Read ABAP Class allowing to enter new master data in planning queries.

The idea behind the solution described in this document came up from several posts in SDN Forum.

Scenario

The business departments want to plan their investments with SAP IP and enter a short description for each Investment. In general this will not work, since the SAP BW does not have master data for the description:

Planning Scenario.jpg

So we have to provide a solution where the End-User can add free text into the field Invest Description.

Solution

This requirement can be fulfilled with the help of an own ABAP Class. The steps to achieve this are listed below:

Step 1: Create Master-Data ABAP-Class

a. This really easy. Just go to the transaction SE80 and create an own ABAP Class which is based on the Super class CL_RSMD_RS_BW_SPEC.

create abap class 1.jpg

create abap class 2.jpg

b. The next step will be the creation of an additional Attribute for taking the text. Let’s call it G_ALLOWED_CHAR.

attribute allowed char.jpg

c. Create the method “Constructor” which has the following parameter

attr of constructor.jpg

d. Coding of method constructor

method CONSTRUCTOR.

CALL METHOD super->constructor
EXPORTING
i_chanm      
= i_chanm
i_infoprov     
= i_infoprov
i_langu        
= sylangu.

DATA: l_iobjnm TYPE rsd_iobjnm.

l_iobjnm = o_chanm.

CALL FUNCTION ‘RSD_COB_PRO_GET’ “_ALWAYS needed -> ***.BW Reading Module InfoObjs in Cube
EXPORTING
i_iobjnm        
= l_iobjnm
i_infocube      
= i_infoprov
i_with_atr_nav
= rs_c_false
IMPORTING
e_s_cob_pro  
= o_s_cob_pro “Needed by Get Values method
EXCEPTIONS
OTHERS = 1.

* Add the entered values of the user to the allowed characteristic values

CALL FUNCTION ‘RSKC_ALLOWED_CHAR_GET’
IMPORTING
e_allowed_char
= g_allowed_char.

endmethod.


e. Redefine Get Values Method

The next step will be the redefinition of the Get_Values Method:

redfinition of get values.jpg

The coding must be adapted:

DATA:     ls_chavlinfo  TYPE rsdm_s_chavlinfo,
               l_offset       
TYPE i,
              
vla              TYPE  /BIC/SZINV_T1.

"Translate Char Value to Upper Case
TRANSLATE ls_chavlinfo-c_chavl to UPPER CASE.

FIELD-SYMBOLS: <ls_selopt> TYPE rsmd_rs_s_selopt.

TRY.
CALL METHOD super->if_rsmd_rs_access~get_values
EXPORTING
i_t_selopt   
= i_t_selopt
i_maxrows    
= i_maxrows
i_t_sorting  
= i_t_sorting
i_ts_req_attr
= i_ts_req_attr
IMPORTING
e_t_chavlinfo
= e_t_chavlinfo
e_tx_atr     
= e_tx_atr.
CATCH
cx_rs_error .
ENDTRY.

*           o_chanm is the InfoObject itself

*           If a value does not exist in the SID-Table, the Table     
*           e_t_chavlinfo is empty.
*           The new value will be added manually to the table.
*           A SID is not required.


IF e_t_chavlinfo IS INITIAL. " Value not found in SIDs

LOOP AT i_t_selopt ASSIGNING <ls_selopt> WHERE iobjnm = o_chanm
AND sign = ’I’
AND option = rs_c_range_opt-equal.

*        <l_s_selopt>-low contain the entry of the User
ls_chavlinfo-c_chavl = <ls_selopt>-low.

* With the Coding below you can stripe out not allowed chars

*        WHILE l_s_chavlinfo-c_chavl CN g_allowed_char.
*          CLEAR l_s_chavlinfo-c_chavl+sy-fdpos(1).
*        ENDWHILE.

INSERT ls_chavlinfo INTO TABLE e_t_chavlinfo.
ENDLOOP.



ENDIF.


Step 2: Create Info Object

Create an InfoObject type CHAR and allow lowercase letters. The InfoObject should not contain any master data.

Info object 1.jpg

Info object 2.jpg

Step 3: Create Web Template

Now a Planning Layout must be created allowing to enter new rows (option of Analysis Web Item). Before we can start creating a suitable Web Template we must have a Planning Query. However this is not a part of this How To. If you have questions about creating planning applications with SAP IP you may have a look at SAP Help.

Result

At the end the Users can enter free defined Investment Descriptions into the Planning Query:

/wp-content/uploads/2012/12/result_169122.jpg

Alternative Scenarios

Beside the Scenario which is mentioned above, you can use this enhancement to create new master Data in standard Info Objects. For this you can use the entered Value of the User in “<ls_selopt>low” and use it to generate new Master data Entries in your standard Object with SIDs and other Master Data Information.

With this adaption scenarios like the one below are thinkable:

Alternative Scenario Master Data Planning.jpg

There is one planning application where the user enter maintain the Product master data and could add new products to the sales planning application. This can be done within the GET_VALUES Method.

But be careful with those functionalities since the danger of contaminating the master data of your original Info Object is present. For this reason it makes sense to mark all ‘planned’ products with a special naming convention and Source System information like illustrated above.

(also published on http://sap-user-blog.com)


To report this post you need to login first.

11 Comments

You must be Logged on to comment or reply to a post.

  1. Kanungo Gaurav

    Hi Chris,

    Implemented your solution. When I executed the WAD, the entry got posted to the info object but thats it, the same thing didn’t worked next time and thus couldn’t enter anything. Wondering why it allowed for the first time and didn’t do it the next time.

    Please share your thoughts.

    -Regards,

    Gaurav

    (0) 
    1. Christopher Kampmann Post author

      Hi Gaurav,

      do have some error messages you can share? Did you enter a key figure value? Otherwise the value won’t get posted to the InfoCube and therefore not displayed in your WAD.

      Can you check the SID-Table of your InfoObject. Are the entered values added to the table?

      Best regards

      Christopher

      (0) 
      1. Kanungo Gaurav

        Hi Christopher,

        I am woring on BW 7.3. I just figured out that implementing this solution breaks the parameter declaration when we create the planning function and that is the reason we are not able to post the values. I have screenshots, let me know your email id, I can send you.

        regards,

        Gaurav

        (0) 
        1. Christopher Kampmann Post author

          Hi Gaurav,

          sorry for my late response.

          That sounds more as a problem of your planning function. What exactly is doing the function? Maybe there is a problem if you added the new Text InfoObject to your Aggregation level.

          I guess the new InfoObject must just be handeld by your function.

          best regards

          Christopher

          (0) 
  2. Daniel BRAKER

    Very nice approach, thanks for your solution!

    The only thing is changing the text after save.

    Problably I’ll solve using Macros due I’m in Excel.

    Thanks

    Daniel

    (0) 
  3. raja s

    Can you please let me know if there is any update on this solution for BW 7.4 or does it remain almost the same?

    Regards,

    Raja.

    (0) 
  4. Melissa Leighton

    Hi,

    Thank you for this post. I am curious if there is an option to perform this solution using Design Studio or other tools instead of Web Application Designer.

    Best Regards,

    Melissa Leighton

    (0) 
  5. Lamine FAYE

    Hi Chris and all,

    I just tried to implement this, but it seems it does not work when the new master data values have to be created by a planning sequence. Even after implementing the logic, my planning sequence ends up with “Value xxx for infoObkect xxx not valid” error.

    I’m on 7.5 on HANA, with a compounded infoObject.

    Any clue ?

    (0) 

Leave a Reply