Menu pbm in ALV......pleas see my code......& have ur point.s

Hi all,
I am trying to use "user_command" in ALV grid...in order to give my own functionality to the menu buttons. Program is giving my short dump.....saying "In a subroutine call, there were parameters than in the routine defination USER_COMMAND"
<b>Here is my source code-</b>
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program = sy-repid
      i_structure_name = 'ZMYSTRUCT'
     I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
      i_callback_pf_status_set = 'SET_PF_STATUS'
      it_events          = it_event
      it_sort            = it_sort
    TABLES
      t_outtab           = itab.
ENDFORM.                    "display_grid
FORM user_command.
  CASE sy-ucomm.
    WHEN 'EXIT'.
      LEAVE PROGRAM.
  ENDCASE.
ENDFORM.                    "USER_COMMAND
Regards,
pradeep phogat

report  z_alv.
type-pools: slis.
      Types                    Begin with TY_                       *
*type-pools: slis.
types  : begin of ty_billing ,
        bukrs          like bkpf-bukrs,
        gjahr          like bkpf-gjahr,
        monat          like bkpf-monat,
        blart          like bkpf-blart,
        budat          like bkpf-budat,
        belnr          like bkpf-belnr,
        hkont          like bsis-hkont,
        shkzg          like bseg-shkzg,
        dmbtr          like bseg-dmbtr,
       d_dmbtr        like bseg-dmbtr,
        d_dmbtr type p decimals 2,
        h_hkont        like bsis-hkont,
        schlw          like skas-schlw,
        s_shkzg        like bseg-shkzg,
        hkont_345      like bsis-hkont,
        shkzg_345      like bseg-shkzg,
        dmbtr_345      like bseg-dmbtr,
        txt20          like skat-txt20,
        end of ty_billing.
      Internal tables          Begin with IT_                       *
data    : it_billing type standard table of ty_billing,
          wa_billing type ty_billing.
data tot_d_dmbtr type p decimals 2  .
*data : tot_D_DMBTR type p decimals 2,
      FI_TOT type p decimals 2,
      t_dmbtr type p decimals 2.
data: hh_kont like bseg-hkont.
      Parameters              data ALV_
      Constants                ALV                                  *
data : intrecordcount type i,  "Variable to hold the record count
       i_grid_settings type lvc_s_glay.
data    : wa_variant like disvariant,   "Variant,
          wa_fieldcat type slis_fieldcat_alv,
          it_fieldcat type slis_t_fieldcat_alv,
          it_events   type slis_t_event,
          lwa_line type slis_listheader,
          it_list_top_of_page type slis_t_listheader,
          w_cuustock like mbew-verpr,
          w_cuustockplan like mbew-verpr,
          w_cuustockplanext like mbew-verpr,
          w_unit type string,
          w_brand type string,
          w_qty like mseg-erfmg,
          w_qty1 like mseg-erfmg,
          w_qty2 like mseg-erfmg,
          w_qty3 like mseg-erfmg,
          w_qty4 like mseg-erfmg,
          test_title type string,
          i_excluding type slis_t_extab,
          w_excluding  like line of i_excluding,
          gd_layout     type slis_layout_alv,
          gt_sort       type slis_t_sortinfo_alv,
          gt_list_top_of_page type slis_t_listheader,
          w_stock type string.
data:  fieldcatalog  type slis_t_fieldcat_alv with header line,
      gd_tab_group  type slis_t_sp_group_alv,
     gd_layout     TYPE   lvc_s_layo,
      gt_events     type slis_t_event,
      gd_prntparams type slis_print_alv,
      gd_repid      like sy-repid,
      test_title1(70) type c,
      sp_day type string,
      sp_month type string,
      sp_year type string,
      test_date type string,
      test_date1 type string.
      Parameters              Begin with PR_
*PARAMETERS     :                                                      *
      At selection-screen                                           *
*AT SELECTION-SCREEN.
selection-screen begin of block b1 with frame title text-001.
select-options: s_comp   for wa_billing-bukrs  default 'EPFD',  " Company
                s_fiyear for wa_billing-gjahr,     " default '2007',  " Financial year
                s_period for wa_billing-monat.     " default '1' to '1'.    " period
parameters     :pr_vari like disvariant-variant.
selection-screen end of block b1 .
      S T A R T   O F   S E L E C T I O N                           *
start-of-selection.
    perform get_bkpf.
    perform loop_table.
   perform loop_table.
      S T A R T   O F   S E L E C T I O N                           *
