Query regarding ALV

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

Hi abhimanyu,
check this code:
report zus_alv_demo_grid .
tables:     ekko.
type-pools: slis.
types: begin of t_ekko,
ebeln type ekpo-ebeln,
ebelp type ekpo-ebelp,
statu type ekpo-statu,
aedat type ekpo-aedat,
matnr type ekpo-matnr,
menge type ekpo-menge,
meins type ekpo-meins,
netpr type ekpo-netpr,
peinh type ekpo-peinh,
line_color(4) type c, "Used to store row color
end of t_ekko.
data: it_ekko type standard table of t_ekko initial size 0,
       wa_ekko type t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
      gd_tab_group type slis_t_sp_group_alv,
      gd_layout    type slis_layout_alv,
      gd_repid     like sy-repid.
Data declaration for EVENT and PRINT PARAMETER.
data: gt_events type slis_t_event,
       gd_prntparams type slis_print_alv.
data declaration for sorting.
data : it_sortcat   type slis_sortinfo_alv occurs 1,
       wa_sort like line of it_sortcat.
data :  i_list_comments type slis_t_listheader.
start-of-selection.
  perform data_retrieval.
perform user_command.
  perform build_fieldcatalog.
  perform build_layout.
  perform build_events.
  perform build_print_params.
  perform build_sortcat.
  perform display_alv_report.
end-of-selection.
*TOP-OF-PAGE.
PERFORM top-of-page.
end-of-page.
*&      Form  build_fieldcatalog
      text
-->  p1        text
<--  p2        text
form build_fieldcatalog.
  fieldcatalog-fieldname   = 'EBELN'.
  fieldcatalog-seltext_m   = 'Purchase Order'.
  fieldcatalog-col_pos     = 0.
  fieldcatalog-outputlen   = 10.
  fieldcatalog-emphasize   = 'X'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'EBELP'.
  fieldcatalog-seltext_m   = 'PO Item'.
  fieldcatalog-col_pos     = 1.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'STATU'.
  fieldcatalog-seltext_m   = 'Status'.
  fieldcatalog-col_pos     = 2.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'AEDAT'.
  fieldcatalog-seltext_m   = 'Item change date'.
  fieldcatalog-col_pos     = 3.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MATNR'.
  fieldcatalog-seltext_m   = 'Material Number'.
  fieldcatalog-col_pos     = 4.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MENGE'.
  fieldcatalog-seltext_m   = 'PO quantity'.
  fieldcatalog-col_pos     = 5.
  fieldcatalog-do_sum = 'X'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'MEINS'.
  fieldcatalog-seltext_m   = 'Order Unit'.
  fieldcatalog-col_pos     = 6.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'NETPR'.
  fieldcatalog-seltext_m   = 'Net Price'.
  fieldcatalog-col_pos     = 7.
  fieldcatalog-outputlen   = 15.
  fieldcatalog-datatype     = 'CURR'.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
  fieldcatalog-fieldname   = 'PEINH'.
  fieldcatalog-seltext_m   = 'Price Unit'.
  fieldcatalog-col_pos     = 8.
  append fieldcatalog to fieldcatalog.
  clear  fieldcatalog.
endform.                    " build_fieldcatalog
*&      Form  build_layout
      text
-->  p1        text
<--  p2        text
form build_layout.
  gd_layout-no_input          = 'X'.
  gd_layout-colwidth_optimize = 'X'.
  gd_layout-totals_text       = 'Totals'(201).
Set layout field for row attributes(i.e. color)
  gd_layout-info_fieldname =      'LINE_COLOR'.
gd_layout-totals_only        = 'X'.
gd_layout-f2code            = 'DISP'.  "Sets fcode for
*when double
                                        "click(press f2)*
gd_layout-group_change_edit = 'X'.
gd_layout-header_text       = 'helllllo'.
endform.                    " build_layout
*&      Form  data_retrieval
      text
-->  p1        text
<--  p2        text
form data_retrieval.
  data: ld_color(1) type c.
  select ebeln ebelp statu aedat matnr menge meins netpr
peinh from ekpo  into table it_ekko.
*Populate field with color attributes
  loop at it_ekko into wa_ekko.
