Data in BPS layout columns

Hi,
   I have two data columns in my BPS layout called price and margin with one lead column material, the layout looks like this when it initially display:
   Material    Price   margin
      1          1.25
      2
      3
      4
The requirments is if user input date in the margin column and the price should be calculated by the following logic
     second  material price = (first price ) + (first margin) and so on.
     if we input margin column 0.50,0.40 0.30  for material 1,2,3,4 respectively, we will get the following price result:
    Material    Price   margin
      1          1.25    0.50
      2          1.75    0.40
      3          2.15    0.30
      4          2.45   
I am tried to use the excel formula for achieve this, but as much as I know the excel formula can not been saved when we configure the BPS layout,beside since the number of material display under different data selection criteria is vary, it's diffculty to hard code the formula in the excel.
Anybody have any suggestion how to do it?

Hi JW,
BPS is designed in a way that layouts and planning functions are completely independent of each other (otherwise you would have to build a layout for each function or something like that).
The data in the layout is sorted according to the lead column. So if you use FOREACH in FOX with the same characteristic, the data will be processed in the same order as the lead column.
Alternatively, you can do it with an exit function. All you need to do in an exit is copy XTH_DATA into an internal table and then use the SORT statement with the same sort key as the lead column.
  DATA:
    lr_aera     TYPE REF TO cl_sem_planarea_attributes,
    lr_t_data   TYPE REF TO data.
  FIELD-SYMBOLS:
    <lt_data>   TYPE STANDARD TABLE.
  CALL METHOD cl_sem_planarea_attributes=>get_instance
    EXPORTING
      i_area      = i_area
    RECEIVING
      er_instance = lr_area.
  CREATE DATA lr_t_data TYPE (lr_area->typename_t_data).
  ASSIGN lr_t_data->*   TO <lt_data>.
  <lt_data> = xth_data.
  sort <lt_data> by ...
your logic here
  xth_data = <lt_data>.
Regards,
Marc
SAP NetWeaver RIG

