How can we add a button on our ALV Grid

Hello,
I need to add a button on the ALV Grid and write a code on that button to download a file on the desktop of the user's machine.
How can we write a code for the same and what would be the syntax of that code.

Hi,
you should copy the 'STANDARD' GUI status from program SAPLKKBL using transaction SE90 >Programming SubObjects> Gui Status.
ENTER SAPLKKBL PROGRAM
STATUS STANDARD.
exexute.
select standard  check box. copy to your zprogram and your gui status.
Enter your Z program name and the name you what for this status - you can keep it as 'STANDARD' to be simple.
then go to se 38 double click on pf status .it goes to me41 screen .
there you can add your button along with predefined buttons on application toolbar.
then write code for button using user command event.
Code:
Form Set_pf_status
Notes: Called by FM REUSE_ALV_GRID_DISPLAY
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
  SET PF-STATUS 'ZSTANDARD'.
ENDFORM. "Set_pf_status
In the above case the GUI status copied was named ZSTANDARD and adjusted accordingly, adding and removing the desired buttons. A button was added called '%DELETE'.
3). Create the following report:
Code:
Form User_command
Notes: Called by FM REUSE_ALV_GRID_DISPLAY
       Detects whether the icon/button for
       'Return Tag Deletion' has been pressed. If it has then
       detect whether any rows have been highlighted and then
       set the delete flag.
FORM user_command USING r_ucomm     LIKE sy-ucomm
                        rs_selfield TYPE slis_selfield.
DATA: li_count TYPE I.
IF r_ucomm EQ '%DELETE'.
  LOOP AT %g00 WHERE mark EQ 'X'.
    ADD 1 TO li_count.
  ENDLOOP.
  IF li_count GT 0.
    gc_delete_flag = 'X'.
    r_ucomm = '&F03'. "Back arraow
  ELSE.
    MESSAGE W000 WITH 'Please highlight the rows to be deleted!'.
  ENDIF.
ENDIF.
ENDFORM.  "User_command
*reward points if usefull