Populate color variable with colour properties
Char 1 = C (This is a color property)
Char 2 = 3 (Color codes: 1 - 7)
Char 3 = Intensified on/off ( 1 or 0 )
Char 4 = Inverse display on/off ( 1 or 0 )
          i.e. wa_ekko-line_color = 'C410'
    ld_color = ld_color + 1.
Only 7 colours so need to reset color value
    if ld_color = 8.
      ld_color = 1.
    endif.
    concatenate 'C' ld_color '10' into wa_ekko-line_color.
wa_ekko-line_color = 'C410'.
    modify it_ekko from wa_ekko.
  endloop.
endform.                    " data_retrieval
*&      Form  display_alv_report
      text
-->  p1        text
<--  p2        text
form display_alv_report.
  gd_repid = sy-repid.
  call function 'REUSE_ALV_GRID_DISPLAY'
       exporting
            i_callback_program       = gd_repid
            is_layout                = gd_layout
            i_callback_top_of_page   = 'TOP-OF-PAGE'
            i_callback_user_command  = 'USER_COMMAND'
            i_callback_pf_status_set = 'SET_PF_STATUS'
            it_event                 = gt_events
            is_print                 = gd_prntparams
            it_fieldcat              = fieldcatalog[]
            it_sort                 = it_sortcat
            i_save                   = 'X'
       tables
            t_outtab                 = it_ekko
       exceptions
            program_error            = 1
            others                   = 2.
  if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.
endform.              " DISPLAY_ALV_REPORT
*&      Form  user_command
      text
-->  p1        text
<--  p2        text
*&      Form  top-of-page
      text
-->  p1        text
<--  p2        text
form top-of-page.
*ALV Header declarations
  data: t_header type slis_t_listheader,
        wa_header type slis_listheader,
        t_line like wa_header-info,
        ld_lines type i,
        ld_linesc(10) type c.
Title
  wa_header-typ  = 'H'.
  wa_header-info = 'EKKO Table Report'.
  append wa_header to t_header.
  clear wa_header.
Date
  wa_header-typ  = 'S'.
  wa_header-key = 'Date: '.
  concatenate  sy-datum+6(2) '.'
               sy-datum+4(2) '.'
   sy-datum(4) into wa_header-info."todays date
  append wa_header to t_header.
  clear: wa_header.
Total No. of Records Selected
  describe table it_ekko lines ld_lines.
  ld_linesc = ld_lines.
  concatenate 'Total No. of Records Selected: ' ld_linesc
     into t_line separated by space.
  wa_header-typ  = 'A'.
  wa_header-info = t_line.
  append wa_header to t_header.
  clear: wa_header, t_line.
  call function 'REUSE_ALV_COMMENTARY_WRITE'
       exporting
       it_list_commentary = t_header
       i_logo             = 'GANESH_LOGO'.
endform.                    " top-of-page
      FORM user_command                                             *
-->  R_UCOMM                                                       *
-->  RS_SELFIELD                                                   *
form user_command using r_ucomm like sy-ucomm
rs_selfield type slis_selfield.
  case r_ucomm.
    when '&IC1'.
      if rs_selfield-fieldname = 'EBELN'.
        read table it_ekko into wa_ekko index rs_selfield-tabindex.
        set parameter id 'BES' field wa_ekko-ebeln.
        call transaction 'ME23N' and skip first screen.
      endif.
    when 'ULHAS'.
      if rs_selfield-fieldname = 'EBELN'.
        read table it_ekko into wa_ekko index rs_selfield-tabindex.
        set parameter id 'BES' field wa_ekko-ebeln.
        call transaction 'ME23N' and skip first screen.
      endif.
  endcase.
endform.
      FORM set_pf_status                                            *
-->  RT_EXTAB                                                      *
form set_pf_status using rt_extab type slis_t_extab.
  set pf-status 'ZNEWSTATUS'.
endform.
*&      Form  build_events
      text
-->  p1        text
<--  p2        text
form build_events.
  data: ls_event type slis_alv_event.
  call function 'REUSE_ALV_EVENTS_GET'
   exporting
     i_list_type           = 0
   importing
     et_events             = gt_events[]
