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

Similar Messages

  • 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

  • Overwrite functionality with BPS layouts

    Hi all,
    I have a requirement,  when the actuals data has a missing field, I should display the record using BPS layouts and then be able to overwrite the record with a new record that I input from the layout which would have the missing field. Can this be achieved?
    Thanks for your timely help.
    Regards,
    Hema

    Cube creates delta records but will not overwrite.

  • Excel functionality in BPS layout

    Hi gurus,
    I have a problem with layout on excel: all the excel functionality are not avaible, in particular i refer to filter and order.
    I try to unprotect excel worksheet but if i use filter i have a lot of problems when save data.
    My users are very boring ....
    Thanks in advance
    FT

    Hi,
    just some background information: in BPS Excel is 'controled' via SAPGUI using OLE Automation, i.e. same technique Word uses to control an embedded Excel file. In this mode some Excel features cannot be used.
    In addition it is hard to control Excel completely. BPS gets the data from the ABAP back-end and transfers the cells via SAPGUI and OLE Automation to Excel. After this BPS has no control what Excel does with the data. Some Excel functions like 'filter' or 'sort' make it almost impossible to read the data back from Excel in a consistent way. This is why the worksheet is protected by default the these kind of Excel functions lead to problems.
    If you save the Excel template without protection in the layout builder it is also not protected at run time of manual planning.
    It is also easy to create a button that protects/unprotects the worksheet. A code snippet can be found in the VBA makros SAPAfterDataPut, SAPBeforeDataGet.
    Regards,
    Gregor

  • Date convert Function module

    Hello,
    Is there any function module thru which i can convert SY-DATUM to DD-MMM-YYYY (13-Apr-2007) format.
    Appreciate any quick replies.
    Message was edited by:
            Salahuddin Syed

    HI,
    Welcome to SDN!!!!!!!
    Check this..
    <b>
    DATA: V_INPUT(8) VALUE '20112006'.
    DATA: V_CHAR(25).
    data: date type sydatum.
    DATA: MONTH_NAMES LIKE T247.
    SELECT SINGLE * FROM T247
    INTO MONTH_NAMES
    WHERE SPRAS = SY-LANGU
    AND MNR = V_INPUT+2(2).
    CONCATENATE MONTH_NAMES-KTX V_INPUT(2) V_INPUT+4(4)
    INTO V_CHAR SEPARATED BY SPACE.
    write: / V_CHAR.</b>
    or
    Please check this FM HR_IN_GET_DATE_COMPONENTS.
    <b>DATA: L_DAY(2)   TYPE C,
          L_MONTH(2) TYPE C,
          L_YEAR(4)  TYPE C,
          L_LTEXT    TYPE T247-LTX.
    DATA: L_DATE TYPE STRING.
    CALL FUNCTION 'HR_IN_GET_DATE_COMPONENTS'
      EXPORTING
        IDATE                         = SY-DATUM
      IMPORTING
        DAY                           = L_DAY
        MONTH                         = L_MONTH
        YEAR                          = L_YEAR
        LTEXT                         = L_LTEXT
      EXCEPTIONS
        INPUT_DATE_IS_INITIAL         = 1
        TEXT_FOR_MONTH_NOT_MAINTAINED = 2
        OTHERS                        = 3.
    CONCATENATE L_LTEXT ',' INTO L_DATE.
    CONCATENATE L_DATE L_DAY L_YEAR INTO L_DATE SEPARATED BY SPACE.
    WRITE: L_DATE.</b>
    Regards
    SAB

  • 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

  • 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

  • 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

  • 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.

  • 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.

  • Manual data change in SEM-BPS

    Hello,
    Dos somebody know how to find possibility of manual data change in the planning layout of SEM-BPS?
    Thanks for answers.

    Hello Svetlana,
    When you meant "to add new (or change existing) data in a planning layout, you have to make use of the function module
    <b>API_SEMBPS_SETDATA.</b>
    The parameters what you have to pass are:
    1) Planning area
    2) Planning level (where your layout is defined)
    3) Planning package
    4) Planning Laoyut
    5) Characteristic values of each row
    Check the documentation of the Funtion Module (CTRL+F4).
    <b><i>1) Be sure to convert the key figure values in string format, otherwise you would get a runtime error.
    2) Make sure that no two rows have same keys (characteristic value tuples)
    3) Make sure that all the characteristic values are contained in the planning level (Check the filters)</i></b>
    A simple working example (ABAP Code) you have it from me when things dosen't go forwards.
    Thanks and Good Luck!

  • BPS Layout Refresh

    Hi,
      We have a BPS layout which has columns for local currency and corresponding USD columns. Planning is done in local currency and upon saving the values are converted to corresponding USD, But the converted USD values are not reflected in the USD columns. We have to go out of the layout and come back into the layout, then the correct USD values are displayed. I think the layout is not getting refreshed on saving.
    Is there a way to achieve this, like having a refresh button which when hit refreshes the layout data.
    Any help on this is highly appreciated.
    Thanks,
    -Muru-

    Hi,
    Then in this case you will have to look for the function that is used for saving the data.... just ask your ABAP colleague to check for that program.  Below is the suggested code to insert :
    CALL FUNCTION 'API_SEMBPS_REFRESH'
    IMPORTING
    e_subrc = l_subrc
    es_return = ls_bapiret.
    Hope this helps.
    Cheers,
    Gimmo

  • 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

  • Check user manual input in excel BPS layouts

    I have some problems for manual input characteristics checks on an excel bps layout.
    I need to assign the value of an header characteristic to a detaild characteristic. How can I do ? I have already tried with characteristic rels. (exit, attributes, etc.) but without results.
    Thanks in advance.

    Hi Mario,
    I am quite sure, that if a char is in an P.Level, and there is a char relationship for it, the char relationship will not be called (somebody correct me if am wrong).
    So, in your case, you want to derive SALES ORG from Company code using char rel. The sales org is in the p.level, since it is in your layout. Threfore the char rel will be not called.
    If you want to have it works, do not select sales org in your level. I assume that you filter your comp code in level with a bps variable. Get this variable value (using API_SEMBPS_VARIABLE_GETDETAIL function) and assign it to char SAles org in your char rel exit. Everytimes when you save your plan data, the char rel exit will be call and sales org will be derived.
    If you want to show and derive the sales org in your layout based on selected company code, create a bps variable type exit for it, and read and derive the value from comp code variable.
    Best Regards,
    Suan Liono

