Time out error in production server  for alv grid report

hi. i have developed alv grid report using nested select statments. when i testing in development  server it is giving the output but in production server if i give 4 months then it is showing time out error.please help me out..its urgent.
Thanks in advance.

Hi Manu,
Don't use Nested selected statements.
Use the Following  Performance Tuning Options that i have given below so that your problem can be solved.
1)  Always check the driver internal tables is not empty, while using FOR ALL ENTRIES
2) Avoid for all entries in JOINS
3) Try to avoid joins and use FOR ALL ENTRIES.
4)   Try to restrict the joins to 1 level only ie only for tables
5)   Avoid using Select *.
6)   Avoid having multiple Selects from the same table in the same object.
7)  Try to minimize the number of variables to save memory.  
8)   The sequence of fields in 'where clause' must be as per primary/secondary index ( if any)
9)   Avoid creation of  index as far as possible
10) Avoid operators like  <>, > , < & like % in where clause conditions
11) Avoid select/select single statements in loops.
12) Try to use 'binary search' in READ internal table. Ensure table is sorted before using   BINARY SEARCH.
13) Avoid using aggregate functions  (SUM, MAX etc) in selects ( GROUP BY , HAVING,)  
14) Avoid using  ORDER  BY in selects
15) Avoid Nested Selects
16) Avoid Nested Loops of Internal Tables
17) Try  to  use FIELD SYMBOLS.
18) Try to avoid into Corresponding Fields of
19) Avoid using Select  Distinct, Use DELETE ADJACENT
<b>
Reward Points for sure if you find it useful. </b>
Regards
Babu

