ALV - error protocol

Hi All
I'm writing an ALV report to do table maintenance of a Z table.
I've used bits of BCALV03 & 04 and other BCALV’s.
I can add new lines and edit fields in the report screen.
I have build F4 to get possible values into my screen fields.
<b>My problem is if I find errors in the form Combi_check and the last
change to a field was made via F4 – my Log-protocol is not shown.
If my last change to a field  before Combi_check was done manuelly –
my Log-protocol is shown OK.
What are I doing wrong ?</b>
I'm using
handle_data_changed
for event data_changed of cl_gui_alv_grid
importing er_data_changed.
method handle_data_changed.
data: ls_good type lvc_s_modi.
loop at er_data_changed->mt_good_cells into ls_good.
  perform combi_check………
if lv_error ne space.
Create Error-protocol
   loop at it_error_tab into wa_error_tab.
     if not wa_error_tab-error eq space.
       CALL METHOD er_data_changed->add_protocol_entry
            EXPORTING
              i_msgid     = '0K'
              i_msgno     = '000'
              i_msgty     = 'E'
              i_msgv1     = wa_error_tab-txt
              i_fieldname = wa_error_tab-fieldname
              i_row_id    = ls_good-row_id.
     endif.
   endloop.
   clear it_error_tab[].
   clear lv_error.
endloop.
LOOP AT  er_data_changed->mt_deleted_rows INTO ls_delete.
Endloop.
endmethod. "handle_data_changed
Best regards
Svend Frederiksen
Frederiksen IT Consulting ApS
ABAP Developer / DK

Hello Svend
As Rich has already implied the DATA_CHANGED event is not yet raised when you call a search help on the ALV list. However, the event will should be raised after hitting the ENTER button which causes the dynpro to run into PAI where you, most  likely, call method go_grid->check_changed_data.
If you want to validate the values selected from a search help then you need to define a handler for event <b>ON_F4</b>. In addition, you need to call method <b>go_grid->register_f4_for_fields</b> (for more details see sample report <b>BCALV_TEST_GRID_F4_HELP</b>).
Regards
  Uwe