Similar Messages

  • How can we add a control on our .jsp webpage for uploading several image fi

    How can we add a control on our .jsp webpage for uploading several image files as done in gmail attachment, Where a Remove button also appears if we wanna remove the particular attachment.

    The SCOM Management Server is in Domain A.  I've tried it already and it has failed.  
    So just to clarify the method I used was to go to Administration>Security>User Roles.  Then New User Role>Read-Only Operator.  In the Create User Role Wizard I then gave the User Role a name, Clicked "Add" under User Role Members.
     Then the Select Users or Groups window pops up and I changed the Locations from Domain A to Domain B and searched for the user, which it's able to find, then clicked "OK" to add it to the User Role members which it does just fine.  On
    the next page which is Group Scope I checked the one group I want this account to have access to and then click next.  This brings me to Dashboards and Views where I click the radio button for "Only the dashboards and views selected in each tab are
    approved" and chose the folder of dashboards I want this account to access and then click next.  This brings me to the Summary and I click "Create".  At this point it thinks for a moment then closes out the wizard but the new Read-Only
    Operator does not appear.  I then look in Event Viewer and see the Event I pasted above.
    Am I doing something wrong here?  Any guidance on how to get around this issue would be much appreciated.
    Thanks,
    Jake

  • How can i add hardware button control

    dear
    sir/madam
    i am using htc explorer mobile smart phone and port the Firefox OS to my mobile its working fine and not pick upping the network for Sim card always searching for network and home key only working how can i add menu,back and search buttons to hardware controls file please help me and video also crashed help me and Bluetooth, Wi-Fi ,GPS,Sensor,sound are working well please help me to fix the abow problems Thank you sorry for my bad English

    Hi,
    Sorry for the late reply, I don't know the answer to your question about hardware button control. But, some developer questions are being asked & answered here:
    http://stackoverflow.com/questions/tagged/firefox-os
    Maybe you can find a developer there who can help you out?
    Thanks for porting Firefox OS!!
    Regards,
    Michelle Luna

  • How can I add radio buttons dynamically?

    Hi,
    I need to add radio buttons dynamically. I will be having a set of options which will be coming form a web service call and I need to convert those options into radio buttons and show it to the user. How can I do it?
    Thanks,
    Hali George

    Yep .... I too would  rather have seen more time put into that kind of stuff than parallax scrolling.

  • How can I add a button that opens a new tab?

    How can I quickly open a new (blank) tab without going to File --> Open New Tab. There has to be a button I can add or a box that isn't checked somewhere. I used to be able to click in the blank space in the row of tabs to open a new tab, but with this latest Firefox update, if I click in the blank space now, it just "restores" my browser window.
    To explain further - I know I can middle-click a link to open it in a new window, but if I'm on one page reading an article, and I want to open a new tab to look up a word or map or whatever, I need a faster way to open a new blank tab.

    You are right - there should be and there is on my windows 7 machine but not on my windows 8.1 machine. Firefox add-ins are identical. So how do I get the new tab button back?

  • How can I add a button to add multiple image in PDF from using adobe acrobat pro?

    I have to create a pdf form using Adobe Acrobat Pro X.
    In this form I want to add a button where I can add multiple images to the field.
    I have tried using javascript event.target.buttonImportIcon(); and successfully add an image, but when I want to add the 2nd image it automatically overwrites the previous one.
    Is there any way to solve this issue? I would like to have a form where I can add a lot of images in it. It is possible in word, but we really have to use adobe.
    Thanks

    Hi thanks for your answer.
    I can add multiple button, but if there are 10 images that I wan to add, then I have to create 10 buttons.
    Moreover, the pictures will be placed on top of each other and it means that you cannot see it clearly.

  • How can we sum for the field on alv grid

    Dear Freinds,
                   I am having the field count .....in the ouput (iam using alv grid) .......which dispalys  the id's which are identical .
    i have scneario similar to the below in my ALV Output
    ID                count         total
    4000              3              100
                                          100
                                         200       Can i get count 3 also along with 200 in alv?
    i am using the code as follows for count can any one please let me know.
    my earlier question which i put was confusing.........so i am givin the qustion again
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 1.
      ls_fieldcat-fieldname    = 'ORGUNIT'.
      ls_fieldcat-seltext_l    =  text-015.  "'Orgunit'.
      ls_fieldcat-key          = 'X'.
      ls_fieldcat-key_sel      = 'X'.
    ls_fieldcat-no_out       = 'X'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 2.
      ls_fieldcat-fieldname    = 'COUNT'.
      ls_fieldcat-seltext_l    = 'H.Count'.
      ls_fieldcat-outputlen    = 4.
      ls_fieldcat-do_sum       = 'X'.
    ls_fieldcat-datatype    = 'NUMC'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname   = 'TOTAL'.
      ls_fieldcat-seltext_m   = 'total'.
      ls_fieldcat-col_pos     = 3.
      ls_fieldcat-outputlen   = 17.
      ls_fieldcat-do_sum      = 'X'.
      ls_fieldcat-datatype    = 'CURR'.
      append ls_fieldcat to fp_i_fieldcat.
    Please let me know how can do if so what is the parameter i have to change for COUNT
    regards
    syamal

    Hi Shamala Kiran.
                          My name is also kiran.I have a develop a code for u.Actually i cant understand your code.But i know ur problem .Plz check that code.In that code i develop a subtotals and grandttotal.Plz observe the FORM "FIELD CATALOG" in that observe the NETWR FIELD and observe the FORM SORTCATALOG then ur problem will be solved.
    Copy the the below code and execute that code and the result.
    If u r Satisfied with the answer plz give the REWARD POINTS.
    CODE:
    Type Pools
    TYPE-POOLS:slis.
    Tables
    TABLES: vbak,vbap.
    Global Variable
    data: w_var type i.
    Global Data
    DATA:it_fieldcat TYPE slis_t_fieldcat_alv,
         wa_fieldcat TYPE slis_fieldcat_alv,
         it_sortcat TYPE slis_t_sortinfo_alv,
         wa_sortcat  LIKE LINE OF it_sortcat.
    Internal Table
    data: BEGIN OF it_salesorder OCCURS 0,
            vbeln LIKE vbak-vbeln,    " Sales Document Number
            posnr like vbap-posnr,    " Sales Doc Item
            netwr like vbap-netwr,    " Net Value
          END OF it_salesorder.
    SELECT OPTIONS
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln.   " Sales Document Number.
    SELECTION-SCREEN END OF BLOCK b1.
    Initialization
    INITIALIZATION.
      PERFORM initialization.
    *&      Form  initialization
          text
    -->  p1        text
    <--  p2        text
    form initialization .
      s_vbeln-sign   = 'I'.
      s_vbeln-option = 'BT'.
      s_vbeln-low    = '4969'.
      s_vbeln-high   = '5000'.
      APPEND s_vbeln.
    endform.                    " initialization
    Start Of Selection
    START-OF-SELECTION.
      PERFORM field_catalog.   "For Structure Creation
      PERFORM fetch_data.      "Get the Data From DB Table
      PERFORM sorting USING it_sortcat.
    End Of Selection
    END-OF-SELECTION.
      perform display_data.
    *&      Form  field_catalog
          text
    -->  p1        text
    <--  p2        text
    form field_catalog .
      wa_fieldcat-col_pos       = w_var.          " Column Position Variable
      wa_fieldcat-tabname       = 'IT_SALESORDER'. " Internal Table Name
      wa_fieldcat-fieldname     = 'VBELN'.         " Field Name
      wa_fieldcat-key           = 'X'.             " Blue Color
      wa_fieldcat-ref_tabname   = 'VBAK'.          " Table Name
      wa_fieldcat-ref_fieldname = 'VBELN'.         " Field Name
      wa_fieldcat-seltext_m     = 'Sales Doc No'.  " Display Text In Screen
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      ADD 1 TO w_var.
      wa_fieldcat-col_pos       = w_var.          " Column Position Variable
      wa_fieldcat-tabname       = 'IT_SALESORDER'. " Internal Table Name
      wa_fieldcat-fieldname     = 'POSNR'.         " Field Name
      wa_fieldcat-ref_tabname   = 'VBAP'.          " Table Name
      wa_fieldcat-ref_fieldname = 'POSNR'.         " Field Name
      wa_fieldcat-seltext_m     = 'Sales Doc Item'. " Display Text In Screen
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      ADD 1 TO w_var.
      wa_fieldcat-col_pos       = w_var.          " Column Position Variable
      wa_fieldcat-tabname       = 'IT_SALESORDER'. " Internal Table Name
      wa_fieldcat-fieldname     = 'NETWR'.         " Field Name
      wa_fieldcat-ref_tabname   = 'VBAP'.          " Table Name
      wa_fieldcat-ref_fieldname = 'NETWR'.         " Field Name
      wa_fieldcat-do_sum        = 'X'.             " Sum
      wa_fieldcat-seltext_m     = 'Net Value'.  " Display Text In Screen
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
      ADD 1 TO w_var.
    endform.                    " field_catalog
    *&      Form  sorting
          text
         -->P_IT_SORTCAT  text
    form sorting using p_it_sortcat TYPE slis_t_sortinfo_alv.
      wa_sortcat-fieldname = 'VBELN'.
      wa_sortcat-up        ='X'.
      wa_sortcat-subtot    = 'X'.
      APPEND wa_sortcat TO p_it_sortcat.
    endform.                    " sorting
    *&      Form  display_data
          text
    -->  p1        text
    <--  p2        text
    form display_data .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
        I_CALLBACK_PROGRAM                = SY-REPID
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
        IT_FIELDCAT                       = it_fieldcat
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
        IT_SORT                           = it_sortcat
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          = it_salesorder
    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_data
    *&      Form  fetch_data
          text
    -->  p1        text
    <--  p2        text
    form fetch_data .
    select a~vbeln
           posnr
           b~netwr
      from vbak as a
    inner join vbap as b on  avbeln = bvbeln
      into table it_salesorder
      where a~vbeln in s_vbeln.
    endform.                    " fetch_data

  • How can we sort up currency field in alv grid??

    Hi GUrus,
    Can any one suggest me how to sort the currency field in alv grid...Please help me out of this issue..
    Thanks in advance!!!
    regards,
    Kranthi.

    hii,
    SAP provides a set of ALV (ABAP List Viewer) & function modules, which can be used to enhance the readability and functionality of any report output.
    ALV is a flexible tool used for displaying lists.The tool provides common list functions & can be enhanced by self-defined options.
    so u will get the option for sorting in your alv report.
    Thanks

  • How can I use hotspot click in an ALV grid?

    Hello,
    I have a table that is displayed in an ALV grid and I would like to have one of the columns as clickable icons.
    For example:
    Print  |  Doc. Type | Name
    (icon) |   .docx      | first
    (icon) |   .pdf         | second ... and so on.
    I would like to click in the icon (Print column) and execute an action, but no matter what I do I can't set the action.
    I know that is not just setting "fieldcatalog-hotspot='X'", but I don't know how to use a hotspot handler.
    Here's some of the code I have:
    TYPES: BEGIN OF ty_docs,
                        print LIKE ICON-ID,
                        doc_type LIKE table_doc-TYPE,
                        name LIKE table_doc-NAME,
                 END OF ty_docs.
    DATA:  oref_dock TYPE REF TO cl_gui_docking_container,
                oref_alv TYPE REF TO cl_gui_alv_grid,
                i_fieldcat TYPE lvc_t_fcat,
                aux_fieldcat TYPE lvc_s_fcat,
                aux_lay TYPE lvc_s_layo,
                i_exclude TYPE TABLE OF syucomm,
                i_docs TYPE ty_docs,
                t_docs LIKE TABLE OF i_docs.
    AT SELECTION-SCREEN OUTPUT.
       APPEND 'ONLI' TO i_exclude.
       APPEND 'SJOB' TO i_exclude.
       APPEND 'PRIN' TO i_exclude.
       CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
         EXPORTING
           p_status = sy-pfkey
           p_program = sy-repid
         TABLES
           p_exclude = i_exclude.
    AT SELECTION-SCREEN.
       CHECK sy-ucomm = space.
         SELECT
               icon~ID AS print
               doc~TYPE AS doc_type
               doc~NAME as name
                 INTO CORRESPONDING FIELDS OF TABLE t_docs
                 FROM table_doc AS doc
                      INNER JOIN ICON AS icon    
                        ON icon~NAME EQ 'ICON_PRINT'
                 GROUP BY icon~ID doc~TYPE doc~NAME.
       IF sy-subrc = 0.
         IF oref_dock IS NOT BOUND.
           CREATE OBJECT oref_dock
              EXPORTING
                repid = sy-repid
                dynnr = sy-dynnr
                side = cl_gui_docking_container=>dock_at_bottom
                ratio = 90
             EXCEPTIONS
               OTHERS = 1.
         ENDIF.
         IF oref_alv IS NOT BOUND.
           CHECK oref_dock IS BOUND.
           CREATE OBJECT oref_alv
             EXPORTING
               i_parent = oref_dock
             EXCEPTIONS
               OTHERS = 1.
           CHECK oref_alv IS BOUND.
           aux_fieldcat-fieldname = 'PRINT'.
           aux_fieldcat-coltext = 'Print'.
           aux_fieldcat-ref_table = 't_docs'.
           aux_fieldcat-ref_field = 't_docs-print'.
           aux_fieldcat-edit = ''.
           aux_fieldcat-just = 'C'.
           aux_fieldcat-hotspot = 'X'.
           aux_fieldcat-outputlen = 10.
           aux_fieldcat-col_pos = 0.
           APPEND aux_fieldcat TO i_fieldcat.
           CLEAR aux_fieldcat.
           aux_fieldcat-fieldname = 'TYPE'.
           aux_fieldcat-coltext = 'Doc. Type'.
           aux_fieldcat-ref_table = 't_docs'.
           aux_fieldcat-ref_field = 't_docs-doc_type'.
           aux_fieldcat-edit = ''.
           aux_fieldcat-outputlen = 15.
           aux_fieldcat-col_pos = 1.
           APPEND aux_fieldcat TO i_fieldcat.
           CLEAR aux_fieldcat.
           aux_fieldcat-fieldname = 'NAME'.
           aux_fieldcat-coltext = 'Name'.
           aux_fieldcat-ref_table = 't_docs'.
           aux_fieldcat-ref_field = 't_docs-name'.
           aux_fieldcat-edit = ''.
           aux_fieldcat-outputlen = 12.
           aux_fieldcat-col_pos = 2.
           APPEND aux_fieldcat TO i_fieldcat.
           CLEAR aux_fieldcat.
           aux_lay-grid_title = 'Docs'.
           aux_lay-edit = ''.
           CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
             EXPORTING
              i_structure_name = 'ty_docs'
              i_internal_tabname = 't_docs'
            CHANGING
              ct_fieldcat = i_fieldcat
           EXCEPTIONS
             OTHERS = 3.
           CALL METHOD oref_alv->set_table_for_first_display
             EXPORTING
               i_structure_name = 'ty_docs'
               is_layout = aux_lay
             CHANGING
               it_fieldcatalog = i_fieldcat
               it_outtab = t_docs
             EXCEPTIONS
               OTHERS = 1.
         ELSE.
           CALL METHOD oref_alv->refresh_table_display
             EXCEPTIONS
               OTHERS = 1.
         ENDIF.
      ENDIF.
    Thank you so much in advance!

    Hi,
    After creating grid set the even handler for hot spot.
    SET HANDLER lcl_event_receiver=>handle_hotspot_click FOR alv_grid.
    Try this code:
    TABLES: mara,t001l.
    DATA: BEGIN OF i_alv OCCURS 0,
           matnr TYPE mara-matnr,
           mtart TYPE mara-mtart,
           matkl TYPE mara-matkl,
           groes TYPE mara-groes,
           maktx TYPE makt-maktx,
           END OF i_alv.
    DATA: wa_alv  LIKE LINE OF i_alv.
    DATA: alv_container  TYPE REF TO cl_gui_docking_container.
    DATA: alv_grid       TYPE REF TO cl_gui_alv_grid.
    DATA: layout    TYPE lvc_s_layo.
    DATA: fieldcat  TYPE lvc_t_fcat.
    DATA: gt_t001l TYPE STANDARD TABLE OF t001l.
    CLASS lcl_event_receiver DEFINITION.
       PUBLIC SECTION.
    *-->Method for User command
         CLASS-METHODS :
         handle_hotspot_click FOR EVENT hotspot_click    OF
                                               cl_gui_alv_grid
                                     IMPORTING E_ROW_ID e_column_id.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    *       CLASS lcl_event_receiver IMPLEMENTATION
    CLASS  lcl_event_receiver IMPLEMENTATION.
       METHOD handle_hotspot_click.
         READ TABLE i_alv INTO wa_alv
          INDEX e_row_id-index
           TRANSPORTING matnr.
         SET PARAMETER ID 'MAT' FIELD wa_alv-matnr.
         CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
       ENDMETHOD.                    "handle_double_click
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    PARAMETERS: p_check TYPE matnr.
    INITIALIZATION.
    PERFORM get_data.
    AT SELECTION-SCREEN OUTPUT.
    *  START-OF-SELECTION.
       DATA: variant TYPE  disvariant.
       DATA: repid TYPE sy-repid.
       repid = sy-repid.
       variant-report = sy-repid.
       variant-username = sy-uname.
       layout-zebra = 'X'.
       layout-edit_mode = 'X'.
       CHECK alv_container IS INITIAL.
       CREATE OBJECT alv_container
                   EXPORTING repid     = repid
                             dynnr     = sy-dynnr
                             side      = alv_container->dock_at_right
                             extension = 350.
       CREATE OBJECT alv_grid
              EXPORTING
                    i_parent          =  alv_container.
    * Set event handler
       SET HANDLER lcl_event_receiver=>handle_hotspot_click FOR alv_grid.
    *  ALV Specific. Data selection.
    *  Populate Field Catalog
       PERFORM get_fieldcatalog.
       CALL METHOD alv_grid->set_table_for_first_display
         EXPORTING
           is_layout        = layout
           is_variant       = variant
           i_save           = 'U'
           i_structure_name = 'I_ALV'
         CHANGING
           it_outtab        = i_alv[]
           it_fieldcatalog  = fieldcat[].
    START-OF-SELECTION.
    * FORM GET_DATA
    FORM get_data.
       SELECT * INTO CORRESPONDING FIELDS OF TABLE i_alv
             FROM mara
               INNER JOIN makt
                 ON mara~matnr = makt~matnr
                        UP TO 100 ROWS
                    WHERE makt~spras = sy-langu.
       SORT i_alv ASCENDING BY matnr.
    ENDFORM.                    "get_data
    *      Form  Get_Fieldcatalog - Set Up Columns/Headers
    FORM get_fieldcatalog.
       DATA: ls_fcat TYPE lvc_s_fcat.
       REFRESH: fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'Material Number'.
       ls_fcat-fieldname  = 'MATNR'.
       ls_fcat-ref_table  = 'I_ALV'.
       ls_fcat-outputlen  = '18'.
       ls_fcat-fix_column = 'X'.
       ls_fcat-key        = 'X'.
       ls_fcat-hotspot    = 'X'.
       ls_fcat-col_pos    = '1'.
       APPEND ls_fcat TO fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'Material Type'.
       ls_fcat-fieldname  = 'MTART'.
       ls_fcat-ref_table  = 'I_ALV'.
       ls_fcat-outputlen  = '10'.
       ls_fcat-fix_column = 'X'.
       ls_fcat-key        = 'X'.
       ls_fcat-col_pos    = '2'.
       APPEND ls_fcat TO fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'Material Group'.
       ls_fcat-fieldname  = 'MATKL'.
       ls_fcat-ref_table  = 'I_ALV'.
       ls_fcat-outputlen  = '12'.
       ls_fcat-col_pos    = '3'.
       APPEND ls_fcat TO fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'Size'.
       ls_fcat-fieldname  = 'GROES'.
       ls_fcat-ref_table  = 'I_ALV'.
       ls_fcat-outputlen  = '30'.
       ls_fcat-col_pos    = '4'.
       APPEND ls_fcat TO fieldcat.
       CLEAR: ls_fcat.
       ls_fcat-reptext    = 'Material Description'.
       ls_fcat-fieldname  = 'MAKTX'.
       ls_fcat-ref_table  = 'I_ALV'.
       ls_fcat-outputlen  = '40'.
       ls_fcat-col_pos    = '5'.
       APPEND ls_fcat TO fieldcat.
    ENDFORM.                    "get_fieldcatalog
    Hope this solves your problem....

  • How can I add a button in my Lightbox container, on top of an image?

    Hi guys,
    I'm currently building out a reasonably advanced menu, which I've done by creating a lightbox and then placing the trigger over an image. This then fades in my menu image, and all works fine.
    I then need to add a transparent rectangle (linking to a page when clicked) or menu within the lightbox container that users can click to go to another page. I can insert this rectangle into my lightbox container, but when it's placed over the image already in there it doesn't show as appearing where it should, but below it - despite it being in the right place....any ideas?

    Thanks, that seems to work. I'm struggling to place the lightbox at the top of the page however - when I click the trigger I want the menu image to display anchored to the top of the page, but there's always a gap as it centers the image. Help is appreciated!

  • How can I add invisible buttons to a scrollable window?

    I've made a scrollable window that basically scrolls some
    text and images. I'd like the images to link to another site but
    I'm having trouble getting the invisible buttons to scroll with the
    images. The text and images laid out in Flash. That is, I'm not
    linking to an HTML file.
    Here's the code I'm using for the scrollable window, which I
    got from a tutorial online. The buttons (at the bottom of the
    script) are located in a separate layer masked by the "maskedView".
    Any insight would really be appreciated!
    thanks!

    Try this code.

  • How can i add mark field to class alv ?

    Here is my code like this.
    CALL METHOD cl_salv_table=>factory
    *  EXPORTING
    *    list_display   = IF_SALV_C_BOOL_SAP=>FALSE
    *    r_container    =
    *    container_name =
             IMPORTING
               r_salv_table   = gr_table
             CHANGING
               t_table        = gt_itab[].
         CATCH cx_salv_msg.
       ENDTRY.
       gr_functions = gr_table->get_functions( ).
       gr_functions->set_all( abap_true ).  "Gui için
       gr_display = gr_table->get_display_settings( ).
       gr_display->set_striped_pattern( abap_true ).
       gr_display->set_list_header( baslik ).
       gr_columns = gr_table->get_columns( ).

    Hi,
    DATA: ob_salv_table          TYPE REF TO cl_salv_table .
    DATA: ob_salv_selections   TYPE REF TO cl_salv_selections.
    ob_salv_selections = ob_salv_table->get_selections( ).
    ob_salv_selections->set_selection_mode( if_salv_c_selection_mode=>row_column ).
    Regards.

  • How to remove the select button from the alv grid

    Hi,
    I am using the Function modules for alv report,
    My 1st field in the list is checkbox,
    User can select the checkbox for further process.
    My problem is I want to remove the standards select option from alv.
    I have searched in slis_layout_alv for any option, but I could not.
    Please help me.
    Regards
    Rajan

    HI
      Exclude process options from ALV
        PERFORM alv_excl. ( g_r_excl     TYPE  ui_functions  . )
    FORM alv_excl.
      APPEND cl_gui_alv_grid=>mc_mb_sum          TO  g_r_excl.
      APPEND cl_gui_alv_grid=>mc_mb_subtot       TO  g_r_excl.
      APPEND cl_gui_alv_grid=>mc_fc_graph        TO  g_r_excl.
      APPEND cl_gui_alv_grid=>mc_fc_info         TO  g_r_excl.
      APPEND cl_gui_alv_grid=>mc_fc_print_back   TO  g_r_excl.
    ENDFORM.                    " alv_excl
    CALL METHOD g_r_grid->set_table_for_first_display
              EXPORTING
                is_layout                     = g_r_layo
                is_variant                    = g_r_variant
                it_toolbar_excluding       = g_r_excl
                i_save                        = 'X'
              CHANGING
                it_outtab        = g_t_yetprint[]
                it_fieldcatalog  = g_t_fieldcat.
    Options appended in g_r_excl, will be excluded from ALV
    Praveen

  • How do I add a button to insert a picture to a PDF form?

    I have a layout for a form that I use constantly. Each form has a person's picture, or at least it's supposed to, along with their information.
    How can I add a button or something so that every time I fill out a form I can easily insert that person's picture?
    I have Adobe Acrobat Pro on a mac.
    Thanks!

    See: https://answers.acrobatusers.com/Is-create-form-users-upload-photos-form-q195128.aspx

  • How to handle user command method in module ALV Grid

    HI Experts,
                     I have 3 containers grid. 
                     GR_GRID              TYPE REF TO CL_GUI_ALV_GRID,
                     GR_GRID1              TYPE REF TO CL_GUI_ALV_GRID,
                     GR_GRID2              TYPE REF TO CL_GUI_ALV_GRID.
                     Please advise me how can I insert, save, delete 3 Module ALV Grid in method user command. How can i get which grid button (save, insert, delete) is clicked and how can i control those grid.
                    Thks in advance.
    CLASS LCL_EVENT_RECEIVER DEFINITION.
      PUBLIC SECTION.
        METHODS :
            HANDLE_TOOLBAR
                  FOR EVENT TOOLBAR OF CL_GUI_ALV_GRID
                                IMPORTING E_OBJECT E_INTERACTIVE SENDER,
            HANDLE_USER_COMMAND
                  FOR EVENT USER_COMMAND OF CL_GUI_ALV_GRID
                                IMPORTING E_UCOMM,
            HANDLE_DATA_CHANGED
                    FOR EVENT DATA_CHANGED OF CL_GUI_ALV_GRID
                          IMPORTING ER_DATA_CHANGED
                                    E_ONF4
                                    E_ONF4_BEFORE
                                    E_ONF4_AFTER,
            HANDLE_DOUBLE_CLICK
                     FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                     IMPORTING E_ROW
                               E_COLUMN,
            HANDLE_HOTSPOT_CLICK
                      FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                           IMPORTING E_ROW_ID
                                     E_COLUMN_ID
                                     ES_ROW_NO.
    ENDCLASS. "(LCL_EVENT_RECEIVER DEFINITION) 
    METHOD HANDLE_USER_COMMAND.
         CLEAR G_CODE.
        G_CODE = E_UCOMM.
        CASE G_CODE.
          WHEN 'INSERT'.
            MESSAGE 'insert' TYPE 'I'.
           APPEND INITIAL LINE TO GT_MAIN.
          WHEN 'SAVE'.
           MODIFY ZTNBOOK FROM GT_MAIN.
            MESSAGE 'save' TYPE 'I'.
          WHEN 'DELETE'.
           DELETE FROM ZTNBOOK WHERE B_ID EQ GT_ZTBOOK-B_ID.
            MESSAGE 'delete' TYPE 'I'.
        ENDCASE.
        IF NOT G_CODE IS INITIAL.
      PBO, PAI
         CALL METHOD CL_GUI_CFW=>SET_NEW_OK_CODE
           EXPORTING
             NEW_CODE = G_CODE.
         CLEAR G_CODE.
        ENDIF.
      ENDMETHOD.

    Hi,
    Before posting, Search in SDN.
    See the below tread it will help you.
    Re: Get table for cl_gui_alv_grid