Similar Messages

  • WIH 00013 time out error while viewing a BO Web intelligence report

    Hi,
    I have a BO web intelligence report. While viewing the report i get WIH 00013 time out error. I have another report with everything same as this one except for one filter condition. That is working fine but former is giving me an error.
    I tried changing the timeout values to 120 minutes from 90 minutes in connection server setting but didn't work.
    Also when i run the same report by scheduling it in CMC and format as PDF, then it works fine. This error only comes when i try to view the report directly from infoview.
    Please let me know if there is any other way to resolve.
    Thanks!
    Edited by: Satya Suma on Mar 9, 2011 1:31 PM
    Edited by: Satya Suma on Mar 9, 2011 2:00 PM

    Hi Suma,
    These links may be helpful to you:
    WIH00013 - Invalid Session
    WIH 00013: Invalid session
    All the Best,
    Madhu....

  • Page Format for landscape/legal paper for ALV Grid report

    Hi!
    I have a request to set up a particular ALV Grid report as a background job with the report output printing on legal-size paper with landscape orientation.  We currently don't have any reports set up to print on legal size paper.  What do I need to do to set this up?  We currently use X_58_170 or X_65_255 which print on letter-size paper.  I cannot seem to find a page format for landscape legal other than LEGAL which seems to be available only for SAPscript or Smart Forms.  Any help will be greatly appreciated.
    Best Regards,
    Nik von Ruden
    Edited by: Nik Von Ruden on Oct 8, 2010 1:11 AM

    Hi,
    Thanks for you reply.
    I cannot control left and right margin in PDF. Also, it is a PDF file so eventhough somehow you are able to change left and right margin, the content does not adjust itself to fit the legal page (as it does in word or excel).
    Let me know if there is any other option.
    Thanks,
    RS

  • Colwidth_optimize not working for alv grid report

    Hi friends,
             I have developed an ALV grid report using 'REUSE_ALV_GRID_DISPLAY'.  The field catalog field columns are having the heading size more than 30 characters. So, to optimize the size of the headings, I am using SLIS_LAYOUT_ALV  and passing the value 'X' to colwidth_optimize.
    but still the column heading is not getting fully display. Rather it is display first 20 characters only.
    For your reference please find the code snippet
    *bold* **************** declarations ************************ *bold*
    DATA : fieldcat       TYPE slis_fieldcat_alv,
                 t_fieldcat     TYPE slis_t_fieldcat_alv,
                ws_layout      TYPE slis_layout_alv.
    *bold* **************** field catalogue ********************** *bold*
      CLEAR fieldcat.
      fieldcat-fieldname     = 'RFWRT_PD_MTRL'.
      fieldcat-seltext_m = 'Pending Quotation Spares Value'.   {quote} this heading not getting fully displayed {quote}
      fieldcat-tabname       = 'IT_FNL'.
    ***    FIELDCAT-REF_TABNAME   = 'VBFA'.
      fieldcat-col_pos       = col_pos.
      APPEND fieldcat TO t_fieldcat.
      ADD 1 TO col_pos.
      CLEAR fieldcat.
      fieldcat-fieldname     = 'RFWRT_PD_SERV'.
      fieldcat-seltext_m = 'Pend Quot-JobWorkVal'.
      fieldcat-tabname       = 'IT_FNL'.
      fieldcat-col_pos       = col_pos.
      APPEND fieldcat TO t_fieldcat.
      ADD 1 TO col_pos.
      ws_layout-colwidth_optimize = 'X'.
    *bold* ****************************** alv grid function call ******************** *bold*
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *    i_buffer_active                         = space
          i_callback_program                  = sy-repid
         i_callback_user_command        = 'USER_COMMAND'
    ***   i_callback_pf_status_set           = 'PF_STATUS'
    *   I_STRUCTURE_NAME                  =
         it_fieldcat                        = t_fieldcat[]
         is_layout                          =  ws_layout
        TABLES
          t_outtab                          = it_fnl
       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.
      CLEAR wa_fnl.
    Please look into it.
    Searched the forum for the similar issue. but didnt got any solution.
    Thanks and regards,
    Murali Krishna

    Hi DaveL,
    Thanks alot for your help. My problem solved.
    Can you please suggest me how we can optimize the column based on the total amount which is summed up (fieldcat-do_sum)
    Regards,
    Murali.

  • I got the time out error in production system how can i rectity

    TYPES :  BEGIN OF TY_FINAL_IDEL,
              IEDD(10),
            IEDD  LIKE AFRU-IEDD,
             MATNR LIKE AFPO-MATNR,
             AUFNR LIKE AFPO-AUFNR,
             PERNR LIKE AFRU-PERNR,
             BUDAT(10),
             GRUND LIKE AFRU-GRUND,
             MATKL LIKE MARA-MATKL,
            MENGE LIKE MSEG-MENGE,
             PSMNG LIKE AFPO-PSMNG,
            PSAMG LIKE AFPO-PSAMG,
              XMNGA LIKE AFRU-XMNGA,
             STPRS LIKE MBEW-STPRS,
            NETPR LIKE EKPO-NETPR,
             TC LIKE MBEW-STPRS,
             GRDTX LIKE TRUGT-GRDTX,
             ARBPL LIKE CRHD-ARBPL,
              MAKTX LIKE MAKT-MAKTX,
             END OF TY_FINAL_IDEL.
    TYPES :  BEGIN OF TY_MARA_IDEL,
            MATNR LIKE MARA-MATNR,
            MATKL LIKE MARA-MATKL,
             MATNR LIKE MAKT-MATNR,
             MAKTX LIKE MAKT-MAKTX,
            MENGE LIKE MSEG-MENGE,
             STPRS LIKE MBEW-STPRS,
            NETPR LIKE EKPO-NETPR,
             END OF TY_MARA_IDEL.
    TYPES : BEGIN OF TY_AFPO_IDEL,
            AUFNR LIKE AFPO-AUFNR,
            PSMNG LIKE AFPO-PSMNG,
            MATNR LIKE AFPO-MATNR,
           PSAMG LIKE AFPO-PSAMG,
             BUDAT LIKE AFRU-BUDAT,
             ARBID LIKE AFRU-ARBID,
             XMNGA LIKE AFRU-XMNGA,
             GRUND LIKE AFRU-GRUND,
            PERNR LIKE AFRU-PERNR,
           AUFNR LIKE AFRU-AUFNR,
            IEDD LIKE AFRU-IEDD,
           AUFNR LIKE AFRU-AUFNR,
            AUFPL LIKE AFRU-AUFPL,
            APLZL LIKE AFRU-APLZL,
            VORNR LIKE AFRU-VORNR,
           GRDTX LIKE TRUGT-GRDTX,
            END OF TY_AFPO_IDEL.
       TYPES : BEGIN OF TY_CRHD_IDEL,
               OBJID LIKE CRHD-OBJID,
               ARBPL LIKE CRHD-ARBPL,
               AUFPL LIKE V_QAPO-AUFPL,
               VORGLFNR LIKE V_QAPO-VORGLFNR,
               VORNR LIKE V_QAPO-VORNR,
               ARBID LIKE V_QAPO-ARBID,
               END OF TY_CRHD_IDEL.
    TYPES : BEGIN OF TY_TRUGT_IDEL,
              SPRAS LIKE TRUGT-SPRAS,
              GRUND LIKE TRUGT-GRUND,
              GRDTX LIKE TRUGT-GRDTX,
              END OF TY_TRUGT_IDEL.
    TYPES : BEGIN OF TY_AFRU_IDEL,
            AUFNR LIKE AFRU-AUFNR,
            END OF TY_AFRU_IDEL.
    *& VARIABLE DECLARATION                                                 *
    DATA   : R_WERKS LIKE AFRU-WERKS,
             R_MATNR LIKE AFPO-MATNR,
            R_MATKL LIKE MARA-MATKL,
             R_AUFNR LIKE AFPO-AUFNR,
            R_ISDD LIKE AFRU-ISDD,
             R_IEDD LIKE AFRU-IEDD.
    *& INTERNAL TABLE DECLARATION                                           *
    DATA : IT_FINAL_IDEL TYPE STANDARD TABLE OF TY_FINAL_IDEL WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.
    DATA : IT_AFPO_IDEL TYPE STANDARD TABLE OF TY_AFPO_IDEL WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.
    DATA : IT_MARA_IDEL TYPE STANDARD TABLE OF TY_MARA_IDEL WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.
    DATA : IT_CRHD_IDEL TYPE STANDARD TABLE OF TY_CRHD_IDEL WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.
    DATA : IT_TRUGT_IDEL TYPE STANDARD TABLE OF TY_TRUGT_IDEL WITH HEADER LINE INITIAL SIZE 100 WITH DEFAULT KEY.
    DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA : WA_FIELDCAT_LN LIKE LINE OF IT_FIELDCAT.
    DATA : IT_EVENTCAT  TYPE SLIS_T_EVENT.
    DATA : WA_EVENTCAT_LN  LIKE LINE OF IT_EVENTCAT.
    DATA : IT_LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: S_COL_POS TYPE I.
    *& SELECTION SCREEN DECLARATION                                         *
    SELECTION-SCREEN BEGIN OF BLOCK : BLOCK WITH FRAME.
    SELECT-OPTIONS:   S_WERKS FOR AFRU-WERKS DEFAULT 'IN01' NO INTERVALS NO-EXTENSION , "Plant
                      S_MATNR FOR AFPO-MATNR, "Material Code
                     S_MATKL FOR MARA-MATKL  NO INTERVALS NO-EXTENSION, "Material Group
                      S_AUFNR  FOR AFPO-AUFNR, "Order Number
                      S_IEDD FOR AFRU-IEDD  OBLIGATORY.    "Confirmed date for execution finish
    *NO INTERVALS NO-EXTENSION
    SELECTION-SCREEN END OF BLOCK BLOCK.
    AT SELECTION SCREEN                                                  *
    AT SELECTION-SCREEN ON S_WERKS.
      SELECT SINGLE WERKS FROM AFRU INTO R_WERKS WHERE WERKS IN S_WERKS.
      IF SY-SUBRC <> 0.
        MESSAGE E001(ZIN01_RDPR).
      ENDIF.
    AT SELECTION-SCREEN ON S_MATNR.
      SELECT SINGLE MATNR FROM AFPO INTO R_MATNR WHERE MATNR IN S_MATNR.
      IF SY-SUBRC <> 0.
        MESSAGE E002(ZIN01_RDPR).
      ENDIF.
    *AT SELECTION-SCREEN ON S_MATKL.
    SELECT SINGLE MATKL FROM MARA INTO R_MATKL WHERE MATKL IN S_MATKL.
    IF SY-SUBRC <> 0.
       MESSAGE E003(ZIN01_RDPR).
    ENDIF.
    AT SELECTION-SCREEN ON S_AUFNR.
      SELECT SINGLE AUFNR FROM AFPO INTO R_AUFNR WHERE AUFNR IN S_AUFNR.
      IF SY-SUBRC <> 0.
        MESSAGE E004(ZIN01_RDPR).
      ENDIF.
    AT SELECTION-SCREEN ON S_IEDD.
    SELECT SINGLE IEDD FROM AFRU INTO R_IEDD WHERE IEDD IN S_IEDD.
    IF SY-SUBRC <> 0.
       MESSAGE E005(ZIN01_RDPR).
    ENDIF.
    IF S_IEDD-LOW IS INITIAL OR S_IEDD-HIGH IS INITIAL.
        MESSAGE E005(ZIN01_RDPR).
        ENDIF.
    SELECT SINGLE IEDD FROM AFRU INTO R_IEDD WHERE IEDD IN S_IEDD.
    IF SY-SUBRC <> 0.
      MESSAGE E006(ZIN01_RDPR).
    ENDIF.
    START OF SELECTION                                                   *
    START-OF-SELECTION.
    PERFORM SELECT_DATA.
    *PERFORM MAIN_DATA.
    PERFORM BUILD_FIELDCATALOG.
    PERFORM DATA_DISPLAY.
    FORM TO SELECT DATA INTO INTERNAL TABLE
    FORM SELECT_DATA.
      SELECT FAUFNR   FPSMNG FMATNR   GBUDAT GARBID GXMNGA GGRUND GPERNR  GIEDD GAUFNR GAUFPL GAPLZL  G~VORNR   INTO CORRESPONDING FIELDS OF TABLE IT_AFPO_IDEL
             FROM AFPO AS F
             INNER JOIN AFRU AS G ON FAUFNR = GAUFNR
             WHERE F~AUFNR IN S_AUFNR   AND
                   F~MATNR IN S_MATNR AND
                   G~WERKS = 'IN01' AND
                    G~XMNGA <> 0 AND
                   G~IEDD IN S_IEDD .
                  G~WERKS IN S_WERKS AND
              IF SY-SUBRC <> 0.
             MESSAGE E006(ZIN01_RDPR).
             ENDIF.
    IF SY-SUBRC = 0.
      SELECT GRUND GRDTX INTO CORRESPONDING FIELDS OF TABLE IT_TRUGT_IDEL FROM TRUGT
                         FOR ALL ENTRIES IN IT_AFPO_IDEL
                         WHERE GRUND = IT_AFPO_IDEL-GRUND .
    ENDIF.
    SELECT  HOBJID HARBPL IAUFPL  IVORGLFNR  IVORNR IARBID INTO CORRESPONDING FIELDS OF TABLE IT_CRHD_IDEL
                                FROM CRHD AS H
                                INNER JOIN V_QAPO AS I ON HOBJID = IARBID
                                FOR ALL ENTRIES IN IT_AFPO_IDEL
                                WHERE VORGLFNR = IT_AFPO_IDEL-APLZL AND
                                      ARBID = IT_AFPO_IDEL-ARBID AND
                                      OBJID = IT_AFPO_IDEL-ARBID .
    IF SY-SUBRC = 0.
      SELECT BMATNR BMAKTX BSPRAS DMATNR D~STPRS INTO CORRESPONDING FIELDS OF TABLE IT_MARA_IDEL
                               FROM MAKT AS B
                               INNER JOIN MBEW AS D ON BMATNR = DMATNR
                               FOR ALL ENTRIES IN IT_AFPO_IDEL
                               WHERE DMATNR = IT_AFPO_IDEL-MATNR AND BSPRAS = 'EN'.
        ENDIF.
    END OF SELECTION
    DATA : PEDATE(10),
            POSDATE(10).
    LOOP AT IT_AFPO_IDEL.
      CONCATENATE IT_AFPO_IDEL-IEDD6(2) IT_AFPO_IDEL-IEDD4(2) IT_AFPO_IDEL-IEDD+0(4)
        INTO PEDATE SEPARATED BY '.'.
      IT_FINAL_IDEL-IEDD = PEDATE.
       CONCATENATE IT_AFPO_IDEL-BUDAT6(2) IT_AFPO_IDEL-BUDAT4(2) IT_AFPO_IDEL-BUDAT+0(4)
        INTO POSDATE SEPARATED BY '.'.
      IT_FINAL_IDEL-BUDAT = POSDATE.
      IT_FINAL_IDEL-PERNR = IT_AFPO_IDEL-PERNR.
      IT_FINAL_IDEL-MATNR = IT_AFPO_IDEL-MATNR.
      IT_FINAL_IDEL-AUFNR = IT_AFPO_IDEL-AUFNR.
      IT_FINAL_IDEL-PSMNG = IT_AFPO_IDEL-PSMNG.
      IT_FINAL_IDEL-XMNGA = IT_AFPO_IDEL-XMNGA.
      IT_FINAL_IDEL-GRUND = IT_AFPO_IDEL-GRUND.
      READ TABLE IT_TRUGT_IDEL WITH KEY GRUND = IT_AFPO_IDEL-GRUND.
      IT_FINAL_IDEL-GRDTX = IT_TRUGT_IDEL-GRDTX.
      READ TABLE IT_CRHD_IDEL WITH KEY VORGLFNR = IT_AFPO_IDEL-APLZL AUFPL = IT_AFPO_IDEL-AUFPL.
    IT_FINAL_IDEL-ARBPL = IT_CRHD_IDEL-ARBPL.
    READ TABLE IT_MARA_IDEL WITH KEY MATNR = IT_AFPO_IDEL-MATNR.
    IF SY-SUBRC = 0.
      IT_FINAL_IDEL-MAKTX = IT_MARA_IDEL-MAKTX.
    IT_FINAL_IDEL-STPRS = IT_MARA_IDEL-STPRS.
      IT_FINAL_IDEL-TC    =  IT_AFPO_IDEL-XMNGA * IT_MARA_IDEL-STPRS.
    ENDIF.
    how can i rectify that one
    in b5t run fine
    but brp i got time_out error
    how to rectify
    give me a solution ,its very very urgent
    Regards
    ds
      APPEND IT_FINAL_IDEL.
    CLEAR : IT_FINAL_IDEL,IT_AFPO_IDEL,IT_MARA_IDEL,IT_CRHD_IDEL.
      CLEAR : IT_TRUGT_IDEL-GRDTX,IT_FINAL_IDEL-TC,IT_FINAL_IDEL-MATNR,IT_FINAL_IDEL-MAKTX, IT_FINAL_IDEL-PSMNG, IT_FINAL_IDEL-STPRS.
      ENDLOOP.

    In your END-OF-SELECTION, you are doing a number of table reads without the binary search option. This will cause the entire tables to be read for each read. Therefore, change this portion of the code to:
      DATA : pedate(10),
      posdate(10).
      SORT: it_trugt_idel BY grund,
            it_crhd_idel  BY vorglfnr aufpl,
            it_mara_idel  BY matnr,
        loop at it_afpo_idel.
      CONCATENATE it_afpo_idel-iedd+6(2) it_afpo_idel-iedd+4(2)
       it_afpo_idel-iedd+0(4) INTO pedate SEPARATED BY '.'.
      it_final_idel-iedd = pedate.
      CONCATENATE it_afpo_idel-budat+6(2) it_afpo_idel-budat+4(2)
      it_afpo_idel-budat+0(4) INTO posdate SEPARATED BY '.'.
      it_final_idel-budat = posdate.
      it_final_idel-pernr = it_afpo_idel-pernr.
      it_final_idel-matnr = it_afpo_idel-matnr.
      it_final_idel-aufnr = it_afpo_idel-aufnr.
      it_final_idel-psmng = it_afpo_idel-psmng.
      it_final_idel-xmnga = it_afpo_idel-xmnga.
      it_final_idel-grund = it_afpo_idel-grund.
      READ TABLE it_trugt_idel WITH KEY
        grund = it_afpo_idel-grund
        BINARY SEARCH.
      it_final_idel-grdtx = it_trugt_idel-grdtx.
      READ TABLE it_crhd_idel WITH KEY
        vorglfnr = it_afpo_idel-aplzl
        aufpl    = it_afpo_idel-aufpl.
      binary search.
      it_final_idel-arbpl = it_crhd_idel-arbpl.
      READ TABLE it_mara_idel WITH KEY
        matnr = it_afpo_idel-matnr
        BINARY SEARCH.
      IF sy-subrc = 0.
        it_final_idel-maktx = it_mara_idel-maktx.
        it_final_idel-stprs = it_mara_idel-stprs.
        it_final_idel-tc = it_afpo_idel-xmnga * it_mara_idel-stprs.
      ENDIF.
      APPEND it_final_idel.
    * CLEAR : IT_FINAL_IDEL,IT_AFPO_IDEL,IT_MARA_IDEL,IT_CRHD_IDEL.
      CLEAR : it_trugt_idel-grdtx,it_final_idel-tc,it_final_idel-matnr,
      it_final_idel-maktx, it_final_idel-psmng, it_final_idel-stprs.
    ENDLOOP.
    Rob

  • I need the grand total for particular coulumn for ALV grid report(OOPs).

    Hello,
    I have used the following code,
    But i m not getting the grand total by default.No error but not getting the desired result.
    Could you please help me in this regard.
    FORM  display_simple_alv.
      DATA :  lr_msg  TYPE   REF   TO  cx_salv_msg.
      DATA : lv_header   TYPE   REF   TO  cl_salv_form_layout_grid,
             lv_h_label  TYPE   REF   TO  cl_salv_form_label,
             lv_h_flow   TYPE   REF   TO  cl_salv_form_layout_flow.
      DATA: gr_sorts TYPE REF TO cl_salv_sorts.
      DATA: gr_agg TYPE REF TO cl_salv_aggregations.
      TRY .
          cl_salv_table=>factory(  IMPORTING  r_salv_table = gr_salv_table
                                   CHANGING  t_table = gt_invdetails4 ).
        CATCH  cx_salv_msg  INTO  lr_msg.
      ENDTRY  .
    Display Basic Toolbar
      gr_functions = gr_salv_table->get_functions( ).
      gr_functions->set_all( abap_true ).
      TRY .
          gr_columns = gr_salv_table->get_columns(  ).
          gr_columns->set_optimize( ).
        CATCH  cx_salv_not_found.
      ENDTRY .
      TRY .
          gr_column ?= gr_columns->get_column(  'KUNNR'  ).
          gr_column->set_long_text(  text-009 ).
          gr_column->set_medium_text(  text-009 ).
          gr_column->set_short_text(  text-009 ).
          gr_column ?= gr_columns->get_column(  'NAME1'  ).
          gr_column->set_long_text(  text-010 ).
          gr_column->set_medium_text(  text-010 ).
          gr_column->set_short_text(  text-011 ).
          gr_column ?= gr_columns->get_column(  'AMOUNT'  ).
          gr_column->set_long_text(  text-012 ).
          gr_column->set_medium_text(  text-012 ).
          gr_column->set_short_text(  text-012 ).
          gr_column ?= gr_columns->get_column(  'TAX'  ).
          gr_column->set_long_text(  text-013 ).
          gr_column->set_medium_text(  text-013 ).
          gr_column->set_short_text(  text-013 ).
          gr_column ?= gr_columns->get_column(  'IVA'  ).
          gr_column->set_long_text(  text-014 ).
          gr_column->set_medium_text(  text-014 ).
          gr_column->set_short_text(  text-015 ).
          gr_column ?= gr_columns->get_column(  'TOTAL_AMOUNT'  ).
          gr_column->set_long_text(  text-016 ).
          gr_column->set_medium_text(  text-016 ).
          gr_column->set_short_text(  text-017 ).
          gr_column ?= gr_columns->get_column(  'CURRENCY'  ).
          gr_column->set_long_text(  text-018 ).
          gr_column->set_medium_text(  text-018 ).
          gr_column->set_short_text(  text-018 ).
          gr_column ?= gr_columns->get_column(  'ZINTERNAL_REFNO'  ).
          gr_column->set_long_text(  text-019 ).
          gr_column->set_medium_text(  text-019 ).
          gr_column->set_short_text(  text-019 ).
          gr_column ?= gr_columns->get_column(  'MATERIAL_AMOUNT'  ).
          gr_column->set_long_text(  text-020 ).
          gr_column->set_medium_text(  text-020 ).
          gr_column->set_short_text(  text-021 ).
          gr_column ?= gr_columns->get_column(  'LABOUR_VALUE'  ).
          gr_column->set_long_text(  text-022 ).
          gr_column->set_medium_text(  text-022 ).
          gr_column->set_short_text(  text-023 ).
          gr_column ?= gr_columns->get_column(  'FAILURE_COST'  ).
          gr_column->set_long_text(  text-024 ).
          gr_column->set_medium_text(  text-024 ).
          gr_column->set_short_text(  text-021 ).
          gr_sorts = gr_salv_table->get_sorts( ).
          gr_sorts->add_sort( columnname = 'AMOUNT' subtotal = abap_true ). "for subtotal
          gr_agg = gr_salv_table->get_aggregations( ).
          gr_agg->add_aggregation( 'AMOUNT' ).
        CATCH  cx_salv_not_found cx_salv_data_error cx_salv_existing.
      ENDTRY .
    Set top of page
      CREATE OBJECT lv_header.
      lv_h_label = lv_header->create_label( row =  1  column =  1  ).
      lv_h_label->set_text(  text-001  ).
      lv_h_label = lv_header->create_label( row =  1  column = 5  ).
      lv_h_label->set_text(  text-002  ).
      lv_h_label = lv_header->create_label( row =  1  column = 14  ).
      lv_h_label->set_text(  text-003  ).
      lv_h_flow = lv_header->create_flow( row =  3  column =  04  ).
      lv_h_flow->create_text(  text  =  text-004  ).
      lv_h_flow = lv_header->create_flow( row =  3  column =  05  ).
      lv_h_flow->create_text(  text  =  text-005  ).
      lv_h_flow = lv_header->create_flow( row =  3  column =  06  ).
      lv_h_flow->create_text(  text  =  name  ).
      set the top of list using the header for Online.
      gr_salv_table->set_top_of_list( lv_header ).
    ALV Display
      gr_salv_table->display( ).
    ENDFORM .                     " DISPLAY_SIMPLE_ALV

    Hi Sridevi,
    To get the grand total, you need to pass the SORT itab to the function module. You need to populate the internal table with the fields on which you want the total or subtotal. If you donu2019t pass this table, you wonu2019t get it.
    For ex:
       ls_sort_wa-spos = 1.
      ls_sort_wa-fieldname = gs_plant-werks.
      ls_sort_wa-up = 'X'.
      ls_sort_wa-subtot = 'X'.
      APPEND ls_sort_wa TO gt_sort.
    So the above code, gives the sub total plant wise.
    and if you want the sum(grand total) you can set the DO_SUM to u2018Xu2019 for that particular field in the field catalog.
    So with this approach, you can get the sub total and grand total for a particular field.
    If you donu2019t want the subtotal, just set DO_SUM, you will get the total.
    Thanks,
    Srini.

  • Time out error

    Dear All,
    One of our production system and one of HR user got time out error while executing T-code PA30 , PA40 .
    Note : we  tried the transaction ( PA30 and PA40 ) in our user id ,it work smooth ,there is no issue with in my user id as well other HR user also .
    Only the specific user facing time out error in Production server.
    Note : while executing PA30 ,PA40 t-codes ,it takes long time to get initial screen itself finally got time out error (No issue with other SAP HR users)  .
    Pls check the below logs:
    Runtime Error          TIME_OUT
           Occurred on     17.08.2011 at   08:59:00
    Time limit exceeded.
    What happened?
    The program "SAPLRHAC" has exceeded the maximum permitted runtime without
    interruption, and has therefore been terminated.
    What can you do?
    Print out the error message (using the "Print" function)
    and make a note of the actions and input that caused the
    error.
    To resolve the problem, contact your SAP system administrator.
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer
    termination messages, especially those beyond their normal deletion
    date.
    Error analysis
    After a certain length of time, the program is terminated. In the case
    of a work area, this means that
    - endless loops (DO, WHILE, ...),
    - database accesses producing an excessively large result set,
    Kindly advise ,is this related to any Authorization issue ???

    Hi,
    Please share SAP_BASIS/ SAP_HR release/patch level information of the affected SAP system.
    I would suggest you to create New Temp SAP User id with exact copy of that affected SAP User ID and then try to access PA30/PA40 with that New SAP User id login into affected system. Check that, u are facing the same behavior/issue with that New Temp SAP User id ?
    Regards,
    Bhavik G. Shroff

  • Adoafmctl.sh , adforsctl.sh have time out errors

    when i run adstrtal.sh script i face some time out error in some script
    for example
    Executing service control script:
    /opt/oracle/inst/apps/PROD_prodapps/admin/scripts/adoafmctl.sh start
    Timeout specified in context file: 100 second(s)
    script returned:
    ERROR : Timed out( 100000 ): Interrupted Exception
    You are running adoafmctl.sh version 120.8
    Starting OPMN managed OAFM OC4J instance ...
    while some time the error is with adformsctl.sh
    and at the end adstrtal.sh exit with status 1 and sometime with status2.
    please help me how i resolve this error.

    <process-type id="*oafm*" module-id="OC4J" status="enabled" working-dir="$ORACLE_HOME/j2ee/home">
    <module-data>
    <category id="start-parameters">
    <data id="java-options" value="-server -verbose:gc -Xmx256M -Xms64M -XX:MaxPermSize=128M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doracle.security.jazn.config=/opt/oracle/inst/apps/PROD_testing/ora/10.1.3/j2ee/oafm/config/jazn.xml"/>
    <data id="java-bin" value="/opt/oracle/inst/apps/PROD_testing/admin/scripts/java.sh"/>
    <data id="oc4j-options" value="-out /opt/oracle/inst/apps/PROD_testing/logs/ora/10.1.3/opmn/oafmstd.out -err /opt/oracle/inst/apps/PROD_testing/logs/ora/10.1.3/opmn/oafmstd.err" />
    </category>
    <category id="stop-parameters">
    <data id="java-options" value="-server -verbose:gc -Xmx256M -Xms64M -XX:MaxPermSize=128M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:+UseParallelGC -XX:ParallelGCThreads=2 -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
    </category>
    <category id="security-parameters">
    <data id="wallet-file" value="file:/opt/oracle/inst/apps/PROD_testing/certs/Apache"/>
    </category>
    </module-data>
    <start timeout="*600*" retry="2"/> *'' we will change this value to 1800 ?''*
    <stop timeout="120"/>
    <restart timeout="720" retry="2"/> *'' do we need to change this value ?''*
    <port id="default-web-site" range="25000-25004" protocol="ajp"/>
    <port id="rmi" range="25500-25504"/>
    <port id="jms" range="24500-24504"/>
    <process-set id="default_group" numprocs="1"/>
    </process-type>
    </ias-component>
    </ias-instance>
    </process-manager>
    </opmn>

  • Report Taking Long time Results time out error.

    Hi Gurus.
    We have a report called Material Variances...
    When my user is executing the report its taking morethan 40 mins and resulting in error " Time Out Error ".
    But when we executing the report with same selections its opening in 5 mins.
    can any one has faced the same issue...
    Thanks in advance for your replies.
    Regards.
    Cna

    Hi,
    You can check InfoCube 0TCT_C02. It will provide information about the execution of the query.
    Right click on Infocube -> Display data -> input the query you want to check in field Query runtime Object->Input the user that executed the query and faces problems
    The Infocube will display information about the query execution like how long the database selection took, how long the OLAP processor lasted, etc.
    Important:
    BI Statistics have to be activeted in the system in order fot the Infocube to display data
    Regards,

  • How to enable excel downloading in ALV grid report.

    Hi all,
    How to enable excal downing in ALV grid report?
    Thanks in Advance.
    Siva Sankar.

    hi
    check the following code
    Example of a Simple ALV Grid Report
    REPORT  ZTUFI091                                .
    *& Report  ZDEMO_ALVGRID                                               *
    *& Example of a simple ALV Grid Report                                 *
    *& The basic requirement for this demo is to display a number of       *
    *& fields from the EKKO table.                                         *
    *REPORT  zdemo_alvgrid                 .
    TABLES:     ekko.
    type-pools: slis.                                 "ALV Declarations
    *Data Declaration
    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,
    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,
          gt_events     type slis_t_event,
          gd_prntparams type slis_print_alv.
    *Start-of-selection.
    START-OF-SELECTION.
    perform data_retrieval.
    perform build_fieldcatalog.
    perform build_layout.
    perform build_events.
    perform build_print_params.
    perform display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    form build_fieldcatalog.
    There are a number of ways to create a fieldcat.
    For the purpose of this example i will build the fieldcatalog manualy
    by populating the internal table fields individually and then
    appending the rows. This method can be the most time consuming but can
    also allow you  more control of the final product.
    Beware though, you need to ensure that all fields required are
    populated. When using some of functionality available via ALV, such as
    total. You may need to provide more information than if you were
    simply displaying the result
                  I.e. Field type may be required in-order for
                       the 'TOTAL' function to work.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      fieldcatalog-emphasize   = 'X'.
      fieldcatalog-key         = 'X'.
    fieldcatalog-do_sum      = 'X'.
    fieldcatalog-no_zero     = '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.
      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
          Build layout for ALV grid report
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    form display_alv_report.
      gd_repid = sy-repid.
      call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_callback_program      = gd_repid
                i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
                it_events               = gt_events
                is_print                = gd_prntparams
                i_save                  = 'X'
               is_variant              = z_template
           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  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    form data_retrieval.
    select ebeln ebelp statu aedat matnr menge meins netpr peinh
    up to 10 rows
      from ekpo
      into table it_ekko.
    endform.                    " DATA_RETRIEVAL
    Form  TOP-OF-PAGE                                                 *
    ALV Report Header                                                 *
    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             = 'Z_LOGO'.
    endform.
          FORM USER_COMMAND                                          *
          --> R_UCOMM                                                *
          --> RS_SELFIELD                                            *
    FORM user_command USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    Check function code
      CASE r_ucomm.
        WHEN '&IC1'.
      Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'EBELN'.
        Read data table, using index of row user clicked on
          READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
        Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
        Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDCASE.
    ENDFORM.
    *&      Form  BUILD_EVENTS
          Build events table
    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.
    endform.                    " BUILD_EVENTS
    *&      Form  BUILD_PRINT_PARAMS
          Setup print parameters
    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.
    hope it will help you
    regards
    sreelatha gullapalli

  • How Alternate rows to be colored  in an ALV Grid report?

    How Alternate rows to be colored  in an ALV Grid report?

    hi,
    try this
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    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 attributes
    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.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      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.
      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
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = gd_repid
          is_layout          = gd_layout
          it_fieldcat        = fieldcatalog[]
          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  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        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

  • Transaction Time out error in EJB while using Websphere Application Server.

    Hi All,
    I am using Websphere Application server and getting the transaction time out error. By default the transaction time out is 120 second. I am using session bean for doing a set of transaction. These set are dynamically generated. Is there any way to set the transaction time out for only this session bean to infinite ?
    Thanks in advance
    Vivek

    Hi,
    According to WAS 6 , every opened connection has to be commited (or rolledback) explicitly (didnt try autocommit) before closing. Even if all you have done with that connection is a SELECT Query.
    This has apparently solved the same problem I was getting. implement it and see whether it helps you.

  • Time Out error problem when i run the report for the whole plant

    Dear all,
    pls find the below coding, when i execute this report for the whole plant , it gives me time out error since it has to process huge database. pls suggest me in which part of my below coding i can improvise or any other better way to fetch the same result.
    pls note that
    i m using Views for querying.pls also note the comments given in Bold to understand the reason behind the coding.
    Views used in are - ZVPOD and ZVPRDCONF.
    START-OF-SELECTION.
      Data: zstat type jest-stat.
      data: stklocaf type mska-lgort.
      data: stklocas type mska-lgort.
    <u><b>To collect the status of the production order by joining the ZVPOD and JEST table.</b></u>
      CLEAR it_ZVPRODDET.
      SELECT DISTINCT ZVPOD~bukrs ZVPOD~aufnr ZVPOD~objnr
      jest~stat ZVPOD~werks ZVPOD~arbpl ZVPOD~J_3AKORD2
      FROM  ZVPOD
      INNER JOIN jest ON ZVPOD~objnr = jest~objnr
      INTO CORRESPONDING FIELDS OF wa_ZVPRODDET where
      plnbez in FGM and arbpl in wc and werks in plant
      and SSAVD in eldate
      and J_3AKORD2 in cups and jest~inact ne 'X'.
        APPEND wa_ZVPRODDET TO it_ZVPRODDET.
      ENDSELECT.
      SORT it_ZVPRODDET BY aufnr stat.
    <u><b>Loop thru Itab to check and delete the records from itab for the specified status.</b></u>
      LOOP AT it_ZVPRODDET INTO wa_ZVPRODDET.
        IF wa_ZVPRODDET-stat = 'I0045' .  " TECO - compl
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
        ELSEIF wa_ZVPRODDET-stat = 'I0009' .  " CNF - Confirmed
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
        ELSEIF wa_ZVPRODDET-stat = 'I0012' .  " DLV - Delivered
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
        ELSEIF wa_ZVPRODDET-stat = 'I0046' .  " CLSD - Closed
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
        ELSEIF wa_ZVPRODDET-stat = 'I0076' .  " DLFL - Del Flag
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
        ELSEIF wa_ZVPRODDET-stat = 'E0003' .  " SCLS - Short Close
          CLEAR tj30t.
          SELECT SINGLE txt04
          FROM tj30t INTO tj30t-txt04
          WHERE stsma = 'PRDHOLD' AND
                estat = 'E0003' AND
                txt04 = 'SCLS' AND
                spras = 'EN'.
          IF sy-subrc = 0.
            DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr.
          ENDIF.
        ENDIF.
    *      Condition for Prod Order released - REL
        IF wa_ZVPRODDET-stat = 'I0002'.
          mreleased = 'Y'.
        else.
          mreleased = 'N'.
        endif.
        zstat = wa_ZVPRODDET-stat.
        IF mreleased = 'N'.
          DELETE it_ZVPRODDET WHERE aufnr = wa_ZVPRODDET-aufnr
          and stat = zstat.
        ENDIF.
      ENDLOOP.
    <u><b>Loop thru the filtered ITAB to get all the production order details for the production order number specified in the where clause( zaufnr ) and populate another internal table.</b></u>
          LOOP AT it_ZVPRODDET INTO wa_ZVPRODDET.
            zaufnr = wa_zvproddet-aufnr.
            zarbid = wa_zvproddet-arbid.
            at new aufnr.
              SELECT DISTINCT * INTO CORRESPONDING FIELDS OF  walnpln
              FROM zvpod where plnbez in FGM and arbpl in wc and SSAVD in
             eldate and werks in plant and J_3AKORD2 in cups and aufnr = zaufnr.
                APPEND walnpln TO itablnpln.
              endselect.
            endat.
          endloop.
          clear walnpln.
    <u><b>
    Looping thru Internal table and performs all the following calculations and inner loop
    and also relevant querying.</b></u>
    <u><b>Assume that ITABLNPLN holds appox. 8000 records.</b></u>
    LOOP AT itablnpln  INTO walnpln.
            contot = 0.
            SELECT distinct * INTO CORRESPONDING FIELDS OF TABLE itablnp
            FROM zvprdconf where aufnr = walnpln-aufnr and
            j_3asize = walnpln-j_3akordx and stzhl ne '2' and stokz ne 'X'.
            clear zvprdconf.
            SELECT single isdd
            FROM zvprdconf into  zvprdconf-isdd
            where aufnr = walnpln-aufnr and
            j_3asize = walnpln-j_3akordx and stzhl ne '2' and stokz ne 'X'.
            SELECT single isdz
            FROM zvprdconf into  zvprdconf-isdz
            where aufnr = walnpln-aufnr and
            j_3asize = walnpln-j_3akordx and stzhl ne '2' and stokz ne 'X'.
            IF sy-subrc EQ 0.
              <u><b>Assume that ITABLNP  holds appox. 30 records.</b></u>
              loop at itablnp into walnp.
                contot = contot + walnp-J_3ALMNGA.
                move walnp-J_3ASIZE to walnpln-J_3ASIZE.
                move zvprdconf-isdd to walnpln-zdate.
                move zvprdconf-isdz to walnpln-ztime.
              endloop.
              walnpln-output = contot.
            endif.
            walnpln-wip = walnpln-menge - contot.
            if walnpln-werks = '1000'.
              stklocaf = '1050'.
              stklocas = '1060'.
            elseif walnpln-werks = '2000'.
              stklocaf = '2150'.
              stklocas = '2160'.
            endif.
           select single kunnr into walnpln-ship from vbpa where
           vbeln = walnpln-KDAUF and PARVW = 'WE'.
            zship = walnpln-ship.
            move zship to walnpln-ship.
            select  single kalab into walnpln-zactqty from mska
            where matnr = walnpln-plnbez
            and j_3asize = walnpln-J_3AKORDX and LGORT = stklocaf.
            condense walnpln-kdauf.
            zsales = walnpln-kdauf.
            concatenate zsales 'S' into zso.
            select single kalab into walnpln-zsndqty from mska
            where matnr = walnpln-plnbez
            and j_3asize = walnpln-J_3AKORDX and LGORT = stklocas
            and J_4KSCAT = zso.
            zmatn = walnpln-plnbez.
            zsale = walnpln-KDAUF.
            walnpln-kdauf = zsale.
            walnpln-plnbez = zmatn.
            zcust = walnpln-kunnr.
            walnpln-kunnr = zcust.
            select single bezei into walnpln-season from TVV2T where
            kvgr2 = walnpln-kvgr2 and SPRAS = 'E'.
            select single bezei into walnpln-shipmode from T173T where
            vsart = walnpln-vsart and SPRAS = 'E'.
            STRL = strlen( walnpln-j_3akord2 ).
            if  strl = 4.
              move walnpln-j_3akord2 to walnpln-j_3akord3.
              clear walnpln-j_3akord2.
            endif.
            move zremk to walnpln-remk.
            MODIFY itablnpln FROM  walnpln.
            contot = 0.
            clear itablnp.
          ENDLOOP.
          PERFORM build_fieldcatalog.
          PERFORM build_layout.
          PERFORM display_alv_report.

    Hi raja,
    Plese go through the suggessitions.
    1.avoide the select ...endselect. write the below select
    CLEAR IT_ZVPRODDET.
    SELECT DISTINCT
         ZVPOD~BUKRS
         ZVPOD~AUFNR
         ZVPOD~OBJNR
         JEST~STAT
         ZVPOD~WERKS
         ZVPOD~ARBPL
         ZVPOD~J_3AKORD2
      FROM ZVPOD
      INNER JOIN JEST ON ZVPOD~OBJNR = JEST~OBJNR
      INTO CORRESPONDING FIELDS TABLE  IT_ZVPRODDET
      WHERE PLNBEZ IN FGM AND
            ARBPL IN WC AND
            WERKS IN PLANT AND
            SSAVD IN ELDATE AND
            J_3AKORD2 IN CUPS AND
            JEST~INACT NE 'X'.
      IF SY-SUBRC = 0.
        SORT TABLE IT_ZVPRODDET.
      ENDIF.
    2..first of all dont delete a record inside the loop. instead use the Field symobols.
    have u obsereved you code in the loop!!!!. wht u r doing..
    u r removing the same record which u in the loop..
    If u wanto delete the entires with check to<b> stat</b>... <b>then.. why dont u put the STAT field in Wher e condition..?</b> by this you reduce the data base select time..
    Now the select query is like the below....
    CLEAR IT_ZVPRODDET.
    SELECT DISTINCT
         ZVPOD~BUKRS
         ZVPOD~AUFNR
         ZVPOD~OBJNR
         JEST~STAT
         ZVPOD~WERKS
         ZVPOD~ARBPL
         ZVPOD~J_3AKORD2
      FROM ZVPOD
      INNER JOIN JEST ON ZVPOD~OBJNR = JEST~OBJNR
      INTO CORRESPONDING FIELDS TABLE  IT_ZVPRODDET
      WHERE PLNBEZ IN FGM AND
            ARBPL IN WC AND
            WERKS IN PLANT AND
            SSAVD IN ELDATE AND
            J_3AKORD2 IN CUPS AND
            JEST~INACT NE 'X' AND
            ( STAT <> 'I0045' AND
              STAT <> 'I0045' AND
              STAT <> 'I0009' AND
              STAT <> 'I0012' AND
              STAT <> 'I0046' AND
              STAT <> 'I0076' AND
              STAT <> 'E0003' ).
      IF SY-SUBRC = 0.
        SORT TABLE IT_ZVPRODDET.
      ENDIF.
    <b>3.</b> WHT IS MEANING OF THE SELECT
    <b>  CLEAR TJ30T.
      SELECT SINGLE TXT04
      FROM TJ30T INTO TJ30T-TXT04
      WHERE STSMA = 'PRDHOLD' AND
            ESTAT = 'E0003' AND
            TXT04 = 'SCLS' AND
            SPRAS = 'EN'.
      IF SY-SUBRC = 0.
        DELETE IT_ZVPRODDET WHERE AUFNR = WA_ZVPRODDET-AUFNR.
      ENDIF.</b>....... IN WHERE CONDION U R GIven all are constant values right?..
    why u need select it inside the loop.. u can write before the SELECT from ZVPOD..
    that why first checke this field then go for fur thure selects..
    <b>now u r code looks like this....</b>
    CLEAR TJ30T.
    SELECT SINGLE TXT04
      FROM TJ30T INTO TJ30T-TXT04
    WHERE STSMA = 'PRDHOLD' AND
          ESTAT = 'E0003' AND
          TXT04 = 'SCLS' AND
          SPRAS = 'EN'.
    IF SY-SUBRC = 0.
      CLEAR IT_ZVPRODDET.
      SELECT DISTINCT
           ZVPOD~BUKRS
           ZVPOD~AUFNR
           ZVPOD~OBJNR
           JEST~STAT
           ZVPOD~WERKS
           ZVPOD~ARBPL
           ZVPOD~J_3AKORD2
        FROM ZVPOD
        INNER JOIN JEST ON ZVPOD~OBJNR = JEST~OBJNR
        INTO CORRESPONDING FIELDS TABLE  IT_ZVPRODDET
        WHERE PLNBEZ IN FGM AND
              ARBPL IN WC AND
              WERKS IN PLANT AND
              SSAVD IN ELDATE AND
              J_3AKORD2 IN CUPS AND
              JEST~INACT NE 'X' AND
              JEST~STAT <> 'I0045' AND
              JEST~STAT <> 'I0045' AND
              JEST~STAT <> 'I0009' AND
              JEST~STAT <> 'I0012' AND
              JEST~STAT <> 'I0046' AND
              JEST~STAT <> 'I0076' AND
              JEST~STAT <> 'E0003' ).
        IF SY-SUBRC = 0.
          SORT TABLE IT_ZVPRODDET.
        ENDIF.
      ENDIF.
    there are so many select inside the loop...... please Delete all of them.... write them be for the loop.......using the FOR ALL ENTRIES.....
    THEN LOOP THE TABLE USING THE WHERE CONDITIONS.
    <b>Plese write u updated code here again</b>..

  • Time out error in MIRO in prd , but takes times to Quality server

    Hi all,
    In the sap standard transaction MIRO, in Production while executive , time out error is coming in dump, while when i execute the same tranaction in Quality server, It takes 1 hrs time , but transaction is suceesful.
    What would be the problem.
    Thanks .
    Lolo.

    Amit Gujargoud wrote:>
    > >
    sekhar manda wrote:
    > > Try after some time i think it won't goes to dump
    >
    > My motor bike is not giving good mileage. Okay I'll go inside my house and come back in few minutes. May be it will give me amazing mileage!
    No need to go inside and come, just RESTART the bike,  its just a typical software engineer's solution

  • Error time out to connect FTP server

    Hi Experts,
    I am getting the error in receiver communication channel (FTP) as :
    An error occurred while connecting to the FTP server ''. The FTP server returned the following error message: 'com.sap.aii.adapter.file.ftp.FTPEx: The control connection to the FTP server ""  timed out while reading the server reply.'. For details, contact your FTP server vendor.
    Getting this error for a particular interface. Changed the time out parameter but not working.
    the same IP address is used for same receiver but different interface and it is in green status.
    tried to restart the adapter but same time out error.
    Same configuation is done for two receiver channels .. but getting above error for a particular interface.Please help.
    Thanks,
    Swapnashree

    Hi Swapna,
        If you are facing problem with only one interface then you make some dummy changes in configuration(ID) to that perticular channel and activate.
    After doing this you just restart your communication channel and check if you have any luck.....
    Also check if you have permissions ......for the user and folder which you are accing in your channel...
    Naveen.

Maybe you are looking for

  • RFC connections do not work after system restart

    Hi PI experts! We're facing a problem with our PI 7.0 system. After each restart of the system, all RFC sender communication channels do not work. When testing the connection in the sending SAP system, the connection test fails. Currently we workarou

  • Imac i7 unable to connect to router at 270mbs on DGN2000

    Hello, I have a Netgear DGN2000 router and i decided to switch the speed settings from 130Mbs to 270Mbs, but after doing so my imac was unable to connect. I tested my windows based laptop and that was working fine. I switched back to 130Mbs and it co

  • How to merge two user accounts?

    I have two user accounts I would like to merge into one. What would be the easiest way to go about doing this? I am mostly concerned about moving files, including preferences files, handling the mail accounts and browers bookmarks shouldn't be too tr

  • How to delete a song downloaded to iPhone?

    I downloaded a free album some time ago and later was able to delete all the songs but one from my iPhone. They are no longer on my MacBook either. The deleted songs show up only if I turn on "Show All Music' in my iPhone settings. But one track will

  • Number of remote RFC connections to SAP from third party application

    Hi All, We are using an external application which is using the JCO API to make a connection to the SAP server to pass invoices. But the connections are note properly closed after invoking the RFCs and SAP seems to be not able to handle further reque