Similar Messages

  • Error "Protocol [REMOTE_JDBC] not supported." while logging WORKSPACE ADMIN

    Hi All,
    I am trying the create a seperate domain for workspace admin, which is deployed in the Weblogic server. When I try to login, I get the error "Protocol [REMOTE_JDBC] not supported".
    Am I missing some configuration?
    Thanks in advance.
    Regards,
    Manohar Chhapolia

    Hi,
    Is this this is the first project you've deployed on an Engine you've just installed? Knowing this will help us understand if you have a problem in one of the external resources in your project or if you had a problem caused by the installation.
    If this is a new Engine, did you use the installation wizard that comes with Oracle BPM 10g? How did you answer the database information for the Directory Service and the Engine? Did you allow the wizard to create a new J2EE domain or did you try to use an existing one (I struggle using the wizard using an existing domain during the installation and get a similar error when I do so)?
    Thanks,
    Dan

  • Display error protocol in an alv list

    Hi!
    I have in my program an alv list.Two of its fields are editable. For one of this field I want to control the value key by the user. So , i used ADD_PROTOCOL_ENTRY from class CL_ALV_CHANGED_DATA_PROTOCOL like in report BCALV_EDIT_04. The control works very well when the user key a wrong value.
    But, here is my problem. I add a button to allow user to change value for several line with one click (mass change) and i would like to control entry too. 
    Since when i call method CHECK_CHANGED_DATA after my mass changes nothing appends, in PAI module i add this code.
    DATA WT_CHANGED TYPE REF TO CL_ALV_CHANGED_DATA_PROTOCOL.    CREATE OBJECT WT_CHANGED EXPORTING I_CALLING_ALV = GRID1.
    PERFORM MASS_CHANGE.
    CALL METHOD G_VERIFIER->HANDLE_DATA_CHANGED( WT_CHANGED ).
    In perform mass_change i had this code :
    WT_CELLS-ROW_ID = WT_INDEX2-ROW_ID.
    WT_CELLS-FIELDNAME = '/BIC/ZC_SIPROD'.
    WT_CELLS-VALUE = P_SIPROD.
    WT_CELLS-TABIX = W_TABIX.
    APPEND WT_CELLS.
    APPEND WT_CELLS TO WT_CHANGED->MT_GOOD_CELLS.
    The protocol windows appears. When i click on an error message the cell witch contains the error is selected but the fiels <i>name of the columns</i> is empty in the protocol windows and the incorrect value is not deleted.
    NB : when i do manual change (i.e line by line) this columns isn't empty and the incorrect value is deleted.
    can you help me in order to solve my problem?
    Thanks by advance,
    LB.
    Message was edited by:
            Laurent BOUDART

    Hi,
    you can have a look in BCALV_GRID_EDIT.
    Look in the perform data_changed.
    Edited by: Mario Schmidt on Jun 21, 2010 5:05 AM

  • Editable Alv: ERROR in er_data_changed- display_protocol

    I have one fields "Emp_dept" in the record of the ALV Grid which can be edited, but when I edit this field  with  enter  event it will generate a error in display protocal, I want it to save in database , I debuged the program it reflect the in internal table but failed to reflect the in change in data base, as i Just started dveelopment in abap programing i searched the whole web for this problem but couldnot sucessfull please help me in this regarrd
    Here is my code:
    I am using module pool programing and I am following abap slandered program Bcalv_edit_03.
    FUNCTION-POOL Z_EMPLOYEE.                   "MESSAGE-ID ..
    * INCLUDE LZ_EMPLOYEED...                    " Local class definition
    TABLES:ZEMPLOYEE, ZEMP_COMM.
    DATA: zemploye TYPE TABLE OF zemployee  WITH HEADER LINE,
      WA TYPE zemployee .
    DATA: ZEMP_COM TYPE TABLE OF ZEMP_COMM   WITH HEADER LINE.
      DATA : WACOMM TYPE ZEMP_COMM.
    DATA: ZEMP_ADR TYPE TABLE OF ZEMP_ADRESS  WITH HEADER LINE,
    WA_ADR TYPE ZEMP_ADRESS.
    DATA: ZEMP_EDU TYPE TABLE OF ZEMP_EDUCATION1  WITH HEADER LINE,
    WA_EDU1 TYPE ZEMP_EDUCATION1.
    DATA EMPD TYPE ZEMP_ID.
    *data empd LIKE zemployee-emp_id.
      data: O_DOCKING TYPE REF TO CL_GUI_DOCKING_CONTAINER,
    O_GRID TYPE REF TO CL_GUI_ALV_GRID,"Grid
       i_selected_rows TYPE lvc_t_row,"Selected Rows
            w_selected_rows TYPE lvc_s_row,
       WA_LAYOUT TYPE LVC_S_LAYO,
    class lcl_event_receiver definition deferred.
    data: g_event_receiver type ref to lcl_event_receiver.
    types:BEGIN OF i_zemployee ,
        emp_id type zemployee-emp_id,
       emp_name type zemployee-emp_name,
       D_O_BIRTH TYPE ZEMPLOYEE-D_O_BIRTH,
       D_o_jOIN TYPE ZEMPLOYEE-D_o_jOIN,
       EMP_DEPT TYPE ZEMPLOYEE-EMP_DEPT,
       EMP_NO type ZEMP_COMM-EMP_NO,
       eemp_id type zemp_comm-emp_id,
       EMP_ADRESS TYPE ZEMP_ADRESS-EMP_ADRESS,
       EMP_RES_ADDR TYPE ZEMP_ADRESS-EMP_RES_ADDR,
       EMP_EDU1 TYPE ZEMP_EDUCATION1-EMP_EDU1,
      END OF i_zemployee.
       Data:
         i_tb type i_zemployee,
         emp_itb like table of i_tb.
         data:t_fcat TYPE lvc_t_fcat,
         wa_fcat TYPE lvc_s_fcat.
    DATA:
       screen  TYPE n LENGTH 4 VALUE 0100,
       screen1  TYPE n LENGTH 4 VALUE 0110,
       screen2  TYPE n LENGTH 4 VALUE 0120,
       screen3  TYPE n LENGTH 4 VALUE 0130,
        ok_code LIKE sy-ucomm.
       FORM FREE_OBJECTS .
       CALL METHOD O_GRID->FREE
         EXCEPTIONS
           CNTL_ERROR        = 1
           CNTL_SYSTEM_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.
       FREE O_GRID.
       CALL METHOD O_DOCKING->FREE
         EXCEPTIONS
           CNTL_ERROR        = 1
           CNTL_SYSTEM_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.
      FREE O_DOCKING.
    ENDFORM.
      form sol using emp_idd .
        data l_num(5) type n.
        l_num = emp_idd.
    * CALL FUNCTION 'NUMBER_GET_NEXT'
    *         EXPORTING
    *              nr_range_nr             = '01'
    *              object                  = 'ZEMP_AUTO'
    *         IMPORTING
    *              number                  = l_num
    *         EXCEPTIONS
    *              interval_not_found      = 1
    *              number_range_not_intern = 2
    *              object_not_found        = 3
    *              quantity_is_0           = 4
    *              quantity_is_not_1       = 5
    *              interval_overflow       = 6
    *              buffer_overflow         = 7
    *              OTHERS                  = 8.
        l_num = l_num + 1.
    EMP_IDD = L_NUM.
    endform.
      class lcl_event_receiver definition.
      public section.
         methods:
           handle_data_changed
              for event data_changed of cl_gui_alv_grid
                  importing er_data_changed.
      private section.
    * This flag is set if any error occured in one of the
    * following methods:
         data: error_in_data type c.
    * Methods to modularize event handler method HANDLE_DATA_CHANGED:
         methods: check_planetype
          importing
             ps_good_planetype type lvc_s_modi
             pr_data_changed type ref to cl_alv_changed_data_protocol.
    *    methods: ch_new_plane_v_new_seatsocc
    *           importing
    *              psg_plane type lvc_s_modi
    *              psg_socc type lvc_s_modi
    *              ps_saplane type saplane
    *              pr_data_changed type ref to cl_alv_changed_data_protocol.
    *    methods: ch_new_plane_v_old_seatsocc
    *           importing
    *              psg_plane type lvc_s_modi
    *              ps_saplane type saplane
    *              pr_data_changed type ref to cl_alv_changed_data_protocol.
    *    methods: check_seatsocc
    *           importing
    *              ps_good type lvc_s_modi
    *              pr_data_changed type ref to cl_alv_changed_data_protocol.
    * This is a suggestion how you could comment your checks in each method:
    * CHECK: fieldname(old/new value) !<comp> fieldname(old/new value)
    * IF NOT: (What to tell the user is wrong about the input)
    * Remarks:
    *  fieldname:       fieldname of table for the corresponding column
    *  (old/new value): ckeck with value of GT_OUTTAB or MT_GOOD_CELLS.
    *  !<comp>        : the value is valid if the condition <comp> holds.
    * Example:
    *  CHECK seatsocc(new) !>= seatsmax(old)
    *  IF NOT: There are not enough number of seats according to this
    *          planetype.
    endclass.
    class lcl_event_receiver implementation.
       method handle_data_changed.
         data: ls_good type lvc_s_modi.
        error_in_data = space.
         loop at er_data_changed->mt_good_cells into ls_good.
           case ls_good-fieldname.
    * check if column PLANETYPE of this row was changed
             when 'EMP_DEPT'.
               call method check_planetype
                      exporting
                         ps_good_planetype = ls_good
                         pr_data_changed   = er_data_changed.
          endcase.
         endloop.
    *§7.Display application log if an error has occured.
         if error_in_data eq 'X'.
            call method er_data_changed->display_protocol.  ( Error line)        <-------------------------------
         endif.
       endmethod.
       method check_planetype.
         data: l_planetype type zemp_dept,
               ls_saplane type zemployee,
               ls_good_seatsocc type lvc_s_modi.
         call method pr_data_changed->get_cell_value
               exporting i_row_id =    ps_good_planetype-row_id
                         i_fieldname = ps_good_planetype-fieldname
               importing e_value     = l_planetype.
    MODIFY ZEMPLOYEE FROM TABLE emp_itb.
         select single * from zemployee into ls_saplane where
                                          emp_dept = l_planetype.
               if sy-subrc ne 0.
           call method pr_data_changed->add_protocol_entry
            exporting
               i_msgid = '0K' i_msgno = '000'  i_msgty = 'E'
               i_msgv1 = text-m03           "Flugzeugtyp
               i_msgv2 = l_planetype
               i_msgv3 = text-m05           "exitstiert nicht
               i_fieldname = ps_good_planetype-fieldname
               i_row_id = ps_good_planetype-row_id.
           error_in_data = 'X'.
           exit. "plane does not exit, so we're finished here!
         endif.
    endmethod.
    endclass.
    **********************************************Module output****************
    MODULE STATUS_0120 OUTPUT.
      SET PF-STATUS 'START'.
      SET TITLEBAR 'STARTT'.
    IF O_DOCKING IS INITIAL.
    *   Creating Docking Container
        data: lt_exclude type ui_functions.
           CREATE OBJECT O_DOCKING
                  EXPORTING
                    RATIO                       = '95'.
           IF SY-SUBRC EQ 0.
    *   Creating Grid
             CREATE OBJECT O_GRID
                 EXPORTING
                    I_PARENT          = O_DOCKING.
           ENDIF.
    endif.
    * Filling the fieldcatalog table
    *    CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    *      EXPORTING
    *        I_STRUCTURE_NAME       = 'i_tb'
    *      CHANGING
    *        CT_FIELDCAT            = t_fcat
    *      EXCEPTIONS
    *        INCONSISTENT_INTERFACE = 1
    *        PROGRAM_ERROR          = 2
    *        OTHERS                 = 3.
       WA_LAYOUT-GRID_TITLE = 'EMPLOYEE TABLE DETAILS'.
       WA_LAYOUT-ZEBRA = 'X'.
       WA_LAYOUT-EDIT = 'X'.
    IF T_FCAT is  initial.
    *  wa_fcat-fieldname = 'EMP_ID'.
    *  wa_fcat-ref_table = 'ZEMPLOYEE'.
    *  wa_fcat-ref_field = 'EMP_ID'.
    *  wa_fcat-col_pos = 2.
    *  APPEND wa_fcat TO t_fcat.
    *  CLEAR wa_fcat.
       wa_fcat-fieldname = 'EMP_NAME'.
       wa_fcat-ref_table = 'ZEMPLOYEE'.
       wa_fcat-ref_field = 'EMP_NAME'.
       wa_fcat-col_pos = 3.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
        wa_fcat-fieldname = 'EMP_DEPT'.
       wa_fcat-ref_table = 'ZEMPLOYEE'.
       wa_fcat-ref_field = 'EMP_DEPT'.
       wa_fcat-col_pos = 4.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
          wa_fcat-fieldname = 'D_O_BIRTH'.
       wa_fcat-ref_table = 'ZEMPLOYEE'.
       wa_fcat-ref_field = 'D_O_BIRTH'.
       wa_fcat-col_pos = 5.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
       wa_fcat-fieldname = 'D_O_JOIN'.
      wa_fcat-ref_table = 'ZEMPLOYEE'.
      wa_fcat-ref_field = 'D_O_JOIN'.
      wa_fcat-col_pos = 6.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
    wa_fcat-fieldname = 'EMP_NO'.
      wa_fcat-ref_table = 'ZEMP_COMM'.
      wa_fcat-ref_field = 'EMP_NO'.
      wa_fcat-col_pos = 7.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
       wa_fcat-fieldname = 'EMP_ADRESS'.
       wa_fcat-ref_table = 'ZEMP_ADRESS'.
       wa_fcat-ref_field = 'EMP_ADRESS'.
       wa_fcat-col_pos = 7.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
       wa_fcat-fieldname = 'EMP_RES_ADDR'.
       wa_fcat-ref_table = 'ZEMP_ADRESS'.
       wa_fcat-ref_field = 'EMP_RES_ADDR'.
       wa_fcat-col_pos = 8.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
       wa_fcat-fieldname = 'EMP_EDU1'.
       wa_fcat-ref_table = 'ZEMP_EDUCATION1'.
       wa_fcat-ref_field = 'EMP_EDU1'.
       wa_fcat-col_pos = 9.
       APPEND wa_fcat TO t_fcat.
       CLEAR wa_fcat.
    ENDIF.
    * CALL METHOD o_grid->register_edit_event
    *    EXPORTING  i_event_id = cl_gui_alv_grid=>mc_evt_modified.
    *    W_VARIANT-REPORT = SY-REPID.
    * Displaying the output
         CALL METHOD O_GRID->SET_TABLE_FOR_FIRST_DISPLAY
           EXPORTING
    *       IS_VARIANT                    = VARIANT
             I_SAVE                        = 'A'
            I_STRUCTURE_NAME       = 'i_tb'
             IS_LAYOUT                     = WA_LAYOUT
             it_toolbar_excluding  = lt_exclude
           CHANGING
           IT_OUTTAB                     =  emp_itb
             IT_FIELDCATALOG               = t_fcat
           EXCEPTIONS
             INVALID_PARAMETER_COMBINATION = 1
             PROGRAM_ERROR                 = 2
             TOO_MANY_LINES                = 3
             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.
    *call method cl_gui_control=>set_focus exporting control = O_GRID.
    *      call method cl_gui_cfw=>flush.
           CALL METHOD o_grid->set_ready_for_input
          EXPORTING
            I_READY_FOR_INPUT = 1.
      CALL METHOD O_GRID->REGISTER_EDIT_EVENT
         EXPORTING
           I_EVENT_ID = CL_GUI_ALV_GRID=>mc_evt_enter.
    *    EXCEPTIONS
    *      ERROR      = 1
    *      OTHERS     = 2.
    **** UPDATE zemployee FROM TABLE emp_itb.
      create object g_event_receiver.
       set handler g_event_receiver->handle_data_changed for o_grid.
    *  IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *  ENDIF.
    ENDMODULE.                 " STATUS_0120  OUTPUT
    *&      Module  USER_COMMAND_0120  INPUT
    *       text
    MODULE USER_COMMAND_0120 INPUT.
    DATA LV_UCOMM TYPE SY-UCOMM.
    *  data: ok_code like sy-ucomm .
      LV_UCOMM = SY-UCOMM.
       CASE LV_UCOMM.
      WHEN 'CANCEL' OR 'EXIT'.
           PERFORM FREE_OBJECTS.
           LEAVE PROGRAM.
         WHEN 'BACK'.
            CALL METHOD o_grid->set_frontend_fieldcatalog
             EXPORTING
               it_fieldcatalog = t_fcat[].
            if o_grid is not initial.
        CALL METHOD o_grid->refresh_table_display
           EXCEPTIONS
             finished = 1
             OTHERS   = 2.
    endif.
           PERFORM FREE_OBJECTS.
           CALL SCREEN 110.
    *      SET SCREEN '0'.
    *      LEAVE SCREEN.
       ENDCASE.
    ENDMODULE.   
    Please help me to solve this porblem..

    Hi suhas,
    my issue is not the lack of data .....
    my issue is about the error handling in data_changed event in alv oops application....am able to display the error log using display_protocol method..,.. but after displaying the error log am still able to save the changes which should not happen....the thing is we should not be able to save the changes...... am having the same issue as the following thread
    Re: CL_ALV_CHANGED_DATA_PROTOCOL - Protocol Popup is not modal
    if u still require any clarifications...pls let me know ur mail-id ill post my code to u ..
    thanks
    suresh

  • ALV Error: Fieldcatalog not found...

    Hello Experts,
    I am currently creating a new report that uses object oriented ALV with
    custom control. But when I run my program it always gives me that there is no fieldcatalog
    found. I will paste my code below so you can see. Hope you can help me out here guys.
    Thank you and take care!
    *=====================================================================
    * Program Name : ZSD_ORDERSTAGE
    * Author       : Aris Hidalgo
    * Date Created : May 4, 2007
    * Description  : Display sales orders for a given customer on a given
    *                date range
    *=====================================================================
    REPORT  zsd_orderstage
            NO STANDARD PAGE HEADING.
    * Data Dictionary Table/s                      *
    TABLES: vbak.
    * Global Structure/s                           *
    TYPES: BEGIN OF t_vbak,
              vbeln TYPE vbak-vbeln,
              posnr TYPE vbap-posnr,
              erdat TYPE vbak-erdat,
              ernam TYPE vbak-ernam,
              auart TYPE vbak-auart,
              kunnr TYPE vbak-kunnr,
              vkgrp TYPE vbak-vkgrp,
             END OF t_vbak.
    TYPES: BEGIN OF t_vbfa,
            vbelv   TYPE vbfa-vbelv,
            posnv   TYPE vbfa-posnv,
            vbtyp_n TYPE vbfa-vbtyp_n,
            vbtyp_v TYPE vbfa-vbtyp_v,
            vbeln   TYPE vbfa-vbeln,
           END OF t_vbfa.
    TYPES: BEGIN OF t_likp,
            vgbel TYPE lips-vgbel,
            vgpos TYPE lips-vgpos,
            vbeln TYPE likp-vbeln,
            posnr TYPE lips-posnr,
            kunnr TYPE likp-kunnr,
           END OF t_likp.
    TYPES: BEGIN OF t_vbrk,
            aubel TYPE vbrp-aubel,
            aupos TYPE vbrp-aupos,
            vbeln TYPE vbrk-vbeln,
           END OF t_vbrk.
    TYPES: BEGIN OF t_output,
            salesorder    TYPE vbak-vbeln,
            salesitem     TYPE vbap-posnr,
            salesgroup    TYPE vbak-vkgrp,
            custcode      TYPE vbak-kunnr,
            shipto        TYPE likp-kunnr,
            creation_date TYPE vbak-erdat,
            created_by    TYPE vbak-ernam,
            delorder      TYPE likp-vbeln,
            invnumber     TYPE vbrk-vbeln,
           END OF t_output.
    * Global Internal Table/s                      *
    DATA: gt_vbak   TYPE STANDARD TABLE OF t_vbak,
          gt_vbfa   TYPE STANDARD TABLE OF t_vbfa,
          gt_likp   TYPE STANDARD TABLE OF t_likp,
          gt_vbrk   TYPE STANDARD TABLE OF t_vbrk,
          gt_output TYPE STANDARD TABLE OF t_output.
    * SELECTION-SCREEN                             *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:     p_kunnr TYPE vbak-kunnr OBLIGATORY.
    SELECT-OPTIONS: s_vkgrp FOR vbak-vkgrp,
                    s_auart FOR vbak-auart,
                    s_erdat FOR vbak-erdat  OBLIGATORY,
                    s_ernam FOR vbak-ernam.
    SELECTION-SCREEN END OF BLOCK b1.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    * Data Declaration/s                           *
    DATA: ok_code             TYPE sy-ucomm,
          save_ok             TYPE sy-ucomm,
          g_max               TYPE i VALUE 100,
          g_repid             TYPE sy-repid,
          gs_layout           TYPE lvc_s_layo,
          cont_for_flights    TYPE scrfname VALUE 'BCALV_GRID_02_100',
          grid1               TYPE REF TO cl_gui_alv_grid,
          custom_container    TYPE REF TO cl_gui_custom_container,
          grid2               TYPE REF TO cl_gui_alv_grid,
    * reference to dialogbox container.
          dialogbox_container TYPE REF TO cl_gui_dialogbox_container,
          event_receiver      TYPE REF TO lcl_event_receiver.
    *       CLASS lcl_event_receiver DEFINITION
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
        handle_double_click
            FOR EVENT double_click OF cl_gui_alv_grid
                IMPORTING e_row e_column,
        handle_close
            FOR EVENT close OF cl_gui_dialogbox_container
                IMPORTING sender,
        create_detail_list.
      PRIVATE SECTION.
        DATA: dialogbox_status TYPE c.  "'X': does exist, SPACE: does not ex.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    *       CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    * §3.At doubleclick(1): The event DOUBLE_CLICK provides
    *    parameters of the clicked row and column.
    *    Use row parameter to select a line of the
    *    corresponding internal table.
      METHOD handle_double_click.
    *    DATA: ls_sflight LIKE LINE OF gt_sflight.
    * read selected row from internal table gt_sflight
    *    READ TABLE gt_sflight INDEX e_row-index INTO ls_sflight.
    * §4.At Doubleclick(2): Select booking data
    *    PERFORM select_table_sbook USING ls_sflight
    *                               CHANGING gt_sbook.
    * §5.At doubleclick(3): Create dialogbox to show detail list
    *   (if not already existent)
        IF dialogbox_status IS INITIAL.
          dialogbox_status = 'X'.
    *      PERFORM create_detail_list.
          CALL METHOD me->create_detail_list.
        ELSE.
          CALL METHOD dialogbox_container->set_visible
            EXPORTING
              visible = 'X'.
          CALL METHOD grid2->refresh_table_display.
        ENDIF.
      ENDMETHOD.                    "handle_double_click
      METHOD handle_close.
    * §6.Handle the CLOSE-button of the dialogbox
    * set dialogbox invisible
    * (the dialogbox is destroyed outomatically when the user
    * switches to another dynpro).
        CALL METHOD sender->set_visible
          EXPORTING
            visible = space.
    * In this example closing the dialogbox leads
    * to make it invisible. It is also conceivable to destroy it
    * and recreate it if the user doubleclicks a line again.
    * Displaying a great amount of data has a greater impact on performance.
      ENDMETHOD.                    "handle_close
      METHOD create_detail_list.
    * create dialogbox container as dynpro-instance
    * When the user switches to another screen, it is
    * destroyed by lifetime mangagement of CFW
        CREATE OBJECT dialogbox_container
            EXPORTING
              top = 150
              left = 150
              lifetime = cntl_lifetime_dynpro
              caption = 'Sales Orders'(200)
              width = 800
              height = 200.
        CREATE OBJECT grid2
            EXPORTING i_parent = dialogbox_container.
    * Register ABAP OO event 'CLOSE'. It is not necessary to register this
    * event at the frontend (this is done during creation).
        SET HANDLER event_receiver->handle_close FOR dialogbox_container.
    * display data
        gs_layout-grid_title = space.
        CALL METHOD grid2->set_table_for_first_display
          EXPORTING
            i_structure_name = 'T_OUTPUT'
            is_layout        = gs_layout
          CHANGING
            it_outtab        = gt_output.
        CALL METHOD cl_gui_control=>set_focus
          EXPORTING
            control = grid2.
      ENDMETHOD.                    "create_detail_list
    ENDCLASS.                    "lcl_event_receiver IMPLEMENTATION
    *       CLASS lcl_get_so DEFINITION
    CLASS lcl_get_so DEFINITION.
      PUBLIC SECTION.
        METHODS: get_sales_orders
                    EXPORTING
                       ex_vbak LIKE gt_vbak.
    ENDCLASS.                    "lcl_get_so DEFINITION
    *       CLASS lcl_get_so IMPLEMENTATION
    CLASS lcl_get_so IMPLEMENTATION.
      METHOD get_sales_orders.
        SELECT vbak~vbeln vbap~posnr vbak~erdat
               vbak~ernam vbak~auart vbak~kunnr
               vbak~vkgrp
          FROM vbak
          INNER JOIN vbap
          ON vbak~vbeln = vbap~vbeln
          INTO TABLE gt_vbak
         WHERE vbak~erdat IN s_erdat
           AND vbak~ernam IN s_ernam
           AND vbak~auart IN s_auart
           AND vbak~vkgrp IN s_vkgrp
           AND vbak~kunnr = p_kunnr.
        IF NOT gt_vbak[] IS INITIAL.
          ex_vbak[] = gt_vbak[].
        ENDIF.
      ENDMETHOD.                    "get_sales_orders
    ENDCLASS.                    "lcl_get_so IMPLEMENTATION
    *       CLASS lcl_get_do DEFINITION
    CLASS lcl_get_do DEFINITION.
      PUBLIC SECTION.
        METHODS: get_delivery_orders
                    IMPORTING
                       value(im_vbak) LIKE gt_vbak
                    EXPORTING
                       value(ex_likp) LIKE gt_likp.
    ENDCLASS.                    "lcl_get_do DEFINITION
    *       CLASS lcl_get_do IMPLEMENTATION
    CLASS lcl_get_do IMPLEMENTATION.
      METHOD get_delivery_orders.
        IF NOT im_vbak[] IS INITIAL.
          SELECT lips~vgbel lips~vgpos
                 likp~vbeln lips~posnr
                 likp~kunnr
            FROM likp
           INNER JOIN lips
              ON likp~vbeln = lips~vbeln
            INTO TABLE gt_likp
             FOR ALL ENTRIES IN im_vbak
           WHERE vgbel = im_vbak-vbeln
             AND vgpos = im_vbak-posnr.
        ENDIF.
        IF NOT gt_likp[] IS INITIAL.
          ex_likp[] = gt_likp[].
        ENDIF.
      ENDMETHOD.                    "get_delivery_orders
    ENDCLASS.                    "lcl_get_do IMPLEMENTATION
    *       CLASS lcl_get_bd DEFINITION
    CLASS lcl_get_bd DEFINITION.
      PUBLIC SECTION.
        METHODS: get_billing_documents
                   IMPORTING
                     value(im_vbak) LIKE gt_vbak
                   EXPORTING
                     value(ex_vbrk) LIKE gt_vbrk.
    ENDCLASS.                    "lcl_get_bd DEFINITION
    *       CLASS lcl_get_bd IMPLEMENTATION
    CLASS lcl_get_bd IMPLEMENTATION.
      METHOD get_billing_documents.
        IF NOT im_vbak[] IS INITIAL.
          SELECT vbrp~aubel vbrp~aupos vbrk~vbeln
            FROM vbrk
           INNER JOIN vbrp
              ON vbrk~vbeln = vbrp~vbeln
            INTO TABLE gt_vbrk
             FOR ALL ENTRIES IN im_vbak
           WHERE aubel = im_vbak-vbeln
             AND aupos = im_vbak-posnr.
        ENDIF.
        IF NOT gt_vbrk[] IS INITIAL.
          ex_vbrk[] = gt_vbrk[].
        ENDIF.
      ENDMETHOD.                    "get_billing_documents
    ENDCLASS.                    "lcl_get_bd IMPLEMENTATION
    *       CLASS lcl_combine_data DEFINITION
    CLASS lcl_combine_data DEFINITION.
      PUBLIC SECTION.
        METHODS: combine_data
                   IMPORTING
                     value(im_vbak) LIKE gt_vbak
                     value(im_likp) LIKE gt_likp
                     value(im_vbrk) LIKE gt_vbrk
                   EXPORTING
                     value(ex_output) LIKE gt_output.
    ENDCLASS.                    "lcl_combine_data DEFINITION
    *       CLASS lcl_combine_data IMPLEMENTATION
    CLASS lcl_combine_data IMPLEMENTATION.
      METHOD combine_data.
        FIELD-SYMBOLS: <fs_vbak> LIKE LINE OF im_vbak,
                       <fs_likp> LIKE LINE OF im_likp,
                       <fs_vbrk> LIKE LINE OF im_vbrk.
        DATA: wa_output LIKE LINE OF ex_output.
        SORT im_vbak ASCENDING BY: vbeln posnr.
        SORT im_likp ASCENDING BY: vgbel vgpos.
        SORT im_vbrk ASCENDING BY: aubel aupos.
        LOOP AT im_vbak ASSIGNING <fs_vbak>.
          READ TABLE im_likp ASSIGNING <fs_likp>
                             WITH KEY vgbel = <fs_vbak>-vbeln
                                      vgpos = <fs_vbak>-posnr
                                      BINARY SEARCH.
          IF sy-subrc = 0.
            MOVE: <fs_vbak>-vbeln TO wa_output-salesorder,
                  <fs_vbak>-posnr TO wa_output-salesitem,
                  <fs_vbak>-vkgrp TO wa_output-salesgroup,
                  <fs_vbak>-kunnr TO wa_output-custcode,
                  <fs_likp>-kunnr TO wa_output-shipto,
                  <fs_vbak>-erdat TO wa_output-creation_date,
                  <fs_vbak>-ernam TO wa_output-created_by,
                  <fs_likp>-vbeln TO wa_output-delorder.
          ENDIF.
          READ TABLE im_vbrk ASSIGNING <fs_vbrk>
                             WITH KEY aubel = <fs_vbak>-vbeln
                                      aupos = <fs_vbak>-posnr
                                      BINARY SEARCH.
          IF sy-subrc = 0.
            MOVE <fs_vbrk>-vbeln TO wa_output-invnumber.
          ENDIF.
          APPEND wa_output TO ex_output.
          CLEAR wa_output.
        ENDLOOP.
        DELETE ex_output WHERE salesorder IS INITIAL.
      ENDMETHOD.                    "combine_data
    ENDCLASS.                    "lcl_combine_data IMPLEMENTATION
    * START-OF-SELECTION                           *
    START-OF-SELECTION.
      DATA: lt_vbak_dum    LIKE gt_vbak,
            lt_likp_dum    LIKE gt_likp,
            lt_vbrk_dum    LIKE gt_vbrk.
      DATA: o_get_so         TYPE REF TO lcl_get_so,
            o_get_do         TYPE REF TO lcl_get_do,
            o_get_bd         TYPE REF TO lcl_get_bd,
            o_combine_data   TYPE REF TO lcl_combine_data.
      CREATE OBJECT: o_get_so,
                     o_get_do,
                     o_get_bd,
                     o_combine_data.
    END-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'MAIN100'.
    *  SET TITLEBAR 'xxx'.
      g_repid = sy-repid.
      IF custom_container IS INITIAL.
        CALL METHOD o_get_so->get_sales_orders
          IMPORTING
            ex_vbak = lt_vbak_dum.
        CALL METHOD o_get_do->get_delivery_orders
          EXPORTING
            im_vbak = lt_vbak_dum
          IMPORTING
            ex_likp = lt_likp_dum.
        CALL METHOD o_get_bd->get_billing_documents
          EXPORTING
            im_vbak = lt_vbak_dum
          IMPORTING
            ex_vbrk = lt_vbrk_dum.
        CALL METHOD o_combine_data->combine_data
          EXPORTING
            im_vbak   = lt_vbak_dum
            im_likp   = lt_likp_dum
            im_vbrk   = lt_vbrk_dum
          IMPORTING
            ex_output = gt_output.
    *Create a custom container control for our ALV Control
        CREATE OBJECT custom_container
            EXPORTING
                container_name = cont_for_flights
            EXCEPTIONS
                cntl_error = 1
                cntl_system_error = 2
                create_error = 3
                lifetime_error = 4
                lifetime_dynpro_dynpro_link = 5.
        IF sy-subrc NE 0.
    *Add your handling, for example
          CALL FUNCTION 'POPUP_TO_INFORM'
            EXPORTING
              titel = g_repid
              txt2  = sy-subrc
              txt1  = 'The control could not be created'(510).
        ENDIF.
    *Create an instance of alv control
        CREATE OBJECT grid1
             EXPORTING i_parent = custom_container.
    *Set a titlebar for the grid control
        gs_layout-grid_title = 'List of Sales Orders'(100).
        CALL METHOD grid1->set_table_for_first_display
          EXPORTING
    *        i_structure_name = 'T_OUTPUT'
            is_layout        = gs_layout
          CHANGING
            it_outtab        = gt_output.
    *Create Object to receive events and link them to handler methods.
    *When the ALV Control raises the event for the specified instance
    *the corresponding method is automatically called.
        CREATE OBJECT event_receiver.
        SET HANDLER event_receiver->handle_double_click FOR grid1.
      ENDIF.
      CALL METHOD cl_gui_control=>set_focus
        EXPORTING
          control = grid1.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CASE save_ok.
        WHEN 'BACK'.
          CALL METHOD custom_container->free.
          CALL METHOD cl_gui_cfw=>flush.
          IF sy-subrc <> 0.
    *Add your handling, for example
            CALL FUNCTION 'POPUP_TO_INFORM'
              EXPORTING
                titel = g_repid
                txt2  = sy-subrc
                txt1  = 'Error in FLush'(500).
          ENDIF.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          CALL METHOD custom_container->free.
          CALL METHOD cl_gui_cfw=>flush.
          IF sy-subrc <> 0.
    *Add your handling, for example
            CALL FUNCTION 'POPUP_TO_INFORM'
              EXPORTING
                titel = g_repid
                txt2  = sy-subrc
                txt1  = 'Error in FLush'(500).
          ENDIF.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          CALL METHOD custom_container->free.
          CALL METHOD cl_gui_cfw=>flush.
          IF sy-subrc <> 0.
    *Add your handling, for example
            CALL FUNCTION 'POPUP_TO_INFORM'
              EXPORTING
                titel = g_repid
                txt2  = sy-subrc
                txt1  = 'Error in FLush'(500).
          ENDIF.
          LEAVE PROGRAM.
      ENDCASE.
      CLEAR save_ok.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT

    Hi Viraylab,
                       You need to craete a fieldcat to print data in ALV and pass this table to the method written below :
    CALL METHOD grid1->set_table_for_first_display
          EXPORTING
           i_structure_name = 'T_OUTPUT'
            is_layout        = gs_layout
          CHANGING
            it_outtab        = gt_output.
           i_fieldcat        = gt_fieldcat
    u can bulid afield catlog table like this :
    form FIELDCAT  using    p_i_fieldcat TYPE SLIS_T_FIELDCAT_ALV.
    DATA : L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    FOR MATERIAL NO
    CLEAR L_FIELDCAT.
    L_FIELDCAT-COL_POS = '1'.
    L_FIELDCAT-FIELDNAME = 'MATNR'.
    L_FIELDCAT-TABNAME = 'IT_MATSTOCK'.
    L_FIELDCAT-seltext_l   = 'MATERIAL NO'.                     " LONG TEXT FOR HEADER.
    L_FIELDCAT-seltext_m   = 'MAT NO'.                     " MEDIUM TEXT FOR HEADER.
    L_FIELDCAT-seltext_s   = 'MATNO'.                     " SHORT TEXT FOR HEADER.
    L_FIELDCAT-EMPHASIZE = 'C410'.                           " COLOR OF THIS COLUMN.
    L_FIELDCAT-OUTPUTLEN = '20'.
    APPEND L_FIELDCAT TO P_I_FIELDCAT.
    FOR MATERIAL TYPE
    CLEAR L_FIELDCAT.
    L_FIELDCAT-COL_POS = '2'.
    L_FIELDCAT-FIELDNAME = 'MTART'.
    L_FIELDCAT-TABNAME = 'IT_MATSTOCK'.
    L_FIELDCAT-seltext_l   = 'MATERIAL TYPE'.                     " LONG TEXT FOR HEADER.
    L_FIELDCAT-seltext_m   = 'MAT TYPE'.                     " MEDIUM TEXT FOR HEADER.
    L_FIELDCAT-seltext_s   = 'MAT TYP'.                     " SHORT TEXT FOR HEADER.
    L_FIELDCAT-EMPHASIZE = 'C510'.                           " COLOR OF THIS COLUMN.
    L_FIELDCAT-OUTPUTLEN = '6'.
    APPEND L_FIELDCAT TO P_I_FIELDCAT.
    FOR MATERIAL DESCRIPTION
    CLEAR L_FIELDCAT.
    L_FIELDCAT-COL_POS = '3'.
    L_FIELDCAT-FIELDNAME = 'MAKTX'.
    L_FIELDCAT-TABNAME = 'IT_MATSTOCK'.
    L_FIELDCAT-seltext_l   = 'MAT DESCRIP'.                     " LONG TEXT FOR HEADER.
    L_FIELDCAT-seltext_m   = 'M DESCRIP'.                     " MEDIUM TEXT FOR HEADER.
    L_FIELDCAT-seltext_s   = 'MDESCRIP'.                     " SHORT TEXT FOR HEADER.
    L_FIELDCAT-EMPHASIZE = 'C310'.                           " COLOR OF THIS COLUMN.
    L_FIELDCAT-OUTPUTLEN = '40'.
    APPEND L_FIELDCAT TO P_I_FIELDCAT.
    Reward points if helpful.
    Regards,
    Hemant

  • Firefox 6 Gives me error "Protocol Javascript isn't associated"

    I have never had this issue before. I have just upgraded to Firefox 6, and now, almost all links, clinking on any link prompts me with: "Firefox doesn't know how to open this link because protocol (javascript) is not associated with any program"
    This has never happened before, but immediately after upgrading to FF6, it's been constant. I have tried uninstalling and re-installing Java, which made no different. I'm completely baffled as to what may be causing this issue.

    According to a suggestion in another thread, you may want to try the following to return certain JavaScript settings to their defaults.
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the filter box, type or paste '''javasc''' and pause while the list is filtered
    (3) If the line with '''network.protocol-handler.external.javascript''' is bold (or shows user set true), double-click it to return its value to the default setting of false. This should get rid of that error.
    (4) If the line with '''javascript.enabled''' is bold (or shows user set false), double-click it to return its value to the default setting of true.
    If the links/buttons/etc. still do not work after that, please indicate whether any of the other settings show "user set".
    Any luck?

  • ALV ERROR in Function Module Fieldcatlog Merge .

    Hi
    I have added 2 more fileds in internral table . this is alv report there is no syntax error .
    i have user function module
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    i_program_name = w_repid
    i_internal_tabname = 'T_BSIK'
    I_STRUCTURE_NAME =
    I_CLIENT_NEVER_DISPLAY = 'X'
    i_inclname = w_repid
    i_bypassing_buffer = 'X'
    I_BUFFER_ACTIVE =
    CHANGING
    ct_fieldcat = T_FIELDCAT
    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 t_fieldcat INTO wa_fieldcat.
    CASE wa_fieldcat-fieldname.
    WHEN 'ZFBDT'.
    wa_fieldcat-key = ''.
    wa_fieldcat-reptext_ddic = 'Net Due Dt.'.
    wa_fieldcat-seltext_l = 'Net Due Dt.'.
    wa_fieldcat-seltext_m = 'Net Due Dt.'.
    wa_fieldcat-seltext_s = 'Net Due Dt.'.
    WHEN 'KUNNR'.
    IF p_kunnr IS INITIAL.
    wa_fieldcat-no_out = 'X'.
    ENDIF.
    WHEN 'LIFNR'.
    IF NOT p_kunnr IS INITIAL.
    wa_fieldcat-no_out = 'X'.
    ENDIF.
    WHEN 'SHKZG'.
    wa_fieldcat-no_out = 'X'.
    WHEN 'ZBD1T'.
    wa_fieldcat-no_out = 'X'.
    WHEN 'BELNR'.
    wa_fieldcat-key = 'X'.
    WHEN OTHERS.
    wa_fieldcat-key = ''.
    ENDCASE.
    MODIFY t_fieldcat FROM wa_fieldcat.
    ENDLOOP.
    I am getting error on that.
    ERROR is :
    The Internal table "\UNCTION= K_KKB_FIELDCAT_MERGE\DATA=L_ABAP_SOURCE[]" IS 72 CHARACTERS Wide
    .the program line is 79 characters wide.
    Thanks
    Chandra

    Hi Chandra,
    For ALV reports the length should not be greater than 72. (please change the same)
    You can also achive the same
    Goto SE38
    Open your program in edit
    Utilities --> Settings --> Set "Downwards-Comp Line Length" falg to X and save. (This wil auotmatically set ur code to 72 chars)
    Hope this helps,
    Nag

  • ALV Error messages

    Is there a list of what specific error messages mean that are returned from ALV function calls.  I have the following code that has data in the IMAT table but the 'REUSE_ALV_LIST_DISPLAY' returns a 1 error code. 
    REPORT  Z_ALVGRID_INTERNAL.
    tables:
    pa0001, zhr_adweather.
    types: begin of ts_imat ,
    orgeh like  PA0001-ORGEH,
    ename like PA0001-ENAME,
    pernr like PA0001-PERNR,
    wapernr  like zhr_adweather-pernr,
    wa_date_taken  like zhr_adweather-date_taken,
    wa_hours_taken  like zhr_adweather-hours_taken,
    wa_expire_date  like zhr_adweather-expire_date,
    wa_makeup_date  like zhr_adweather-makeup_date,
    wa_makeup_hours  like zhr_adweather-makeup_hours,
    wa_results  like zhr_adweather-results,
    end of ts_imat.
    Data:
          imat type table of ts_imat, " internal table
          gs_imat type ts_imat. " work area for the table
    data:
          gs_zhr_adweather type zhr_adweather,
          gs_pernr like pa0001-pernr,
          gs_orgeh like pa0001-orgeh,
          gs_ename like pa0001-ename.
    data i_repid like sy-repid.
    data i_lines like sy-tabix.
    TYPE-POOLS: SLIS.
    data int_fcat type SLIS_T_FIELDCAT_ALV.
    start-of-selection.
      select single pernr orgeh ename from pa0001
      into (gs_imat-pernr, gs_imat-orgeh, gs_imat-ename)
      where pernr = '00000053'.
      select single * from zhr_adweather
    into gs_zhr_adweather
    where pernr = '00000053'.
      if sy-subrc = 0.
        gs_imat-wapernr = gs_zhr_adweather-pernr.
        gs_imat-wa_date_taken = gs_zhr_adweather-date_taken.
       gs_imat-wa_hours_taken = gs_zhr_adweather-hours_taken.
       gs_imat-wa_expire_date = gs_zhr_adweather-expire_date.
       gs_imat-wa_makeup_date = gs_zhr_adweather-makeup_date.
       gs_imat-wa_makeup_hours = gs_zhr_adweather-makeup_hours.
       gs_imat-wa_results = gs_zhr_adweather-results.
      endif.
      append gs_imat to imat.
      clear i_lines.
      describe table imat lines i_lines.
      if i_lines lt 1.
        write: /
        'No materials found.'.
        exit.
      endif.
    end-of-selection.
      i_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME         = i_repid
          I_INTERNAL_TABNAME     = 'IMAT'  "capital letters!
          I_INCLNAME             = i_repid
        CHANGING
          CT_FIELDCAT            = int_fcat
        EXCEPTIONS
          INCONSISTENT_INTERFACE = 1
          PROGRAM_ERROR          = 2
          OTHERS                 = 3.
      IF SY-SUBRC <> 0.
        write: /
        'Returncode',
        sy-subrc,
        'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.
      ENDIF.
       write: /
        'Returncode',
        sy-subrc,
        'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
              I_CALLBACK_PROGRAM = 'Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB'
               I_CALLBACK_PROGRAM = i_repid
                IT_FIELDCAT        = int_fcat
                I_SAVE             = 'A'
           TABLES
                T_OUTTAB           = IMAT
           EXCEPTIONS
                PROGRAM_ERROR      = 1
                OTHERS             = 2.
      IF SY-SUBRC <> 0.
        write: /
        'Returncode',
        sy-subrc,
        'from FUNCTION REUSE_ALV_LIST_DISPLAY'.
      ENDIF.

    I was able to get it working by moving values to int_fcat.
    (see FORM BUILD_FIELDCATA .)
    REPORT  Z_ESP_ALVGRID_INTERNAL.
    tables:
    pa0001, zhr_adweather.
    types: begin of ts_imat ,
    orgeh like  PA0001-ORGEH,
    ename like PA0001-ENAME,
    pernr like PA0001-PERNR,
    wapernr  like zhr_adweather-pernr,
    wa_date_taken  like zhr_adweather-date_taken,
    wa_hours_taken  like zhr_adweather-hours_taken,
    wa_expire_date  like zhr_adweather-expire_date,
    wa_makeup_date  like zhr_adweather-makeup_date,
    wa_makeup_hours  like zhr_adweather-makeup_hours,
    wa_results  like zhr_adweather-results,
    wa_outstanding  like zhr_adweather-hours_taken,
    end of ts_imat.
    Data:
          imat type standard table of ts_imat, " internal table
          gs_imat type ts_imat. " work area for the table
    data:
          gs_zhr_adweather type zhr_adweather,
          gs_pernr like pa0001-pernr,
          gs_orgeh like pa0001-orgeh,
          gs_ename like pa0001-ename.
    data i_repid like sy-repid.
    data i_lines like sy-tabix.
    TYPE-POOLS: SLIS.
    data int_fcat type SLIS_T_FIELDCAT_ALV with header line.
    start-of-selection.
    SELECT-OPTIONS:
    S_PERNR FOR gs_pernr.
      select single pernr orgeh ename from pa0001
      into (gs_imat-pernr, gs_imat-orgeh, gs_imat-ename)
      where pernr = s_PERNR.
          if sy-subrc = 0.
              endif.
      select single * from zhr_adweather
    into gs_zhr_adweather
    where pernr = s_PERNR.
      if sy-subrc = 0.
        gs_imat-wapernr = gs_zhr_adweather-pernr.
        gs_imat-wa_date_taken = gs_zhr_adweather-date_taken.
        gs_imat-wa_hours_taken = gs_zhr_adweather-hours_taken.
        gs_imat-wa_expire_date = gs_zhr_adweather-expire_date.
        gs_imat-wa_makeup_date = gs_zhr_adweather-makeup_date.
        gs_imat-wa_makeup_hours = gs_zhr_adweather-makeup_hours.
        gs_imat-wa_results = gs_zhr_adweather-results.
         gs_imat-wa_outstanding = gs_zhr_adweather-hours_taken - gs_zhr_adweather-makeup_hours.
      endif.
      append gs_imat to imat.
      clear i_lines.
      describe table imat lines i_lines.
      if i_lines lt 1.
        write: /
        'No materials found.'.
        exit.
      endif.
    end-of-selection.
    perform build_fieldcata.
      i_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
               I_CALLBACK_PROGRAM = 'Z_ALV_SIMPLE_EXAMPLE_WITH_ITAB'
                IT_FIELDCAT        = int_fcat[]
           TABLES
                T_OUTTAB           = IMAT
           EXCEPTIONS
                PROGRAM_ERROR      = 1
                OTHERS             = 2.
      IF SY-SUBRC <> 0.
        write: /
        'Returncode',
        sy-subrc,
        'from FUNCTION REUSE_ALV_LIST_DISPLAY'.
      ENDIF.
    *&      Form  BUILD_FIELDCATA
          text
    -->  p1        text
    <--  p2        text
    FORM BUILD_FIELDCATA .
    clear int_fcat.
    int_fcat-fieldname = 'ORGEH'.
    int_fcat-seltext_l  = 'ORGANIZATIONAL UNIT'.
    int_fcat-col_pos = 1.
    append int_fcat.
    clear int_fcat.
    int_fcat-fieldname = 'ENAME'.
    int_fcat-seltext_l  = 'EMPLOYEE NAME'.
    int_fcat-col_pos = 2.
    append int_fcat.
    clear int_fcat.
    int_fcat-fieldname = 'PERNR'.
    int_fcat-seltext_l  = 'PERSONNEL NUMBER'.
    int_fcat-col_pos = 3.
    append int_fcat.
    clear int_fcat.
    int_fcat-fieldname = 'WAPERNR'.
    int_fcat-seltext_l  = 'Z-PERNR'.
    int_fcat-col_pos = 4.
    append int_fcat.
    clear int_fcat.
    int_fcat-fieldname = 'WA_HOURS_TAKEN'.
    int_fcat-seltext_l  = 'HOURS TAKEN'.
    int_fcat-col_pos = 6.
    append int_fcat.
    clear int_fcat.
    int_fcat-fieldname = 'WA_DATE_TAKEN'.
    int_fcat-seltext_l  = 'DATE OF AW LEAVE TAKEN'.
    int_fcat-col_pos = 5.
    append int_fcat.
    clear int_fcat.
    int_fcat-fieldname = 'WA_EXPIRE_DATE'.
    int_fcat-seltext_l  = 'EXPIRATION DATE'.
    int_fcat-col_pos = 7.
    append int_fcat.
    clear int_fcat.
    int_fcat-fieldname = 'WA_MAKEUP_DATE'.
    int_fcat-seltext_l  = 'DATE OF AW MAKEUP'.
    int_fcat-col_pos = 8.
    append int_fcat.
    clear int_fcat.
    int_fcat-fieldname = 'WA_MAKEUP_HOURS'.
    int_fcat-seltext_l  = 'HOURS OF AW MAKEUP'.
    int_fcat-col_pos = 9.
    append int_fcat.
    clear int_fcat.
    int_fcat-fieldname = 'WA_OUTSTANDING'.
    int_fcat-seltext_l  = 'OUTSTANDING BALANCE'.
    int_fcat-col_pos = 10.
    append int_fcat.
    clear int_fcat.
    int_fcat-fieldname = 'WA_RESULTS'.
    int_fcat-seltext_l  = 'EXPIRED LEAVE RESULTS'.
    int_fcat-col_pos = 11.
    append int_fcat.
    ENDFORM.

  • Alv error: error "The system is configured incorrectly "

    hi,
    I am getting the following error while doing alv in webdynpro.
    error "The system is configured incorrectly "
    The error occurred on the application server CDNSRV_CDN_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    i have embeeded the view with the ui container.
    but still its not working...
    Thanks & regards,
    satti

    Hi Satish,
    you might check if the solution provided in SAP Note [1164829|https://service.sap.com/sap/support/notes/1164829] "WD ABAP ALV dump during filtering" fits to your case.
    Best regards,
      Andreas

  • ALV: Error calling add_protocol_entry

    Hi,
    I want to avoid to call the fm 'POPUP_TO_INFORM' for showing an error message in my alv. I'd like to collect all errors and set the field in error (red). I am trying to follow the following steps:
    1) DATA pr_data_changed type ref to cl_alv_changed_data_protocol.
    2)             call method pr_data_changed->add_protocol_entry
                                exporting
                     i_msgid = '0K' i_msgno = '000'  i_msgty = 'E'
                     i_msgv1 = text-i03
                     i_fieldname = 'MATNR'
                     i_row_id = 1.
    3)  CALL METHOD pr_data_changed->display_protocol.
    I receive this error when the step 2 is executed.
    You attempted to use a 'NULL' object reference (access a component (variable: "PR_DATA_CHANGED").
    Any help will be well appreciated.
    Thanks in advance.
    Regards,
           Giovanni

    Hi and thanks for the suggestion but is it possible ti have an example how to create the PR_DATA_CHANGED object?
    Thanks.
       Giovanni

  • Editable ALV Error

    I am displaying a ALV table and have editable field for Quantity ( 13 char; 3 decimal).
    If the user enters quantity which is more than 13 chars; I am getting a error
    "The entered value has too many digits in the integer part".
    I have a event handler method for ON_DATA_CHECK was expecting to catch this cell in the t_error_cells table; however this method is not called...
    I am looking for some pointers in resolving the issue.

    Hi,
    you get this error rightly. If you want this to work you may have to consider changing the data element type to quan or P or C or simply string .
    You may have to have the conversion routine to match the database type.

  • ALV error.

    Hi All,
          I've a report which is using  
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'.
    It displays the data correctly, but when i press back button it gives a short dump!
    The error is :
    Runtime Errors         MOVE_TO_LIT_NOTALLOWED_NODATA
    I've checked that field catalogs are done correctly.
    You help is greatly appreciated!
    Thanks,
    Rohit.

    Hi All,
          The dump occurs at some code which i've not created.
    Also, i've checked that all the parameters are properly passed to the function.
    Dump occurs in (Include-)Programms "LSLVC_FULLSCREENF02".
    source code extract:
      656   if not gt_grid-s_layout-box_fieldname is initial.                    
      657     call method gt_grid-grid->get_selected_rows                        
      658       importing                                                        
      659         et_index_rows = lt_rows.                                       
      660     delete lt_rows where rowtype ne ' '.                               
      661     sort lt_rows by index.                                             
      662     assign component gt_grid-s_layout-box_fieldname                    
      663                                              of structure t_outtab     
      664     to <l_box>.                                                        
      665     data: l_sel_lines type i.                                          
      666     data: l_tab_lines type i.                                          
      667     data: ls_rows type lvc_s_row.                                      
      668 * check                                                                
      669     if r_ucomm = '&SAL' or r_ucomm = '&ALL'.                           
      670       l_ucomm = r_ucomm.                                               
      671     else.                                                              
      672       describe table lt_rows lines l_sel_lines.                        
      673       describe table t_outtab lines l_tab_lines.                       
      674       if l_sel_lines = 0.                                              
      675         l_ucomm = '&SAL'.                                              
      676       endif.                                                           
      677       if l_sel_lines = l_tab_lines.                                    
      678         l_ucomm = '&ALL'.                                              
      679       endif.                                                           
      680     endif.                                                             
      681 * set/unset <box> of all items                                         
      682     if l_ucomm eq '&SAL' or l_ucomm eq '&ALL'.                         
      683       if l_ucomm eq '&SAL'.                                            
      684         loop at t_outtab.                                              
      685           l_tabix = l_tabix + 1.                                       
    >>>>>           <l_box> = ' '.                                               
      687           modify t_outtab index l_tabix.                               
      688         endloop.                                                  -

  • How to resolve error: protocol violation (error code:17401)

    I am using jdbc to access the database oracle 8.1.7 on windows, and when I access two lines of a table, no errors occured.But when I access all lines of the table, an error occured:
    java.sql.SQLException: N%74P-Ri
    what is the problem ?
    My program is really very simple,as follows:
    import java.lang.*;
    import java.io.*;
    import java.sql.*;
    import java.net.URL;
    import oracle.jdbc.driver.*;
    public class mytest {   
    public static void main (String args[]) {
    String str4="",str5="",str7="",str8="",str10="",str11="",str13="";
    String str14="",str16="",str17="",str24="";
    try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@172.20.1.41:1521:szxx","dev2002","dev2002");
    Statement stmt=conn.createStatement();
    String sql="select GSJB0004,GSJB0005,GSJB0007,GSJB0008,GSJB0010,GSJB0011,GSJB0013,GSJB0014,GSJB0016,GSJB0017,GSJB0024 from FRM_GSJBGK where GSJB0008='shanghai'";
    ResultSet rs=stmt.executeQuery(sql);
    int i=1;
    while (rs.next()) {
    str4=rs.getString("GSJB0004");
    str5=rs.getString("GSJB0005");
    str7=rs.getString("GSJB0007");
    str8=rs.getString("GSJB0008");
    str10=rs.getString("GSJB0010");
    str11=rs.getString("GSJB0011");
    str13=rs.getString("GSJB0013");
    str14=rs.getString("GSJB0014");
    str16=rs.getString("GSJB0016");
    str17=rs.getString("GSJB0017");
    str24=rs.getString("GSJB0024");
    System.out.println("*******");
    System.out.println(i);
    System.out.println(str4+"|"+str5+"|"+str7+"|"+str8+"|"+str10+"|"+str11+"|"+str13+"|"+str14+"|"+str16+"|"+str17+"|"+str24);
    i++;
    catch (SQLException e) {
    System.err.println(e.getErrorCode());
    e.printStackTrace();
    catch (Exception e) {
    System.err.println("mytest():"+e.getMessage());
    all the fields such as GSJB0004 is varchar2, the largest is about 90.
    any suggestions is welcome!
    Thank you!
    my e-mail is :[email protected]

    I am not sure what's the problem. But I would do the following
    try to connect to database using sql*plus, run this sql statement there, see if it works.
    try to find out which call failed exactly.
    Try to get a new version of jdbc driver, for example, classes12.zip from oracle site. Make sure it is in your classes path.
    Regards,
    jim

  • ALV : Error row highlighted

    Hi Experts,
    On my ALV , few fields are editable. If the user enters a wrong value and tries to save , then I want the particular field or row highlighted .
    Sapmle code would be very helpful
    Thanks.
    Ajith

    Hello,
    You can look at the links below:
    [Re: Is it possible to color a text in ALV GRID;
    [Re: Setting cell color in ALV;
    Thanks,
    Jayant

  • ALV error log

    Hello,
    i'm using class CL_ALV_CHANGED_DATA_PROTOCOL, and adding entries using method ADD_PROTOCOL_LOG.
    I would like to hide the log that is displayed. I saw method PROTOCOL_IS_VISIBLE, but it has no importing parameters, only an exporting parameter. any ideas?

    can u try using FM - BAL_LOG_DELETE

Maybe you are looking for

  • Help with error in invoicing tracking table

    I've figured out most of the formula to calculate the late fee based on the days past due.  However, I keep getting an error when the client actually pays on time.  I've tried dozens of different ideas, but either get a syntax error or there is one a

  • Problem with utube it says verify web address after buffering help!

    When I want to watch a video on youtube it starts buffering then writes verify the web address if valid then stops. What's the solution?

  • This apps is not in my ipad

    Hi My ipad have a apps available updates call: Kick off Football V2.0, but i never install such as this app in my ipad and i can't remove this note in my update list. any help on this? thanks Zero I'm using ipad4 update ios.

  • OBIEE 11g production server

    Hi All , Can any buddy suggest me , Which OS will be suitable for OBIEE 11g production server from the below mentioned . 1. Windows 2003 x32 2. Windows 2003 x64 Thanks In Advance , Anto Qujes

  • Daily dump by Autoabap - DATA_LENGTH_0

    Hello, We use our Flash recovery area as our archive log destination and since we started doing so we get this dump: DATA_LENGTH_0 - CX_SY_RANGE_OUT_OF_BOUNDS The problem occurs here (in RSORADBA): 262   perform get_db_parameter(rsora001) using 'log_