ALV, sums, more than one WAERS, WAERS is not shown

Hello,
I have a problem:
I have a table which contains WRBTR AND WAERS.
There are more than one possible waers.
So  I have a table for example:
100   EUR
1000 EUR
500  EUR
700  USD
800  EUR
The sum line looks like:
2600 EUR
700
The second WAERS is missing.
Why does the report show the EUR and not the USD?
I want both WAERS.
Any idea?

Hi,
Check this code it works fine.
DATA : BEGIN OF WA_JESUS,
         V_NO TYPE I,
         V_M1(3) TYPE c,
       END OF WA_JESUS.
DATA :  IT_JESUS LIKE HASHED TABLE OF WA_JESUS WITH HEADER LINE WITH UNIQUE KEY V_m1.
IT_JESUS-V_NO   = 700.
IT_JESUS-V_M1 = 'USD' .
COLLECT IT_JESUS.
IT_JESUS-V_NO   = 800.
IT_JESUS-V_M1 = 'EUR' .
COLLECT IT_JESUS.
IT_JESUS-V_NO   = 700.
IT_JESUS-V_M1 = 'EUR' .
COLLECT IT_JESUS.
LOOP AT IT_JESUS.
WRITE : / IT_JESUS-V_NO,
          IT_JESUS-V_M1.
ENDLOOP.
Thanks,
Reward If Helpful.