start-of-selection.
    test_title = 'NOTES TO THE PAYMENT ACCOUNT '.
    test_date = date-high.
    test_date1 = date-LOW.
     sp_year = test_date+0(4).
     sp_month = test_date+4(2).
     sp_day = test_date+6(2).
   concatenate test_title '' into
   test_title1
   separated by space.
  perform build_fieldcatalog.
  perform build_layout.
  perform build_events.
  perform exclude_build.
  perform eventtab_build changing gt_events.
  perform comment_build  changing gt_list_top_of_page.
  perform build_print_params.
  perform display_alv_report.
*Get data from BKPF                                                   *
form get_bkpf.
      select bukrs gjahr monat blart budat belnr
           from bkpf
           into corresponding fields of wa_billing
           where bukrs   in s_comp
           and   gjahr   in s_fiyear
           and   monat   in s_period
           and   blart <> 'ZR'
           and   blart <> 'ZQ'.
         perform get_bseg.
    endselect.
endform.
*Get data from BSEG                                                   *
form get_bseg.
    select hkont shkzg dmbtr
    from bseg
    into corresponding fields of wa_billing
    where gjahr = wa_billing-gjahr
    and   belnr = wa_billing-belnr
    and   hkont like '0000141%%%'.
if wa_billing-hkont cp  '0000141*1' or wa_billing-hkont cp '00001412' or wa_billing-hkont cp '0000141*7'
   or wa_billing-hkont cp '0000141**8'.
                  select  hkont dmbtr shkzg into (wa_billing-h_hkont , wa_billing-d_dmbtr , wa_billing-s_shkzg)
                        from bseg
                        where gjahr = wa_billing-gjahr
                        and   belnr = wa_billing-belnr
                        and   hkont not like '0000141%%%'.
                        perform get_skas.
                        perform get_skat.
                        append wa_billing to it_billing.
               endselect.
  elseif wa_billing-hkont cp  '0000141**6' .
      if wa_billing-blart = 'AB' and wa_billing-shkzg = 'S'.
                select  hkont dmbtr shkzg into (wa_billing-h_hkont , wa_billing-d_dmbtr , wa_billing-s_shkzg)
                        from bseg
                        where gjahr = wa_billing-gjahr
                        and   belnr = wa_billing-belnr
                        and   hkont not like '0000141%%%'.
                        perform get_skas.
                        perform get_skat.
                        append wa_billing to it_billing.
               endselect.
   elseif  wa_billing-blart <> 'AB'  and wa_billing-shkzg = 'H' .
                select  hkont dmbtr shkzg into (wa_billing-h_hkont , wa_billing-d_dmbtr , wa_billing-s_shkzg)
                        from bseg
                        where gjahr = wa_billing-gjahr
                        and   belnr = wa_billing-belnr
                        and   hkont not like '0000141%%%'.
                        perform get_skas.
                        perform get_skat.
                        append wa_billing to it_billing.
               endselect.
   endif.
endif.
endselect.
endform.
*Get data from SKAS                                                   *
form get_skas.
         select single schlw
         from skas
         into wa_billing-schlw
         where saknr eq wa_billing-h_hkont
         and   spras eq 'EN'.
endform.
*Get data from SKAS                                                   *
form get_skat.
         select single txt20
         from skat
         into wa_billing-txt20
         where saknr eq wa_billing-h_hkont
         and   spras eq 'EN'.
endform.
*end-of-selection.
*Loop in to it billing table                                          *
form loop_table.
sort it_billing by hkont belnr h_hkont  .
delete adjacent duplicates from it_billing comparing h_hkont s_shkzg d_dmbtr.
sort it_billing by h_hkont ascending.
loop at it_billing into wa_billing.
endloop.
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[].
  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.
  ls_event-name = 'USER_COMMAND'.
  ls_event-form = 'F01_USER_COMMAND'.
  append ls_event to gt_events.
endform.                    " build_events
form build_fieldcatalog.
    clear  fieldcatalog.
    fieldcatalog-fieldname   = 'SCHLW'.
    fieldcatalog-key = 'X'.
    fieldcatalog-seltext_m   = 'KEY WORD'.
    fieldcatalog-col_pos     = 1.
    fieldcatalog-outputlen   = 15.
    fieldcatalog-edit = ''.
<td align=center>
fieldcatalog-align = "right".
    append fieldcatalog to fieldcatalog.
