Display currentrow of totalrow for each details

Friends,
I have a scenario.... where on a master detail (s) page, for each detail, I need to display the <currentrow> out of <totalrows>.
I am able to show the <totalrows> by using bindings.detailiterator.estimatedrowcount.
I can get the <currentrow> using bindings.detailiterator.currentrowindexinrange.
Problem is when it intiallly loads it shows -1 as current row.  I would like to show 1 of <totalrow> for the first row.
I have partialtrigger on next and previous button. As soon as i press this button everything starts working fine. I see the currentcurrent now .....
it seems like when page initially loads, iterator doesn't have any information about the currentrow and that's why it is showing -1 as the currentrow index.....
Any suggestion will be appreciated.....
thank you guys
-R

thank you Kiran and Barbara for your response.....
My issue was that initially when the page loads, iterator wasn't executed hence current row is always returned as -1 .....
I couldn't able to find easy solution to
1- I added a transient atrribute in my Vo
2- I updated the VOROWImpl class and updated get<Transient> method which returned
return getRowSet().getCurrentRowIndex() +" of "+ getRowSet().getRowCount();
3- Displayed this on the title of the details and solved the problem

Similar Messages

  • Need a multi-level control break report displaying a cross-tab for each ...

    I need a multi-level control break report that displays a cross-tab report for each
    detail and subtotal. The individual cross-tabs are no problem. There are two issues:
    1) How to get many cross-tabs (thousands) to appear in one report.
    2) How to provide cross-tabs in-line on the multi-level subtotal lines.
    Here is a concrete example.
    Suppose the data base contains this table:
    road (
    id_number number, -- this is an artificial PK
    city varchar2,
    county varchar2,
    state varchar2,
    length number,
    owner varchar2, -- roads may be owned by cities, counties, states, and others
    surface_type varchar2 -- the surface type may be gravel, asphalt, concrete, and others
    The table is populated with several million records that include every
    length of road in a US city.
    It is OK to suppose that all the attributes in all the records are not null.
    Without the PK, there would be millions of duplicates,
    which should all contribute to the summed lengths.
    The report I need is like a control break report with a detail line for each
    city together with subtotals for each county and state and
    a grand total for the US at the end.
    However, each detail and total line needs to be a cross-tab report
    summing the length over the city, county, state or US
    (whichever is called for at that location)
    for each combination of owner and surface_type.
    so the report would have the following structure:
    a city cross-tab for the first city in county 1/state 1
    a city cross tab for the last city in county 1/state 1
    a cross-tab for count 1
    a city cross tab for the first city in county 2/state 1
    a city cross tab for the last city in county 2/state 1
    a cross tab for state 1
    a cross-tab for the US
    Any suggestions will be appreciated.
    This problem comes up because my client's legacy system,
    which is being replaced,
    already has such a report (in COBOL).
    Thanks!!!
    Steve
    PS, I know one ugly way to do it. Namely, make a variable for each
    possible combination of owner and surface. Then code an ordinary control
    break report. However, I am looking for something better.

    Hi Jenna_Fire,
    According to your description, you have a matrix contains total for each group on each level. Now your requirement is, when you click on any number (data field or total), it will go to the detail report which returns all the detail information of the people
    within the group scope. For example, if you click on the total of Active users in United States, it will return the detail information of Active users in New York and Texas. Right?
    In this scenario, we should set the parameter (@Country, @State, @City) allow multiple values in both main and detail report. And in Default Value (@Country, @State, @City), query out all distinct values. In the textbox which contains
    those total values, when set use these parameters to run the report, we only need to pass the parameters of parent groups. For example, if we click on the total of Active users in New York, we only need to pass Country, State, Status to detail report, and
    in the detail report, the City parameter will use all distinct values (Default Values) because we don't pass the City parameter. We have tested this case with sample data in our local environment. Here are steps and screenshots for your reference:
    1. Create parameter Country, State, City and Status in both main report and detail report. Set both Available Value and Default Value get values from query (Create a dataset for each parameter, use "select distinct [column] from [table]" as query). Set allow
    multiple values for parameter Country, State and City in both reports.
    2. In corresponding textbox, pass appropriate parameters in go to report Action.
    4. Filter data in detail report (in where clause or using filters).
    5. Save and preview. It looks like below:
    Reference:
    Using Parameters to Connect to Other Reports
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Is it possible to display the document link for each record  in Report ?

    Hi,
         Is it possible to display the document or Image link for each master record in the Report  with the help of RSA1->Document->Master Data.
    Usefull answers are really helpfull.
    Advance Thanks for the userful answers.
    Regards,
    MRC.

    Hi  JAYASHREE PARASMAL ,
          Thanks for your valuable answers.
          Now i got the document in my Report,while executing the report through query designer as per your suggestion done on Setting Tab option.
          But i can't able to get the same thing,while i executing the Repory through WAD.
          What setting i need follow in the WAD for getting the same thing.
          Kindly give your suggestion to get the document in my Report,while i am executing through my WAD.
          Once again thanks for your helpful answer and awaiting for your suggestion.
    Regards,
    MRC.

  • How can I display different error bars for each point on a scatter graph?

    I have a scatter chart in Numbers and I need to add error bars to the points along both the x and y axes, however, the size of the error bars for each point need to be of different sizes. Is there a way to accomplish this or is there some kind of work around to acheieve a similar result? So far the only way I can find to add error bars only allows a standard amount for each point.

    I found the answer here https://discussions.apple.com/message/16440653#16441393

  • How can I get ITUNES to display manually added artwork for each song regardless of the album name?

    I have been manually adding artwork to my songs. When I click the Show Artwork check box, it doesn't show the cover art. For example some greatest hits albums have different cover art per track. ITUNES picks one of the cover art and shows it for the entire album grouping.
    Anyway around this? I want the added cover art to display per song.

    The artwork of each individual track does display during playback, in the small thumbnail at the top of the iTunes window, or at the left of the MiniPlayer control (opens by clicking the thumbnail), or the larger artwork panel that is shown if you click on the Show Large Artwork control in the MiniPlayer. It should also display on any iPod or iOS Now Playing view.
    The Up Next list uses the album art (usually cover of the first track) for everything from the same album, which is perhaps a shame, although in general one artwork per album makes sense.
    tt2

  • Displaying data in chart for each iteration of FOR loop

    Hi Flex experts,
    I'm coding an Actionscript routine that has a series of
    complex calculations within a for loop. I would like to display
    some of the calculation results in a Flex chart at the end of each
    iteration of the loop. Thus far, I can only get the chart to
    display the results from the last iteration, but not any of the
    preceding iterations.
    Any tips or pointers would be greatly appreciated.
    Thanks,
    Dean

    Please have look at callLater method. You can call your
    chart-updating method thru callLater and that might help.
    Otherwise, can you share some of your code in the loop?
    ATTA

  • How to display different subtotal text for each group in alv report

    Hi,
    i need to display subtotal text as "totals of  Mat1"  for material numbers 1 to 10 as group1 and again i need to display subtotal text as " totals of Mat2" for material number 11 to 20.
    group 2.
    Please help me asap.

    You can create subtotals by columns.
    You would need extra column to group the materials( 1 to 10 GROUP1 20 to 30 GROUP2 by example)  and use this column for subtotals

  • Display of total ansal for each org unit using the sdepth (depth level)

    Hi all,
         We have a requirment in which we will be getting all the active employees related to a perticular org unit then  For every PERNR,we need to  find (as of run date) the org ID on PA0001- ORGEH and total the dollars at the org unit ID level started at the org unit defined on field ORGID and only as far down as defined on selection screen field SDEPTH.
           Example: $10k under Dept D, $9k under Dept C, $8k under Dept B and $7k under Dept A. If field SDEPTH was set to blank, each department would be assigned the above stated budget amount. If SDEPTH was set to 3, the budget would stop at the third level down the org chain (assuming A is the org unit defined in field ORGID, org unit C would be the third org down the chain). The total budget at level C would incorporate any dollars calculated from employees that fall below this org unit in the structure. In this example, the total for org unit C would be $19k, B would remain at 8k and A at 7k.
        We are making use of the FM :  RH_STRUC_GET  to get all pernr numbers related to a perticular org unit and sub level units separately and also RP_ANSAL_FROM_WAGETYPES for getting ansal based on the wahge types (multiple wage types can be provided by the user on the selection screen) .
    Please let me know how can i achive the requirement.
    Regards,
    Zareena.
    Edited by: zareena molla on May 20, 2008 7:14 AM

    Thanks Dan.
    Appreciate if you can help on the below points as well.
    1. As part of divestiture/transfer postings: The system is reversing some Previous Year(PY) equity accounts into themselves. How can we get the system to eliminate them by posting to COI Clearing account. Basically, we dont want the PY accounts to be touched?
    For the Retained earnings - PY account, the system is actually posting to COI clearing account.
    These PY accounts are part of some scopes for equitization.
    Is there any link between the "balance carry forward" - list of items table and the divestiture postings?
    Does the system check this table while posting/reversing the equity(PY) accounts?
    2. I want to understand the sequence in which the system posts the documents at the old parent and new parent (group) level.
    The same activity number is there  for Total Divestiture, total transfer documents posted at new parent level and total divestiture document posted at old parent level.
    Does the system follow bottom up approach? Thereby creating total divestiture document at old parent level.
    Followed by documents at upper level (new parent level)
    Also , at the upper level(new parent level), does it post documents in the way they are shown in the log? (We havent changed the default sequence maintained in UCWB - COI settings). so it will post first consolidation doc, followed by total divestiture, followed by total transfer docs at the new parent level?
    Is this the reason for the double value being posted at new parent for equity holding data?
    Will studying the statistical items (corresponding to eliminated equity holding items) be relevant here to understand why at upper level there is double the value being posted by system?
    Thanks.

  • Table of content, I want to display just the image for each chapter and the name of the chapter. my book is not landscape format but each time I draging a picture into a specific chapter it duplicate it to all chapters why?

    table of content in a landscape orientation.
    I want to have in my table of content only image and the name of the chapter which is each to do.
    my problem when I am draging an image to each chapter it copied it to all chapter although I am marking only the specifc chapter.
    why? how can i overcome it?

    Are you using Microsoft word?  Microsoft thinks the users are idiots. They put up a lot of pointless messages that annoy & worry users.  I have seen this message from Microsoft word.  It's annoying.
    As BDaqua points out...
    When you copy information via edit > copy,  command + c, edit > cut, or command +x, you place the information on the clipboard. When you paste information, edit > paste or command + v, you copy information from the clipboard to your data file.
    If you edit > cut or command + x and you do not paste the information and you quite Word, you could be loosing information.  Microsoft is very worried about this. When you quite Word, Microsoft checks if there is information on the clipboard & if so, Microsoft puts out this message.
    You should be saving your work more than once a day. I'd save every 5 minutes.  command + s does a save.
    Robert

  • Display overlap of period for each record.

    Hi All,
    I have a report in which I have 2 date columns(start date say 'a' and end date say 'b'). In my prompts i have selected a time range. My start date and end date will fall in this time range.
    Time range is 1/5/2009 to 3/16/2009
    Start Date     End Date          1/5/2009     1/12/2009     1/19/2009     1/26/2009     2/2/2009     2/9/2009     2/16/2009     2/23/2009     3/2/2009     3/9/2009     3/16/2009
    1/19/2009     6/8/2009          0     0     1     1     1     1     1     1     1     1     1
    4/20/2009     5/25/2009          0     0     0     0     0     0     0     0     0     0     0
    3/16/2009     5/18/2009          0     0     0     0     0     0     0     0     0     0     1
    1/19/2009     6/8/2009          0     0     1     1     1     1     1     1     1     1     1
    1/5/2009     3/8/2009          1     1     1     1     1     1     1     1     1     0     0
    3/16/2009     5/18/2009          0     0     0     0     0     0     0     0     0     0     1
    As shown above I need to stamp '0' if the week(horizontal row) doesn't fall in the a-b time range and '1' if it falls.
    How can I achieve this .
    Thanks and regards,

    Very tricky but it can be done.
    1- create view which returns all the week start date between the prompts (if you are on oracle play around with a select againts the ALL_OBJECTS).
    2 Bring this view as a dimension in your RPD and create a dummy join againts your fact table.
    3. In your report use a case when to determine if your period is valid or not.
    4. put it in a pivot table.
    regards
    John
    http://obiee101.blogspot.com/
    Edited by: John Minkjan on Jun 26, 2009 6:03 AM

  • Display error messages for each material

    Hi All,
    I am using a BAPI which gives errors in return table.I am executing this BAPI for several materials in a LOOP.I need to display the error messages for each of these materials as shown below:
    Material 1:
    error1
    error2
    Material 2:
    error 1
    error 2.
    What is the best way to display this?Also plz let me know how to use REUSE_ALV_HIERSEQ_LIST_DISPLAY?
    Thanks,
    Rakesh.

    I did the same thing in the below code, go thru it and check it.
    * calling the BAPI to update the Asset Master AS02
      loop at it_final into is_final.
    * If updating of floor area only
        if p_farea = 'X'.
    * passing new area value to the BAPI
          is_realestate-area     = is_final-grufl.
          is_realestatex-area    = 'X'.
          call function 'BAPI_FIXEDASSET_CHANGE'
               exporting
                    companycode = is_final-bukrs
                    asset       = is_final-anln1
                    subnumber   = is_final-anln2
                    realestate  = is_realestate
                    realestatex = is_realestatex
               importing
                    return      = it_return.
    * If Asset Master is changed with out any errors
          read table it_return with key type = 'E'.
          if sy-subrc = 0.
            flag = ' '.
          else.
            flag = 'X'.
    * Call the COMMIT BAPI
            call function 'BAPI_TRANSACTION_COMMIT'
                 exporting
                      wait = 'X'.
            wait up to 2 seconds.
          endif.
    * If the Asset Master is changed with out any errors
          if flag = 'X'.
            read table it_output into is_output with key
                                      bukrs = is_final-bukrs
                                      anln1 = is_final-anln1
                                      anln2 = is_final-anln2
                                      binary search.
            if sy-subrc = 0.
    *          is_output-c_icon  = c_green.
              is_output-grufl_n = is_final-grufl.
              is_output-message = it_return-message.
    * Modify the output internal table with the changed new values
              modify it_output from is_output
                               transporting grufl_n message
                               where bukrs = is_output-bukrs
                                 and anln1 = is_output-anln1
                                 and anln2 = is_output-anln2.
            endif.
          elseif flag = ' '.
            read table it_output into is_output with key
                                      bukrs = is_final-bukrs
                                      anln1 = is_final-anln1
                                      anln2 = is_final-anln2
                                      binary search.
            if sy-subrc = 0.
    *          is_output-c_icon  = c_red.
              is_output-grufl_n = is_realestate-area.
              is_output-message = it_return-message.
    * Modify the output internal table with the changed new values
              modify it_output from is_output
                               transporting grufl_n message
                               where bukrs = is_output-bukrs
                                 and anln1 = is_output-anln1
                                 and anln2 = is_output-anln2.
            endif.
          endif.
        endif.
    * If updating of lease commencement date only
        if p_ldate = 'X'.
    * Passing new lease start date value to the BAPI
          is_leasing-start_date  = is_final-leabg.
          is_leasingx-start_date = 'X'.
    * Call the BAPI to change the Asset Master
          call function 'BAPI_FIXEDASSET_CHANGE'
               exporting
                    companycode = is_final-bukrs
                    asset       = is_final-anln1
                    subnumber   = is_final-anln2
                    leasing     = is_leasing
                    leasingx    = is_leasingx
               importing
                    return      = it_return.
    * If Asset Master is changed with out any errors
          read table it_return with key type = 'E'.
          if sy-subrc = 0.
            flag = ' '.
          else.
            flag = 'X'.
    * Call the COMMIT BAPI
            call function 'BAPI_TRANSACTION_COMMIT'
                 exporting
                      wait = 'X'.
            wait up to 2 seconds.
          endif.
    * If the Asset Master is changed with out any errors
          if flag = 'X'.
            read table it_output into is_output with key
                                      bukrs = is_final-bukrs
                                      anln1 = is_final-anln1
                                      anln2 = is_final-anln2
                                      binary search.
            if sy-subrc = 0.
    *          is_output-c_icon  = c_green.
              is_output-leabg_n = is_final-leabg.
              is_output-message = it_return-message.
    * Modify the output internal table with the changed new values
              modify it_output from is_output
                               transporting leabg_n message
                               where bukrs = is_output-bukrs
                                 and anln1 = is_output-anln1
                                 and anln2 = is_output-anln2.
            endif.
          elseif flag = ' '.
            read table it_output into is_output with key
                                      bukrs = is_final-bukrs
                                      anln1 = is_final-anln1
                                      anln2 = is_final-anln2
                                      binary search.
            if sy-subrc = 0.
    *          is_output-c_icon  = c_red.
              is_output-leabg_n = is_leasing-start_date.
              is_output-message = it_return-message.
    * Modify the output internal table with the changed new values
              modify it_output from is_output
                               transporting leabg_n message
                               where bukrs = is_output-bukrs
                                 and anln1 = is_output-anln1
                                 and anln2 = is_output-anln2.
            endif.
          endif.
        endif.
        clear : is_final, is_realestate, is_leasing,
                it_return, flag , is_output.
      endloop.
    * Display the report out with old and new values
      PERFORM output_report.
    *&      Form  output_report
    *       text
    *  -->  p1        text
    *  <--  p2        text
    *FORM output_report.
    *  DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
    *         is_layout TYPE slis_layout_alv.
    ** Sub routine for filling the field catalog
    *  IF it_fieldcat[] IS INITIAL.
    *    PERFORM field_fill USING it_fieldcat.
    *  ENDIF.
    ** Sub routine to set the layout
    *  PERFORM set_layout USING is_layout.
    ** Function module to display the data in ALV format
    *  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    *       EXPORTING
    *            i_callback_program = l_repid
    *            it_fieldcat        = it_fieldcat
    *            is_layout          = is_layout
    *       TABLES
    *            t_outtab           = it_output
    *       EXCEPTIONS
    *            program_error      = 1
    *            OTHERS             = 2.
    *  IF sy-subrc <> 0.
    *    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    *  ENDIF.
    *ENDFORM.                    " output_report
    *&      Form  field_fill
    *       text
    *      -->P_IT_FIELDCAT  text
    *FORM field_fill USING pt_fieldcat TYPE slis_t_fieldcat_alv.
    *  DATA : ls_fieldcat TYPE slis_fieldcat_alv,
    *         pos TYPE i VALUE 1.
    *  ls_fieldcat-col_pos       = pos.
    *  ls_fieldcat-fieldname     = 'C_ICON'.
    *  ls_fieldcat-seltext_m     = 'Change Status'.
    *  ls_fieldcat-tabname       = 'IT_OUTPUT'.
    *  APPEND ls_fieldcat TO pt_fieldcat.
    *  CLEAR ls_fieldcat.
    *  pos = pos + 1.
    *  ls_fieldcat-col_pos       = pos.
    *  ls_fieldcat-fieldname     = 'BUKRS'.
    *  ls_fieldcat-ref_fieldname = 'BUKRS'.
    *  ls_fieldcat-ref_tabname   = 'ANLA'.
    *  APPEND ls_fieldcat TO pt_fieldcat.
    *  CLEAR ls_fieldcat.
    *  pos = pos + 1.
    *  ls_fieldcat-col_pos       = pos.
    *  ls_fieldcat-fieldname     = 'ANLN1'.
    *  ls_fieldcat-ref_fieldname = 'ANLN1'.
    *  ls_fieldcat-ref_tabname   = 'ANLA'.
    *  APPEND ls_fieldcat TO pt_fieldcat.
    *  CLEAR ls_fieldcat.
    *  pos = pos + 1.
    *  ls_fieldcat-col_pos       = pos.
    *  ls_fieldcat-fieldname     = 'ANLN2'.
    *  ls_fieldcat-ref_fieldname = 'ANLN2'.
    *  ls_fieldcat-ref_tabname   = 'ANLA'.
    *  APPEND ls_fieldcat TO pt_fieldcat.
    *  CLEAR ls_fieldcat.
    *  pos = pos + 1.
    *  IF p_farea = 'X'.
    *    ls_fieldcat-col_pos       = pos.
    *    ls_fieldcat-fieldname     = 'GRUFL'.
    *    ls_fieldcat-ref_fieldname = 'GRUFL'.
    *    ls_fieldcat-ref_tabname   = 'ANLA'.
    *    APPEND ls_fieldcat TO pt_fieldcat.
    *    CLEAR ls_fieldcat.
    *    pos = pos + 1.
    *    ls_fieldcat-col_pos       = pos.
    *    ls_fieldcat-fieldname     = 'GRUFL_N'.
    *    ls_fieldcat-seltext_l     = 'New Floor Area'.
    *    ls_fieldcat-tabname       = 'IT_OUTPUT'.
    *    APPEND ls_fieldcat TO pt_fieldcat.
    *    CLEAR ls_fieldcat.
    *    pos = pos + 1.
    *  ENDIF.
    *  IF p_ldate = 'X'.
    *    ls_fieldcat-col_pos       = pos.
    *    ls_fieldcat-fieldname     = 'LEABG'.
    *    ls_fieldcat-ref_fieldname = 'LEABG'.
    *    ls_fieldcat-ref_tabname   = 'ANLA'.
    *    APPEND ls_fieldcat TO pt_fieldcat.
    *    CLEAR ls_fieldcat.
    *    pos = pos + 1.
    *    ls_fieldcat-col_pos       = pos.
    *    ls_fieldcat-fieldname     = 'LEABG_N'.
    *    ls_fieldcat-seltext_l     = 'New Lease St.Date'.
    *    ls_fieldcat-tabname       = 'IT_OUTPUT'.
    *    APPEND ls_fieldcat TO pt_fieldcat.
    *    CLEAR ls_fieldcat.
    *    pos = pos + 1.
    *  ENDIF.
    *  ls_fieldcat-col_pos       = pos.
    *  ls_fieldcat-fieldname     = 'MESSAGE'.
    *  ls_fieldcat-seltext_l     = 'Status Message'.
    *  ls_fieldcat-tabname       = 'IT_OUTPUT'.
    *  APPEND ls_fieldcat TO pt_fieldcat.
    *  CLEAR ls_fieldcat.
    *  pos = pos + 1.
    *ENDFORM.                    " field_fill
    Regards
    Gopi

  • ALv for each pernr

    Hi all,
      Please help me out. I want to display a alv report for each pernr. what I mean by this is like for each pernr my report should generate one new alv block completly.
    like for each alv block my whole alv should have a new block. the header changes just a little bit.
    I hope I made myself clear to you all.
    Reward points for all useful ans.

    For this requirement, blocke ALV must be used,
    Plesae see the following code....
    BLOCKED ALV REPORT.
    REPORT ZCS_PRG21.
    TABLES: LFA1,EKKO.
    DATA: BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    ORT01 LIKE LFA1-ORT01,
    LAND1 LIKE LFA1-LAND1,
    REGIO LIKE LFA1-REGIO,
    END OF ITAB.
    DATA: BEGIN OF JTAB OCCURS 0,
    LIFNR LIKE EKKO-LIFNR,
    EBELN LIKE EKKO-EBELN,
    BUKRS LIKE EKKO-BUKRS,
    BSTYP LIKE EKKO-BSTYP,
    EKORG LIKE EKKO-EKORG,
    BSART LIKE EKKO-BSART,
    END OF JTAB.
    SELECT * FROM LFA1 INTO CORRESPONDING FIELDS OF TABLE ITAB UP TO 5 ROWS.
    SELECT * FROM EKKO INTO CORRESPONDING FIELDS OF TABLE JTAB UP TO 5 ROWS.
    TYPE-POOLS: SLIS.
    DATA: LAYOUT TYPE SLIS_LAYOUT_ALV,
    HEADER TYPE SLIS_T_LISTHEADER WITH HEADER LINE,
    FLDCAT1 TYPE SLIS_T_FIELDCAT_ALV,
    FLDCAT2 TYPE SLIS_T_FIELDCAT_ALV,
    EVE1 TYPE SLIS_T_EVENT WITH HEADER LINE,
    EVE2 TYPE SLIS_T_EVENT WITH HEADER LINE.
    LAYOUT-ZEBRA = 'X'.
    LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    LAYOUT-WINDOW_TITLEBAR = 'BLOCKED ALV'.
    EVE2-NAME = 'TOP_OF_PAGE'.
    EVE2-FORM = 'TOP_OF_PAGE1'.
    APPEND EVE2.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    I_LIST_TYPE = 0
    IMPORTING
    ET_EVENTS = EVE1[]
    EXCEPTIONS
    LIST_TYPE_WRONG = 1
    OTHERS = 2
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE EVE1 WITH KEY NAME = 'TOP_OF_PAGE'.
    EVE1-FORM = 'TOP_OF_PAGE'.
    MODIFY EVE1 TRANSPORTING FORM WHERE NAME = 'TOP_OF_PAGE'.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    IT_EXCLUDING =
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'ITAB' “it must be in capital letters, otherwise gives “no-fieldcatalog” is found
    I_STRUCTURE_NAME =
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_INCLNAME = SY-REPID
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE =
    CHANGING
    CT_FIELDCAT = FLDCAT1
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FLDCAT1
    I_TABNAME = 'ITAB'
    IT_EVENTS = EVE1[]
    IT_SORT =
    I_TEXT = ' '
    TABLES
    T_OUTTAB = ITAB
    EXCEPTIONS
    PROGRAM_ERROR = 1
    MAXIMUM_OF_APPENDS_REACHED = 2
    OTHERS = 3
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    I_PROGRAM_NAME = SY-REPID
    I_INTERNAL_TABNAME = 'JTAB'
    I_STRUCTURE_NAME =
    I_CLIENT_NEVER_DISPLAY = 'X'
    I_INCLNAME = SY-REPID
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE =
    CHANGING
    CT_FIELDCAT = FLDCAT2
    EXCEPTIONS
    INCONSISTENT_INTERFACE = 1
    PROGRAM_ERROR = 2
    OTHERS = 3
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = FLDCAT2
    I_TABNAME = 'JTAB'
    IT_EVENTS = EVE2[]
    IT_SORT =
    I_TEXT = ' '
    TABLES
    T_OUTTAB = JTAB
    EXCEPTIONS
    PROGRAM_ERROR = 1
    MAXIMUM_OF_APPENDS_REACHED = 2
    OTHERS = 3
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    IS_PRINT =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM TOP_OF_PAGE.
    REFRESH HEADER.
    HEADER-TYP = 'H'.
    HEADER-INFO = 'VENDOR DETAILS'.
    APPEND HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEADER[]
    I_LOGO =
    I_END_OF_LIST_GRID =
    I_ALV_FORM =
    ENDFORM.
    FORM TOP_OF_PAGE1.
    REFRESH HEADER.
    HEADER-TYP = 'H'.
    HEADER-INFO = 'PURCHASE DOCUMENTS DETAILS'.
    APPEND HEADER.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEADER[]
    I_LOGO =
    I_END_OF_LIST_GRID =
    I_ALV_FORM =
    ENDFORM.

  • Different chart for each level hierarchy in report designer

    Is there a way to display a different chart for each level of the hierarchy in a report designer? I want a different chart for each level. That is, if there are 5 nodes in level 4, I want 5 different nodes. Is there a way to do this? I tried to insert the chart inside a cell in each level, but it shows the same chart for all nodes instead of a different chart for each node.

    Has any one tried using a context sensitive chart?  According to this, it seems like this should be possible, but I am having no luck.
    http://help.sap.com/saphelp_nw70/helpdata/en/47/a99a0a5fdb0985e10000000a42189c/frameset.htm

  • On the web how can I check the user role to display the form suitable for this role i

    Hello
    How can I check on the web the use role to display the a form for each role
    Example
    If the admin login I display admin_form.fmb and if user login I display
    user_form.fmb
    Thankx
    Tamer

    In my forms I hide tab pages according the role using something like the following script in the WHEN_NEW_FORM_INSTANCE trigger.
    So the user can not navigate to tabs which are vorbiden by his role.
    CURSOR users_roles_cur IS SELECT granted_role FROM user_role_privs
    WHERE username=(SELECT user FROM dual);
    user_roles_rec users_roles_cur%ROWTYPE;
    IF users_roles_cur%ISOPEN
    THEN
    CLOSE users_roles_cur;
    END IF;
    OPEN users_roles_cur;
    LOOP
    FETCH users_roles_cur INTO user_roles_rec;
    EXIT WHEN users_roles_cur%NOTFOUND;
    MESSAGE (user_roles_rec.granted_role);
    PAUSE;
    IF RTRIM(user_roles_rec.granted_role,' ') = 'BLA-BLA'
    THEN
    tb_pg_id := FIND_TAB_PAGE('activity');
    IF GET_TAB_PAGE_PROPERTY(tb_pg_id, visible) = 'FALSE' THEN
    SET_TAB_PAGE_PROPERTY(tb_pg_id, visible, property_true);
    END IF;
    END IF;
    END LOOP;
    CLOSE users_roles_cur;
    Other solution may be is to use an initial form which only will detect the user role and run the appropriate form.
    Other solutions are also possible.
    Joseph

  • Using IF in a for each loop which is grouped by two fields

    Hi ,
    My requirement is to filter the Payment records ,based on the parameter input date and also group by based on two of the Fields and calculate the sum of the payment Amounts.
    I have created a for each loop with the group by first on one field and then the other field.
    My question is where should I put my IF condition based on parameter dates ?
    If condition would be if Created = Date Parameter .CAn anybody help where I should insert the IF condition in the below code.
    Ex:
    <?for-each-group:Payments;./Created?>
    Display Date : Created
    <?for-each-group:current-group();./CreatedByName?>
    Table      :      CreatedByName     count of Payments           Sum of Amount
    <?end for-each-group?>
    <?end for-each-group?>
    thanks.

    Hi ,
    I got the result by putting the filter in [ ]
    Ex:
    <?for-each-group:Payments[PaymentStatus != 'New';./CreatedDate?>
    here I am filtering the records based on [Payment Status != New] and then group by Created Date .
    Similarly I can new another condition as well in the same statement
    <?for-each-group:Payments[PaymentStatus != 'New'][PaymentMethod != 'Cash'];./CreatedDate?>
    Regards.

Maybe you are looking for