Maybe you are looking for

  • Transfer app to another account?

    Hi, I bought a GPS app a few months ago for £70, and have found that I don't really use it. My father likes the app however... paying for it again would be a waste as I'm not using my copy, so how can I transfer this app to his account? Thanks

  • Deploying applications w. Jar files

    I'm experiencing extreme difficulties trying to deploy my application using a jar. I use a file and an image in my app, so I want to include them in the Jar file and I want my app to use the files from the jar. So my question is: how do I do this? An

  • Click on Firefox icon and ASK appears - why please and how do I get my Firefox back ?

    Firefox had been ok all day. Then late afternoon I clicked on the Firefox icon and ASK Jeeves appeared. Cannot get rid of it and cannot get Firefox. Help.

  • Ipod touch WiFi problems to be fixed in 3.0 Firmware?

    Basically, I bought my ipod touch brand new about a month ago (2G, 2.2.1 firmware). Ever since I opened it (approx. 2 weeks ago) the WiFi has been pretty sketchy. I get an error "server stopped responding" a lot (maybe like 2-8 mins of browsing) on s

  • JMC flight recording code analysis

    Hello, I am having trouble understanding my flight recording of an ADF application. I have profiled an ADF app built in 11g R2 running on a stand alone server. The JMC recording returns everything it should. I need to know how to analyze my ADF metho