endform.                    " build_fieldcatalog
*&      Form  GT_TOP_OF_PAGE
&      ALV HEADING                                                   &
  form comment_build changing gt_top_of_page type slis_t_listheader.
  data: gs_line type slis_listheader.
  clear gs_line.
  gs_line-typ  = 'H'.
  gs_line-info = test_title.
GS_LINE-INFO = 'NOTES TO THE RECEIPT AND PAYMENT ACCOUNT'.
  append gs_line to gt_top_of_page.
  clear gs_line.
  gs_line-typ  = 'S'.
  gs_line-key  = 'CENTRAL BANK'.
  gs_line-info =  'Finaceal Report'.
  append gs_line to gt_top_of_page.
GS_LINE-KEY  = 'STATUS 2'.
GS_LINE-INFO = 'INFO 2'.
APPEND GS_LINE TO GT_TOP_OF_PAGE.
CLEAR GS_LINE.
GS_LINE-TYP  = 'A'.
GS_LINE-INFO = 'ACTION'.
APPEND GS_LINE TO  GT_TOP_OF_PAGE.
endform.
form top_of_page.
  call function 'REUSE_ALV_COMMENTARY_WRITE'
       exporting
            it_list_commentary = gt_list_top_of_page.
  write: sy-datum, 'Page No', sy-pagno left-justified.
endform.
form end_of_page.
  write at (sy-linsz) sy-pagno centered.
endform.
*&      Form  build_layout
      text
-->  p1        text
<--  p2        text
form build_layout.
  gd_layout-colwidth_optimize = 'X'.
gd_layout-TOTALS_TEXT = 'X' .
endform.                    " build_layout
*&      Form  build_print_params
      text
-->  p1        text
<--  p2        text
form build_print_params.
  gd_prntparams-reserve_lines = '1'.   "Lines reserved for footer
  gd_prntparams-no_coverpage = 'X'.
endform.                    " build_print_params
*&      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
      i_background_id          = 'ALV_BACKGROUND'
     i_grid_title             = test_title1
      it_sort                  = gt_sort[]
      it_events                = gt_events[]
     i_callback_pf_status_set = ''
      i_callback_user_command  = 'F01_USER_COMMAND'
      is_layout                = gd_layout
      it_fieldcat              = fieldcatalog[]
      i_grid_settings          = i_grid_settings
      i_save                   = 'X'
    tables
      t_outtab                 = it_billing
      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  exclude_build
form exclude_build.
  w_excluding = '&GRAPH'. "Graphic
  append w_excluding to i_excluding.
endform.                    " exclude_build
HEADER FORM
form eventtab_build changing lt_events type slis_t_event.
constants:
gc_formname_top_of_page type slis_formname value 'TOP_OF_PAGE'.
*GC_FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE'.
  data: ls_event type slis_alv_event.
  call function 'REUSE_ALV_EVENTS_GET'
       exporting
            i_list_type = 0
       importing
            et_events   = lt_events.
  read table lt_events with key name =  slis_ev_top_of_page
                           into ls_event.
  if sy-subrc = 0.
    move gc_formname_top_of_page to ls_event-form.
    append ls_event to lt_events.
  endif.
define END_OF_PAGE event
READ TABLE LT_EVENTS WITH KEY NAME =  SLIS_EV_END_OF_PAGE
                         INTO LS_EVENT.
IF SY-SUBRC = 0.
  MOVE GC_FORMNAME_END_OF_PAGE TO LS_EVENT-FORM.
  APPEND LS_EVENT TO LT_EVENTS.
ENDIF.
endform.
      FORM F01_USER_COMMAND                                         *
-->  R_UCOMM                                                       *
-->  RS_SELFIELD                                                   *
form show_status using p_w_perct p_w_text.
  call function 'SAPGUI_PROGRESS_INDICATOR'
    exporting
      percentage = p_w_perct
      text       = p_w_text.
endform. " SHOW_STATUS
regard
nawa