Maybe you are looking for

  • OneDrive stopped returning files with a "+" in its file name.

    Hi, My app creates a folder in OneDrive in the name of the app and saves a data file with the same name in it.  My app name contains a "+" in the name.  For example "Menu+ Inventory.dat" All was working well for last couple of years and suddenly OneD

  • Static playhead

    Hello to all. While working in GB I found it a pleasant thing to have this feature: when it starts from the beginning of a song, the playhead starts moving from the left of the viewer and moves till it reaches the 12-second mark. After this, the play

  • How to bind an element in an arrayList to a table column

    Hi everyone, I need your help. I have an ObjectListDataProvider to bind a class MyClass to a table. Inside of MyClass, there is a property called dynNumOfElements of type ArrayList. I need dynamically create the columns of the table to match the numb

  • Designing for iPad. Horizontal Scroll & Different Page Sizes.

    Putting together a pdf for iPad using cs6. I have content that fits a standard iPad format BUT I also have these very long timelines (170cm x 21 cm). These need to be displayed zoomed in – with the reader swiping right to accessing the remainder of t

  • Laptop burns my skin months ago HP still not resolved anything

    To anyone that is stuggling to get any kind of apology or action from HP do not hold your breath.. HP beat audio laptop burns my thigh, with a blister, left me with a red scar I  provided HP with a picture and offered a doctors note and all they've c