Query Regarding ALV : WD ABAP

HI ,
The 'Settings' option in ALV in WD ABAP provides an option to the user to select the number of rows as per suitability . I want to check whether these settings can be saved at the user profile level .
I mean if the user again logs in , he will be able to see as many rows in the ALV table as he selected and saved previously . I mean , is the settings are local to the session or to the user profile . If , the settings can be saved at the user profile level , then how it is achieved .Also , if the column settings can be saved at the user profile level !!
Best Regards
Sid

Hi,
do you mean this? http://help.sap.com/saphelp_nw2004s/helpdata/en/e9/8ca7428e0d0d31e10000000a1550b0/frameset.htm
Regards, Heidi

Similar Messages

  • Hi experts 1 query regarding alv report running in background

    when i run my alv report with 40 columns in background in spool when i get output disturbed 20 lines of first row is moving to second row so when i download to excel the o/p is completely disturbed and no use for me is there any way to solve this problem.please reply

    hi ,
    this will solve your problem
    http://www.****************/Tutorials/ALV/Spool/width.htm
    Increasing the width of the spool when using ALV List
    By Aafaque Husain, YASH Technologies
    Whenever an ALV report (with more number of columns) is scheduled in background, the output will be displayed in a zigzag fashion as shown below:  
    If we try to download the output from the spool or try to view the output, then we observe that the output is not in an appropriate fashion.  
    To get the right format of output in the spool we generally increase the u201Cno. of columns fieldu201D in the Format typesu201D. Have a look at the following screenshot:   
    Sometimes even when we change this field, we get the output truncated at the end, like last few columns are not displayed. There is certain limitation for this field, so that even if increase this value again, we find no change in the output display in spool. 
    This value is effective only when we check the check box u201CNumber of columns from list display formatu201D in the SPAD transaction.
    Ø       GO to SPAD Transaction code
    Ø       In the menu Settings -> Spool System as shown belowu2026
    Ø       In the others tab check the first check box in the Output Controller block, SAVE and exit.
    Now Schedule the ALV report again by providing the output device and format, and then we get the full output in the spool as shown below: 
    Regards,
    Madhavi

  • Query Regarding ALV - Very Urgent

    Hi experts,
    I have defined a ALV grid in my program using the startdard function module as editable. Now I want the grid to be displayed in the screen with my pf-status. how can i do that?.
    Here is the sample code.
    REPORT  zadvcformsub
      NO STANDARD PAGE HEADING MESSAGE-ID zf
      LINE-SIZE 255 LINE-COUNT 66.
    INCLUDE zftsvar .
    TYPE-POOLS : slis.
    TABLES : zftsregstr, zftsintnum, zftscusttc,
             zadvcform,  konv, knvv, sscrfields.
    DATA : it_fieldcat   TYPE  slis_t_fieldcat_alv.
    DATA : w_layout    TYPE  slis_layout_alv,
           w_fieldcat  TYPE  slis_fieldcat_alv.
    DATA : BEGIN OF it_initial OCCURS 1,
            bukrs(4)      TYPE c,
            wkreg(3)      TYPE c,
            zkunag(10)    TYPE c,
            validfrom(10) TYPE c,
            validto(10)   TYPE c,
            vkorg(4)      TYPE c,
            aland(3)      TYPE c,
            zformtype(1)  TYPE c,
            frmintno(10)  TYPE c,
            uname(12)     TYPE c,
            datum(10)     TYPE c,
            uzeit(8)      TYPE c,
           END OF it_initial.
    DATA : BEGIN OF it_part OCCURS 1,
            zkunag    LIKE zadvcform-zkunag,
            frmintno  LIKE zadvcform-frmintno,
            validfrom LIKE zadvcform-validfrom,
            validto   LIKE zadvcform-validto,
           END OF it_part.
    DATA : w_sno(2)     TYPE c,
           w_cust(10)   TYPE c,
           w_cform(10)  TYPE c,
           w_from(10)   TYPE c,
           w_to(10)     TYPE c,
           w_blank1(10) TYPE c,
           w_blank2(10) TYPE c,
           w_blank3(10) TYPE c,
           w_blank4(10) TYPE c,
           w_string_len TYPE i,
           w_sel_line(255) TYPE c,
           w_indx(2) TYPE c.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK b1  WITH FRAME TITLE text-001.
    SELECT-OPTIONS:
          s_bukrs FOR zadvcform-bukrs NO INTERVALS NO-EXTENSION OBLIGATORY,
          s_aland FOR zadvcform-aland NO INTERVALS NO-EXTENSION OBLIGATORY,
          s_wkreg FOR zadvcform-wkreg NO INTERVALS NO-EXTENSION OBLIGATORY,
          s_vkorg FOR zadvcform-vkorg NO INTERVALS NO-EXTENSION OBLIGATORY,
      s_fmtyp FOR zadvcform-zformtype NO INTERVALS NO-EXTENSION OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
    AT SELECTION-SCREEN.
    START-OF-SELECTION.
      w_fieldcat-fieldname = 'ZKUNAG'.
      w_fieldcat-tabname = 'IT_PART'.
      w_fieldcat-ref_fieldname = 'ZKUNAG'.
      w_fieldcat-ref_tabname = 'ZADVCFORM'.
      w_fieldcat-seltext_l = 'Customer Code'.
      w_fieldcat-ddictxt = 'L'.
      w_fieldcat-input = 'X'.
      w_fieldcat-edit  = 'X'.
      APPEND w_fieldcat TO it_fieldcat.
      w_fieldcat-fieldname = 'FRMINTNO'.
      w_fieldcat-tabname = 'IT_PART'.
      w_fieldcat-ref_fieldname = 'FRMINTNO'.
      w_fieldcat-ref_tabname = 'ZADVCFORM'.
      w_fieldcat-seltext_l = 'C Form No'.
      w_fieldcat-ddictxt = 'L'.
      w_fieldcat-input = 'X'.
      w_fieldcat-edit  = 'X'.
      APPEND w_fieldcat TO it_fieldcat.
      w_fieldcat-fieldname = 'VALIDFROM'.
      w_fieldcat-tabname = 'IT_PART'.
      w_fieldcat-ref_fieldname = 'VALIDFROM'.
      w_fieldcat-ref_tabname = 'ZADVCFORM'.
      w_fieldcat-seltext_l = 'Valid From'.
      w_fieldcat-ddictxt = 'L'.
      w_fieldcat-input = 'X'.
      w_fieldcat-edit  = 'X'.
      APPEND w_fieldcat TO it_fieldcat.
      w_fieldcat-fieldname = 'VALIDTO'.
      w_fieldcat-tabname = 'IT_PART'.
      w_fieldcat-ref_fieldname = 'VALIDTO'.
      w_fieldcat-ref_tabname = 'ZADVCFORM'.
      w_fieldcat-seltext_l = 'Valid To'.
      w_fieldcat-ddictxt = 'L'.
      w_fieldcat-input = ' '.
      w_fieldcat-edit  = ' '.
      APPEND w_fieldcat TO it_fieldcat.
      DO 15 TIMES.
        CLEAR it_part.
        APPEND it_part.
      ENDDO.
      SET PF-STATUS 'ZADVCFORM_COPY'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-cprog
         i_callback_pf_status_set = 'ZADVCFORM_COPY'
          it_fieldcat              = it_fieldcat
          i_grid_title             = 'Advanced C Form Submission'
        TABLES
          t_outtab                 = it_part[]
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE i039(zaba) WITH 'Error in ALV'.
      ENDIF.
    I am geting the editable ALV grid but how to set my gui status.
    regards,
    Arul Jothi.

    Hi,
    Here is an sample code to handle events.
    DATA: I_EVENTS TYPE SLIS_T_EVENT.
    PERFORM F4000_EVENTS_INIT CHANGING I_EVENTS.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
       IT_EVENTS                      = I_EVENTS
      TABLES
        T_OUTTAB                       = I_MARA
    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 F4000_EVENTS_INIT USING I_EVENTS TYPE SLIS_T_EVENT.
      DATA: LINE_EVENT TYPE SLIS_ALV_EVENT.
      CLEAR LINE_EVENT.
      LINE_EVENT-NAME = 'TOP_OF_PAGE'.
      LINE_EVENT-FORM = 'F4001_TOP_OF_PAGE'.
      APPEND LINE_EVENT TO I_EVENTS.
      CLEAR LINE_EVENT.
      LINE_EVENT-NAME = 'PF_STATUS_SET'.
      LINE_EVENT-FORM = 'F4002_PF_STATUS_SET'.
      APPEND LINE_EVENT TO I_EVENTS.
      CLEAR LINE_EVENT.
      LINE_EVENT-NAME = 'USER_COMMAND'.
      LINE_EVENT-FORM = 'F4003_USER_COMMAND'.
      APPEND LINE_EVENT TO I_EVENTS.
    ENDFORM.
    FORM F4003_USER_COMMAND USING UCOMM LIKE SY-UCOMM
                                  SELFIELD TYPE SLIS_SELFIELD.
      CASE UCOMM.
        WHEN '&CHNG'.
          READ TABLE I_MARA INDEX SELFIELD-TABINDEX.
          IF I_MARA-MATNR NE SPACE.
            SET PARAMETER ID 'MAT' FIELD I_MARA-MATNR.
            CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
                  CLEAR UCOMM.
          ENDIF.
      ENDCASE.
    ENDFORM.

  • Query regarding ALV

    Hi
      I am using ALV to print my report.
      I want to write some data above or below
        the ALV output. How to do it?
    Regards,
    Abhimanyu.L

    Hi abhimanyu,
    check this code:
    report zus_alv_demo_grid .
    tables:     ekko.
    type-pools: slis.
    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
    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.
    Data declaration for EVENT and PRINT PARAMETER.
    data: gt_events type slis_t_event,
           gd_prntparams type slis_print_alv.
    data declaration for sorting.
    data : it_sortcat   type slis_sortinfo_alv occurs 1,
           wa_sort like line of it_sortcat.
    data :  i_list_comments type slis_t_listheader.
    start-of-selection.
      perform data_retrieval.
    perform user_command.
      perform build_fieldcatalog.
      perform build_layout.
      perform build_events.
      perform build_print_params.
      perform build_sortcat.
      perform display_alv_report.
    end-of-selection.
    *TOP-OF-PAGE.
    PERFORM top-of-page.
    end-of-page.
    *&      Form  build_fieldcatalog
          text
    -->  p1        text
    <--  p2        text
    form build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = '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.
      fieldcatalog-do_sum = 'X'.
      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
          text
    -->  p1        text
    <--  p2        text
    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-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " build_layout
    *&      Form  data_retrieval
          text
    -->  p1        text
    <--  p2        text
    form data_retrieval.
      data: ld_color(1) type c.
      select ebeln ebelp statu aedat matnr menge meins netpr
    peinh 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
    *&      Form  display_alv_report
          text
    -->  p1        text
    <--  p2        text
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program       = gd_repid
                is_layout                = gd_layout
                i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_user_command  = 'USER_COMMAND'
                i_callback_pf_status_set = 'SET_PF_STATUS'
                it_event                 = gt_events
                is_print                 = gd_prntparams
                it_fieldcat              = fieldcatalog[]
                it_sort                 = it_sortcat
                i_save                   = 'X'
           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  user_command
          text
    -->  p1        text
    <--  p2        text
    *&      Form  top-of-page
          text
    -->  p1        text
    <--  p2        text
    form top-of-page.
    *ALV Header declarations
      data: t_header type slis_t_listheader,
            wa_header type slis_listheader,
            t_line like wa_header-info,
            ld_lines type i,
            ld_linesc(10) type c.
    Title
      wa_header-typ  = 'H'.
      wa_header-info = 'EKKO Table Report'.
      append wa_header to t_header.
      clear wa_header.
    Date
      wa_header-typ  = 'S'.
      wa_header-key = 'Date: '.
      concatenate  sy-datum+6(2) '.'
                   sy-datum+4(2) '.'
       sy-datum(4) into wa_header-info."todays date
      append wa_header to t_header.
      clear: wa_header.
    Total No. of Records Selected
      describe table it_ekko lines ld_lines.
      ld_linesc = ld_lines.
      concatenate 'Total No. of Records Selected: ' ld_linesc
         into t_line separated by space.
      wa_header-typ  = 'A'.
      wa_header-info = t_line.
      append wa_header to t_header.
      clear: wa_header, t_line.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
           exporting
           it_list_commentary = t_header
           i_logo             = 'GANESH_LOGO'.
    endform.                    " top-of-page
          FORM user_command                                             *
    -->  R_UCOMM                                                       *
    -->  RS_SELFIELD                                                   *
    form user_command using r_ucomm like sy-ucomm
    rs_selfield type slis_selfield.
      case r_ucomm.
        when '&IC1'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
        when 'ULHAS'.
          if rs_selfield-fieldname = 'EBELN'.
            read table it_ekko into wa_ekko index rs_selfield-tabindex.
            set parameter id 'BES' field wa_ekko-ebeln.
            call transaction 'ME23N' and skip first screen.
          endif.
      endcase.
    endform.
          FORM set_pf_status                                            *
    -->  RT_EXTAB                                                      *
    form set_pf_status using rt_extab type slis_t_extab.
      set pf-status 'ZNEWSTATUS'.
    endform.
    *&      Form  build_events
          text
    -->  p1        text
    <--  p2        text
    form build_events.
      data: ls_event type slis_alv_event.
      call function 'REUSE_ALV_EVENTS_GET'
       exporting
         i_list_type           = 0
       importing
         et_events             = gt_events[]
    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 gt_events with key name =  slis_ev_end_of_page
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_PAGE' to ls_event-form.
        append ls_event to gt_events.
      endif.
      read table gt_events with key name =  slis_ev_end_of_list
                  into ls_event.
      if sy-subrc = 0.
        move 'END_OF_LIST' to ls_event-form.
        append ls_event to gt_events.
      endif.
    endform.                    " build_events
    *&      Form  build_print_params
          text
    -->  p1        text
    <--  p2        text
    form build_print_params.
      gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
      gd_prntparams-no_coverpage = 'X'.
    endform.                    " build_print_params
          FORM END_OF_PAGE                                              *
    form end_of_page.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      write: sy-uline(50).
      skip.  write:/40 'Page:', sy-pagno .
    endform.
          FORM END_OF_LIST                                              *
    form end_of_list.
      data: listwidth type i,
      ld_pagepos(10) type c,
      ld_page(10)    type c.
      skip.  write:/40 'Page:', sy-pagno .
    endform.
    *&      Form  build_sortcat
          text
    -->  p1        text
    <--  p2        text
    form build_sortcat.
    wa_sort-spos      = 1.
    wa_sort-fieldname = 'EBELN'.
    append wa_sort to it_sortcat.
    wa_sort-spos      = 2.
    wa_sort-fieldname = 'EBELP'.
    append wa_sort to it_sortcat.
    endform.                    " build_sortcat
    regards,
    keerthi.

  • Help needed regarding ALV report

    Hi,
    I have a query regarding ALV report.
    The requirement is as follows:-
    When the user executes the ALV report and if he sums one numeric field column values and filters out some of the field columns ( for example there r 5 columns in the report and the user has filtered out 2 of them and viewing only 3 columns)
    and now the requirements is that when the user runs the report later he should see the modified report ( i mean only 3 cloumns and the total value of the column which he has made) but not the original output which was there when the report was developed.
    First of all i wanna know is it possible to do r not. If yes then how
    Hope u have got what i want.
    eagerly waiting for ur reply.
    regards,
    maqsood

    Hi
    Yes you can! You have to manage the layout variant.
    So when you call your ALV you have to set the parameter I_SAVE = 'A'.
    In this way you'll allow the user to save the variants for layout.
    After you has to have a chance to choose the variant in selection-screen.
    See the demo program BCALV_GRID_11 to manage the variant in selection-screen.
    Max

  • Adding the ABAP code to SAP Query to support Query's ALV Double click.

    Hi, Expert.
    I need to add some ABAP Code into SAP Query (or Infoset) to support the double click event on ALV cell of result of query.
    Is it possible & How to do ?
    Thank you very much.
    Best Regard
    Nattapash C.

    Hi, Gautham.
    I've put BREAK-POINT in all code section e.g. INITIALIZATION, END-OF-SELECTION..
    I found there are some section for add code that will be executed when query is processing before output data to ALV.
    What I need to know is Where I can input the code after ALV output. For support the Double Click Event on Query's ALV cell.
    Best Regard,
    Nattapash C.

  • What is the constant name for Change layout Button in ALV Grid ABAP Objects

    Dear All,
    I have one query please help me.
    what is the constant name for Change layout Button in ALV Grid ABAP Objects.
    With Rgds,
    Babu

    Halo Vinod,
    The consant name is cl_gui_alv_grid=>mc_fc_current_variant.
    Regards
    Arshad

  • Query on ALV

    I have a query on ALV.
    When am doing a addition for a currency field with some negative amounts and positive amounts, the Sumation of all amounts are not happening.
    Could someone please help me on this.
    Thanks in advance.
    Prince

    Hi,
    In ALV fieldcatalog, please pass the CFIELDNAME and CTABNAME.
    CFIELDNAME = Currency Key,
    CTABNAME = Currency key table name.
    like use below code in the fieldcatalog
    LS_FIELDCAT-CFIELDNAME    = 'WAERK'.
    LS_FIELDCAT-CTABNAME      = 'VBAP'.
    I think summation is working fine.
    rewards if helpful.
    Regards,
    Subbarao

  • Advanced ALV using ABAP objects

    Hi All ABAPers,
    I have a question in Advanced ALV using ABAP objects.Can we display the output ie., ALV Grid without defining the custom cointainer?ie., just as we do in the classical ALV without defining any screens.Can we do that as a normal executable program ie., without using module pool programming.Please give me a solution.
    Thanks & Regards,
    Chaitanya.

    If you want editable grids then the cl_salv_table method won't unfortunately be of use since (currently) there's no editable facility / method.
    So if you are using cl_gui_alv_grid here's how to "get round" the problem.
    I'm essentially using my own alv class which is a reference to cl_gui_alv_grid  but the methodology shown here is quite simple.
    What you can do is to create a method which calls a function module for example ZZ_CALL_SCREEN so you only have to code a Screen and a GUI in ONE function module and not in every  ALV report.
    for example you could create something like this
    My version has the option of 2 screens - so when I double click on a cell in one grid I can  perform some actions and then display a 2nd grid before returning back to the ist grid.You can easily modify this to suit your applications.
    The parameters are fairly self evident from the code. You can just use this as a model for your own applications.
    I agree that having to code a separate screen and GUI for OO ALV GRID reports was for some people a "show stopper" in switching  from the old SLIS  to OO ALV reports.
    I Hope if any SAP development guys are reading this PLEASE PROVIDE EDITABLE FUNCTIONALITY IN THE NEW CL_SALV_TABLE class.  Thanks in advance.
    method display_data.
    call function 'ZZ_CALL_SCREEN'
      exporting
        screen_number       =  screen_number
        program             =  program
        title_text          =  title_text
       i_gridtitle         =  i_gridtitle
        i_zebra             =  i_zebra
        i_edit              =  i_edit
        i_opt               =  i_opt
        i_object            =  z_object
      changing
        e_ucomm             =  e_ucomm
        it_fldcat           =  it_fldcat
        gt_outtab           =  gt_outtab.
    e_ucomm = sy-ucomm.
    endmethod.
    function zz_call_screen .
    *"*"Local interface:
    *"  IMPORTING
    *"     REFERENCE(SCREEN_NUMBER) TYPE  SY-DYNNR
    *"     REFERENCE(PROGRAM) TYPE  SY-REPID
    *"     REFERENCE(TITLE_TEXT) TYPE  CHAR50
    *"     REFERENCE(I_GRIDTITLE) TYPE  LVC_TITLE
    *"     REFERENCE(I_ZEBRA) TYPE  LVC_ZEBRA
    *"     REFERENCE(I_EDIT) TYPE  LVC_EDIT
    *"     REFERENCE(I_OPT) TYPE  LVC_CWO
    *"     REFERENCE(I_OBJECT) TYPE REF TO  ZZHR_ALV_GRID
    *"  CHANGING
    *"     REFERENCE(E_UCOMM) TYPE  SY-UCOMM
    *"     REFERENCE(IT_FLDCAT) TYPE  LVC_T_FCAT
    *"     REFERENCE(GT_OUTTAB) TYPE  STANDARD TABLE
    assign gt_outtab to <dyn_table>.
    move title_text to screen_title.
    assign i_object to <zogzilla>.
    export <dyn_table> to memory id 'dawggs'.
    export i_gridtitle to memory id 'i_gridtitle'.
    export i_edit to memory id 'i_edit'.
    export i_zebra to memory id 'i_zebra'.
    export i_opt to memory id 'í_opt'.
    export it_fldcat to memory id 'it_fldcat'.
    case screen_number.
    when '100'.
    call screen 100.
    when '200'.
    call screen 200.
    endcase.
    endfunction.
    process before output.
    module status_0100.
    process after input.
    module user_command_0100.
    rocess before output.
    module status_0200.
    process after input.
    module user_command_0200.
    *   INCLUDE LZHR_MISCO01                                               *
    *&      Module  STATUS_0100  OUTPUT
    *       text
    module status_0100 output.
    import <dyn_table> from memory id 'dawggs'.
    import i_gridtitle from memory id 'i_gridtitle'.
    import  i_edit from memory id 'i_edit'.
    import i_opt from  memory id 'í_opt'.
    import  it_fldcat from  memory id 'it_fldcat'.
    i_object = <zogzilla>.
    call method i_object->display_grid
      exporting
        i_gridtitle = i_gridtitle
        i_edit  = i_edit
        i_zebra = i_zebra
        i_opt = i_opt
        g_fldcat = it_fldcat
        g_outtab = <dyn_table>
       changing
         it_fldcat = it_fldcat
         gt_outtab = <dyn_table>.
      set pf-status '001'.
      set titlebar '000' with screen_title.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  STATUS_0200  OUTPUT
    *       text
    module status_0200 output.
    import <dyn_table> from memory id 'dawggs'.
    import i_gridtitle from memory id 'i_gridtitle'.
    import  i_edit from memory id 'i_edit'.
    import i_opt from  memory id 'í_opt'.
    import  it_fldcat from  memory id 'it_fldcat'.
    i_object = <zogzilla>.
    call method i_object->display_grid
      exporting
        i_gridtitle = i_gridtitle
        i_edit  = i_edit
        i_zebra = i_zebra
        i_opt = i_opt
        g_fldcat = it_fldcat
        g_outtab = <dyn_table>
       changing
         it_fldcat = it_fldcat
         gt_outtab = <dyn_table>.
    set pf-status '001'.
      set titlebar '000' with screen_title.
    endmodule.                 " STATUS_0200  OUTPUT
    *   INCLUDE LZHR_MISCI01                                               *
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    module user_command_0100 input.
      case sy-ucomm.
        when 'BACK'.
          leave to screen 0.
        when 'EXIT'.
          leave program.
        when 'RETURN'.
          leave program.
        when others.
      endcase.
    endmodule.                 " USER_COMMAND_0100  INPUT
    *&      Module  USER_COMMAND_0200  INPUT
    *       text
    module user_command_0200 input.
    case sy-ucomm.
        when 'BACK'.
          leave to screen 0.
        when 'EXIT'.
          leave program.
        when 'RETURN'.
          leave program.
        when others.
      endcase.
    endmodule.                 " USER_COMMAND_0200  INPUT
    Cheers
    jimbo

  • ALV using ABAP Classes and Objects

    Hi All,
    I am trying to print the values in my internal table using ALV, using ABAP classes and objects. Here the title for columns are picked based on the title specified in the data element. I want to set the title of my columns by my own. how to achieve this ?. Please provide me a sample code if possible.
    thanks & regards,
    Navneeth.K

    Hello Navneeth
    The following sample report shows how to build and modify a fieldcatalog (routine <b>BUILD_FIELDCATALOG_KNB1</b>).
    *& Report  ZUS_SDN_ALVGRID_EVENTS
    REPORT  zus_sdn_alvgrid_events.
    DATA:
      gd_okcode        TYPE ui_func,
      gt_fcat          TYPE lvc_t_fcat,
      go_docking       TYPE REF TO cl_gui_docking_container,
      go_grid1         TYPE REF TO cl_gui_alv_grid.
    DATA:
      gt_knb1          TYPE STANDARD TABLE OF knb1.
    PARAMETERS:
      p_bukrs      TYPE bukrs  DEFAULT '2000'  OBLIGATORY.
    *       CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING
              e_row_id
              e_column_id
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
    *       CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_hotspot_click.
    *   define local data
        DATA:
          ls_knb1     TYPE knb1,
          ls_col_id   TYPE lvc_s_col.
        READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row_id-index.
        CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
        CASE e_column_id-fieldname.
          WHEN 'KUNNR'.
            SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
            SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
            CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
          WHEN 'ERNAM'.
    *        SET PARAMETER ID 'USR' FIELD ls_knb1-ernam.
    *        NOTE: no parameter id available, yet simply show the priciple
            CALL TRANSACTION 'SU01' AND SKIP FIRST SCREEN.
          WHEN OTHERS.
    *       do nothing
        ENDCASE.
    *   Set active cell to field BUKRS otherwise the focus is still on
    *   field KUNNR which will always raise event HOTSPOT_CLICK
        ls_col_id-fieldname = 'BUKRS'.
        CALL METHOD go_grid1->set_current_cell_via_id
          EXPORTING
            is_row_id    = e_row_id
            is_column_id = ls_col_id.
      ENDMETHOD.                    "handle_hotspot_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
      SELECT        * FROM  knb1 INTO TABLE gt_knb1
             WHERE  bukrs  = p_bukrs.
    * Create docking container
      CREATE OBJECT go_docking
        EXPORTING
          parent                      = cl_gui_container=>screen0
          ratio                       = 90
        EXCEPTIONS
          OTHERS                      = 6.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Create ALV grid
      CREATE OBJECT go_grid1
        EXPORTING
          i_parent          = go_docking
        EXCEPTIONS
          OTHERS            = 5.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Set event handler
      SET HANDLER:
        lcl_eventhandler=>handle_hotspot_click FOR go_grid1.
    * Build fieldcatalog and set hotspot for field KUNNR
      PERFORM build_fieldcatalog_knb1.
    * Display data
      CALL METHOD go_grid1->set_table_for_first_display
        CHANGING
          it_outtab       = gt_knb1
          it_fieldcatalog = gt_fcat
        EXCEPTIONS
          OTHERS          = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * Link the docking container to the target dynpro
      CALL METHOD go_docking->link
        EXPORTING
          repid                       = syst-repid
          dynnr                       = '0100'
    *      CONTAINER                   =
        EXCEPTIONS
          OTHERS                      = 4.
      IF sy-subrc <> 0.
    *   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * ok-code field = GD_OKCODE
      CALL SCREEN '0100'.
    END-OF-SELECTION.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'STATUS_0100'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE gd_okcode.
        WHEN 'BACK' OR
             'END'  OR
             'CANC'.
          SET SCREEN 0. LEAVE SCREEN.
        WHEN OTHERS.
      ENDCASE.
      CLEAR: gd_okcode.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Form  BUILD_FIELDCATALOG_KNB1
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fieldcatalog_knb1 .
    * define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
    *     I_BUFFER_ACTIVE              =
          i_structure_name             = 'KNB1'
    *     I_CLIENT_NEVER_DISPLAY       = 'X'
    *     I_BYPASSING_BUFFER           =
    *     I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        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.
      LOOP AT gt_fcat INTO ls_fcat
              WHERE ( fieldname = 'KUNNR'  OR
                      fieldname = 'ERNAM' ).
        ls_fcat-hotspot = abap_true.
        ls_fcat-scrtext_s  = '<short text>'.  " short text of column
        ls_fcat-scrtext_m = '<medium text>'.  " medium text of column
        ls_fcat-scrtext_l   = '<long text>'.  " longtext text of column
        ls_fcat-tooltip      = '...'.  " ALV control: Tool tip for column header
        ls_fcat-coltext    = '...'.   " ALV control: Column heading
        MODIFY gt_fcat FROM ls_fcat.
      ENDLOOP.
    ENDFORM.                    " BUILD_FIELDCATALOG_KNB1
    Regards
      Uwe

  • Regarding ALV Header

    Hi Abapers,
    I am having one Problem regarding ALV Header on the report. Requirement is to get the data it into this order on ALV Header using Simple ABAP.
    Summary
    "Building No       Room No          Comments
    111                   AA                   Over Allocated.
    545                   XX                    Space Free
    787                   YY                   No Space
    I have Tried to enter it into the header table but the data is not coming correctly.
    Problem is It is coming in this way which is wrong..
    Summary
    "Building No  Room No  Comments
    111   AA   Over Allocated.
    545   XX    Space Free
    787   YY   No Space
    Can Any body solve my Problem to get the header information it into the below .
    Summary
    "Building No       Room No          Comments
    111                   AA                   Over Allocated.
    545                   XX                    Space Free
    787                   YY                   No Space

    Hi ,
    I have tried but couldn't succeded. Can you Please provide me the solution.

  • Query regarding updation thru a Procedure

    Hi,I have a query regarding updation.
    1.I invoke a procedure in Oracle called submit thru my Java application.
    The submit procedure saves the XML data in the database
    and displays this data in a Front End GUI.
    2. Now,I make a change in my Java application by adding new elements to the same row.This row now contains additional XML elements.
    I would like to display the new row with the new elements in the GUI.
    What is a better option for doing the above?
    1.Delete the row being shown,save the new row with the changes in the database,and re display it?
    2.Or,Update the row dynamically and refresh?
    Any suggestions
    Thanks,

    Hi,I have a query regarding updation.
    1.I invoke a procedure in Oracle called submit thru
    my Java application.
    The submit procedure saves the XML data in the
    database
    and displays this data in a Front End GUI.
    2. Now,I make a change in my Java application by
    adding new elements to the same row.This row now
    contains additional XML elements.
    I would like to display the new row with the new
    elements in the GUI.
    What is a better option for doing the above?
    1.Delete the row being shown,save the new row with
    the changes in the database,and re display it?
    2.Or,Update the row dynamically and refresh?
    Any suggestions
    Thanks,If you delete (it seems to me yours this process is regular and frequent) and re insert the new updated one record then High water mark will cause to scan yours table which may cause to degrade the performance.AFAIK you should go with update.But hold down dont implement it as i suggested lets see what are others solution here which may be more precious then mine.
    Khurram

  • A query regarding synchronised functions, using shared object

    Hi all.
    I have this little query, regarding the functions that are synchronised, based on accessing the lock to the object, which is being used for synchronizing.
    Ok, I will clear myself with the following example :
    class First
    int a;
    static int b;
    public void func_one()
    synchronized((Integer) a)
    { // function logic
    } // End of func_one
    public void func_two()
    synchronized((Integer) b)
    { / function logic
    } // End of func_two
    public static void func_three()
    synchronized((Integer) a)
    { // function logic
    } // End of func_three, WHICH IS ACTUALLY NOT ALLOWED,
    // just written here for completeness.
    public static void func_four()
    synchronized((Integer) b)
    { / function logic
    } // End of func_four
    First obj1 = new First();
    First obj2 = new First();
    Note that the four functions are different on the following criteria :
    a) Whether the function is static or non-static.
    b) Whether the object on which synchronization is based is a static, or a non-static member of the class.
    Now, first my-thoughts; kindly correct me if I am wrong :
    a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisation, since in case obj1 and obj2 happen to call the func_one at the same time, obj1 will obtain lock for obj1.a; and obj2 will obtain lock to obj2.a; and both can go inside the supposed-to-be-synchronized-function-but-actually-is-not merrily.
    Kindly correct me I am wrong anywhere in the above.
    b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation.
    Kindly correct me I am wrong anywhere in the above.
    c) In case 3, we have a static function , synchronized on a non-static object. However, Java does not allow functions of this type, so we may safely move forward.
    d) In case 4, we have a static function, synchronized on a static object.
    Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation. But we are only partly done for this case.
    First, Kindly correct me I am wrong anywhere in the above.
    Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".
    Another query : so far we have been assuming that the only objects contending for the synchronized function are obj1, and obj2, in a single thread. Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.a; and again obj1 trying to obtain lock for obj1.a, which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed. Thus, effectively, our synchronisation is broken.
    Or am I being dumb ?
    Looking forward to replies..
    Ashutosh

    a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisationThere is no synchronization between distinct First objects, but that's what you specified. Apart from the coding bug noted below, there would be synchronization between different threads using the same instance of First.
    b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.obj1/2 don't call methods or try to obtain locks. The two different threads do that. And you mean First.b, not obj1.b and obj2.b, but see also below.
    d) In case 4, we have a static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.Again, obj1/2 don't call methods or try to obtain locks. The two different threads do that. And again, you mean First.b. obj1.b and obj2.b are the same as First.b. Does that make it clearer?
    Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".That's what happens in any case whether you write obj1.func_four(), obj2.func)four(), or First.func_four(). All these are identical when func_four(0 is static.
    Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.aNo we don't, we have a thread trying to obtain the lock on First.b.
    and again obj1 trying to obtain lock for obj1.aYou mean obj2 and First.b, but obj2 doesn't obtain the lock, the thread does.
    which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed.Of course it won't. Your reasoning here makes zero sense..Once First.b is locked it is locked. End of story.
    Thus, effectively, our synchronisation is broken.No it isn't. The second thread will wait on the same First.b object that the first thread has locked.
    However in any case you have a much bigger problem here. You're autoboxing your local 'int' variable to a possibly brand-new Integer object every call, so there may be no synchronization at all.
    You need:
    Object a = new Object();
    static Object b = new Object();

  • Query regarding the conversion of DME file in MT940 format.

    Hello Experts,
    I have a query regarding the generation of MT940 file after generating the payment file from other DME tree.
    After completion of payment run, my payment file is generated in the DME format which is according to the DME tree.
    I want to convert the DME file (which is generated via F110)  from existing format to the standard MT940 format.
    Is there any standard program which converts the DME file to MT940. If so,  please inform me as early.
    I have tried to upload the DME file in FF.5 transaction, but it is not allowing me to convert the file in MT940 structure.
    Or please inform the steps how i can convert the file .
    Awaiting for your inputs.
    Thanks in advance

    Hi Zareena.
    I would like to suggest,
    SX_OBJECT_CONVERT_RAW_TXT.
    Hope that's usefull.
    Good Luck & Regards.
    Harsh Dave

  • Query regarding the data type for fetcing records from multiple ODS tables

    hey guys;
    i have a query regarding the data type for fetcing records from multiple ODS tables.
    if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
    can any one help with some suggestion.

    Hi Mudit,
    One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
    AS is used to rename the column name when data is being selected from your DB.
    So, the query  Select ename as empname from emptable will return the data with column name as empname.
    Regards,
    Bhavesh