Similar Messages

  • Change Data in BPS Layout: Exit Function

    Hello everyone,
    We are using BW-BPS and we need to make a sort of a certain characteristic in a Planning Folder. In the specific Planning Folder it was defined an exit function and it was assigned a function module.
    We implement the following code:
    FUNCTION Z_ORDENAR_CLASSIFICACAO_PLANO.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA
    *"     REFERENCE(I_PLEVEL) TYPE  UPC_Y_PLEVEL
    *"     REFERENCE(I_METHOD) TYPE  UPC_Y_METHOD
    *"     REFERENCE(I_PARAM) TYPE  UPC_Y_PARAM
    *"     REFERENCE(I_PACKAGE) TYPE  UPC_Y_PACKAGE
    *"     REFERENCE(IT_EXITP) TYPE  UPF_YT_EXITP
    *"     REFERENCE(ITO_CHASEL) TYPE  UPC_YTO_CHASEL
    *"     REFERENCE(ITO_CHA) TYPE  UPC_YTO_CHA
    *"     REFERENCE(ITO_KYF) TYPE  UPC_YTO_KYF
    *"  EXPORTING
    *"     REFERENCE(ET_MESG) TYPE  UPC_YT_MESG
    *"  CHANGING
    *"     REFERENCE(XTH_DATA) TYPE  HASHED TABLE
      DATA:
        lr_area TYPE REF TO cl_sem_planarea_attributes,
        wa_hash_table type ref to data,
        l_sortfield type STRING,
        lr_t_data TYPE REF TO data.
      FIELD-SYMBOLS:
        <lt_data> TYPE STANDARD TABLE,
        <ht_head> TYPE ANY TABLE,
        <xth_data> TYPE HASHED TABLE,
        <ls_data> TYPE ANY,
        <wa_data> TYPE ANY,
        <fundo> TYPE ANY,
        <eco> TYPE ANY.
      CALL METHOD cl_sem_planarea_attributes=>get_instance
        EXPORTING
          i_area = i_area
        RECEIVING
          er_instance = lr_area.
      CREATE DATA wa_hash_table LIKE LINE OF xth_data.
      ASSIGN wa_hash_table->* TO <ht_head>.
      <ht_head> = xth_data.
      LOOP AT <ht_head> ASSIGNING <ls_data>.
    This is the characteristic that we pretend to sort
        l_sortfield = 'S_CHAS-0CMMT_ITEM'.
        SORT <ht_head>
          BY (l_sortfield) DESCENDING.
      ENDLOOP.
      <xth_data> = <ht_head>.
      UNASSIGN: <ls_data>, <ht_head>.
    ENDFUNCTION.
    When execute this function, we get a DUMP (ASSIGN_TYPE_CONFLICT). Does anybody have any suggestion how to change a hash table or somehow make a sort in this hash table?
    Thanks in advance.
    Ilda

    Hi,
    After some changes in the code, it seems that xth_data table is assuming the “new content”. In debugging, we could see that the assignment was made and xth_data records are now in a different order. But when executing the BPS Layout assigned to this planning function, all the lines (records) still in the same place. The Layout doesn’t change.
    This is the code:
    FUNCTION Z_ORDENAR_CLASSIFICACAO_PLANO.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(I_AREA) TYPE  UPC_Y_AREA
    *"     REFERENCE(I_PLEVEL) TYPE  UPC_Y_PLEVEL
    *"     REFERENCE(I_METHOD) TYPE  UPC_Y_METHOD
    *"     REFERENCE(I_PARAM) TYPE  UPC_Y_PARAM
    *"     REFERENCE(I_PACKAGE) TYPE  UPC_Y_PACKAGE
    *"     REFERENCE(IT_EXITP) TYPE  UPF_YT_EXITP
    *"     REFERENCE(ITO_CHASEL) TYPE  UPC_YTO_CHASEL
    *"     REFERENCE(ITO_CHA) TYPE  UPC_YTO_CHA
    *"     REFERENCE(ITO_KYF) TYPE  UPC_YTO_KYF
    *"  EXPORTING
    *"     REFERENCE(ET_MESG) TYPE  UPC_YT_MESG
    *"  CHANGING
    *"     REFERENCE(XTH_DATA) TYPE  HASHED TABLE
      DATA:
      lr_area TYPE REF TO cl_sem_planarea_attributes,
      l_sortfield type STRING,
      data_ref TYPE REF TO data,
      lr_t_data TYPE REF TO data.
      FIELD-SYMBOLS:
      <lt_data> TYPE ANY TABLE,
      <ls_data> TYPE ANY,
      <ls_data_copy> TYPE ANY.
      CALL METHOD cl_sem_planarea_attributes=>get_instance
        EXPORTING
          i_area      = i_area
        RECEIVING
          er_instance = lr_area.
      CREATE DATA lr_t_data TYPE (lr_area->typename_t_data).
      ASSIGN lr_t_data->* TO <lt_data>.
      <lt_data> = xth_data.
      CLEAR xth_data.
      l_sortfield = 'S_CHAS-0CMMT_ITEM'.
      SORT <lt_data> BY (l_sortfield) DESCENDING.
      MOVE <lt_data> TO xth_data.
    ENDFUNCTION.
    Does anybody understand this behavior, why the changes in the user-exit are not assumed in the BPS Layout?
    Thanks,
    Ilda

  • Locking data in BPS layout

    Hi Guys,
    I have  one Planing Layout which different users will access for planning  but for different Cost centers. But as of Now when User1 is loggining in it is fetching all Cost Centers and User2 is getting Locked . he is not able to change any plan data .
    Now I want that when user1 will logon in BPS Layout ,he/she should fetch up the data for Cost centers for which he/she is authorized . So, other users should not be locked. they should continue to plan for other Cost centers.
    your Suggessions will be hIghly Appreciated.
    Thanks
    Pankaj.

    Hi Pankaj,
       I suppose you want an input variable for 'User Group' based on which you would write an exit variable for Cost Center. I am a bit out of touch of BPS but as far as I think, you cannot do that because you cannot include a nav. attr. in a planning level. If you can think of some other way other than an input var. for 'User Group' then it might help. One way could be to include 'User Group' as a separate characteristic in the planning level.
    In Integrated Planning, this is definitely possible, because in an input ready query, the nav. attr is accessible like any other characteristic on which we are able to apply an input variable.
    Maybe somebody else can throw more light on this particular scenario in BPS.

  • How to apply Excel formula in BPS layout

    Hi ,
       I need to apply the following logic in my BPS layout.
    There are three data columns called C,D,E respectivelt
    redord 1   user input data for all the columns,
    Record 2   C2 = D1 + E2.
    Record 3   C3 = D2 + E3.
    Record n   Cn = D(n-1) + En.
      n is the number of record in teh layout.
    1: Can we use Excel formula to achive this?
    2: If the anser is yes, how can we configure the BPS layout? I am not sure if we can do it at the last step of change layout.
    3: If the answer is no, what is the other choice? I have tried to use user exit, but had some problem in passing the data to xth_data table in the orginal order sequence.
    thanks in advance.

    JW,
    please see my answer to your original post "data in BPS layout columns"
    Regards,
    Marc
    SAP NetWeaver RIG

  • Ugrent help. User exit- Read data from BW BPS layout and write to ODS

    Hi,
    I am new to BW BPS and have a req. where i need to read data from BPS layout (EXCEL) and write it to ODS.
    Is there any function module or user exit which read data from excel layout and upload it to ODS. Or can any one help me out how can i write a code for this.
    It is urgent and i need your help.
    Appreciate any kind of input.
    Thanks
    Mamatha

    Dear Mamatha,
    read following documents. i hope it will work for you.
    [http://www.geocities.com/cynarad/reference_for_bps_programming.pdf]
    [Accessing BW Master Data in BPS Functions using ABAP ( Exit Function )|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d3dcc423-0b01-0010-4382-aa3e0784b61e]
    Regards,
    Malik
    Give me points if its helpful for you.

  • Data columns in BPS layout

    Hi,
      My current BPS layout has three columns, they are cost,price and margin respectively. The user now ask to add another column call "alert" after the margin column.
    The logic is that if the margin is less than 10%, then the alert column should marked with "X", otherwise leave it blank.
      In order to add a column after margin column, the added column have to be key figure which will not allowed characteristics,while all the other key figure type such as amount, quantity, date ect will not take
    "X".
      Any idea or suggestion.

    JW,
    If Margin is the last column on your layout, what you do is in the last layout definition screen, add the locl excel formula to the column after where the margin would appear.  Then you just use simple excel formula to do it.
    For things to appear only if there is data in the row, I typically use an IF in the excel formula and check for values in cost, price, margin.  Actually it would be 2 nested IFs.  One to check for value and the other to determine the 10% and mark it with a X...  In purely excel formula, there is no distinction between key figures and characteristics since it is only Excel.
    Hope this helps.

  • Column in bps layout

    Hi all,
    How can I hide a key figure data column in my BPS layout?
    Thanks
    Gianmarco

    Thanks but this solution isn't OK because when I start the layout there are a column and not keep my hide changes.
    Any suggestion please?
    Gianmarco

  • Loading data from excel to BPS layout

    Hi,
    I have BPS layouts in place and also excel sheets which are exact replica of those layouts.
    I know 2 options to load excel data into the BPS. These are:
    1) Copy and paste the data from excel to BPS layout.
    2) Create a flat file in line format from excel and then use method explained in document "How to Load a Flat File into BW-BPS Using SAPGUI.pdf".
    Is there any other way I can upload the same?
    Any help in this regard will be highly appreciated.
    thanks in advance.
    regards,
    Pankaj

    Thanks to Vlad, Laurent & Srini for prompt replies.
    But here the user needs to load data directly to the transactional cube.
    So it is a case of "instead of keying in values" on to the BPS planning layout, user wants to upload the data from excel into the BPS layout.
    Planning is done on SAP GUI and not web browser.
    I am able to do the same using the document "How to Load a Flat File into BW-BPS Using SAPGUI".
    But in this case the data needs to be converted into a simple csv file in line item format before it can be uploaded.
    Is there any way, where we can upload from excel file without having it to change to csv format as required in "How to Load a Flat File into BW-BPS Using SAPGUI"?
    thanks in advance.
    regards,
    Pankaj

  • Is it possible  Hide a column in BPS layout "WEB" ?

    Hi,
    Is it possible to hide a column in a "WEB" BPS layout  ?
    Have you an example to hide a column in web thanks to Java and where insert it ?

    Alessandro,
    I create in BPS0 all the customizing I need (functions, layout...). After that, I create a web interface with these components (variables, functions, layout).
    That 's why I wonder what could be the java code to hide a column in web interface.
    regards

  • Hide a column in BPS layout ?

    Hi,
    Is it possible to hide a column in a BPS layout (Web Excel) ?
    When I hide a column in the layout definition, saving it resets the hidden column.
    Any idea if it will be included in a future release ?
    Thanks

    Alessandro,
    I create in BPS0 all the customizing I need (functions, layout...). After that, I create a web interface with these components (variables, functions, layout).
    That 's why I wonder what could be the java code to hide a column in web interface.
    regards

  • Compare previous column value in BPS Layout

    How to compare the two column values in BPS layout.
    My layout format
    PO NO
    GL
    Actual
    Amount
    1001
    701
    1200
    User Entry
    Actual Value is 1200, User will enter the Amount but it should be equal to 1200 or less then that.
    If user entered more than 1200 in Amount column, I should get error message.
    Thanks in advance.
    Regards,
    Kiruthika

    Hi Uryukin Andrey,
    Where do we need to use this fox formula? Could you please explain steps to use this FF?
    Thanks,
    Harry

  • Date convertion function in BPS layout

    Hi,
       At the user's request, I have created a key figure with date type "date". The purpose of this is to allowed the user can input the date for each of the material displayed at the BPS layout.
       when I use the listcube to display the date key figure, I notice that it is not display as the regular date instead it has benn converted to a number for example 01/12/2005 is dispaly as 731,959. when I delete the date from the layout and save it,now the cube has add a 731,959- record. this is comply with how the infocube deal with ket figure data.
       There should be an function which convert the date 01/10/2005 to 731.595 in the BPS back end, anybody know the function name.
    Thanks,

    Hi JW,
    If you simply want to generate a new date from an existing one, there are several options using only FOX. But again, maybe you want to look at the original intention of the application and your data modelling options before researching into this specific issue.
    William

  • How to Remove totals on few columns from SEM BPS layout

    On SEM BPS layout it has 10 5 charatestics columns
    and 10 key figure columns.
    out of these key figures I want see totals on some
    coulmns and for few columns I do not want to see totals.
    for wxample it does not make sense of seeing total under
    the salary incrase percentage coulmn.
    Please suggest anyway we can remove total for some  
    columns on the layout

    Hey, thanks -- everything worked as you described. It never would have occurred to me that the "put back" button refers to the browser selection not the layout selection, for reasons I give below.
    I think Aperture exhibits some conceptual confusion here. First of all, a "light table" is created by the New > Light Table command, and you add images to the newly created light table just as you would add them to an album. But those images don't go on the light table layout until you drag them from the browser to the layout table. The "put back" button and "remove from light table" contextual menu command both mean remove from the layout. The phrasing of the contextual menu command make it sounds as if it will remove the clicked image from the light table's collection of images, like removing an image from an album -- it would have made more sense to name this command "put back". Furthermore, the "put back" button is above the layout display, not above the browser, which to me implies that it applies to selections in the layout display. To select an image in the browser, and click "put back selected" seems backwards -- if you just selected the image in the browser, your attention is focused on the browser, not the layout; from the browser's point of view, the button should read "bring back" not "put back".
    The documentation didn't really help when I was trying to figure this out. Sometimes the Aperture documentation refers to just a "light table", as on the overview on page 732. On pages 733 and 734, though, it refers to a "light table album". On page 735 of the Aperture manual there is a very brief explanation of how "to add images to the light table" and "to remove an image from the light table". Here, "light table" refers to the layout not the album. The explanation of the "Put Back Selected" button says to select an image then click the button, and the picture shown is of an image selected in the layout, not in the browser.

  • To Identify changed data in planning layout in BPS

    We have a planning layout  in BPS which user can change data on individual cell.  We also have an EXIT function to distribute data to this layout.
    User changes data on cells then executes the EXIT function to distribute data. During debugging, we see the changed entry with delta amount in the XTH_DATA table. However, there are many entries with similar characteristics; hence we cannot identify the particular changed data, i.e., the changed sales amount, in XTH_DATA of EXIT function. 
    Is there any configuration and/or function to show only the changes data? Any comments/hints are greatly appreciated.
    Best regards,
    Sam

    Hi,
    When you enter for a particular characteristic and remaining characteristic if you left bank , it will store as #  in layout and samething will also in cube. you can check it cube also.
    for eg.
    profitcenter com.code  sales revenue
    100              #              10
    if you want to avoid this then you have to enter all characteristic values.
    Regards,
    Siva.

  • Variable Range not working in BPS-Layout.

    Hi BI Guru's,
    I am facing Problem in BPS - Layout.
    My requirement is to get YTD Budget Quantity in Single Coulumn. For Example, I need Quantiy for the Period 001.2009 to 12.2009 in single Column as Budget YTD 2009.
    For this I defined a variable on the Planning area, with the characteristics "fiscper" and in the selection condition i entered the range 001.2009 to 012.2009, but when i executed the layout it is showing the quantity for the perios 001.2009 only and not for the entire range.
    I tried with the User Exit also, where i copied the standard function module "UPF_VARIABLE_USER_EXIT"  to 'Z' function and modified to my requirement.
    Following is my Code for the Function Module
    clear eto_charsel.
    data ls_charsel type upc_ys_charsel.
    clear ls_charsel.
      i_area = 'ZUCOPA'.
      I_CHANM = 'FISCPER'.
      i_variable = 'ZACTDYTD1'.
      ls_charsel-chanm = i_chanm.
      ls_charsel-seqno = '1'.
      ls_charsel-sign  = 'I'.
      ls_charsel-opt   = 'BT'.
      ls_charsel-low   =  '2009001'.
      ls_charsel-HIGH   = '2009012'.
      insert ls_charsel into table eto_charsel.
    But the after using the Function Module in the User Exit area of Variable also, I am getting the Quantity for the Period 001.2009 only and not for the entire range ( 001.2009 to 012.2009 ).
    Please suggest some solution ASAP.
    Thanks in advance.
    Regards,
    VD.

    Hi Marc,
    Thanks For your Reply,
    I changed the Layout as suggested by you, where i have now 12 columns for Budget Quantity and a Total column( C1C2....C12).
    I do not want to show this 12 column and instead want to show only the total column, so I hide this columnn's in the change layout but after saving the layout these columns again appear in the layout.
    How do i hide these columns in the layout????
    Thanks
    VD

Maybe you are looking for