Similar Messages

  • Comments beneth ALV.....have ur points

    Hi all,
    Below the  alv grid....can we write some remaks or comments...in the bottom.
    If yes...pleas let me know the code for this....
    Thanx in advance.
    <b>Have ur points..</b>

    Hi pradeep,
                    check out the following code.
    *& Report  ZST_DRILL_DOWN
    REPORT  zst_drill_down.
    TYPE-POOLS: slis.
    TYPES: BEGIN OF ty_ekpo,
           ebeln    TYPE ekpo-ebeln,
           ebelp    TYPE ekpo-ebeln,
           menge    TYPE ekpo-menge,
           netwr    TYPE ekpo-netwr,
           END  OF ty_ekpo.
    DATA: lt_ekpo TYPE TABLE OF ty_ekpo,
          lw_ekpo TYPE ty_ekpo.
    DATA: events TYPE slis_t_event.
    DATA: event1 TYPE slis_alv_event.
    DATA: lt_fcat TYPE slis_t_fieldcat_alv,
          lw_fcat TYPE slis_fieldcat_alv.
    DATA: heading     TYPE  slis_t_listheader,
          hline       TYPE  slis_listheader,
    start-of-selection.
    SELECT * FROM ekpo INTO CORRESPONDING FIELDS OF TABLE lt_ekpo.
    CLEAR lw_fcat.
    lw_fcat-fieldname = 'EBELN'.
    lw_fcat-seltext_l = 'EBELN'.
    lw_fcat-hotspot   = 'X'.
    APPEND lw_fcat TO lt_fcat.
    CLEAR lw_fcat.
    lw_fcat-fieldname = 'EBELP'.
    lw_fcat-seltext_l = 'EBELP'.
    APPEND lw_fcat TO lt_fcat.
    CLEAR lw_fcat.
    lw_fcat-fieldname = 'MENGE'.
    lw_fcat-seltext_l = 'MENGE'.
    APPEND lw_fcat TO lt_fcat.
    CLEAR lw_fcat.
    lw_fcat-fieldname = 'NETWR'.
    lw_fcat-seltext_l = 'NETWR'.
    APPEND lw_fcat TO lt_fcat.
    DATA:gt_sort TYPE slis_t_sortinfo_alv.
    DATA: ls_sort TYPE slis_sortinfo_alv.
    ls_sort-fieldname = 'EBELN'.
    ls_sort-spos      = 1.
    ls_sort-up        = 'X'.
    ls_sort-subtot    = 'X'.
    append ls_sort to gt_sort.
    ls_sort-fieldname = 'EBELP'.
    ls_sort-spos      = 2.
    ls_sort-up        = 'X'.
    ls_sort-subtot    = 'X'.
    append ls_sort to gt_sort.
    <b>CLEAR: event1.
    event1-name = slis_ev_end_of_list.
    event1-form = 'END_OF_LIST'.
    APPEND event1 TO events.</b>
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       i_callback_program                = sy-repid
      I_CALLBACK_PF_STATUS_SET          = ' '
       i_callback_user_command           = 'USER_COMMAND1'
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
       it_fieldcat                       = lt_fcat[]
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
       it_sort                           = gt_sort[]
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
    it_events                         = events[]
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          = lt_ekpo
    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  USER_COMMAND1
          text
         -->R_UCOMM         text
         -->SELECTED_FIELD  text
    FORM user_command1 USING r_ucomm TYPE sy-ucomm
         selected_field TYPE slis_selfield.
      IF r_ucomm = '&IC1'.
        MESSAGE e000(8i) WITH 'Error message'.
       submit ZST_DRILL_DOWN and return.
      ENDIF.
    ENDFORM.                    "USER_COMMAND
    *&      Form  end_of_list
          text
    FORM end_of_list.
    <b>  CLEAR hline.
      hline-typ  = 'H'.
      hline-info = 'WRite anything'.
      APPEND hline TO heading.
      <b><b>CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
      EXPORTING
        it_list_commentary       = heading[]
          I_LOGO                   =
          I_END_OF_LIST_GRID       =
          I_ALV_FORM               =
              .</b></b></b>ENDFORM.                    "end_of_list
    regards,
    Santosh

  • Urgent..getting default & changed values in ALV editable....have ur point.s

    Hi all,
    I m using interactive ALV grid with 1 column editable with some default values, When i m clicking on SAVE button, only the values which are changed by the user in that column are coming in the internal table, & the default values are automatically deleted by the following code....
    But my requirement is to save all the default & changed values of the ALV column....
    <b>Help me out & have ur points.</b>
    DATA ref1 TYPE REF TO cl_gui_alv_grid.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    importing
                   e_grid                           = ref1
    CALL METHOD ref1->check_changed_data
    IMPORTING
       e_valid   =
    CHANGING
       c_refresh = 'X'

    Pradeep,
    When ur doing the CHECK_CHANGED_DATA, u ll get the edited values inside this callback sub -routine only. so here u trap the values those are changed ( thats after editing).
    Once the control goes back to the original program ( calling prog ) , u ll end up with ur old data ( before editing).
    you ll have to handle that explictly in your code, or shift to OO alv grid like this -
    REPORT ZSKC_GRID.
    TABLES : EQUI.
    DATA   : BEGIN OF T_EQUI OCCURS 0,
              EQUNR TYPE EQUI-EQUNR,
              AENAM TYPE EQUI-AENAM,
             END   OF T_EQUI.
    DATA : T_FCAT  TYPE LVC_T_FCAT,
           G_FCODE TYPE SY-UCOMM.
    DATA : G_GRID TYPE REF TO CL_GUI_ALV_GRID.
    SELECT-OPTIONS: S_EQUNR FOR EQUI-EQUNR.
    START-OF-SELECTION.
    * get data.
      PERFORM SUB_GET_DATA.
    * Populate catalog.
      PERFORM SUB_BUILD_CATALOG CHANGING T_FCAT.
    * Display the grid.
      PERFORM SUB_SHOW_GRID.
      CALL SCREEN 9001.
    *&      Form  SUB_GET_DATA
    *       Get data
    FORM SUB_GET_DATA .
      SELECT EQUNR AENAM
      FROM   EQUI
      INTO   TABLE T_EQUI
      WHERE  EQUNR IN S_EQUNR.
      IF SY-SUBRC NE 0.
    *  Give some message if needed
      ENDIF.
    ENDFORM.                    " SUB_GET_DATA
    *&      Form  SUB_BUILD_CATALOG
    *       text
    *      <--P_T_FCAT  text
    FORM SUB_BUILD_CATALOG  CHANGING PT_FCAT TYPE LVC_T_FCAT.
      DATA : WA_CAT TYPE LVC_S_FCAT.
      CLEAR WA_CAT.
      WA_CAT-FIELDNAME = 'EQUNR'.
      WA_CAT-TABNAME   = 'T_EQUI'.
      WA_CAT-REF_FIELD = 'EQUNR'.
      WA_CAT-REF_TABLE = 'EQUI'.
      APPEND WA_CAT TO PT_FCAT.
      CLEAR WA_CAT.
      WA_CAT-FIELDNAME = 'AENAM'.
      WA_CAT-TABNAME   = 'T_EQUI'.
      WA_CAT-REF_FIELD = 'AENAM'.
      WA_CAT-REF_TABLE = 'EQUI'.
      WA_CAT-EDIT      = 'X'.
      APPEND WA_CAT TO PT_FCAT.
    ENDFORM.                    " SUB_BUILD_CATALOG
    *&      Form  SUB_SHOW_GRID
    *       Show grid
    FORM SUB_SHOW_GRID .
    * create the Grid Object.
      CREATE OBJECT G_GRID
        EXPORTING
           I_PARENT          = CL_GUI_CONTAINER=>SCREEN0
        EXCEPTIONS
          ERROR_CNTL_CREATE = 1
          ERROR_CNTL_INIT   = 2
          ERROR_CNTL_LINK   = 3
          ERROR_DP_CREATE   = 4
          OTHERS            = 5.
      CHECK SY-SUBRC EQ 0.
    * Display contents,
      CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        CHANGING
          IT_OUTTAB                     = t_equi[]
          IT_FIELDCATALOG               = t_fcat
        EXCEPTIONS
          INVALID_PARAMETER_COMBINATION = 1
          PROGRAM_ERROR                 = 2
          TOO_MANY_LINES                = 3
          others                        = 4.
    ENDFORM.                    " SUB_SHOW_GRID
    *&      Module  STATUS_9001  OUTPUT
    *       text
    MODULE STATUS_9001 OUTPUT.
       SET PF-STATUS 'PF_9001'.
       SET TITLEBAR 'TITLE_9001'.
    ENDMODULE.                 " STATUS_9001  OUTPUT
    *&      Module  USER_COMMAND_9001  INPUT
    *       text
    MODULE USER_COMMAND_9001 INPUT.
      CASE G_FCODE.
        WHEN 'BACK' OR 'CANC' OR 'EXIT'.
          LEAVE TO SCREEN 0.
        WHEN 'HAVE'.
    *    After editing everything user presses this button.
         PERFORM SUB_GET_EDITED_DATA.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9001  INPUT
    *&      Form  SUB_GET_EDITED_DATA
    *       Read the ALV grid and get current internal table.
    FORM SUB_GET_EDITED_DATA .
    DATA : T_OLD_DATA LIKE T_EQUI OCCURS 0.
    * hold the old values if u need them.
      t_old_data[] = t_equi[].
    * This will update the global internal table.
      CALL METHOD G_GRID->CHECK_CHANGED_DATA.
    * Now t_equi have changed here. u have the old data in the T_OLD_DATA.
      BREAK-POINT.
    ENDFORM.                    " SUB_GET_EDITED_DATA
    Create a blank screen called 9001. and Pf-staus has a buton with fcode "HAVE". ( alongwith BACK canc exit).

  • Menu problem in ALV.....have ur ponts...

    Hi all,
    I copied standard SAP menu in Se41 then i used that in my ALV grid, Now i want to put my own function code on the exit button(red one), and in user command i m trapping that function code, but no action is going to be done...evern break-point is also not working in the user command...i mean control is not going on..
    Pleas assist me..
    Regards,
    pradeep phogat

    Hello Pradeep,
    you are setting your own PF-status in the report right.
    create an user command
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program       = l_f_repid
                is_layout                = l_r_layout
                it_fieldcat              = g_t_fieldcat
                i_callback_pf_status_set = 'PF_STATUS_SET'
                i_callback_user_command  = 'USER_COMMAND'
                i_save                   = 'X'
           TABLES
                t_outtab                 = g_t_data
           EXCEPTIONS
                program_error            = 1
                OTHERS                   = 2.
    create a form for the user command in that write the below code.
          FORM secondarylist                                            *
    -->  RF_UCOMM                                                      *
    -->  RS                                                            *
    FORM secondarylist USING rf_ucomm LIKE sy-ucomm
                             rs TYPE slis_selfield.
    CLEAR sy-ucomm.
      CASE r_ucomm.
        WHEN  'EXIT' .
          CLEAR r_ucomm.
          SET SCREEN 0.
          LEAVE SCREEN.
      ENDCASE.
    ENDFORM.
    keep the break point in the line case r_ucomm and execute the report and when u press the exit button(red button) then ur code will stop at this place and u can execute it manually.
    Reward if useful.
    Regards,
    Phani.

  • Setting to see T code in status

    Hi
    Is their any setting to see T code in System-Status for IMG ? As many times I see that staus shows only SPRO T code even if IMG Activity key in display key under Additional Data shows T code ( last 4 digits) in SPRO.

    Hello Sunil
    How could we display menu path for SPRO related t codes?
    We are able to display menu path of standard transaction codes through SEARCH_SAP_MENU t code.
    Thanks.
    Vimal

  • How to avoid duplicates values from alvgird see below code

    how to avoid duplicates values from alvgird see below code
    in below query docno no is repeated again and again
    how i can avoid duplication in this query.
    select * into corresponding fields of table itab
             from  J_1IEXCHDR
                     inner join  J_1IEXCDTL
                        on  J_1IEXCDTLlifnr =  J_1IEXCHDRlifnr
                     where  J_1IEXCHDr~status = 'P'.

    Hi Laxman,
    after that select statement
    select * into corresponding fields of table itab
    from J_1IEXCHDR
    inner join J_1IEXCDTL
    on J_1IEXCDTLlifnr = J_1IEXCHDRlifnr
    where J_1IEXCHDr~status = 'P'.
    <b>if sy-subrc = 0.
    delete adjucent duplicates from itab comparing <field name of itab internal table>
    endif.</b>
    this will delete your duplicate entries.once you done with this call the alv FM.
    <b>  call function 'REUSE_ALV_GRID_DISPLAY'</b>
    exporting
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
       i_callback_program                = v_repid
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = 'IT_USER_COMMAND'
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
       i_grid_title                      = 'Purchase Order Details'
      I_GRID_SETTINGS                   = I_GRID_SETTINGS
       is_layout                         = wa_layout
       it_fieldcat                       = it_fieldcat
      IT_EXCLUDING                      = IT_EXCLUDING
      IT_SPECIAL_GROUPS                 = IT_SPECIAL_GROUPS
       it_sort                           = it_sort
      IT_FILTER                         = IT_FILTER
      IS_SEL_HIDE                       = IS_SEL_HIDE
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        = IS_VARIANT
       it_events                         = it_event
      IT_EVENT_EXIT                     = IT_EVENT_EXIT
      IS_PRINT                          = IS_PRINT
      IS_REPREP_ID                      = IS_REPREP_ID
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   = IT_ALV_GRAPHICS
      IT_HYPERLINK                      = IT_HYPERLINK
      IT_ADD_FIELDCAT                   = IT_ADD_FIELDCAT
      IT_EXCEPT_QINFO                   = IT_EXCEPT_QINFO
      IR_SALV_FULLSCREEN_ADAPTER        = IR_SALV_FULLSCREEN_ADAPTER
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           = E_EXIT_CAUSED_BY_CALLER
      ES_EXIT_CAUSED_BY_USER            = ES_EXIT_CAUSED_BY_USER
        tables
    <b>      t_outtab                          = ITAB</b>
    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.
    Thanks
    Vikranth Khimavath

  • Can't see procrdure code

    Hello ,
    I am new to ORACLE. I have downloaded ORACLE XE. I use Go to database home page menu to login. I log in as hr. In object browser I browse procedures. I get the list of procedures in left pane, but I can't see procedure code in the right pane. Can any one guide me ?
    Thanx in advance.

    For example:
    Re: Creating Script using Script Editor

  • I'd like to know how can see the code editor for FormBeans y ActionBean

    Hi, I'm testing JDeveloper 10 and found this problem: When a created (Struts) FormBeans or ActionBeans I can't see formBean class or where it created and obviusly can't see source code in code editor.
    Can you help me?
    Sorry for my english
    Paio

    Form beans will be created in the default package for the project. We don't create them for you automatically though - unless you click on an Action in the Diagram, and choose "Go to Form Bean" from the context menu.
    If you just create a bean in the Struts Structure pane - that will create the XML entry but not the implementation.

  • Menu options in ALV report

    Hi,
    Im not getting Menu options in ALV report output. Not even default menu options SYSTEM, HELP Its dispalying as <b>????????????????????????????????</b>. Can someone help me regarding this?
    Regards,
    amal

    Hi Amal,
                Check the screen number if you are using a seperate screen and Menu painter.
    Thanks and Regards,
    Sampath

  • My ITunes gift card I brought, the Reemdem code had bin wide out so I can no longer see that code what do I do

    My ITunes gift card I brought, the Reemdem code had bin wide out so I can no longer see that code what do I do?

    "bin wide out"?
    If you mean you cannot read the code on the back of the card take it back to the store you purchased it from. If the numbers are not visable because you scratched them out I don't know if the store will replace or refund that. If you can read some of the numbers you could just keep trying a combination of letters and numbers to replace the missing ones. This will take a while depending on how many inputs are missing. You will have to use 0 through 9 and I am guessing A through Z.

  • See my code that no me error after complied but not give me pdf result and

    hi master
    sir i use this code for create the pdf
    ExternalContext econtext = getExternalContext();
    InputStream stream = econtext.getResourceAsStream(PREFIX);
    try {
    JRResultSetDataSource mcon = new JRResultSetDataSource(getSessionBean1().getChartofaccRowSet());
    JasperPrint jasperPrint = null;
    jasperPrint = JasperFillManager.fillReport(stream, null, mcon);
    JRExporter exporter = null;
    HttpServletResponse response = (HttpServletResponse)econtext.getResponse();
    FacesContext fcontext = FacesContext.getCurrentInstance();
    exporter = new JRPdfExporter();
    exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
    exporter.setParameter(JRExporterParameter.OUTPUT_STREAM,
    response.getOutputStream());
    exporter.exportReport();
    fcontext.responseComplete();
    } catch (Exception ex) {
    log(" Error Description" , ex);
    error("Error counting rows: " + ex.getMessage() );
    error("Error counting rows: " + ex ); }
    sir this code not give any error but also not create /display the pdf
    i try to find the where problem occurred i get textfiled and send some value after one by one line
    like is this
    first time try
    JRResultSetDataSource mcon = new JRResultSetDataSource(getSessionBean1().getChartofaccRowSet());
    textField2.setValue(PREFIX);
    is given me right result and show /WEB-INF/reports/mfa.jasper in textfield2
    second time
    jasperPrint = JasperFillManager.fillReport(stream, null, mcon);
              textField2.setValue(PREFIX);
    when i press button second time this time page not give me result in textfield2 and show blank it means
    only this line have error but what i could not foud out jasperPrint = JasperFillManager.fillReport(stream, null, mcon);
    use see my code and give me idea or solution of my problem
    thank�s
    aamir

    I found and easier way to do it and wrote it up here: http://developers.sun.com/jscreator/learning/tutorials/2/reports.html

  • SQLDeveloper 3.2 - I can't see trigger code

    Hi people
    In some cases, I can't see trigger code.
    I didn't find a pattern to determine what kind of trigger has an invisible code.
    For example, in my instance I can't see code of SCOTT.AFTER_INS_UPD_ON_EMP trigger, but I see it in SQL tab for SCOTT.EMP table.
    I had to copy from there and recreate trigger. Now is visible
    I work with EBS R12, and a list of some triggers with that problem follows:
    AR_RECEIVABLE_APPLICATIONS_BRI
    AS_JTF_RS_GROUP_MEM_BI
    FND_FLEX_VAL_RULE_LINES_T1
    FND_FLEX_VALIDATION_RULES_T1
    FND_SECURITY_GROUPS_IL
    HR_LOCATIONS_ALL_OVN
    PAY_TEMPLATE_EXCLUSION_RUL_WHO
    PER_ALL_PEOPLE_F_OVN
    PER_PERSON_ANALYSES_OVN
    PER_PSV_OVN
    WIP_DISCRETE_JOBS_BRD
    My info:
    SQL Developer 3.2.09.30
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
    Thanks
    Oscar

    Hi Oscar,
    Possibly your issue may be the same as this very recently logged and fixed bug:
    Bug 14530780 - TRIGGERCODE IN OTHER SCHEMA NOT VISIBLE IN BROWSER, HOWEVER QUERIABLE IN SQLWORK
    But the bug narrative never claims it is a regression, so presumably it also would have been a problem in prior releases.
    Regards,
    Gary

  • How to see programming Code for UCCX Script

    Hi All,
    How can I  see the programming Code for UCCX Script? I have a script and want to see its Code , something like :
    int sum = 0;
    boolean alternate = false;
    boolean isValid = false;
    try {
    int i = 0;
    for (i = ccnumber.length() - 1; i >= 0; i--) {
      int n = Integer.parseInt(ccnumber.substring(i, i + 1));
      if (alternate) {
       n = n * 2;
       if (n > 9) {
        n = (n % 10) + 1;
      sum += n;
      alternate = !alternate;
    isValid = (sum % 10 == 0);
    } catch (Exception e) {
    return -1;
    return (isValid == true ? 1 : 0);
    thanks,
    Hamed

    You're not going to find code per se, unless you have some java class you wrote and then you would only see the code if you had the source java file.  The script is the only interface you get for "code".
    david

  • Can we see the code of GUI UDF functions

    Hi All,
    Can we see the code of GUI UDF functions?
    Which language it has been written?
    Cheers!
    Samarjit

    Hi,
    Have a look at this blog.
    Is this what you are looking for?
    <a href="/people/venkataramanan.parameswaran/blog/2007/02/06/is-there-a-possibility-to-access-xi-standard-functions-in-user-defined-functions-yes there a possibility to access XI standard functions in User defined Functions?" Yes!</a>
    Regards
    Bhavesh

  • Problem making jar..pls see the code.

    i have some class files in a folder.
    i created a batch file for making jar.
    and when i copy this jar file somewhere and write another batch file to run my java application its showing noclassfound error?.
    pls see the code below and tell me where did i go wrong?
    batch file making jar. 1
    jar cvf SpectrobesUploadSimulator.jar *.class
    pausebatch file to run the application 2
    java SpectrobesSimulator
    pausethe batch file 2 will run if i have the classes in the same directory but when i remove the classes and put the jar its not working.

    i gave the classpaths also
    set CLASSPATH=$CLASSPATH:.:Spectrobes.jar
    java SpectrobesSimulator
    pause

Maybe you are looking for

  • Extra credit question for class

    hey guys my physics teacher gave me an extra credit question to answer. judging by my grade in physics...i could really use the help. Why does the mac labtop use a 2 prong charger but the extension cord is a 3 prong?

  • Doubt in classes

    hi please  check the code data: lr_columns type ref to cl_salv_columns_tree. data: gr_tree   type ref to cl_salv_tree.   lr_columns = gr_tree->get_columns( ). can  any body explain  wt  lr_columns  contains. hw can i  use tghis  lr_columns thanks& Re

  • Cannot load movie with subtitles and export in QuickTime 10 / Os X Lion

    Since Os X Lion, when trying to load a movie (DivX) in QuickTime 10 at the same time that the related subtitles file (.srt) is in the same folder as the movie, QT 10 suggests to use QT 7. QT 10 cannot load the movie with subtitles (in Snow Leopard ev

  • Double Instance of one Button

    Hi guys I have an event structure which handles two cases, one of them is to write some external hardware and the other is to read from it. There are 2 methods of reading and writing to this part through its Volatile and Non Volatile Memory. To decid

  • RAC VS GRID

    Dear all, what's the difference between GRID and RAC if any? I know that services in RAC is a key component of GRID but i need a broader definition Thanks