Maybe you are looking for

  • Mount Notification Error 295

    I have a Mount Issue and sent this to Apple last year with no fix. It has now transferred over to my iMac and I need to know why because it is causing my iMac to not connect to the network when the power goes off and it reboots. Can anyone translate

  • Applescript - get images from urls in excel

    I have huge a excel file with 2 columns, name_* and url picture. Is there a way to automate all the picture download and rename it with name_* to a specified folder?

  • HT204266 How do i cancel my movie purchased when it stil downloading?

    Hi there...if anyone could help me and tell me how to cancel my purchased for movie when it still downloading....now i paused the download..the bill only charged when the movie is fully download isn't? Can someone tell me what to do...

  • Rented movie on itunes

    so i rented a movie on itunes and want to move it over to my apple tv. i clicked on my apple tv under the device section of itunes, moved over the rented move and clicked accept. it attempted to sync for about 5-10 seconds and the movie moved back to

  • SapScript - Box / Position / Writing Text -

    Hello everyone. I have an problem in a SapScript. I made the following code: BOX FRAME 20 TW BOX HEIGHT '2.2' CM FRAME 10 TW BOX HEIGHT '2.7' CM FRAME 10 TW BOX YPOS '2.7' CM WIDTH '5.5' CM HEIGHT '9.5' CM FRAME 10 TW BOX YPOS '2.7' CM WIDTH '7.0' CM