EXCEPTIONS
  LIST_TYPE_WRONG       = 1
  OTHERS                = 2
  if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  endif.
  read table gt_events with key name =  slis_ev_end_of_page
              into ls_event.
  if sy-subrc = 0.
    move 'END_OF_PAGE' to ls_event-form.
    append ls_event to gt_events.
  endif.
  read table gt_events with key name =  slis_ev_end_of_list
              into ls_event.
  if sy-subrc = 0.
    move 'END_OF_LIST' to ls_event-form.
    append ls_event to gt_events.
  endif.
endform.                    " build_events
*&      Form  build_print_params
      text
-->  p1        text
<--  p2        text
form build_print_params.
  gd_prntparams-reserve_lines = '3'.   "Lines reserved for footer
  gd_prntparams-no_coverpage = 'X'.
endform.                    " build_print_params
      FORM END_OF_PAGE                                              *
form end_of_page.
  data: listwidth type i,
  ld_pagepos(10) type c,
  ld_page(10)    type c.
  write: sy-uline(50).
  skip.  write:/40 'Page:', sy-pagno .
endform.
      FORM END_OF_LIST                                              *
form end_of_list.
  data: listwidth type i,
  ld_pagepos(10) type c,
  ld_page(10)    type c.
  skip.  write:/40 'Page:', sy-pagno .
endform.
*&      Form  build_sortcat
      text
-->  p1        text
<--  p2        text
form build_sortcat.
wa_sort-spos      = 1.
wa_sort-fieldname = 'EBELN'.
append wa_sort to it_sortcat.
wa_sort-spos      = 2.
wa_sort-fieldname = 'EBELP'.
append wa_sort to it_sortcat.
endform.                    " build_sortcat
regards,
keerthi.

