Doubt in VO's dirtiness

Hello All,
In process request I am querying the VO to display data on page.
Pls note: At the end of Process request when I check dirty sttus of VO using following code then it is not dirty.
But If I check at the very begining of process form request, I found that it is dirty.
Is it a natural behavior?
Is there any way to find which VO attribute is making VO dirty?
OAApplicationModule am123 = pageContext.getRootApplicationModule();
XXEGASRHeadersVOImpl vo123 = (XXEGASRHeadersVOImpl)am123.findViewObject("XXEGASRHeadersVO1");
if( vo123.isDirty())
System.out.println("test123445");
}

Hi,
I think there is no such method....
However, you can do one thing...
In the process request try to print all the View Attribute values and then in PFR too do the same then you can compare...
But just think, I am checking its dirtiness at the end of process request where it is showing not dirty.
and as soon as I enter into process form request, I am checking its dirtiness at the very begining of method, where it is showing it as dirty
Yes it is possible...suppose you have a text input bind to a View Attribute. as the page loads the value in it is "test".
this time VO is not dirty....now you change the value to "test123". Now the VO has become dirty...so in PFR when you will check then the VO will be dirty even if you are checking at the begining of PFR.
Thanks,
Gaurav

Similar Messages

  • Doubt in report of FI

    Hi every one i have a small doubt in FI report that is i have to give the following output as per the user requirement i had added all the everything in this program i had given u the entire code the only problem is if make comment for the code of city and postal code the remaining everything is working properly and if i remove comment at CITY and POSTAL CODE there is some error can u find out that and help me please
    * Ist-Einzelpostenanzeige EC-PCA                                      *
    * - direkte Aufruf                                                    *
    * - Report Writer                                                     *
    * - Recherche                                                         *
    * 45b MIC: default values for poper and ryear depfr. fiscyear variant *
    * 46a MIC Warning if too few selection parameters                     *
    * 46a MIC: use up to 'whr_size' single values in select statement     *
    * 46a MIC: move'Initialization of Rep-Rep-Interface' to Initialization*
    * 46a MIC: check only new auth-object                                 *
    * 46c MIC: add RMVCT and get more fields from RRI                     *
    REPORT z_rcopca02_1 NO STANDARD PAGE HEADING MESSAGE-ID km
                    LINE-COUNT (2) LINE-SIZE 81.
    * Typen ***************************************************************
    *type-pools: kkblo.
    TYPE-POOLS: slis, ecarc.
    * DDIC-Tabellen *******************************************************
    TABLES: glpca,                         "Einzelposten / Ist
            glu1,                          "Übergabestruktur FI-SL-Anzeige
            t000,
            tka01,
            sscrfields,
            lfa1,
            kna1,
            bseg,
            with_item.
    * Variablen und int. Tabellen *****************************************
    DATA: afield        TYPE slis_fieldcat_alv,
          sp_group      TYPE slis_sp_group_alv,
          t_listheader  TYPE slis_t_listheader WITH HEADER LINE,
          t_layout      TYPE slis_layout_alv,
          t_fieldcat    TYPE slis_t_fieldcat_alv,
          t_spec_groups TYPE slis_t_sp_group_alv,
          event         TYPE slis_alv_event,
          t_events      TYPE slis_t_event,
          g_variant     LIKE disvariant,
          gx_variant    LIKE disvariant,
          g_exit(1)     TYPE c,
          g_save(1)     TYPE c,
          g_repid       LIKE sy-repid,
          msgtyp        LIKE sy-msgty,
          lt_dynpread   LIKE dynpread OCCURS 1 WITH HEADER LINE,
          ls_rpcak      LIKE rpcak,              "note 0310592
          packsize      TYPE i VALUE 1000,
          text1(60)     TYPE c,
          text2(60)     TYPE c,
          oldkokrs      LIKE glpca-kokrs,
          oldracct      LIKE glpca-racct.
    DATA: whr_size    TYPE i VALUE 50,"Maximum of single values per  MIC 46a
                       "charact. in the where-clause of the select-statement
          lines         TYPE i, "number of lines of range table      MIC 46a
          cnt_rldnr     TYPE i, "Zähler Anzahl selektierter Ledger
          cnt_kokrs     TYPE i, "Zähler Anzahl selektierter KoReKreise
          cnt_poper     TYPE i, "Zähler Anzahl selektierter Perioden
          cnt_ryear     TYPE i, "Zähler Anzahl selektierter GeschJahre
          cnt_rvers     TYPE i, "Zähler Anzahl selektierter Versionen
          cnt_bukrs     TYPE i, "Zähler Anzahl selektierter BuKreise
          empge         LIKE dkobr-empge,
          ksl_curr      LIKE tka01-pcacur,
          hsl_curr      LIKE t001-waers,
          a_rec         LIKE rstirec.
    DATA: BEGIN OF dim_data.
            INCLUDE STRUCTURE rgcdi.       "data for dimensions
    DATA: END OF dim_data.
    DATA: BEGIN OF tab_fields OCCURS 80,
            name LIKE dntab-fieldname,     "fields in table i_glpca
          END OF tab_fields.
    DATA: BEGIN OF i_glpca OCCURS 0.
            INCLUDE STRUCTURE rpca2.
    DATA:   racct_ktext LIKE rpcak-ktext,
            psppp LIKE prps-posid,
            name1 LIKE lfa1-name1,
            adrnr like lfa1-adrnr,
            stras like lfa1-stras,
            c_name1 like kna1-name1,
            v_rate like with_item-qsatz,
            qsshb like bseg-qsshb,
            qbshb like bseg-qbshb,
          END OF i_glpca.
    DATA: rw_subrc   LIKE sy-subrc,      "Flag: Report-Writer-Schnittstelle
          re_subrc   LIKE sy-subrc,        "Flag: Recherche-Schnittstelle
          subrc      LIKE sy-subrc.
    DATA: set_id    LIKE sethier-setid,    "Set-ID        "RDI_SETS_4.0
          set_class LIKE sethier-setclass, "Setklasse     "RDI_SETS_4.0
          set_sname LIKE sethier-shortname."Setname (24)  "RDI_SETS_4.0
    DATA: authorised(1),
          s_message(1),
          auth_dbcount LIKE sy-tabix,
    *     Hex-Konstanten für Minimum/Maximum-Werte
          BEGIN OF hex00,
            x1(12) TYPE c,
            x2(12) TYPE c,
          END OF hex00,
          BEGIN OF hexff,
            x1(12) TYPE c,
            x2(12) TYPE c,
          END OF hexff.
    RANGES rclnt FOR glpca-rclnt.
    FIELD-SYMBOLS: <glpca> LIKE LINE OF i_glpca,
                   <glpca_arc> TYPE ecarc_glpca_curr.
    * Selektionsoptionen *************************************************
    SELECT-OPTIONS:
      rldnr    FOR glpca-rldnr   DEFAULT '8A' NO-DISPLAY,
      rassc    FOR glpca-rassc                NO-DISPLAY,
    * rrcty    for glpca-rrcty   default 0,
      rrcty    FOR glpca-rrcty,
      rvers    FOR glpca-rvers   DEFAULT '000',
      kokrs    FOR glpca-kokrs   MEMORY ID cac,
      bukrs    FOR glpca-rbukrs  MEMORY ID buk,
    * poper    for glpca-poper   default sy-datlo+4(2),
    * ryear    for glpca-ryear   default sy-datlo,
      poper    FOR glpca-poper,
      ryear    FOR glpca-ryear,
      prctr    FOR glpca-rprctr  MATCHCODE OBJECT prct,
      pprctr   FOR glpca-sprctr  MATCHCODE OBJECT prct,
    * RACCT    FOR GLPCA-RACCT   MATCHCODE OBJECT KART,      "RD_P30K128304
      racct    FOR glpca-racct,            "RD_P30K128304
      drcrk    FOR glpca-drcrk,
      activ    FOR glpca-activ,
      rhoart   FOR glpca-rhoart,
      rfarea   FOR glpca-rfarea,
      stagr    FOR glpca-stagr,
      rtcur    FOR glpca-rtcur,
      runit    FOR glpca-runit,
      versa    FOR glpca-versa  NO-DISPLAY,
      eprctr   FOR glpca-eprctr NO-DISPLAY,
      afabe    FOR glpca-afabe  NO-DISPLAY,
      rmvct    FOR glpca-rmvct  NO-DISPLAY,
      hrkft    FOR glpca-hrkft  NO-DISPLAY,  "note 550972
      sbukrs   FOR glpca-sbukrs NO-DISPLAY,  "note 550972
      shoart   FOR glpca-shoart NO-DISPLAY,  "note 550972
      sfarea   FOR glpca-sfarea NO-DISPLAY,  "note 550972
      docct    FOR glpca-docct,
      docnr    FOR glpca-docnr,
      refdocct FOR glpca-refdocct,
      refdocnr FOR glpca-refdocnr,
      werks    FOR glpca-werks,
      repmatnr FOR glpca-rep_matnr MATCHCODE OBJECT pca_shlp_rep_matnr,
      rscope   FOR glpca-rscope.
    PARAMETERS: no_rrint NO-DISPLAY DEFAULT ' '." skip       "MICP40K066037
    " report-report-interface
    * display variant                                       ">>MICP40K039857
    SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE text-e01.
    PARAMETERS: p_vari LIKE disvariant-variant.
    SELECTION-SCREEN COMMENT 47(40) varname FOR FIELD p_vari.
    SELECTION-SCREEN END OF BLOCK 0.
    PARAMETERS log_grp(4) TYPE c NO-DISPLAY DEFAULT 'zKE5Z'.
    "<<MICP40K039857
    RANGES: v_racct  FOR glpca-racct,
            v_prctr  FOR glpca-rprctr,
            v_pprctr FOR glpca-sprctr.
    * Tabelle mit Werten aus den Berichts-Set vom Report-Writer           *
    DATA  BEGIN OF val_tab OCCURS 50.
            INCLUDE STRUCTURE rgciv.
    DATA  END OF val_tab.
    ***************************************************        MICP30K166368
    * feldkatalog und interface für bb-schnittstelle rw        MICP30K166368
    ***************************************************        MICP30K166368
    "MICP30K166368
    DATA  BEGIN OF bbs_fieldtab OCCURS 20. "MICP30K166368
            INCLUDE STRUCTURE rstifields.  "MICP30K166368
    DATA  END OF bbs_fieldtab.             "MICP30K166368
    * archiv
    TYPE-POOLS: rsds.
    TYPES:      BEGIN OF ty_archive_objects,
                   object       LIKE arch_obj-object,
                END   OF ty_archive_objects,
                ty_t_archive_objects TYPE ty_archive_objects OCCURS 2.
    CONSTANTS:  lc_set          TYPE  c           VALUE 'X',
                lc_report       TYPE  progname    VALUE 'ZKE5Z',
                lc_reporttype   TYPE  reporttype  VALUE 'TR'.
    TABLES:     admi_files.
    SELECT-OPTIONS lr_files FOR admi_files-archiv_key NO-DISPLAY.
    PARAMETER:  read_db       TYPE c            DEFAULT 'X' NO-DISPLAY,
                read_ar       TYPE c                        NO-DISPLAY,
                arc_obj       LIKE arch_obj-object          NO-DISPLAY,
                read_as       TYPE c            DEFAULT 'X' NO-DISPLAY.
    DATA  :     lt_arch_obj     TYPE ty_t_archive_objects WITH HEADER LINE,
                ls_selections   TYPE rsds_frange,
                lt_selections   TYPE rsds_frange_t,
                ls_selopt TYPE rsdsselopt,
                lt_glpca_archiv TYPE ecarc_t_glpca_curr.
    *********************************************************>>MICP40K039857
    * INITIALIZATION
    INITIALIZATION.
    * Diverse Initialisierungen
      PERFORM init_vars.
      g_repid = sy-repid.
    * Set default values for record type
      rrcty-sign = 'I'.
      rrcty-option = 'EQ'.
      rrcty-low    = '0'.
      APPEND rrcty.
      rrcty-low = '2'.
      APPEND rrcty.
    * Set default values for period and year (if kokrs or bukrs is known)
      GET PARAMETER ID 'BUK' FIELD bukrs-low.
      GET PARAMETER ID 'CAC' FIELD kokrs-low.
      IF     kokrs-low IS INITIAL       "get contr. area from company code
         AND NOT bukrs-low IS INITIAL.
        CALL FUNCTION 'KOKRS_GET_FROM_BUKRS'
          EXPORTING
            i_bukrs        = bukrs-low
          IMPORTING
            e_kokrs        = kokrs-low
          EXCEPTIONS
            no_kokrs_found = 1
            OTHERS         = 2.
        IF sy-subrc <> 0.
          CLEAR kokrs-low.
        ENDIF.
      ENDIF.
      IF NOT kokrs-low IS INITIAL.
        CALL FUNCTION 'K_KOKRS_READ'       "get fiscal year variant
             EXPORTING
                  kokrs           = kokrs-low
              IMPORTING
                  e_tka01         = tka01
            EXCEPTIONS
                  not_found       = 1
                  not_found_gjahr = 2
                  OTHERS          = 3.
        IF sy-subrc = 0.
          CALL FUNCTION 'G_PERIOD_GET'
            EXPORTING
              date                           = sy-datlo
              variant                        = tka01-lmona
            IMPORTING
              period                         = poper-low
              year                           = ryear-low
            EXCEPTIONS
              ledger_not_assigned_to_company = 1
              period_not_defined             = 2
              variant_not_defined            = 3
              OTHERS                         = 4.
          IF sy-subrc = 0.
            poper-sign = 'I'.
            poper-option = 'EQ'.
            APPEND poper.
            ryear-sign = 'I'.
            ryear-option = 'EQ'.
            APPEND ryear.
          ENDIF.
        ENDIF.
      ENDIF.
    * Settings for display variants
      g_save = 'A'.  "Schalter Varianten benutz./allg. speichern
      CLEAR g_variant.
      g_variant-report = g_repid.
      g_variant-log_group = log_grp.
      g_variant-username = sy-uname.
    * Get default variant
      gx_variant = g_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = g_save
        CHANGING
          cs_variant = gx_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        p_vari = gx_variant-variant.
      ENDIF.
    * Set variant
      IF p_vari IS INITIAL.
        p_vari = '1SAP'.
        MOVE p_vari TO gx_variant-variant.
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
          EXPORTING
            i_save     = g_save
          CHANGING
            cs_variant = gx_variant
          EXCEPTIONS
            not_found  = 1.
        IF sy-subrc NE 0.
          CLEAR p_vari.
          CLEAR gx_variant-variant.
        ENDIF.
      ENDIF.
      varname = gx_variant-text.
      "<<MICP40K039857
    * archiv
      CALL FUNCTION 'KARL_DATA_INPUT_INIT'
        EXPORTING
          i_report     = lc_report
          i_reporttype = lc_reporttype
        IMPORTING
          e_xusedb     = read_db
          e_xusear     = read_ar
          e_archobj    = arc_obj
          e_infosys    = read_as
        TABLES
          t_arch_sel   = lr_files.
      DATA: lt_excluding LIKE sy-ucomm OCCURS 0 WITH HEADER LINE.
      CALL FUNCTION 'RS_SET_SELSCREEN_STATUS'
        EXPORTING
          p_status  = 'SELSCREEN'
          p_program = 'RCOPCA02'
        TABLES
          p_exclude = lt_excluding.
    * Initialisieren der Bericht/Bericht-Schnittstellen                   *
      DATA: ld_no_rrint TYPE boole_d.      "note 490484 begin
      IMPORT rri = ld_no_rrint FROM MEMORY ID 'RCOPCA02_NO_RRI'.
      IF ld_no_rrint = 'X'.
        FREE MEMORY ID 'RCOPCA02_NO_RRI'.
      ELSE.                                "note 490484 end
        CALL FUNCTION 'G_REPORT_INTERFACE_INIT'   "Report-Writer?
            EXPORTING                      "MICP30K166368
                 table = 'GLPCT'           "MICP30K166368
             IMPORTING
                 subrc = rw_subrc          "MICP30K166368
            TABLES                         "MICP30K166368
                 it_fieldr = bbs_fieldtab. "MICP30K166368
        CALL FUNCTION 'RSTI_APPL_STACK_POP'"oder Recherche?
             IMPORTING
                  i_rec                      = a_rec
             EXCEPTIONS
                  appl_stack_not_initialized = 1.
        re_subrc = sy-subrc.
        IF re_subrc = 0.
    *    check Receiver is this report
          IF NOT ( ( a_rec-rtool = 'RT' AND a_rec-ronam = 'Z_RCOPCA02_1' )
                   OR ( a_rec-rtool = 'TR' AND a_rec-ronam = 'ZKE5Z' ) ) .
            re_subrc = 2.
          ENDIF.
        ENDIF.
      ENDIF.
    * AT SELCTION-SCREEN on value request**********************************
    *at selection-screen on value-request for racct-low.          "RD "4.6a
    *                                                             "RD "4.6a
    * call function 'K_RACCT_VALUE_REQUEST'                       "RD "4.6a
    *      importing                                              "RD "4.6a
    *           e_racct      = racct-low.                         "RD "4.6a
    *                                                             "RD "4.6a
    *                                                             "RD "4.6a
    *at selection-screen on value-request for racct-high.         "RD "4.6a
    *                                                             "RD "4.6a
    * call function 'K_RACCT_VALUE_REQUEST'                       "RD "4.6a
    *      importing                                              "RD "4.6a
    *           e_racct      = racct-high.                        "RD "4.6a
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.         "MICP40K039857
      PERFORM f4_for_variant.              "MICP40K039857
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR poper-low.         "RD "4.6a
    * begin of insertion note 522715
      CALL FUNCTION 'K_KOKRS_READ'
        EXPORTING
          kokrs           = kokrs-low
        EXCEPTIONS
          not_found       = 1
          not_found_gjahr = 2
          OTHERS          = 3.
      IF sy-subrc = 0.
    * end of insertion note 522715
        CALL FUNCTION 'ECPCA_RPMAX_VALUE_REQUEST'               "RD "4.6a
             EXPORTING                                          "RD "4.6a
                  i_kokrs     = kokrs-low                       "RD "4.6a
                  i_ryear     = ryear-low                       "RD "4.6a
             IMPORTING                                          "RD "4.6a
                  e_rpmax     = poper-low                       "RD "4.6a
    * begin of insertion note 522715
             EXCEPTIONS
                  table_empty = 1.
      ENDIF.
    * end of insertion note 522715
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR poper-high.        "RD "4.6a
    * begin of insertion note 522715
      CALL FUNCTION 'K_KOKRS_READ'
        EXPORTING
          kokrs           = kokrs-low
        EXCEPTIONS
          not_found       = 1
          not_found_gjahr = 2
          OTHERS          = 3.
      IF sy-subrc = 0.
    * end of insertion note 522715
        CALL FUNCTION 'ECPCA_RPMAX_VALUE_REQUEST'               "RD "4.6a
             EXPORTING                                          "RD "4.6a
                  i_kokrs     = kokrs-low                       "RD "4.6a
                  i_ryear     = ryear-low                       "RD "4.6a
             IMPORTING                                          "RD "4.6a
                  e_rpmax     = poper-high                      "RD "4.6a
    * begin of insertion note 522715
             EXCEPTIONS
                  table_empty = 1.
      ENDIF.
    * end of insertion note 522715
    * AT SELCTION-SCREEN ***************************************************
    AT SELECTION-SCREEN.
      PERFORM pai_of_selection_screen.
    * begin of insertion note 522715
      IF NOT kokrs-low IS INITIAL.
        CALL FUNCTION 'K_KOKRS_READ'
          EXPORTING
            kokrs           = kokrs-low
          EXCEPTIONS
            not_found       = 1
            not_found_gjahr = 2
            OTHERS          = 3.
        IF sy-subrc <> 0.
          MESSAGE e101(ki) WITH kokrs-low.
        ENDIF.
      ENDIF.
    * end of insertion note 522715
    * archiv
      IF sy-ucomm = 'FC01' OR sy-ucomm = 'UCDS'
        OR sy-ucomm = 'ONLI' AND read_ar = 'X'
        AND read_as IS INITIAL AND lr_files[] IS INITIAL.
        IF lt_arch_obj[] IS INITIAL.
          lt_arch_obj-object = 'PCA_OBJECT'. APPEND lt_arch_obj.
          lt_arch_obj-object = 'EC_PCA_ITM'. APPEND lt_arch_obj.
        ENDIF.
        CALL FUNCTION 'KARL_DATA_INPUT_SELECT'
          EXPORTING
            i_db_and_arc       = lc_set
            i_infosys_possible = lc_set
            i_object_fixed     = 'V'
            i_documentation    = 'KARL_DATA_INPUT_SEL_KE5YZ'
            i_report           = lc_report
            i_reporttype       = lc_reporttype
          TABLES
            t_objects          = lt_arch_obj
            t_arch_sel         = lr_files
          CHANGING
            c_xusedb           = read_db
            c_xusear           = read_ar
            c_archobj          = arc_obj
            c_infosys          = read_as.
      ENDIF.
    * START-OF-SELECTION **************************************************
    START-OF-SELECTION.
    *   Default-Werte löschen, falls Aufruf über Recherche
    *   oder Report-Writer erfolgt ist
      IF no_rrint IS INITIAL AND ld_no_rrint IS INITIAL.        "note 490484
        IF rw_subrc EQ 0 OR re_subrc EQ 0.
          REFRESH: rldnr, rrcty, rvers,  kokrs, bukrs, poper,  ryear,
                   racct, prctr, pprctr, drcrk, activ, rhoart, rfarea,
                   versa, afabe, eprctr,
                   v_racct, v_prctr, v_pprctr.
          CLEAR:   rldnr, rrcty, rvers,  kokrs, bukrs, poper,  ryear,
                   racct, prctr, pprctr, drcrk, activ, rhoart, rfarea,
                   versa, afabe, eprctr,
                   v_racct, v_prctr, v_pprctr.
          IF NOT read_as IS INITIAL.                           "note 625581
            CLEAR: lr_files, lr_files[].                       "note 625581
          ENDIF.                                               "note 625581
        ENDIF.
    * Parameter einlesen über Report-Writer-Schnittstelle                 *
        IF rw_subrc EQ 0.
          PERFORM rw_get_parameters.
    * oder Parameter einlesen über Recherche-Schnittstelle                *
        ELSEIF re_subrc EQ 0.
          PERFORM re_get_parameters.
        ENDIF.
      ENDIF.
      IF read_db = 'X'.                     " read from DB (archiv)
    * Bewegungsdaten einlesen und puffern...................................
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            text = 'Einzelposten selektieren'(p10).
    * Use dirty trick to mislead DB-optimizer
        CALL FUNCTION 'DB_DO_NOT_USE_CLIENT_INDEX'
          EXPORTING
            value    = sy-mandt
          TABLES
            mandttab = rclnt.
        SELECT (tab_fields) FROM glpca
           CLIENT SPECIFIED
           PACKAGE SIZE packsize
           APPENDING CORRESPONDING FIELDS OF TABLE i_glpca
           WHERE rldnr     IN rldnr
             AND rrcty     IN rrcty
             AND rvers     IN rvers
             AND kokrs     IN kokrs
             AND rbukrs    IN bukrs
             AND ryear     IN ryear
             AND rassc     IN rassc
             AND hrkft     IN hrkft   "note 550972
             AND sbukrs    IN sbukrs  "note 550972
             AND shoart    IN shoart  "note 550972
             AND sfarea    IN sfarea  "note 550972
             AND racct     IN racct
             AND rprctr    IN prctr
             AND sprctr    IN pprctr
             AND poper     IN poper
             AND drcrk     IN drcrk
             AND activ     IN activ
             AND rhoart    IN rhoart
             AND rfarea    IN rfarea
             AND versa     IN versa
             AND eprctr    IN eprctr
             AND afabe     IN afabe
             AND rmvct     IN rmvct
             AND docct     IN docct
             AND docnr     IN docnr
             AND stagr     IN stagr
             AND rtcur     IN rtcur
             AND runit     IN runit
             AND refdocct  IN refdocct
             AND refdocnr  IN refdocnr
             AND werks     IN werks
             AND rep_matnr IN repmatnr       "RDIP40K020663
             AND rscope    IN rscope         "RDIP40K020663
          AND rclnt     IN rclnt.       "dirty trick to mislead DB-optimizer
          IF sy-dbcnt > 1.
            text1 = sy-dbcnt.
            CONDENSE text1.
            CONCATENATE text1 text-m01 INTO text2 SEPARATED BY space.
            CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
              EXPORTING
                text = text2.          " ... Datensätze gelesen
          ENDIF.
        ENDSELECT.
    * Entfernt nicht zugehörige Einträge....................................
        LOOP AT i_glpca WHERE ( NOT rprctr IN v_prctr  )
                           or ( not SPRCTR in v_pprctr )
                           OR ( NOT racct  IN v_racct  ).
          DELETE i_glpca.
        ENDLOOP.
      ENDIF.
    *archiv
      IF read_ar = 'X' AND NOT
        ( read_as IS INITIAL AND lr_files[] IS INITIAL ).
        CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
          EXPORTING
            text = 'Lesen im Archiv'(p12).
        DEFINE fill_lt_selections.
          if not &2[] is initial.
            clear ls_selections.
            move &1 to ls_selections-fieldname.
            loop at &2.
              clear ls_selopt.
              move-corresponding &2 to ls_selopt.
              append ls_selopt to ls_selections-selopt_t.
            endloop.
            append ls_selections to lt_selections.
          endif.
        END-OF-DEFINITION.
        fill_lt_selections 'RLDNR'  rldnr.
        fill_lt_selections 'RRCTY'  rrcty.
        fill_lt_selections 'RVERS'  rvers.
        fill_lt_selections 'KOKRS'  kokrs.
        fill_lt_selections 'RBUKRS' bukrs.
        fill_lt_selections 'POPER'  poper.
        fill_lt_selections 'RYEAR'  ryear.
        fill_lt_selections 'RPRCTR' prctr.
        fill_lt_selections 'SPRCTR' pprctr.
        fill_lt_selections 'RACCT'  racct.
        fill_lt_selections 'DRCRK'  drcrk.
        fill_lt_selections 'ACTIV'  activ.
        fill_lt_selections 'RHOART' rhoart.
        fill_lt_selections 'RFAREA' rfarea.    "note 401961
        fill_lt_selections 'STAGR'  stagr.
        fill_lt_selections 'RTCUR'  rtcur.
        fill_lt_selections 'RUNIT'  runit.
        fill_lt_selections 'VERSA'  versa.
        fill_lt_selections 'EPRCTR' eprctr.
        fill_lt_selections 'AFABE'  afabe.
        fill_lt_selections 'RMVCT'  rmvct.
        fill_lt_selections 'DOCCT'  docct.
        fill_lt_selections 'DOCNR'  docnr.
        fill_lt_selections 'REFDOCCT' refdocct.
        fill_lt_selections 'REFDOCNR' refdocnr.
        fill_lt_selections 'WERKS'  werks.
        fill_lt_selections 'REP_MATNR' repmatnr.
        fill_lt_selections 'RSCOPE' rscope.
        fill_lt_selections 'HRKFT'  hrkft.   "note 550972
        fill_lt_selections 'SBUKRS' sbukrs.  "note 550972
        fill_lt_selections 'SHOART' shoart.  "note 550972
        fill_lt_selections 'SFAREA' sfarea.  "note 550972
        CALL FUNCTION 'EC_PCA_SELECT_FROM_ARCHIVE'
          EXPORTING
            i_selections            = lt_selections[]
            i_files_sequential_read = lr_files[]
          IMPORTING
            e_glpca                 = lt_glpca_archiv[]
          EXCEPTIONS
            no_infostruc_found      = 1.
        IF sy-subrc = 1.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        CLEAR i_glpca.
        LOOP AT lt_glpca_archiv ASSIGNING <glpca_arc>
                        WHERE ( rprctr IN v_prctr  )
                          and ( sprctr IN v_pprctr )
                          AND ( racct  IN v_racct  ).
          MOVE-CORRESPONDING <glpca_arc> TO i_glpca.
          APPEND i_glpca.
        ENDLOOP.
    * delete duplicate records                                   note 639647
        IF NOT read_db IS INITIAL AND NOT lt_glpca_archiv[] IS INITIAL.
          SORT i_glpca.
          DELETE ADJACENT DUPLICATES FROM i_glpca.
        ENDIF.
      ENDIF.
      IF i_glpca[] IS INITIAL.         "Info,nichts gefunden
        MESSAGE s000.
        EXIT.
      ENDIF.
    * get texts for accounts ...............................................
      SORT i_glpca BY kokrs racct.
      LOOP AT i_glpca ASSIGNING <glpca>.
        IF <glpca>-kokrs <> oldkokrs OR <glpca>-racct <> oldracct. "AT NEW
          CLEAR ls_rpcak.
          oldkokrs = <glpca>-kokrs.
          oldracct = <glpca>-racct.
          CALL FUNCTION 'K_RACCT_SINGLE_CHECK'         "note 0310592
               EXPORTING
                    i_kokrs    = <glpca>-kokrs
                    i_racct    = <glpca>-racct
                    i_spras    = sy-langu
                    i_textflag = 'X'
               IMPORTING
                    e_rpcak    = ls_rpcak
               EXCEPTIONS
                    not_valid  = 1
                    OTHERS     = 2.
          IF sy-subrc NE 0.
            CLEAR ls_rpcak.
          ENDIF.
        ENDIF.                             "ENDAT
        <glpca>-racct_ktext = ls_rpcak-ktext.
    * Fetching vendor name from vendor number
    *break-point.
         SELECT SINGLE * FROM LFA1
             WHERE LIFNR = <glpca>-LIFNR AND
             SPRAS = SY-LANGU.
         IF SY-SUBRC eq 0.
            <glpca>-name1 = lfa1-name1.
            <glpca>-adrnr = lfa1-adrnr.
            <glpca>-stras = lfa1-stras.
         ENDIF.
    * Fetching customer name from customer number
         SELECT SINGLE * FROM kna1
             WHERE KUNNR = <glpca>-KUNNR.
         IF SY-SUBRC eq 0.
            <glpca>-c_name1 = kna1-name1.
         ENDIF.
         SELECT SINGLE * FROM bseg
                WHERE BUKRS EQ <glpca>-rbukrs AND
                      BELNR EQ <glpca>-refdocnr AND
                      GJAHR EQ <glpca>-ryear AND
                      KTOSL EQ 'WIT' AND
                      BUZEI EQ <glpca>-refdocln.
         IF SY-SUBRC eq 0.
           SELECT SINGLE * FROM WITH_ITEM
                  WHERE BUKRS EQ <glpca>-rbukrs AND
                        BELNR EQ <glpca>-refdocnr AND
                        GJAHR EQ <glpca>-ryear." AND
    *                    BUZEI EQ <glpca>-refdocln AND
    *                    WITHT EQ BSEG-QSSKZ.
           IF SY-SUBRC eq 0.
              <glpca>-v_rate = with_item-qsatz.
              <glpca>-qsshb = with_item-WT_QSSHB.
              <glpca>-qbshb = with_item-WT_QBSHB.
           ENDIF.
         ENDIF
      ENDLOOP.
    * Liste mit Einzelposten geeignet sortieren.............................
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text = 'Einzelposten sortieren'(p30).
    *  if show_ref is initial.
    *    sort i_glpca by rldnr ryear rbukrs rrcty rvers
    *                    docct docnr docln.
    *  else.
      SORT i_glpca BY rldnr kokrs ryear rbukrs rrcty rvers poper
                      refdocct refdocnr refdocln.
    *  endif.
    * Berechtigungsprüfung und gemerkte Belege aufbereiten .................
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text = 'Berechtigungsprüfungen'(p40).
      CLEAR: cnt_rldnr, cnt_kokrs, cnt_ryear, cnt_rvers, cnt_bukrs.
      LOOP AT i_glpca ASSIGNING <glpca>.
    *   Berechtigungscheck
        PERFORM check_repo_authority CHANGING authorised.
        IF authorised IS INITIAL.
          DELETE i_glpca.
          s_message = 'X'.
    *     zählen der Sätze ohne Berechtigung
          auth_dbcount = auth_dbcount + 1.
        ELSE. "Weitere Bearbeitung nur für berechtigte Belege...
    *     Zusätzlich merken der Anzahl der Ausprägungen
    *     bestimmter Dimensionen
          ON CHANGE OF <glpca>-rldnr.
            ADD 1 TO cnt_rldnr.
          ENDON.
          ON CHANGE OF <glpca>-kokrs.
            ADD 1 TO cnt_kokrs.
            CALL FUNCTION 'G_CURRENCY_FROM_CT_GET'
              EXPORTING
                ct       = '90'
                kokrs    = <glpca>-kokrs
                rldnr    = <glpca>-rldnr
              IMPORTING
                currency = ksl_curr.
          ENDON.
          ON CHANGE OF <glpca>-poper.
            ADD 1 TO cnt_poper.
          ENDON.
          ON CHANGE OF <glpca>-ryear.
            ADD 1 TO cnt_ryear.
          ENDON.
          ON CHANGE OF <glpca>-rvers.
            ADD 1 TO cnt_rvers.
          ENDON.
          ON CHANGE OF <glpca>-rbukrs.
            ADD 1 TO cnt_bukrs.
            CALL FUNCTION 'G_CURRENCY_FROM_CT_GET'
              EXPORTING
                bukrs    = <glpca>-rbukrs
                ct       = '10'
              IMPORTING
                currency = hsl_curr.
          ENDON.
    *     externe Immobilienbezeichnung                     "ww/kb
    *     on change of i_glpca-imkey.
          IF ( NOT <glpca>-imkey IS INITIAL ).
            CALL FUNCTION 'REMD_IMKEY_TO_EMPGE'
                 EXPORTING
                      i_imkey    = <glpca>-imkey
                      i_dabrz    = <glpca>-dabrz
    *                 I_length   = 20
                 IMPORTING
                      e_empge    = <glpca>-empge
                      e_konty    = <glpca>-konty
                 EXCEPTIONS
                      not_found  = 1.
            IF sy-subrc NE 0.
              CLEAR <glpca>-empge.
              CLEAR <glpca>-konty.
            ENDIF.
    *       CONCATENATE I_GLPCA-KONTY I_GLPCA-EMPGE INTO I_GLPCA-IMBEZ.
          ENDIF.
    *     endon.
    *     on change of i_glpca-dabrz.
    *        call function 'REMD_IMKEY_TO_EMPGE'
    *             exporting
    *                  i_imkey    = i_glpca-imkey
    *                  i_dabrz    = i_glpca-dabrz
    **                 i_length   = 20
    *             importing
    *                  e_empge    = i_glpca-empge
    *                  e_konty    = i_glpca-konty.
    **       CONCATENATE I_GLPCA-KONTY I_GLPCA-EMPGE INTO I_GLPCA-IMBEZ.
    *      endon.
    *     Konvertierungsproblem mit PSP-Nummer bereinigen
          IF NOT <glpca>-ps_psp_pnr IS INITIAL.
            IF <glpca>-ps_psp_pnr EQ space.
              CLEAR <glpca>-ps_psp_pnr.
            ELSE.
              WRITE <glpca>-ps_psp_pnr TO <glpca>-psppp.
              CALL FUNCTION 'CONVERSION_EXIT_ABPSN_INPUT'
                EXPORTING
                  input  = <glpca>-psppp
                IMPORTING
                  output = <glpca>-psppp.
            ENDIF.
          ENDIF.
    *     Währungen in Hilfsfeldern speichern
          IF <glpca>-hsl_curr IS INITIAL.
            <glpca>-hsl_curr = hsl_curr.
          ENDIF.
          IF <glpca>-ksl_curr IS INITIAL.
            <glpca>-ksl_curr = ksl_curr.
          ENDIF.
    *     modify i_glpca.
        ENDIF.
      ENDLOOP.
    * Nachricht, wenn nicht alle Einzelposten angezeigt werden.
      IF NOT s_message IS INITIAL.
        MESSAGE s407(km) WITH auth_dbcount.
      ENDIF.
    * EP ausgeben...........................................................
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
        EXPORTING
          text = 'Einzelposten ausgeben'(p50).
      t_layout-detail_initial_lines = 'X'.
      t_layout-detail_popup         = 'X'.
      t_layout-f2code               = 'PIC1'.                "MICP40K039857
      t_layout-get_selinfos         = 'X'.
      t_layout-group_change_edit    = 'X'.                   "note 576149
      PERFORM fill_listheader.
      PERFORM fieldcat_fill.
      PERFORM spec_groups_fill.
      PERFORM events_fill.                 "MICP40K039857
      ">>MICP40K039857
    *  call function 'K_KKB_LIST_DISPLAY'
    *       exporting
    *            i_callback_program       = 'Z_RCOPCA02_1
    *            i_callback_user_command  = 'USR_CMD'
    *            i_callback_top_of_page   = 'TOP_OF_PAGE'
    **           I_CALLBACK_END_OF_PAGE   =
    **           I_CALLBACK_END_OF_LIST   =
    *            i_callback_pf_status_set = 'SET_PF_STATUS'
    **           I_CALLBACK_LAYOUT_SAVE   =
    **           I_CALLBACK_FIELDCAT_SAVE =
    *            i_tabname                = 'I_GLPCA'
    *            is_layout                = t_layout
    *            it_fieldcat              = t_fieldcat
    **           I_FCTYPE                 = 'R'
    **           IT_EXCLUDING             =
    *            it_special_groups        = t_spec_groups
    **           IT_SORT                  =
    **           IS_SEL_HIDE              =
    **           I_SCREEN_START_COLUMN    = 0
    **           I_SCREEN_START_LINE      = 0
    **           I_SCREEN_END_COLUMN      = 0
    **           I_SCREEN_END_LINE        = 0
    *       tables
    *            t_outtab                 = i_glpca
    *       exceptions
    *            others                   = 1.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    *  CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
    *         I_INTERFACE_CHECK        = ' '
               i_callback_program       = 'Z_RCOPCA02_1'
               i_callback_pf_status_set = 'SET_PF_STATUS'
               i_callback_user_command  = 'USR_CMD'
               i_structure_name         = 'I_GLPCA'
               is_layout                = t_layout
               it_fieldcat              = t_fieldcat
    *         IT_EXCLUDING             =
               it_special_groups        = t_spec_groups
    *         IT_SORT                  =
    *         IT_FILTER                =
    *         IS_SEL_HIDE              =
               i_default                = 'X'
               i_save                   = g_save
               is_variant               = g_variant
               it_events                = t_events
    *         IT_EVENT_EXIT            =
    *         IS_PRINT                 =
    *         I_SCREEN_START_COLUMN    = 0
    *         I_SCREEN_START_LINE      = 0
    *         I_SCREEN_END_COLUMN      = 0
    *         I_SCREEN_END_LINE        = 0
    *    IMPORTING
    *         E_EXIT_CAUSED_BY_CALLER  =
    *         ES_EXIT_CAUSED_BY_USER   =
          TABLES
               t_outtab                 = i_glpca
        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.
      "<<MICP40K039857
      CLEAR i_glpca.
    *&      Form  CHECK_REPO_AUTHORITY
    *  Check only new auth-object K_PCA                                    *
    *  -->  p1        text
    *  <--  p2        text
    FORM check_repo_authority CHANGING authorized LIKE authorised.
    * fill structure for userexit in K_PCA_RESP_AUTHORITY_CHECK
      DATA: auth LIKE pca_i_auth.          "46a MIC check K_PCA and G_GLTP
      auth-bukrs = <glpca>-rbukrs.
      auth-rldnr = <glpca>-rldnr.
      auth-rvers = <glpca>-rvers.
      auth-rrcty = <glpca>-rrcty.
      CLEAR authorized.
    * check PrCtr/account/activity
      CALL FUNCTION 'K_PCA_RESP_AUTHORITY_CHECK'
        EXPORTING
          i_kokrs             = <glpca>-kokrs
          i_prctr             = <glpca>-rprctr
          i_kstar             = <glpca>-racct
          i_vorgn             = 'REPP'
          i_actvt             = '28'
          i_auth              = auth
          i_no_dialog_message = 'X'
        EXCEPTIONS
          no_authority        = 1
          data_missing        = 2
          OTHERS              = 3.
      IF sy-subrc = 0.                                          "ok
    * check ledger/version/record type
        CALL FUNCTION 'PCA_G_GLTP_AUTH_CHECK'
          EXPORTING
            rldnr            = <glpca>-rldnr
            rvers            = <glpca>-rvers
            rrcty            = <glpca>-rrcty
          EXCEPTIONS
            no_authorisation = 1
            OTHERS           = 2.
        IF sy-subrc = 0.                   "ok, User is authorized
          authorized = 'X'.
        ENDIF.
      ENDIF.
    ENDFORM.                               " CHECK_REPO_AUTHORITY
    *&      Form  INIT_VARS
    *       Initialisieren diverser Hilfsvariablen und -tabellen           *
    FORM init_vars.
      DATA BEGIN OF nametab OCCURS 80. "Tabelle mit Feldern aus der RPCA2
              INCLUDE STRUCTURE dntab.
      DATA END OF nametab.
      SELECT SINGLE * FROM t000
                      CLIENT SPECIFIED
                      WHERE mandt = sy-mandt.
      REFRESH nametab.
      CALL FUNCTION 'NAMETAB_GET'
        EXPORTING
          only    = 'T'
          tabname = 'RPCA2'
        TABLES
          nametab = nametab.
    * Übernehmen der Feldnamen, die auch in der GLPCA
    * vorkommen.
      LOOP AT nametab WHERE fieldname NE 'KSL_CURR'
                        AND fieldname NE 'HSL_CURR'
                        AND fieldname NE 'EMPGE'               "ww/kb
                        AND fieldname NE 'KONTY'.              "ww/kb
        MOVE nametab-fieldname TO tab_fields-name.
        APPEND tab_fields.
      ENDLOOP.
    * fill Fields of receiver for BBS                          "MIC46C
      CALL FUNCTION 'RSTI_REPORT_FIELDS_FIND'
        EXPORTING
          e_repid   = 'Z_RCOPCA02_1'
          e_type    = 'R'
        TABLES
          it_fields = bbs_fieldtab.
    * correct fieldnames
      READ TABLE bbs_fieldtab WITH KEY rfield = 'PRCTR'.
      IF sy-subrc = 0.
        bbs_fieldtab-rfield = 'RPRCTR'.
        MODIFY bbs_fieldtab INDEX sy-tabix.
      ENDIF.
      READ TABLE bbs_fieldtab WITH KEY rfield = 'PPRCTR'.
      IF sy-subrc = 0.
        bbs_fieldtab-rfield = 'SPRCTR'.
        MODIFY bbs_fieldtab INDEX sy-tabix.
      ENDIF.
      READ TABLE bbs_fieldtab WITH KEY rfield = 'BUKRS'.
      IF sy-subrc = 0.
        bbs_fieldtab-rfield = 'RBUKRS'.
        MODIFY bbs_fieldtab INDEX sy-tabix.
      ENDIF.
    * Unicode
      CLASS cl_abap_char_utilities DEFINITION LOAD.
      CLEAR hex00 WITH cl_abap_char_utilities=>minchar.
      CLEAR hexff WITH cl_abap_char_utilities=>maxchar.
    ENDFORM.                               " INIT_VARS
    *       FORM FILL_LISTHEADER                                          *
    *       List-Header in Abhängigkeit der selektierten Daten            *
    FORM fill_listheader.
      READ TABLE i_glpca INDEX 1.
      IF sy-subrc NE 0.
        EXIT.
      ENDIF.
      t_listheader-typ  = 'S'.
      t_listheader-key  = 'Ledger              '(h01).
      IF cnt_rldnr <= 1.
        t_listheader-info = i_glpca-rldnr.
      ELSE.
        t_listheader-info = '*'.
      ENDIF.
      APPEND t_listheader.
      t_listheader-typ  = 'S'.
      t_listheader-key  = 'Kostenrechnungskreis'(h02).
      IF  cnt_kokrs <= 1.
        t_listheader-info = i_glpca-kokrs.
      ELSE.
        t_listheader-info = '*'.
      ENDIF.
      APPEND t_listheader.
      t_listheader-typ  = 'S'.
      t_listheader-key  = 'Buchungskreis       '(h03).
      IF cnt_bukrs <= 1.
        t_listheader-info = i_glpca-rbukrs.
      ELSE.
        t_listheader-info = '*'.
      ENDIF.
      APPEND t_listheader.
      t_listheader-typ  = 'S'.
      t_listheader-key  = 'Buchungsperiode     '(h04).
      IF cnt_poper <= 1.
        t_listheader-info = i_glpca-poper.
      ELSE.
        t_listheader-info = '*'.
      ENDIF.
      APPEND t_listheader.
      IF cnt_ryear <= 1.
        t_listheader-typ  = 'S'.
        t_listheader-key  = 'Geschäftsjahr       '(h05).
        t_listheader-info = i_glpca-ryear.
        APPEND t_listheader.
      ENDIF.
      t_listheader-typ  = 'S'.
      t_listheader-key  = 'Version             '(h06).
      IF cnt_rvers <= 1.
        t_listheader-info = i_glpca-rvers.
      ELSE.
        t_listheader-info = '*'.
      ENDIF.
      APPEND t_listheader.
    ENDFORM.                    "fill_listheader
    *&      Form  FIELDCAT_FILL
    *&      Aufbau des Feldkataloges für den K_KKB_LIST_DISPLAY,           *
    *&      bzw REUSE_ALV_LIST_DISPLAY,                                    *
    *&      weitere Infos enthält die FktBaustein-Doku                     *
    FORM fieldcat_fill.
      DATA: i TYPE i VALUE 0.
      REFRESH t_fieldcat.
    * Ledger
    *  if cnt_rldnr > 1.
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RLDNR'.
      afield-no_sum      = 'X'.
      afield-no_out      = 'X'.
    *   afield-key         = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-sp_group    = '1'.
      APPEND afield TO t_fieldcat.
    *  endif.
    * Satzart
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RRCTY'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group    = '1'.
      APPEND afield TO t_fieldcat.
    * Version
    *  if cnt_rvers > 1.
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RVERS'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group    = '1'.
      APPEND afield TO t_fieldcat.
    *  endif.
    * Periode
    *  if cnt_poper > 1.
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'POPER'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group    = '1'.
      APPEND afield TO t_fieldcat.
    *  endif.
    * Geschäftsjahr
    *  if cnt_ryear > 1.
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RYEAR'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group    = '1'.
      APPEND afield TO t_fieldcat.
    *  endif.
    * Referenzbelegtyp
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'REFDOCCT'.
      afield-ref_tabname = 'GLPCA'.
      afield-key_sel     = 'X'.
      afield-no_sum      = 'X'.
      afield-sp_group    = '2'.
      afield-seltext_s   = 'Typ'(t01).
      afield-seltext_m   = 'Belegtyp'(t02).
      afield-seltext_l   = 'Ref.Belegtyp'(t03).
      afield-outputlen   = 3. "Platz für die Sterne der Zwischensummen
    *  if not show_ref is initial.
      afield-key = 'X'.
    *  else.
    *    afield-no_out = 'X'.
    *  endif.
      APPEND afield TO t_fieldcat.
    * Referenzbelegnummer
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'REFDOCNR'.
      afield-ref_tabname = 'GLPCA'.
      afield-key_sel     = 'X'.
      afield-no_sum      = 'X'.
      afield-sp_group    = '2'.
      afield-seltext_s  = 'Refbeleg'(t04).
      afield-seltext_m  = 'Refbelegnr'(t05).
      afield-seltext_l  = 'Ref.Belegnummer'(t06).
    *  if not show_ref is initial.
      afield-key = 'X'.
    *  else.
    *    afield-no_out = 'X'.
    *  endif.
      APPEND afield TO t_fieldcat.
    * Referenzbelegzeile
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'REFDOCLN'.
      afield-ref_tabname = 'GLPCA'.
      afield-key_sel     = 'X'.
      afield-no_sum      = 'X'.
      afield-sp_group    = '2'.
      afield-seltext_s   = 'Zeile'(t07).
      afield-seltext_m   = 'Belegzeile'(t08).
      afield-seltext_l   = 'Ref.Belegzeile'(t09).
    *  if not show_ref is initial.
      afield-key = 'X'.
    *  else.
    *    afield-no_out = 'X'.
    *  endif.
      APPEND afield TO t_fieldcat.
    * Belegtyp PCA
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'DOCCT'.
      afield-ref_tabname = 'GLPCA'.
      afield-key_sel     = 'X'.
      afield-no_sum      = 'X'.
      afield-sp_group    = '1'.
      afield-outputlen   = 3. "Platz für die Sterne der Zwischensummen
    *  if show_ref is initial.
      afield-key = 'X'.
    *  else.
      afield-no_out = 'X'.
    *  endif.
      APPEND afield TO t_fieldcat.
    * Belegnummer PCA
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'DOCNR'.
      afield-ref_tabname = 'GLPCA'.
      afield-key_sel     = 'X'.
      afield-no_sum      = 'X'.
      afield-sp_group    = '1'.
    *  if show_ref is initial.
      afield-key = 'X'.
    *  else.
      afield-no_out = 'X'.
    *  endif.
      APPEND afield TO t_fieldcat.
    * Belegzeile PCA
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'DOCLN'.
      afield-ref_tabname = 'GLPCA'.
      afield-key_sel     = 'X'.
      afield-no_sum      = 'X'.
      afield-sp_group    = '1'.
    *  if show_ref is initial.
      afield-key = 'X'.
    *  else.
      afield-no_out = 'X'.
    *  endif.
      APPEND afield TO t_fieldcat.
    * Kostenrechnungskreis
    *  if cnt_kokrs > 1.
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'KOKRS'.
      afield-ref_tabname = 'GLPCA'.
      afield-key_sel     = 'X'.
      afield-no_sum      = 'X'.
      afield-no_out      = 'X'.
      afield-sp_group    = '7'.
      APPEND afield TO t_fieldcat.
    *  endif.
    * Buchungskreis
    *  if cnt_bukrs > 1.
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RBUKRS'.
      afield-ref_tabname = 'GLPCA'.
      afield-key_sel     = 'X'.
      afield-no_sum      = 'X'.
      afield-no_out      = 'X'.
      afield-seltext_s  = 'BuKrs'(b01).
      afield-seltext_m  = 'BuKrs'(b02).
      afield-seltext_l  = 'Empfänger-BuKrs'(b03).
      afield-sp_group    = '8'.
      APPEND afield TO t_fieldcat.
    *  endif.
    * Profit Center
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RPRCTR'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-sp_group    = '7'.
      APPEND afield TO t_fieldcat.
    * Eliminierungs-Profit-Center
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'EPRCTR'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group    = '7'.
      APPEND afield TO t_fieldcat.
    * Sender-Profit-Center
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'SPRCTR'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-sp_group    = '7'.
      APPEND afield TO t_fieldcat.
    * Konto
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RACCT'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-sp_group    = '7'.
      APPEND afield TO t_fieldcat.
      ADD 1 TO i.
    * Kontentext
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RACCT_KTEXT'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'RPCAK'.
      afield-ref_fieldname = 'KTEXT'.
      afield-seltext_s   = 'Kont-txt.'(m11).
      afield-seltext_m   = 'Kontentext'(m12).
      afield-seltext_l   = 'Kontentext'(m13).
      afield-sp_group    = '7'.
      APPEND afield TO t_fieldcat.
      ADD 1 TO i.
    * Statistische Kennzahl
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'STAGR'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group    = '12'.
      APPEND afield TO t_fieldcat.
    * Soll/Haben-Kennzeichen
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'DRCRK'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group    = '1'.
      APPEND afield TO t_fieldcat.
    * Wert in Profit-Center-Währung
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'KSL'.
      afield-do_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
    *  AFIELD-SELTEXT_S   = 'PrCtr-Hauswhr.'(P01).
    *  AFIELD-SELTEXT_M   = 'PrCtr-Hauswährung'(P02).
    *  AFIELD-SELTEXT_L   = 'Profit-Center-Hauswährung'(P03).
      afield-cfieldname  = 'KSL_CURR'.
      afield-sp_group    = '3'.
      APPEND afield TO t_fieldcat.
    * Währungsschlüssel KSL
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos       = i.
      afield-fieldname     = 'KSL_CURR'.
      afield-ref_tabname   = 'TKA01'.
      afield-ref_fieldname = 'PCACUR'.
      afield-no_sum        = 'X'.
      afield-no_out        = 'X'.
      afield-seltext_s     = 'PrCtrHW'(t10).
      afield-seltext_m     = 'Währungsschl. PrCtrHW'(t11).
      afield-seltext_l     = 'Währungsschl. PrCtrHW'(t12).
      afield-sp_group      = '3'.
      APPEND afield TO t_fieldcat.
    * Betrag in Hauswährung
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'HSL'.
      afield-do_sum      = 'X'.
      afield-no_out      = 'X '.
      afield-ref_tabname = 'GLPCA'.
      afield-cfieldname  = 'HSL_CURR'.
      afield-sp_group    = '4'.
      APPEND afield TO t_fieldcat.
    * Währungsschlüssel Hauswährung
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos       = i.
      afield-fieldname     = 'HSL_CURR'.
      afield-ref_tabname   = 'T001'.
      afield-ref_fieldname = 'WAERS'.
      afield-no_sum        = 'X'.
      afield-no_out        = 'X '.
      afield-seltext_s     = 'BukrW.'(t13).
      afield-seltext_m     = 'Währungsschl. BukrW'(t14).
      afield-seltext_l     = 'Währungsschl. BukrW'(t15).
      afield-sp_group      = '4'.
      APPEND afield TO t_fieldcat.
    * Betrag in Transaktionswährung
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'TSL'.
      afield-no_out      = 'X '.
      afield-ref_tabname = 'GLPCA'.
      afield-cfieldname  = 'RTCUR'.
      afield-sp_group    = '5'.
      APPEND afield TO t_fieldcat.
    * Währungsschlüssel Transaktionswährung
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos       = i.
      afield-fieldname     = 'RTCUR'.
      afield-ref_tabname   = 'GLPCA'.
      afield-ref_fieldname = 'RTCUR'.
      afield-no_sum        = 'X'.
      afield-no_out        = 'X '.
      afield-seltext_s     = 'TW  '(t16).
      afield-seltext_m     = 'Währungsschl. TW'(t17).
      afield-seltext_l     = 'Währungsschl. TW'(t18).
      afield-sp_group      = '5'.
      APPEND afield TO t_fieldcat.
    * Menge
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'MSL'.
      afield-qfieldname  = 'RUNIT'.
      afield-no_out      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-sp_group      = '6'.
      APPEND afield TO t_fieldcat.
    * Mengeneinheit
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RUNIT'.
      afield-no_sum      = 'X'.
      afield-no_out      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-sp_group      = '6'.
      APPEND afield TO t_fieldcat.
    * Herkunftsobjektart
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RHOART'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group      = '7'.
      APPEND afield TO t_fieldcat.
    * Funktionsbereich
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RFAREA'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group      = '7'.
      APPEND afield TO t_fieldcat.
    * Objektklasse
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'RSCOPE'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group      = '1'.
      APPEND afield TO t_fieldcat.
    * G/L-Vorgang
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'ACTIV'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-seltext_s     = 'Vorg.'(t31).
      afield-seltext_m     = 'Vorgang'(t32).
      afield-seltext_l     = 'Betriebswirt. Vorgang'(t33).
      afield-sp_group      = '1'.
      APPEND afield TO t_fieldcat.
    * Geschäftsbereich
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'GSBER'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group      = '8'.
      APPEND afield TO t_fieldcat.
    * Kostenstelle
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'KOSTL'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group    = '9'.
      APPEND afield TO t_fieldcat.
    * CO-Auftrag
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'AUFNR'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-sp_group    = '9'.
      APPEND afield TO t_fieldcat.
    * Projekt
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'PSPPP'.
      afield-no_sum      = 'X'.
      afield-no_out      = 'X'.
      afield-sp_group    = '9'.
      afield-ref_tabname   = 'PRPS'.
      afield-ref_fieldname = 'POSID'.
      APPEND afield TO t_fieldcat.
    * Debitor
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'KUNNR'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-seltext_s   = 'Debitor'(d01).
      afield-seltext_m   = text-d01.
      afield-seltext_l   = text-d01.
      afield-sp_group    = '8'.
      APPEND afield TO t_fieldcat.
    * Customer Name
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'C_NAME1'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'KNA1'.
      afield-no_out      = 'X'.
      afield-seltext_s   = 'Customer Name'.
      afield-seltext_m   = 'Cust Name'.
      afield-seltext_l   = 'C Name'.
      afield-sp_group    = '8'.
      APPEND afield TO t_fieldcat.
    * Kreditor
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'LIFNR'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'GLPCA'.
      afield-no_out      = 'X'.
      afield-seltext_s   = 'Kreditor'(k01).
      afield-seltext_m   = text-k01.
      afield-seltext_l   = text-k01.
      afield-sp_group    = '8'.
      APPEND afield TO t_fieldcat.
    * Vendor name
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'NAME1'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'LFA1'.
      afield-no_out      = 'X'.
      afield-seltext_s   = 'Vendor Name'(v01).
      afield-seltext_m   = text-v01.
      afield-seltext_l   = text-v01.
      afield-sp_group    = '8'.
      APPEND afield TO t_fieldcat.
    * Withholding tax rate
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'V_RATE'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = 'WITH_ITEM'.
      afield-no_out      = 'X'.
      afield-seltext_s   = 'Withholding tax rate'.
      afield-seltext_m   = 'With. tax rate'.
      afield-seltext_l   = 'W. Tax rate'.
      afield-sp_group    = '8'.
      APPEND afield TO t_fieldcat.
    * Withholding Tax Base Amount
      ADD 1 TO i.
      CLEAR afield.
      afield-col_pos     = i.
      afield-fieldname   = 'QSSHB'.
      afield-no_sum      = 'X'.
      afield-ref_tabname = '

    Hi pavan.
    something is definitely wrong with your code: You have an internal table for display with fields from rpca 2 and additional some more fields. I do not see a field ORT01 for CITY or PSTLZ for POSTAL CODE, at least to in table GLPCA from where the data are extracted.
    You must fill PSTLZ and ORT01 (if it is for the supplier):
         SELECT SINGLE * FROM LFA1
             WHERE LIFNR = <glpca>-LIFNR AND
             SPRAS = SY-LANGU.
         IF SY-SUBRC eq 0.
            <glpca>-name1 = lfa1-name1.
            <glpca>-adrnr = lfa1-adrnr.
            <glpca>-stras = lfa1-stras.
    **** add here: ***
      select single ort01 pstlz
        into corresponding fields of <glpca>
        from adrc
        where adrnr = <glpca>-adrnr.
         ENDIF.
    Make sure that fields ORT01 and PSTLZ are defined for internal table i_glpca.
    Regards,
    Clemens

  • Party doubt!

    Hi folks,
    I have a doubt regarding XI parties. I understand that party is used when we are exchanging messages in a cross-business scenario (B2B). In my case, I’m talking about an IDoc scenario in a A2A vision, or either, all the Business systems involved are into our landscape, however, in the technical design, some of them have the profile type KU (customer), and all the documentation that I read (SDN) mention the usage of Parties for that kind of Partner Profile.
    Tell me if I’m right, LS means ALE and KU means EDI and EDI is for B2B scenarios… So, Do I need to define a Party or I can skip it and use this profile type with services without Party?
    Thanks in advance,
    Ricardo.

    > 1 - Do I need two parties for that? One per each
    > Business Service?
    Not absolutely necessary. The same party can be used for different Business Services.
    > 2 - In Party Identifiers configuration I have 3
    > parameters to fill: Agency, Schema and Name. For
    > Agency I fill it with Business System Name, for
    > Schema - ALE#KU and into Name what I should use
    > there? This value should be given to me from Business
    > Service Team? I guess is something like an identifier
    > number that I don't have yet…
    This will not be provided by the Business Service team. If your requirement is to post an idoc of type KU from XI to a R3 system then the Sender Partner Name and Receievr Partner Name will be taken from the VALUE of the party and this should be obtained from your R3 team.
    If the R3 has the partner profile for a Partner KU with value 00000012 then this is the value to be used in the party in XI and so on.
    Regards
    Bhavesh
    PS: It might sound vague but the best way to do this is to get yopur hands dirty and try things out! They are simpler than they sound.

  • Doubts in Redo log

    Hi,
    DB: 10.2.0.4
    OS: UNIX/Windows
    I have some doubts in archive log generation.
    *1)* Once current redo log is filed , LGWR will move to next redo log which is available with status INACTIVE , and current one will become ACTIVE.If more archive logs are generating , based on business , ACTIVE will become INACTIVE after sometime and can use for CURRENT redo log.
    If no archive logs are generated , my redo log is not coming out from status ACTIVE to INACTIVE .Even i waited for 5 minutes , but i had the same status.
    What will be the time to make ACTIVE to INACTIVE?. What causing to make this happen ?.
    Normally , when checkpoint is happened DBWR will write the CURRENT log data to data files , right?.In ACTIVE state , has archive log generated?. Many times i seen archive log is generated even it is in ACTIVE state.
    *2)* My Archive logs size (25MB) is not equal to the redo log size. Normally , when we switch the logs or any rman backup , logs will be switched automatically and how much redo is filled , same will be generated with size.
    But, in my case , more archive logs are generating and many have the different size out of generated and no manual switching or rman script are running during this period.
    Any idea on this?.
    Thanks,
    Sunand

    sunand wrote:
    Hi,
    DB: 10.2.0.4
    OS: UNIX/Windows
    I have some doubts in archive log generation.
    *1)* Once current redo log is filed , LGWR will move to next redo log which is available with status INACTIVE , and current one will become ACTIVE.If more archive logs are generating , based on business , ACTIVE will become INACTIVE after sometime and can use for CURRENT redo log.
    If no archive logs are generated , my redo log is not coming out from status ACTIVE to INACTIVE .Even i waited for 5 minutes , but i had the same status.
    What will be the time to make ACTIVE to INACTIVE?. What causing to make this happen ?.
    Normally , when checkpoint is happened DBWR will write the CURRENT log data to data files , right?.In ACTIVE state , has archive log generated?. Many times i seen archive log is generated even it is in ACTIVE state.
    That is wrong.DBWR process write dirty blocks from database buffer cache to datafiles but not "CURRENT log data to data files".So if your current online log group is full then ARCH process will try archiving this group to available destination and without archiving there will not happen LOG SWITCH.After archiving log switch will happen and LOG SEQUENCE NUMBER will increase then you will get new current log group.IF old group status is ACTIVE it means this group still need instance recovery.SO when you execute ALTER SYSTEM CHECKPOINT in this case status of this group will INACTIVE.
    *2)* My Archive logs size (25MB) is not equal to the redo log size. Normally , when we switch the logs or any rman backup , logs will be switched automatically and how much redo is filled , same will be generated with size.
    But, in my case , more archive logs are generating and many have the different size out of generated and no manual switching or rman script are running during this period.
    Any idea on this?.
    As you know archivelogs is a copy of online redologs,but there can be several reasons and result these size can be different.For example manual log switch or if you set ARCHIVE_LAG_TARGET != 0.Finally archive logs contains information for media recover,but online redo logs contain instance and media recovery it means these size can be different.

  • Redologs basic doubt

    Hi,
    version is 10g, no archive log mode.....
    I have one basic doubt. please bare with me..... I have gone through documents..but still some doubts...
    One person asked me this doubt, when a long running transaction is going on , there is no commit, lot of redo activity is there, if we dont commit, those changed information is gone, when the redo log files are over written, is it true???? he asked like that,
    My answer is like below.......
    There is a long running transaction going on ( insert the data into one table).
    Redo log files are 10 MB size ( 2 Redo log groups with 2 members each).... when insertion is going on, changes are entering into redo log files. stil there is no commit.....
    (a) one redo log file got filled up
    (b) next log switch
    (c) next redo logfile got filled up
    see here still there is no commit
    (d)next system uses first redo log switch and overwrites the data in redo log file
    So, when coming to my doubt, all un commited data already written to data files and when we rollback, those data which is written in datafiles will be rolled back by using undo information in undo files.
    am i right????
    all the new information wile insertion, that data is written into datafiles. old data is written to undo files. when we roll back
    Please correct me, if my undestanding is wrong......
    Edited by: oraDBA2 on Oct 23, 2008 12:53 PM

    Dear friend,
    Oracle's Redo Log
    Each Oracle database has a redo log. This redo log records all CHANGES made in datafiles. The redo log makes it possible to replay SQL statements.
    Before Oracle changes data in a datafile it writes these changes to the redo log.
    As Oracle rotates through its redo log groups, it will eventually overwrite a group which it has already written to. Data that is being overwriten would of course be useless for a recovery scenario. In order to prevent that, a database can (and for production databases should) be run in archive log mode. Simply stated, in archive log mode, Oracle makes sure that online redo log files are not overwritten unless they have been savely archived somewhere.
    THUS, to ANWSER YOUR QUESTION: If Archive Log is ON, your LONG-RUNNING uncommited transaction is generating large volumes of ARCHIVE LOGS !!!!!
    ALSO:
    LGWR writes the redo log buffers to disk. The background process in charge for archiving redo logs is ARCn (if automatic archiving is enabled.)
    In order to find out in which mode the instance runs, one can use archive log list from within sql plus.
    Log Buffer: All changes that are covered by redo is first written into the log buffer. The idea to first store it in the memory is to reduce disk IO. Of course, when a transaction commits, the redo log buffer must be flushed to disk, because otherwise the recovery for that commit could not be guaranteed. It is LGWR (Log Writer) that does that flushing.
    Determining amount of generated redo log
    select
    n.name, t.value
    from
    v$mystat t join
    v$statname n
    on
    t.statistic# = n.statistic#
    where
    n.name = 'redo size';
    See also the package redo_diff
    RBA (Redo Byte Address)
    The RBA consists of three parts and is ten bytes long:
    * Log sequence number
    * Block number within this sequence
    * Offset within this block
    The location of each redo log entry is identified through an RBA. The RBAs are important for dirty db blocks in the buffer cache.
    Determining optimal redo log size
    The optimal size of redo log files can be queried with
    select optimal_logfile_size from v$instance_recovery;
    Good luck!

  • Performance tuning doubt

    Hi,
    I came to know from an expert that "*If the remote destination is slow and archiver is taking longer to archive to that destination, then the user needs to allocate more redo log groups so that there is a logfile available for a logswitch to switch into, and not wait for the archiver to finish archiving to the destination.*"
    But, generally this is true for "checkpoint not complete" error, we increase the redolog group for this issue.
    I am unable to understand why to increase redolog group if " the remote destination is slow and archiver is taking longer to archive to that destination".
    Can anyone please clear my doubt?
    Regards,
    Saikat

    Saikat Banerjee wrote:
    I came to know from an expert that "*If the remote destination is slow and archiver is taking longer to archive to that destination, then the user needs to allocate more redo log groups so that there is a logfile available for a logswitch to switch into, and not wait for the archiver to finish archiving to the destination.*"
    But, generally this is true for "checkpoint not complete" error, we increase the redolog group for this issue.
    I am unable to understand why to increase redolog group if " the remote destination is slow and archiver is taking longer to archive to that destination".
    Your question covers the waits:
    log file switch (archiving needed)
    log file switch (checkpoint incomplete)Key detail - the log writer has a limited number of online redo log files, so has to re-use them. It cannot re-use a log file unless the contents of the file have been made safe. In the first case this means that any data blocks made dirty by the changes described in a given log file must have been written to disc before the log file can be over-written. Secondarily, if the database is running in archivelog mode, the online redo log has to be archived (copied) to some other destination.
    The idea of adding more log files (for either wait) is simply based on the assumption that the volume of work varies through the day, and you have to cope with peaks of activity that can be covered by having enough online log files (or large enough log files). Once the peak processing has passed we hope that the checkpoints and the archival can catch up.
    The reason why you have to archive the log files even if running in one of the data guard modes is (probably) that in the generic case you could have a dataguard standby in one location and archival going somewhere else for a variety of reasons. Oracle simply applies the generic strategy, it doesn't have a code path that says: "we doing X, so Y has beome redundant".
    Regards
    Jonathan Lewis

  • Tracking dirty region on a complex component

    Hi,
    I have a component displaying geo data. Controllers used to pan, select data can draw on top of it ( like selection rectangle or whatever can help the user keeps track of its interaction... ) To accelerate the refresh, I only want to redraw the region of the component that the controllers have painted on.
    I have a problem tracking those dirty region. Here is how I would like the select controller to behave :
    - draw the selection rectangle while the user drags the mouse ;
    - once the user release the mouse button, the rectangle should still be displayed
    - on a new interaction, erase the previous selection rectangle and start over
    Below is a sample code that supposed to do that however for time to time the dirty region is not fully repaint and leave part the selection rectangle edges ( you'll have to play a little to see it happens )
    Could somebody tell me what did I do wrong or if it is a bug ? I doubt that although it happends rather randomly...
    Thanks for your help
    Brieuc
    PS : - sample code is below
    - I've run it on jre 1.5.0_06, 1.5.0_08 and 1.6.0 beta4x
    - don't just click you'll get a null pointer exception... :-) I'm too lazy to fix it
    package graphics;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Point;
    import java.awt.Rectangle;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    public class DrawRectangle extends JComponent implements MouseListener,
              MouseMotionListener {
         Point clickedPoint;
         Rectangle rect;
         Rectangle dirtyRegion = new Rectangle();
         public DrawRectangle() {
              super();
              setLayout( null );
              setSize( 400, 400 );
              setMinimumSize( new Dimension( 400, 400 ) );
              setPreferredSize( new Dimension( 400, 400 ) );
              setOpaque( true );
              addMouseListener( this );
              addMouseMotionListener( this );
         public void mousePressed(MouseEvent e ) {
              clickedPoint = e.getPoint();
              if ( rect != null ) {
                   repaint( rect );
                   rect = null;
         public void mouseDragged(MouseEvent e ) {
              if ( rect == null )
                   rect = new Rectangle();
              else {
                   dirtyRegion.setFrame( rect );
                   rect.setFrameFromDiagonal( clickedPoint, e.getPoint() );
                   Rectangle.union( dirtyRegion, rect, dirtyRegion );
                   dirtyRegion.width += 1;
                   dirtyRegion.height += 1;
                   dirtyRegion.width += 1;
                   dirtyRegion.height += 1;
         repaint( dirtyRegion );
         public void mouseReleased(MouseEvent e ) {
              dirtyRegion.setFrame( rect );
              rect.setFrameFromDiagonal( clickedPoint, e.getPoint() );
              Rectangle.union( dirtyRegion, rect, dirtyRegion );
              dirtyRegion.width += 1;
              dirtyRegion.height += 1;
              repaint( dirtyRegion );
         public void mouseClicked( MouseEvent e ) {
         public void mouseEntered(MouseEvent e ) {
         public void mouseExited(MouseEvent e ) {
         public void mouseMoved(MouseEvent e ) {
         @Override
         protected void paintComponent(Graphics g ) {
              Graphics2D g2 = (Graphics2D) g;
              if ( isOpaque() ) {
                   Color c = g2.getColor();
                   g2.setColor( getBackground() );
                   g2.fillRect( dirtyRegion.x, dirtyRegion.y, dirtyRegion.width, dirtyRegion.height );
                   g2.setColor( c );
              if ( rect != null )
                   g2.drawRect( rect.x, rect.y, rect.width - 1, rect.height - 1 );
         public static void main( String[] args ) {
              JFrame f = new JFrame( "Test" );
              f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              f.add( new DrawRectangle() );
              f.pack();
              f.setVisible( true );
    }

    Hi,
    the text field value, where is it persisted? Is it the binding layer or a managed bean in request scope. The latter would exlain what happens in that the original field value is set back from what you set it to. In this case try viewScope
    Just a guess
    Frank

  • Dirty Buffers

    Hi All,
    Can anyone please clear my doubt. The data which is uncommitted in the database buffer cache are called dirty buffers or data which are both uncommmitted and committed in the buffer cache are called dirty buffers.
    Thanks

    Yes We talk about LRU list but Do pointers arrange in
    any kind of a list.?
    In reality there is no list. LRU list is a well defined mathematical structure known as "linked list". The actual
    mechanism is based on the touch count. Are linked lists used in the buffer management?
    Of course they are! Is the page replacement process based on the linked list? No, it's
    based on something called "touch count".
    >
    >
    It's very simple, actually.
    Terms "dirty" and "free"
    are buffer management expressions. Buffer is"dirty"
    if it doesn't have a valid backup on disk. Bufferis
    "free" if it has a valid
    backup and is not in use ("pinned"). Sorry didn't get this.
    Whats a buffer has to do with backup.
    Oracle copies data from/to disk.It never transfers
    it.First of all, "backup" is "a copy". If there is a copy of the buffer on the disk, the buffer is not "dirty". The data itself doesn't have to be modified. Locking the table " will "dirty" a buffer but will not modify the data. You can verify that easily:
    1 select file_id,block_id,blocks from dba_extents
    2* where owner='SCOTT' and segment_name='EMP'
    SQL> /
    FILE_ID BLOCK_ID BLOCKS
    4 25 8
    Elapsed: 00:00:00.40
    SQL> select dirty from v$bh where file#=4 and block# between 25 and 33;
    D
    N
    N
    N
    N
    N
    N
    N
    7 rows selected.
    Elapsed: 00:00:00.05
    SQL>
    SQL> lock table scott.emp in exclusive mode;
    Table(s) Locked.
    Elapsed: 00:00:00.01
    1* select block#,dirty from v$bh where file#=4 and block# between 25 and 33
    SQL> /
    BLOCK# D
    29 N
    32 N
    27 N
    30 N
    28 N
    31 N
    31 N
    31 Y
    8 rows selected.
    Elapsed: 00:00:00.02
    Voila! We've got a modified copy (XCUR) for the block 31. We can clear the modification in a very simple way:
    SQL> commit;
    Commit complete.
    Elapsed: 00:00:00.01
    SQL> alter system checkpoint;
    System altered.
    Elapsed: 00:00:00.11
    SQL> select block#,dirty from v$bh where file#=4 and block# between 25 and 33
    2 /
    BLOCK# D
    29 N
    32 N
    27 N
    30 N
    28 N
    31 N
    31 N
    31 N
    8 rows selected.
    Elapsed: 00:00:00.02
    SQL>
    We released the lock, forced the DBWR process to write out the "changes" and the block
    status was cleared. I am woking on 11.1.0.6 test database, with July patch app.lied, and
    ass managed tablespaces (ASSM). In this instance, block was modified while no data was
    modified. Dirty data is the data of the sordid nature.

  • Redolog doubt in RAC

    Hi,
    I have small doubt regarding redolog corruption/deletion in RAC Instance:
    OS: RHEL 4.5
    Oracle: 10.2.0.1
    DB_NAME=RAC ( 2 Instances, RAC1 and RAC2 are pointed to this DB).
    One user (User1) is connected to DB using RAC1 Instance having redolog groups 2 (having each one member: redo1a.log and redo2a.log). I did logswitch freshly and Presently current redolog is redo2a.log. User1 created emp table and inserted 20 records and commited. note that, still current redolog is redo2a.log and there is no log switch. There are no users connected to DB other than user1.
    Now, I shutdown abort the RAC1 instance and User1 session is switched to RAC2 Instance. When he queries the select * from emp table, he is getting 20 records? how come he gets? the inserted records are still in redolog2a.log of RAC1 instance and commit statement is also still there in redolog and thre is no log switch, instance RAC1 is shutdown abruptly. How come he gets 20 records, when he connected to RAC2 instance?
    Please explain me, how it is possible? please execuse me, if there is anything wrong with my question.

    Whether it is RAC or non RAC system DBWn process writes the dirty buffers to disk.
    The DBWn process writes dirty buffer to disk under the following conditions:
    1. When a checkpoint is issued.
    2. When a server process cannot find a clean reusable buffer after scanning a threshold number of buffers.
    3. Every 3 seconds
    if still not written to disk when you start database next time media recovery will be completed.
    Where in RAC environment it works on concept of GLOBAL CACHE. Whichever changes happening to 1st node same will be update to 2nd node as well. when node 1 goes down abruptly 2nd node identifies it and does the media recovery. so even when user again connects to 2nd node still data will be available.
    Anil Malkai

  • Doubt in fbl1n transaction

    hi i have a doubt....
    in fbl1n transaction, there are open items and cleared items.
    in it the cleared items  for certain document types such as invoice etc is not present in the open item table (bsik)
    however the cleared items for document types such as general  voucher its present in the open items table (bsik)
    is this possible as all cleared item entries shld b present in the open item table with an indicator set for cleared or not...
    plz exlain!

    Hi
    There are 2 tables(open and Closed Items)  in FI for Account Payables and Account Receivables and GL accounts
    1.Account payables: BSIK is Open Items and BSAK is Closed items
    2.Account Receivables; BSID and BSAD for OPEN and closed items
    3/GL accounts :  BSIS and BSAS  for Open and Closed Items
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Doubt in creation of a new object

    Hi All,
                 I have one doubt in creation of a new object.If a new object is to be created and it is not a subtype
    of any existing object, then what should we enter in the Program field for creating the object?
    I hope I am clear with my question.
    Thanks in Advance,
    Saket.

    Hi Saket,
    Following will be required for created a custom business object.
    1. Object Type - ZTEST (Internal Techincal Key)
    2. Object Name - ZTESTNAME (Technical Key Name)
    3. Name - TEST (Name of BO, it is used while selecting the object type)
    4. Description - (Short Description of BO)
    5. Program - ZTESTPROGRAM (ABAP program in which the methods of the object type are implemented)
    6. Application - A or B.. etc (Area to which your BO is related)
    Please remember that you can learn these basic things by giving F1 help on those fields and in HELP.SAP.COM.
    Regards,
    Gautham Paspala

  • Doubt in sender mail adapter

    Hi Everyone,
    Can we read and validate the attachment of the mail.If so how to do it.
    Thanks in advance,
    Sakthi

    Hi Sakthi,
       Please refere the below links:
      http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/bf93409c663228e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0d/52b240ac052817e10000000a1550b0/frameset.htm
    Let me know if you have any doubts regarding this.
    Thanks,
    sekhar.

  • PI' RFC  Connection pool  doubt.

    Hi PI exports:
    i have a doubt about  pi' RFC  Connection pool ,pi RFC receive channel can set the conn pool size ,but when start the rfc receiver channel ,is there always only one Connection  pool ,or there is only one Connection  pool  instance?
      thinks
    Edited by: kevin liang on Oct 19, 2009 6:45 AM

    Hi,
      Connection poolins size means how many number of connection you want to make open to send data to ECC, We can define maximum number of connection in Receiver RFC Adapter,Go to additional parameters section and define Max Number of connection give the number there,thats it.Internally it works as Connection poolin mechanism.
    Regards,
    Raj

  • Small Doubt Regarding SY-MANDT

    Hi All,
         SELECT changenr FROM cdhdr CLIENT SPECIFIED INTO CORRESPONDING FIELDS OF TABLE it_cdhdr
                                             WHERE mandant = syst-mandt
                                             AND   objectclas = 'MATERIAL'
                                             AND   objectid   = wa_matl-matnr
                                             AND   tcode      = 'MM02'.
         I have written the select stament as shown above.
         In this i have a doubt like adding a field sy-mandt  in the where condition will increase the Efficiency of program or not.
    regards,
    raghu.

    Hi..
    No doubt the efficency would be affected but from business point of view there will many  things that need to be checked as in:
    If you are viewing data from CDHDR and CDPOS which is client specific then you are not viewing complete data.
    These tables give us and document changes made to a particular object in SAP but if anything is cross client like company code(lets assume) then changes to it wont be visible in all the clients..
    so there can be some key information you can miss out while working on some of the objects.
    else in this case its good to make query cross client.
    regards
    vishal

  • Doubts with control break statements on internal table loops (AT/ENDAT)

    Hi, i've had a couple of doubts for a long while which I hope someone can clarify today:
    1) I know how to use the AT statements, however, i'm not sure I get correctly what this part of help regarding this commands means:
    <i>"The control level structure with internal tables is static. It corresponds exactly to the sequence of columns in the internal table (from left to right). In this context, the criteria according to which you sort the internal table are unimportant."</i>
    I've always sorted the internal table before the control break and it works that way. For example:
    SORT ITAB BY EBELN EBELP.
    LOOP AT ITAB.
      AT NEW EBELN.
    *   Code for the order header
      ENDAT.
    ENDLOOP.
    If I <b>don't</b> sort the internal table, it doesn't work! (i get dupplicated processing). In the example, if i have more than one register with the same EBELN and they're not consecutive, the header gets processed twice. I really don't get that part of the help text.
    2) I know this: <i>"At the start of a new control level (i.e. immediately after AT), the following occurs in the output area of the current LOOP statement:
    All character type fields (on the right) are filled with "*" after the current control level key.
    All other fields (on the right) are set to their initial values after the current control level key."</i>
    My doubt is: WHY is that this way? Because sometimes (most times) I need those fields INSIDE the statement! So when that happened i've solved it in one of three ways:
    LOOP AT ITAB INTO WA_ITAB.
      WA_ITAB_AUX = WA_ITAB.
      AT NEW FIELD.
        WA_ITAB = WA_ITAB_AUX.
    *   ...Rest of the code for the first register
      ENDAT.
    ENDLOOP.
    LOOP AT ITAB INTO WA_ITAB.
      AT NEW FIELD.
        READ TABLE ITAB INDEX SY-TABIX INTO WA_ITAB.
    *   ...Rest of the code for the first register
      ENDAT.
    ENDLOOP.
    * (Without AT)
    LOOP AT ITAB INTO WA_ITAB.
      IF WA_ITAB-FIELD <> FIELD_AUX.
        FIELD_AUX = WA_ITAB_FIELD.
    *   ...Rest of the code for the first register
      ENDIF.
    ENDLOOP.
    Is there any problem with this way of coding? Can be done better?
    Thank you very much in advance.

    Hi..,
    1)
    See if u sort the table on a field on which u r using AT ENDAT .. then all the records which are having the same value for that field will form a group or those reocrds will be at one place.. so when u sort the table for all the records  AT ENDAT  will get executed onli once..
    If u dont sort this table on this field then all these records will be at different places and in between there may be records with different value for this field.. so this AT ENDAT will get executed for each record !!
    2)
    No u cannot use the Right hand fields of the field in the table .. Because these AT events work as Group based operations... So till that field on which AT ENDAT is working it breaks that record into two groups.. One is the left hand fields including that field.. and right hand fields as another group.. and makes the right hand group as stars ****.  Thats y u can observe that even any one field in the left hand group changes the AT ENDAT will get executed  !!!!
    Hope u understood !!!
    regards,
    sai ramesh

Maybe you are looking for