Skip to Content
avatar image
Former Member

End time calculation based on date SAP BEx

Hi gurus,

             I have a scenario where I have an info object 'End Time' which has to be calculated as the maximum value based on a date and another field which is unique. End time is already set to Aggregation 'Maximum' in rsa1 in the backend.

Please see the sample data below:

Steps      Unique ID                 End time     End date

S1              UID1                     00:07:32    29-Dec-2014

S2              UID1                     00:12:45    29-Dec-2014

S3              UID1                     00:05:06    29-Dec-2014

S4              UID1                     00:09:10    29-Dec-2014

I require the output to be :

Steps     Unique ID     End time     End date

S2             UID1           00:12:45     29-Dec-2014


Unique ID and End date cannot be obtained from a variable.

Can you please help me calculate this value in SAP BEx Query Designer?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 02, 2015 at 04:34 AM

    Hi Aparajitha,

    There can be two options,

    1)Can you try the Top N Condition with N=1 for both Date and Time .- Query Designer

    2)Look Up in CMOD by passing the input variable - Backend Look UP.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      write a customer exit on date using below logic.

      lv_snpdate  TYPE /bic/ date infobject

            SELECT MAX( date) FROM /bic/ZDSONAME INTO TABLE itab.

                ' .

            LOOP AT itab INTO work area

              lv_snpdate = workarea -/bic/odate info object



            l_s_range-low       = lv_snpdate.

            l_s_range-sign      = 'I'.

            l_s_range-opt       = 'EQ'.

            APPEND l_s_range TO e_t_range.


      Rahul S

  • avatar image
    Former Member
    Jan 02, 2015 at 04:27 PM

    Hi Aparajitha,

    My advice how say SVU, is:

    1) Apply a condition query allowing only display your records
    2) Create another cube, when you only loads this records, you can add in your MP and your query only show values needed.

    You can use a exit var, but the result may not be as expected.

    Can share more about your requierement?.

    I hope helps.


    Add comment
    10|10000 characters needed characters exceeded