Similar Messages

  • RegionRenderer encodeAll The region component with id: pt1:r1 has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance.

    Hi,
    I am using JDEV 11.1.2.1.0
    I am getting the following error :-
    <RegionRenderer> <encodeAll> The region component with id: pt1:r1 has detected a page fragment with multiple root components. Fragments with more than one root component may not display correctly in a region and may have a negative impact on performance. It is recommended that you restructure the page fragment to have a single root component.
    Piece of code is for region is:-
       <f:facet name="second">
                                                <af:panelStretchLayout id="pa1"
                                                                       binding="#{backingBeanScope.Assign.pa1}">
                                                    <f:facet name="center">
                                                        <af:region value="#{bindings.tfdAssignGraph1.regionModel}" id="r1"
                                                                   binding="#{backingBeanScope.Assign.r1}"/>
                                                    </f:facet>
                                                </af:panelStretchLayout>
                                            </f:facet>
    How do I resolve it ?
    Thanks,

    Hi,
    I see at least 3 errors
    1. <RegionRenderer> <encodeAll> The region component with id: pt1:r1 has detected a page fragment with multiple root components.
    the page fragment should only have a single component under the jsp:root tag. If you see more than one, wrap them in e.g. an af:panelGroupLayout or af:group component
    2. SAPFunction.jspx/.xml" has an invalid character ".".
    check the document (you can open it in JDeveloper if the customization was a seeded one. Seems that editing this file smething has gone bad
    3. The expression "#{bindings..regionModel}" (that was specified for the RegionModel "value" attribute of the region component with id "pePanel") evaluated to null.
    "pageeditorpanel" does seem to be missing in the PageDef file of the page holding the region
    Frank

  • At Line-selection in ALV for more than one field.

    How to use At Line-selection in ALV Basic Report where there are more than one field for displaying Secondary Lists.
    Ex: In Basic List there are 3 fields Volume_m Volume_y and Volume_i.When i click on any of the field i need to display the secondary list for that particular field.

    Hi Pavan,
                  Use User-command event of ALV.
    Refer this code :
    form BUILD_EVENTCAT  using    p_i_eventcat TYPE SLIS_T_EVENT.
    DATA: I_EVENT TYPE SLIS_ALV_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
       I_LIST_TYPE           = 0
    IMPORTING
       ET_EVENTS             = P_I_EVENTCAT
    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.
      clear I_event.
      read table p_i_eventcat with key name = slis_ev_user_command into I_event.
      if sy-subrc = 0.
        move 'USER_COMMAND' to I_event-form.
        append I_event to p_i_eventcat.
      endif.
    form USER_COMMAND' using p_ucomm type sy-ucomm
                               p_selfield type slis_selfield.
      case p_ucomm.
      WHEN '&IC1'.                       "&IC1 is the Fcode for double click
    Use  P_ELFIELD-VALUE  for further processing . this  will contain the value on which u will double click
    endcase.
    Reward points if helpful.
    Regards,
    Hemant

  • To create an alv, using more than one table

    Hello,
    I'm new to abap. I want to create an alv. I have to use two  internal table, first ( say ibkpf ) as a header and display corresponding detail from another internal table ( say ibseg ).
    I intend to use
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' in my program.
    Can this be done and if yes how?
    Thanks.
    Ushma

    Hi ,
    Check the following code...
    *REPORT  zdemo_alvgrid                 .
    TABLES:     EKKO.
    TYPE-POOLS: SLIS.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF T_EKKO,
      EBELN TYPE EKPO-EBELN,
      EBELP TYPE EKPO-EBELP,
      STATU TYPE EKPO-STATU,
      AEDAT TYPE EKPO-AEDAT,
      MATNR TYPE EKPO-MATNR,
      MENGE TYPE EKPO-MENGE,
      MEINS TYPE EKPO-MEINS,
      NETPR TYPE EKPO-NETPR,
      PEINH TYPE EKPO-PEINH,
      LINE_COLOR(4) TYPE C,     "Used to store row color attributes
    END OF T_EKKO.
    DATA: IT_EKKO TYPE STANDARD TABLE OF T_EKKO INITIAL SIZE 0,
          WA_EKKO TYPE T_EKKO.
    *ALV data declarations
    DATA: FIELDCATALOG TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          GD_TAB_GROUP TYPE SLIS_T_SP_GROUP_ALV,
          GD_LAYOUT    TYPE SLIS_LAYOUT_ALV,
          GD_REPID     LIKE SY-REPID.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM DATA_RETRIEVAL.
    PERFORM BUILD_FIELDCATALOG.
    PERFORM BUILD_LAYOUT.
    PERFORM DISPLAY_ALV_REPORT.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM BUILD_FIELDCATALOG.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you  more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
                  I.e. Field type may be required in-order for
                       the 'TOTAL' function to work.
      FIELDCATALOG-FIELDNAME   = 'EBELN'.
      FIELDCATALOG-SELTEXT_M   = 'Purchase Order'.
      FIELDCATALOG-COL_POS     = 0.
      FIELDCATALOG-OUTPUTLEN   = 10.
      FIELDCATALOG-EMPHASIZE   = 'X'.
      FIELDCATALOG-KEY         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = 'X'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'EBELP'.
      FIELDCATALOG-SELTEXT_M   = 'PO Item'.
      FIELDCATALOG-COL_POS     = 1.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'STATU'.
      FIELDCATALOG-SELTEXT_M   = 'Status'.
      FIELDCATALOG-COL_POS     = 2.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'AEDAT'.
      FIELDCATALOG-SELTEXT_M   = 'Item change date'.
      FIELDCATALOG-COL_POS     = 3.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'MATNR'.
      FIELDCATALOG-SELTEXT_M   = 'Material Number'.
      FIELDCATALOG-COL_POS     = 4.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'MENGE'.
      FIELDCATALOG-SELTEXT_M   = 'PO quantity'.
      FIELDCATALOG-COL_POS     = 5.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'MEINS'.
      FIELDCATALOG-SELTEXT_M   = 'Order Unit'.
      FIELDCATALOG-COL_POS     = 6.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'NETPR'.
      FIELDCATALOG-SELTEXT_M   = 'Net Price'.
      FIELDCATALOG-COL_POS     = 7.
      FIELDCATALOG-OUTPUTLEN   = 15.
      FIELDCATALOG-DATATYPE     = 'CURR'.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
      FIELDCATALOG-FIELDNAME   = 'PEINH'.
      FIELDCATALOG-SELTEXT_M   = 'Price Unit'.
      FIELDCATALOG-COL_POS     = 8.
      APPEND FIELDCATALOG TO FIELDCATALOG.
      CLEAR  FIELDCATALOG.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM BUILD_LAYOUT.
      GD_LAYOUT-NO_INPUT          = 'X'.
      GD_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      GD_LAYOUT-TOTALS_TEXT       = 'Totals'(201).
    Set layout field for row attributes(i.e. color)
      GD_LAYOUT-INFO_FIELDNAME =      'LINE_COLOR'.
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM DISPLAY_ALV_REPORT.
      GD_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM      = GD_REPID
               i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
               i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                IS_LAYOUT               = GD_LAYOUT
                IT_FIELDCAT             = FIELDCATALOG[]
               it_special_groups       = gd_tabgroup
               IT_EVENTS                = GT_XEVENTS
                I_SAVE                  = 'X'
               is_variant              = z_template
           TABLES
                T_OUTTAB                = IT_EKKO
           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.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM DATA_RETRIEVAL.
    DATA: LD_COLOR(1) TYPE C.
    SELECT EBELN EBELP STATU AEDAT MATNR MENGE MEINS NETPR PEINH
    UP TO 10 ROWS
      FROM EKPO
      INTO TABLE IT_EKKO.
    *Populate field with color attributes
    LOOP AT IT_EKKO INTO WA_EKKO.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
      LD_COLOR = LD_COLOR + 1.
    Only 7 colours so need to reset color value
      IF LD_COLOR = 8.
        LD_COLOR = 1.
      ENDIF.
      CONCATENATE 'C' LD_COLOR '10' INTO WA_EKKO-LINE_COLOR.
    wa_ekko-line_color = 'C410'.
      MODIFY IT_EKKO FROM WA_EKKO.
    ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Apr 10, 2008 5:30 PM

  • Can a standard Adobe ID Suite be installed on more than one computer? If not; how can an educator buy a second seat on another computer with the same educators account?

    Adobe requires an ID account to install software on a single computer. However I have a portable Mac as well as a desktop system. Can I install another copy with the monthly paid installation on the second computer or do I need to buy another seat with the same account?
    J-GM

    Hey tferm78!
    I have a couple of options for you to consider. First, you may simply want to authorize all of your computers for your iTunes account and turn on Automatic Downloads, so that when you download something on one computer, it will automatically download to other computers:
    iTunes Store: Authorize or deauthorize your Mac or PC
    http://support.apple.com/kb/ht1420
    iTunes Store: How to enable Automatic Downloads
    http://support.apple.com/kb/ht4539
    You could also look into iTunes Match, a service that would seamlessly link all of your iTunes libraries:
    Apple - iTunes - Match
    http://www.apple.com/itunes/itunes-match/
    Lastly, here is an article that will help you move your library from one computer to another, if you so desire:
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/ht4527
    Thanks for using the Apple Support Communities. Have a good one!
    -Braden

  • Using more than one keyword don't not work to filter pictures.

    hi,
    i am new to aperture and currently try to filter images with keywords. i have for instance a picture of a dog in my china projects. the keywords attached to the dog picture are: "Animals, Dogs, China, Xian. all keywords capitalized and separated by a comma. if i type Dogs or animals, or any of the keyword attached to it individually its works. i will get the picture. but if i enter two keywords, i.e., Animals, Dogs, I don't get any return. nothing.
    of course, i can open the keyword field, and check Animals and Dogs and it will bring the pictures. But does someone know why typing several keywords (same capitalization, spelling, etc) attached to a picture does not bring result in finding the picture.
    thanks for your help

    There should be a button to the left of the search box which will open a window of search options. One of the options is Keywords and it allows you to check the keywords you would like to search for. You can have it include images which have all the selected keywords or any of the selected keywords. Here is an image of that box:
    http://www.ianlaruephotography.com/picture2.png
    Hope that helps!

  • Fragments with more than one root component may not display correctly ...

    Using JDev 11.1.1.3; have a page fragment that contains a layout component for the content, but also an af:popup definition as child to the root tag of the fragment. I get the above design-time warning; wondering whether this is customarily ignored when the secondary components are popups, or whether there is a better way of defining the popup which needs to package with a fragment ?
    Thanks,

    I get it in the structure pane along with the other Warnings (eg: Reference selectedRow not found).
    <jsp:root ...>
    <c:set ...>
    <af:panelStretchLayout ...>
    <af:popup ...>
    </jsp:root>
    ... would put 1 warning in the Structure pane alerting developer to the fact that the popup isn't expected.
    Thanks for the assistance.

  • Can you put music in more than one genre without creating a new genre?

    My question is more specific than the subject. Is it possible to put albums and music in more than one genre category and not have it make a new genre in itself?
    (I view my music as a list, column browser on top. Genre is the left-most category and I narrow down what I'm looking for from there, left to right.)
    For example, I would like to have one album (Kundun) in both the "classical" genre category AND the "soundtrack" category. When I highlight the album and view the information("info") and at the bottom write "classical, soundtrack" in the genre drop down box, instead of listing the album in both classical and in soundtrack, iTunes instead creates an entirely new genre called "classical, soundtrack." This defeats the purpose, because it now separates it out from the rest of my classical music, or soundtrack music.
    Is there a solution to get what I am looking for? The album shows up in the soundtrack genre, and can show up in the classical genre.
    Thanks.
    Running iTunes version 9.0.1

    iOS devices and Apple TV's will only send the audio to one Airplay speaker at a time. However, iTunes on a computer will send audio to multiple Airplay speakers. With the help of Home Sharing and Apple's free Remote app on an iOS device you can control iTunes as well as the speakers connected to it.

  • Source system contain more than one fold then they are not processed

    when a mail box for a source system contain more than one fold they are not necessarily manage in the right sequence order (FIFO)
    The folders stand for material update flows.

    Hi   XI   Experts,
    I have a problem with source directory of the File Adapter,
    XI system is not reading the files from the source directory in the sequence when there is more than one folder .
    See the below description regarding the same.
    "when a mail box for a source system contain more than one fold they are not necessarily manage in the right sequence order (FIFO)
    The folders stand for material update flows."
    Please update me as soon as possible.
    Regards
    sreenivasulu

  • Can we have more than one Transaction type in Interaction Center in 7.0

    We are currently upgrading from CRM 5.0 to 7.0. We have an Interaction Center that has about 30 transaction types defined in the action boxes that we want to use in the CRM Web UI in 7.0. Is it possible to use more than one Business Activity (Sales) transaction in the WebUI? I see that you can configure them for follow-ups but when I view the Business transaction profile configuration , it only allows me to apply 1 transaction , say 0010 or ZC01.  When I launch the Web UI, I see the transaction say ZC01 in the upper left corner.  We would like to be able to launch the Web UI and the ability to create activities for more than 1 transaction type. Is this possible ?

    Can we pull employee from one trusted system and in the same way can we pull some contractors from other trusted system simultaniously?
    yes you can. In the schedule task you'll have to put your query in such a way that it brings both data.
    Can both trusted systems can be active at the same time pulling two types of users from two trusted systems?
    You have to run both recon in sequential manner so that it can pull correct data for OIM
    Some where i read in doc that only one target system can be designated as trusted system if it as has more than one the recons will not work properly...
    I don't think that it results into issue. But we have to see the sequence mainly. Otherwise it will results into wrong data

  • Can we have more than one trusted system in Oracle Identity Manager?

    Can we have more than one trusted system in Oracle Identity Manager?

    Can we pull employee from one trusted system and in the same way can we pull some contractors from other trusted system simultaniously?
    yes you can. In the schedule task you'll have to put your query in such a way that it brings both data.
    Can both trusted systems can be active at the same time pulling two types of users from two trusted systems?
    You have to run both recon in sequential manner so that it can pull correct data for OIM
    Some where i read in doc that only one target system can be designated as trusted system if it as has more than one the recons will not work properly...
    I don't think that it results into issue. But we have to see the sequence mainly. Otherwise it will results into wrong data

  • Connectivity to more than one ERP

    Hi experts!
    Does anyone know whether CRM 2007 can be connected to more than one ERP?
    Thanks in advance.
    Almudena

    Hi Almudena
    Yes, Certainly CRM 2007 can be connected to more than one ERP backend systems. These systems can be SAP EPR systems or may not be SAP ERP systems or can be a combination of SAP & Non SAP ERP systems.
    The exchange of information between SAP CRM and other components, such as SAP BW and ERP back-end systems, occurs over the CRM middleware.
    The CRM Server contains the CRM middleware, which handles the data exchange with internal applications and external major components, such as an SAP ERP and/or non-SAP ERP systems used as the back-end. The CRM middleware can exchange messages with Non u2013SAP ERP system via standard interfaces, for example, XML u2013 SOAP.
    If you want to link more than one CRM system or more than one ERP system, see Notes 640570 and 853430.
    The data exchange between the CRM Middleware and external systems is performed via adapters. The adapters map and convert data between various formats.
    Hope I have answered your question. Please give rating to my answer if you find it useful.
    Regards
    Dinesh

  • HT4847 Can I buy extra storage for each Apple device by having more than one Apple ID?

    Hi All!
    I have multiple Apple devices and would like to have separate storage for each device, Ipad, Iphone, and Ipod. Is this possible? Can I have more than one Apple ID?

    Not if you want them to share the same iCloud account so they sync the same data between all your devices.  To share the same account, they have to all be set up with the same iCloud ID, and will share the same 5GB of free storage (but you can always purchase more).
    If you want them to be on separate iCloud accounts, you can set up a different iCloud account on each device using as separate Apple ID for iCloud on each.  (You can have more than one Apple ID).  If you do this, they will each have their own, separate iCloud account with 5GB of free storage, but will not sync iCloud data between them.

  • Hotspot on more than one fields in ALV Report

    I want to add Hotspot on more than one field in ALV,
      one field is Vbeln , one is BSTNK, one is matnr and so on.
    i have used form user_command.and have written coding for Vbeln (on vbeln i am showing transaction VA02)
    i want to pass an eror mesaage when user clicks on bstnk or matnr.
    Thanks

    Hi Lovleen,
    *Global definitions  *
    Data Types
    type-pools: slis.
    types: begin of tp_data,
    ebeln like ekko-ebeln,
    *matnr like ekko-matnr,
    *meins like ekko-meins,
    lifnr like lfa1-lifnr,
    chk1,
           end of tp_data,
           tp_tbl_data type standard table of tp_data.
    Constants
    Data objects (variable declarations and definitions)
    Report data to be shown.
    data: it_data type standard table of tp_data.
    Heading of the report.
    data: t_heading type slis_t_listheader.
    ======================= Selection Screen ==========================
    selection-screen: begin of block b1 with frame title text-t01.
    DATA: w_aux_ebeln like ekko-ebeln.
    SELECT-OPTIONS s_ebeln for w_aux_ebeln
    DEFAULT 1000 .
    DATA: w_aux_lifnr like lfa1-lifnr.
    SELECT-OPTIONS s_lifnr for w_aux_lifnr
    DEFAULT 00000001000 .
    selection-screen: end of block b1.
    ======================== Event Blocks =============================
    at selection-screen.
    start-of-selection.
      perform get_data using it_data.
    end-of-selection.
      perform build_alv using it_data t_heading.
    ======================== Subroutines ==============================
    *&      Form  get_data
          Gets the information to be shown in the report.
    form get_data using t_data type tp_tbl_data.
    SELECT e~ebeln
    *e~matnr
    *e~meins
    l~lifnr
    INTO CORRESPONDING FIELDS OF TABLE t_data
    FROM ekko as e
    inner join lfa1 as l on elifnr = llifnr
    WHERE e~ebeln in s_ebeln
    AND l~lifnr in s_lifnr
    endform.                    " get_data
    *&      Form  build_alv
          Builds and display the ALV Grid.
    form build_alv using t_data type tp_tbl_data
                         t_heading  type slis_t_listheader.
    ALV required data objects.
    data: w_title   type lvc_title,
          w_repid   type syrepid,
          w_comm    type slis_formname,
          w_status  type slis_formname,
          x_layout  type slis_layout_alv,
          t_event    type slis_t_event,
          t_fieldcat type slis_t_fieldcat_alv,
          t_sort     type slis_t_sortinfo_alv.
    refresh t_fieldcat.
    refresh t_event.
    refresh t_sort.
    clear x_layout.
    clear w_title.
    Field Catalog
      perform set_fieldcat2 using:
    1 'CHK1' 'XFELD' space space space 'Select' 'Select this row' 'Sel'
    'Select this row' space space space 'X' 'X' space t_fieldcat,
    2 'EBELN' 'EBELN' 'EKKO' space space  space  space  space  space space
    space space space space space t_fieldcat ,
    3 'MATNR' 'MATNR' 'EKKO' space space  space  space  space  space space
    space space space space space t_fieldcat ,
    4 'MEINS' 'MEINS' 'EKKO' space space  space  space  space  space space
    space space space space space t_fieldcat ,
    5 'LIFNR' 'LIFNR' 'LFA1' space space  space  space  space  space space
    space space space space space t_fieldcat .
    Layout
    x_layout-zebra = 'X'.
    Top of page heading
      perform set_top_page_heading using t_heading t_event.
    Events
      perform set_events using t_event.
    GUI Status
      w_status = ''.
      w_repid = sy-repid.
    Title
    w_title = <<If you want to set a title for
                the ALV, please, uncomment and edit this line>>.
    User commands
      w_comm   = 'USER_COMMAND'.
    Order
    Example
    PERFORM set_order USING '<field>' 'IT_DATA' 'X' space space t_sort.
    Displays the ALV grid
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_callback_program       = w_repid
          it_fieldcat              = t_fieldcat
          is_layout                = x_layout
          it_sort                  = t_sort
          i_callback_pf_status_set = w_status
          i_callback_user_command  = w_comm
          i_save                   = 'X'
          it_events                = t_event
          i_grid_title             = w_title
        tables
          t_outtab                 = t_data
        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.                    " build_alv.
    *&      Form  set_top_page_heading
          Creates the report headings.
    form set_top_page_heading using t_heading type slis_t_listheader
                                    t_events  type slis_t_event.
    data: x_heading type slis_listheader,
          x_event   type line of slis_t_event.
    Report title
      clear t_heading[].
      clear x_heading.
      x_heading-typ = 'H'.
      x_heading-info = ''(001).
      append x_heading to t_heading.
    Program name
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Program: '.
      x_heading-info = sy-repid.
      append x_heading to t_heading.
    User who is running the report
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'User: '.
      x_heading-info = sy-uname.
      append x_heading to t_heading.
    Date of execution
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Date: '.
      write sy-datum to x_heading-info.
      append x_heading to t_heading.
    Time of execution
      clear x_heading.
      x_heading-typ = 'S'.
      x_heading-key = 'Time: '.
      write sy-uzeit to x_heading-info.
      append x_heading to t_heading.
    Top of page event
      x_event-name = slis_ev_top_of_page.
      x_event-form = 'TOP_OF_PAGE'.
      append x_event to t_events.
    endform.
    *&      Form  set_events
          Sets the events for ALV.
          The TOP_OF_PAGE event is alredy being registered in
          the set_top_page_heading subroutine.
    form set_events using t_events type slis_t_event.
    data: x_event   type line of slis_t_event.
    Example
    clear x_event.
    x_event-name = .
    x_event-form = .
    append x_event to t_event.
    endform.
    *&      Form  set_order
          Adds an entry to the order table.
    FORM set_order USING p_fieldname p_tabname p_up p_down p_subtot
                         t_sort TYPE slis_t_sortinfo_alv.
      DATA: x_sort TYPE slis_sortinfo_alv.
      CLEAR x_sort.
      x_sort-fieldname = p_fieldname.
      x_sort-tabname   = p_tabname.
      x_sort-up = p_up.
      x_sort-down = p_down.
      x_sort-subtot = p_subtot.
      APPEND x_sort TO t_sort.
    ENDFORM.                    "set_order
    *&      Form  set_fieldcat2
          Adds an entry to the field catalog.
       p_colpos: Column position.
       p_fieldname: Field of internal table which is being described by
    *            this record of the field catalog.
       p_ref_fieldname: (Optional) Table field / data element which
    *                describes the properties of the field.
    *                If this field is not given, it is copied from
    *                the fieldname.
       p_ref_tabname: (Optional) Table which holds the field referenced
    *              by <<p_ref_fieldname>>.
                      If this is not given, the parameter
                      <<p_ref_fieldname>> references a data element.
       p_outputlen: (Optional) Column width.
       p_noout: (Optional) If set to 'X', states that the field is not
    *           showed initially. If so, the field has to be
                included in the report at runtime using the display
                options.
       p_seltext_m: (Optional) Medium label to be used as column header.
       p_seltext_l: (Optional) Long label to be used as column header.
       p_seltext_s: (Optional) Small label to be used as column header.
       p_reptext_ddic: (Optional) Extra small (heading) label to be
    *                used as column header.
       p_ddictxt: (Optional) Set to 'L', 'M', 'S' or 'R' to select
                  whether to use SELTEXT_L, SELTEXT_M, SELTEXT_S,
                  or REPTEXT_DDIC as text for column header.
       p_hotspot: (Optional) If set to 'X', this field will be used
    *             as a hotspot area for cursor, alolowing the user
    *          to click on the field.
       p_showasicon: (Optional) If set to 'X', this field will be shown
                     as an icon and the contents of the field will set
    *             which icon to show.
       p_checkbox: (Optional) If set to 'X', this field will be shown
                   as a checkbox.
       p_edit: (Optional) If set to 'X', this field will be editable.
       p_dosum: (Optional) If set to 'X', this field will be summed
                (aggregation function) according to the grouping set
                by the order functions.
       t_fieldcat: Table which contains the whole fieldcat.
    FORM set_fieldcat2 USING
          p_colpos p_fieldname p_ref_fieldname p_ref_tabname
          p_outputlen p_noout
          p_seltext_m p_seltext_l p_seltext_s p_reptext_ddic p_ddictxt
          p_hotspot p_showasicon p_checkbox p_edit
          p_dosum
          t_fieldcat TYPE slis_t_fieldcat_alv.
      DATA: wa_fieldcat TYPE slis_fieldcat_alv.
      CLEAR wa_fieldcat.
    General settings
      wa_fieldcat-fieldname = p_fieldname.
      wa_fieldcat-col_pos = p_colpos.
      wa_fieldcat-no_out = p_noout.
      wa_fieldcat-hotspot = p_hotspot.
      wa_fieldcat-checkbox = p_checkbox.
      wa_fieldcat-icon = p_showasicon.
      wa_fieldcat-do_sum = p_dosum.
    Set reference fieldname, tablenam and rollname.
    If p_ref_tabname is not given, the ref_fieldname given
       is a data element.
    If p_ref_tabname is given, the ref_fieldname given is a
       field of a table.
    In case ref_fieldname is not given,
       it is copied from the fieldname.
      IF p_ref_tabname IS INITIAL.
        wa_fieldcat-rollname =   p_ref_fieldname.
      ELSE.
        wa_fieldcat-ref_tabname = p_ref_tabname.
        IF p_ref_fieldname EQ space.
          wa_fieldcat-ref_fieldname =   wa_fieldcat-fieldname.
        ELSE.
          wa_fieldcat-ref_fieldname =   p_ref_fieldname.
        ENDIF.
      ENDIF.
    Set output length.
      IF NOT p_outputlen IS INITIAL.
        wa_fieldcat-outputlen = p_outputlen.
      ENDIF.
    Set text headers.
      IF NOT p_seltext_m IS INITIAL.
        wa_fieldcat-seltext_m = p_seltext_m.
      ENDIF.
      IF NOT p_seltext_l IS INITIAL.
        wa_fieldcat-seltext_l = p_seltext_l.
      ENDIF.
      IF NOT p_seltext_s IS INITIAL.
        wa_fieldcat-seltext_s = p_seltext_s.
      ENDIF.
      IF NOT p_reptext_ddic IS INITIAL.
        wa_fieldcat-reptext_ddic = p_reptext_ddic.
      ENDIF.
      IF NOT p_ddictxt IS INITIAL.
        wa_fieldcat-ddictxt = p_ddictxt.
      ENDIF.
    Set as editable or not.
      IF NOT p_edit IS INITIAL.
        wa_fieldcat-input     = 'X'.
        wa_fieldcat-edit     = 'X'.
      ENDIF.
      APPEND wa_fieldcat TO t_fieldcat.
    ENDFORM.                   "set_fieldcat2
    ======================== Subroutines called by ALV ================
    *&      Form  top_of_page
          Called on top_of_page ALV event.
          Prints the heading.
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
        i_logo             = <<If you want to set a logo, please,
                             uncomment and edit this line>>
          it_list_commentary = t_heading.
    endform.                    " alv_top_of_page
    *&      Form  user_command
          Called on user_command ALV event.
          Executes custom commands.
    form user_command using r_ucomm     like sy-ucomm
                            rs_selfield type slis_selfield.
    Example Code
    Executes a command considering the sy-ucomm.
    CASE r_ucomm.
       WHEN '&IC1'.
         Set your "double click action" response here.
         Example code: Create and display a status message.
         DATA: w_msg TYPE string,
               w_row(4) TYPE n.
         w_row = rs_selfield-tabindex.
         CONCATENATE 'You have clicked row' w_row
                     'field' rs_selfield-fieldname
                     'with value' rs_selfield-value
                     INTO w_msg SEPARATED BY space.
         MESSAGE w_msg TYPE 'S'.
    ENDCASE.
    End of example code.
    endform.                    "user_command
    Reward Points if useful.
    Regards,
    Manoj Kumar

  • ALV to select more than one column by row using set_table_for_first_display

    Hello everyone,
    I am developing an application (ALV OO) to select more than 1 column by row ( one ). This is an a holiday application so the idea is:
    -One column will be the day, and the row will be the user.
    So I am trying to select more than one day by user (that would be the row).
    I am using the method set_table_for_first_display but when it shows the alv, doesn't let me to select more than one column with a click of the mouse.
    Does anybody know if I can do this (select more than one column, by row) in somehow?
    Please let me know if you need more clarification about this.
    Thanks in advance
    Diego

    Hi Diego,
    it's all in the documentation.
    set different selection modes through the value of the field u201CSEL_MODEu201D in the layout structure.
    SPACE
    same as 'B'
    see 'B'
    Default setting
    'A'
    Column and row selection
    Multiple columns
    Multiple rows
    The user selects the rows through pushbuttons at the left border of the grid control.
    'B'
    Simple selection, list box
    Multiple columns
    Multiple rows
    'C'
    Multiple selection, list box
    Multiple columns
    Multiple rows
    'D'
    Cell selection
    Multiple columns
    Multiple rows
    Any cells
    The user selects the rows through pushbuttons at the left border of the grid control
    Beyond setting this option, you can set u201CNO_ROWMARKu201D option to hide the mark column which is normally visible when the selection mode allows multiple row selection.
    One point to notice here is that if you set your ALV Grid as to be editable, it may override your selection mode regardless of your layout settings.
    This is from SDN Community Contribution "An Easy Reference for ALV Grid Control" By: Serdar ŞİMŞEKLER
    Sorry, no link,. it's on my disk.
    Regards,
    Clemens

Maybe you are looking for

  • Need to have a Delivery split based on number of line items

    What are best possible ways to have a control on the delivery creation based on the no. of line items. Scenario : Suppose if i have a sales order with say 1200 lines (same to ship to party, same del date & Same Shipping point) and suppose if i want t

  • How to share subset of iTunes library between two computers

    I've searched the forum for this information, and I've seen similar questions, but not exactly what I'm looking for. Here's the scenario: My wife and I both access iTunes from different computers (I use a Mac, she uses Windows), using different iTune

  • How do I connect ny samsung tab2 note to hp deskjet 2540 if you could please help, thank you

    how do I connect ny samsung tab2 note to hp deskjet 2540 if you could please help, thank you

  • OC4J containers sometimes don't stop/start?

    Occasionally when I do opmnctl stopall or startall, an OC4J container will fail to start or stop. Sometimes I get the "forcibly shutting down..." message from opmnctl. Sometimes it just sits there. Sometimes it shuts down but a 'ps -ef | grep oracle'

  • A Scrolling Problem

    Hi all I have a little problem I wana get fixed...its a little bit long problem so better help me out with this: A swing application that has four textfield which accepts pure string and saves it to a database..theres a button when clicked will show