Similar Messages

  • Hi experts 1 query regarding alv report running in background

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

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

  • Query Regarding ALV - Very Urgent

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

    Hi,
    Here is an sample code to handle events.
    DATA: I_EVENTS TYPE SLIS_T_EVENT.
    PERFORM F4000_EVENTS_INIT CHANGING I_EVENTS.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
       IT_EVENTS                      = I_EVENTS
      TABLES
        T_OUTTAB                       = I_MARA
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM F4000_EVENTS_INIT USING I_EVENTS TYPE SLIS_T_EVENT.
      DATA: LINE_EVENT TYPE SLIS_ALV_EVENT.
      CLEAR LINE_EVENT.
      LINE_EVENT-NAME = 'TOP_OF_PAGE'.
      LINE_EVENT-FORM = 'F4001_TOP_OF_PAGE'.
      APPEND LINE_EVENT TO I_EVENTS.
      CLEAR LINE_EVENT.
      LINE_EVENT-NAME = 'PF_STATUS_SET'.
      LINE_EVENT-FORM = 'F4002_PF_STATUS_SET'.
      APPEND LINE_EVENT TO I_EVENTS.
      CLEAR LINE_EVENT.
      LINE_EVENT-NAME = 'USER_COMMAND'.
      LINE_EVENT-FORM = 'F4003_USER_COMMAND'.
      APPEND LINE_EVENT TO I_EVENTS.
    ENDFORM.
    FORM F4003_USER_COMMAND USING UCOMM LIKE SY-UCOMM
                                  SELFIELD TYPE SLIS_SELFIELD.
      CASE UCOMM.
        WHEN '&CHNG'.
          READ TABLE I_MARA INDEX SELFIELD-TABINDEX.
          IF I_MARA-MATNR NE SPACE.
            SET PARAMETER ID 'MAT' FIELD I_MARA-MATNR.
            CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
                  CLEAR UCOMM.
          ENDIF.
      ENDCASE.
    ENDFORM.

  • Query Regarding ALV : WD ABAP

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

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

  • Help needed regarding ALV report

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

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

  • Query on ALV

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

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

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

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

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

  • Query regarding updation thru a Procedure

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

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

  • A query regarding synchronised functions, using shared object

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

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

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

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

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

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

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

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

  • Query regarding Cluster nodes in CC

    Hi Experts,
    We have a query regarding the cluster nodes available in the CC monitoring.
    Can two nodes of a same channel can poll at the same time?
    Kindly suggest what should be done to make a specific cluster node of a CC polls at a particular time.
    Thanks
    Suganya.

    Hi,
    There is an answered thread on this
    Processing in  Multiple Cluster Nodes
    Regards,
    Manjusha

  • Query regarding G/LAccounts in psoting

    Hi Experts,
    I have one query regarding PCP0.
    After executing PCP0,If We double click on the posting document we can see the number of G/L accounts in that posting Document.If we double click on each G/L Account it shows all the revision information indetail for all payments cumulated into that particular G/L Account.
    Some of the G/L's are appearing as single line in the posting document and if we double click for the revision information it is showing all the Wagetypes with personnel numbers and the total of each wagetype.
    Some of the G/L's we can see Multiple times for each individual.
    Can any one please explain where does we set up the the revision information for the G/L Accounts .
    Appreciate If anyone can help to know this information.
    Thanks & Regards,
    Sandhya.

    Hi Gopal,
    Counting class are assigned to the Periodic work Schedule 1 to 9 are just arbitart sequence numbers and have no meaning in general they are used for linking Pweriodic Work schedules with differences.
    You can use the class for absence and attendance counting to specify different methods of counting according to the period work schedule.
    They have no other meaning apart from that.
    Thanks and Regards
    Swati

  • Query regarding the fields details in particular form for all the users in

    Dear All,
                  I have one query regarding the fields details in particular form for all the users in company.
    Let take an exapmle if i had created Purchase Order having fields in content tab as 1.Item No. 2.Quantity 3.Unit Proce   4.Total   5. Location.
    While Login in User manager i set these fields only for Purchase order , but when i login from other user and open the similar purchase order the defaults fields are also seen including  above 4 fieds .
    Now my question is how to set the User choice fiels for the particular form that are common to all users.
    Means whenever i login in any user and opens the same document the same fields should be seen....Thanksssss.........

    You have to login with each and every user and do the Form Settings of every forms, so that all the forms look same for all the users.
    This is a manual job and you have do do it with every user login.
    Alternately, you can try out this link that explains
    [How to Copy One Screen Layout to Another User|http://www.sbonotes.com/2008/03/how-to-copy-one-screen-layout-to.html]

  • Query regarding App V Deployment - (Deploying DriverMSI in App - V)

    Hi All,
    This is my query regarding deployment of a driver MSI using App V. I have tried sequencing "NMap software" which has Kernel driver as service. I have separated the Kernel driver and wrapped in an MSI and tried deploying the Kernel Driver MSI using
    the DeploymentConfig.xml file but its not happening.
    I have tried writing script in DeploymentConfig.xml in AddPackage Tag as shown in the below commands where I have added driver MSI in sequenced package, and tried deploying the DeploymentConfig.xml in powershell during Add-Package event but the driver
    MSI is not getting installed in Client machine.
    <AddPackage>
            <Path>msiexec.exe</Path>
            <Arguments>/i Nmap_KernelDriver.msi /qb /l*v c:\windows\system32\LogFiles\Install_Nmap.log</Arguments>
            <Wait RollbackOnError="true" Timeout="30"/>
          </AddPackage>
          <RemovePackage>
            <Path>msiexec.exe</Path>
            <Arguments>/x {4BAB3E93-716E-4E18-90F0-1DA3876CBEB6} /qn</Arguments>
            <Wait RollbackOnError="false" Timeout="60"/>
          </RemovePackage>
        </MachineScripts>
    The other way I have tried is writing a vbscript for installing the driver MSI, added the vbs in sequenced package and called the same in DeploymentConfig.xml but no luck.Please find the command below.
    <!--
        <MachineScripts>
          <PublishPackage>
            <Path>wscript.exe</Path>
            <Arguments>[{AppVPackageRoot}]\..\Scripts\NMap_Driver_Install.vbs -guid 7c21d1e9-0fc4-4e56-b7bf-49e54d6e523f -name Insecure_Nmap_6.4_APPV</Arguments>
            <Wait RollbackOnError="true" Timeout="30"/>
          </PublishPackage>
          <UnpublishPackage>
            <Path>\\server\share\barfoo.exe</Path>
            <Arguments>-WithArgs</Arguments>
            <Wait RollbackOnError="false" Timeout="30"/>
          </UnpublishPackage>
    Please suggest any method to make this successful or kindly let me know if there is any mistake in the script.
    Thanks in advance,
    Vivek V

    Hi Nicke,
    These are the following methods and steps that I have performed for installing Driver MSi.
    Method 1:
    1. Included the driver MSI in Package Files Tab in sequencer and called the same MSI in DeploymentConfig.xml using the below script.
    <AddPackage>
            <Path>msiexec.exe</Path>
            <Arguments>/i Nmap_KernelDriver.msi /qb /l*v c:\windows\system32\LogFiles\Install_Nmap.log</Arguments>
            <Wait RollbackOnError="true" Timeout="30"/>
          </AddPackage>
          <RemovePackage>
            <Path>msiexec.exe</Path>
            <Arguments>/x {4BAB3E93-716E-4E18-90F0-1DA3876CBEB6} /qn</Arguments>
            <Wait RollbackOnError="false" Timeout="60"/>
          </RemovePackage>
        </MachineScripts>
    2. After the above steps, deployed the AppV package along with DeploymentConfig.xml in App V Client using the commands mentioned below.
    Set-ExecutionPolicy -Unrestricted
    Import-module Appvclient
    Set-AppVClientConfiguration -EnablePackageScripts 1
    Add-AppvClientPackage -Path "Path of the AppV file" -DynamicDeploymentConfig "Path of DeploymentConfig.xml"
    after trying the above steps the driver MSI is not getting installed.
    Method 2:
    1. Included the driver MSI and a VBS file(VBS contains script for calling the driverMSI)in Package Files tab in sequencer. Commandlines has been provided calling the vbs file in DeploymetConfig.xml as mentioned below.
    <!--
        <MachineScripts>
          <PublishPackage>
            <Path>wscript.exe</Path>
            <Arguments>[{AppVPackageRoot}]\..\Scripts\NMap_Driver_Install.vbs -guid 7c21d1e9-0fc4-4e56-b7bf-49e54d6e523f -name Insecure_Nmap_6.4_APPV</Arguments>
            <Wait RollbackOnError="true" Timeout="30"/>
          </PublishPackage>
          <UnpublishPackage>
            <Path>\\server\share\barfoo.exe</Path>
            <Arguments>-WithArgs</Arguments>
            <Wait RollbackOnError="false" Timeout="30"/>
          </UnpublishPackage>
    2. after executing the above steps, tried deploying the AppV file along with DeploymentConfig.xml using the commands mentioned below,
    Set-ExecutionPolicy -Unrestricted
    Import-module Appvclient
    Set-AppVClientConfiguration -EnablePackageScripts 1
    Add-AppvClientPackage -Path "Path of the AppV file" -DynamicDeploymentConfig "Path of DeploymentConfig.xml"
    evenafter trying the above methods the driver MSI is not getting installed. Hope you can understand my explanations above.
    Regards,
    Vivek V

Maybe you are looking for

  • I would like to delete photos off my iPhone so can download ios7 but keep them on icloud

    I need to delete my photos off my iPhone so I can download ios7 how can I see them in my icloud to make sure I have still them

  • Loading only the selected item

    I am developing a data binding app where the source data is stored in the following format: public void LoadData() // Sample data; replace with real data this.Items.Add(new ItemViewModel() { ID = "0", LineOne = "runtime one", LineTwo = "Maecenas prae

  • Proxy Table type not Generated

    Hi Gui's, I am woking on proxies while creating the proxis in SPROXY transaction proxy table type is not creating which we used in abap programing. what is the issue will you please guide me. Thanks, Lakshmi

  • Bad oracle.security.wss.config.SecurityOperation class

    Hello, I'm trying to hook up some diagnostics to the application server (10.1.3), and I'm getting an error when the webservices' SecurityOperation class is getting loaded. I've tried 2 different versions of the jar file (wssecurity.jar), but haven't

  • Can't install After Effects as full version

    Hi, I can't install After Effects as full version although veing customer of the complete CC. With all the other programs it works fine (I installed them via desktop application) but after effects is still shown as test version. And this free trial i