QUESTION on MAINTENANCE VIEW

Hi gurus,
I am not familiar with MAINTENANCE VIEW TABLE, can someone please tell me on how to create it and how can I use it for query or select.
I hope someone can help me.
Thanks in advance.

hello gurus,
im new to this community please help me out from this please explain what are different conditions are there for install and replace in this code pzzzzzzzzz its really urgent evening is my delivery
THIS IS MIS SHOWS A LEAD TIME FOR DEVICES PERTAINING TO A SELECTION*
CRITERIA FROM THE TIME OF ISSUE OF METER FROM THE DEPOT FOR NEW   *
INSTALLATION / REPLACEMENT CONNECTION TO THE FIRST BILL          *
Designer           : K SRIKANTH                                 *
Programmer            : K SRIKANTH                                 *
Programming Date      : 29/12/2004
Change Tracking No     : D90K                                    *
Program Title          : LEAD TIME REPORT FROM DEVICE * *
                    INSTALLATION/REPLACEMENT TO FIRST BILL *
MODIFICATIONS                                                     *
DATE       | BY      | DESCRIPTION       | Chg Trck No             *
dd.mm.yy   | xxxxx   |                   |                         *
           |         |                   |                         *
           |         |                   |                         *
ASSUMPTIONS:
THE VALUES FROM THE TABLE V_EABL ARE SELECTED ONLY FOR METER       *
READING REASON '01','02','03' & '22' FOR THE FIELD ABLESGR.
THE VALUES FROM THE TABLE ETDZ ARE SELECTED ONLY FOR REGISTER
CODE '01' FOR THE FIELD ZWKENN .
THE NUMBER OF RECORDS FETCHED FROM TABLE EGERH, WHILE RUNNING IN   *
FOREGROUND, DEPENDS UPON THE SELECTION CRITERIA. WHILE RUNNING IN  *
BACKGROUND THIS CONDITION IS NOT APPLICABLE.                        *
REPORT ZRDMD01A MESSAGE-ID ZS LINE-SIZE 150 .
TYPE-POOLS : SLIS .
TABLE DECLARATION*********************
TABLES :
IFLOT ,
TE401 ,  "   Transactions reasons
EGERH ,          " Historical Data of ISU Device Master Record
EQUI ,           " Equipment master data
EASTL,          " Billing data: Installation Structure at Device Level
EANL ,          " Installation
EVBS ,          " Premise
EADRREGAREAA,   " Role-Spec. Allocation: Reg. Str. Area to Reg. StrGroup
EHAUISU ,       " Connect. Obj.
ILOA  ,          "  PM Object Location and Account Assignment
EABLG ,         " MR Reasons in MR Document
EABL  ,          "  MR Document
EVER ,           " IS-U Cont.
ERCH ,           "  Billing Doc. Data
ERCHC    ,      "  Invoicing/Reversal History: ERCH
ETYP ,
ETDZ,
EASTS ,
V_EABL ,
EADRREGAREAT .
***INTERNAL TABLE DECLARATION*****
DATA : BEGIN OF ITCOM OCCURS 100,
         STATUS(50) TYPE C ,
        REGIOAREA LIKE EADRREGAREAA-REGIOAREA,
        DESCRIPT LIKE EADRREGAREAT-DESCRIPT ,
        V0_15 TYPE I,
        V16_30 TYPE I,
        V31_45 TYPE I,
        V46_60 TYPE I,
        V61_75 TYPE I,
        V76_90 TYPE I,
        V90 TYPE I,
        VNTAV TYPE I,
        TOTAL TYPE I ,
       REGIOGROUP LIKE EADRREGAREAA-REGIOGROUP ,
      END OF ITCOM .
DATA : ITFLD TYPE SLIS_T_FIELDCAT_ALV ,
       SFLD TYPE  SLIS_FIELDCAT_ALV ,
       ITH  TYPE  SLIS_T_FIELDCAT_ALV ,
       STH  TYPE  SLIS_FIELDCAT_ALV ,
       SIT  TYPE  SLIS_FIELDCAT_ALV,
       ITA  TYPE  SLIS_T_FIELDCAT_ALV ,
       IEVENTS TYPE SLIS_T_EVENT ,
       ALV_T_EVENT TYPE SLIS_T_EVENT WITH HEADER LINE,
       ITEVENTS TYPE SLIS_ALV_EVENT ,
         EVENTS TYPE SLIS_T_EVENT ,
        EVNTS  TYPE SLIS_ALV_EVENT ,
        EVNTS1  TYPE SLIS_ALV_EVENT ,
        EVNTS2  TYPE SLIS_ALV_EVENT ,
        EVNTS3  TYPE SLIS_ALV_EVENT ,
        EVENTS_SUMM TYPE SLIS_T_EVENT ,
        EVENTS_DETAIL TYPE SLIS_T_EVENT ,
        EVENTS_SPL TYPE SLIS_T_EVENT .
DATA : ITHD TYPE SLIS_T_LISTHEADER ,
        HD TYPE SLIS_LISTHEADER ,
       ITD TYPE SLIS_T_LISTHEADER ,
        TD  TYPE SLIS_LISTHEADER .
DATA : BEGIN OF ITFIN OCCURS 0,
    EQUNR   LIKE EGERH-EQUNR ,   " EQUIPMENT NUMBER
    ANLAGE  LIKE EASTL-ANLAGE  , "INSTLLATION NUMBER
    VSTELLE LIKE EANL-VSTELLE,   "PREMISE
    LOGIKNR LIKE EGERH-LOGIKNR,  "LOGICAL DEVICE NUMBER
    SERNR   LIKE EQUI-SERNR,     "DEVICE NUMBER
    VKONTO  LIKE EVER-VKONTO,    "CONTRACT NUMBER
    REGIOAREA LIKE EADRREGAREAA-REGIOAREA,
    REGIOGROUP LIKE EADRREGAREAA-REGIOGROUP,
    LTPU(8)  TYPE C ,   "LEAD FROM PREMISE T UI
    LTUB(8)  TYPE C,    "LEAD FROM UTILITY INS TO BILLING INS
    LTBM(8)  TYPE C,    "LEAD FROM BI TO MR ORDER
    LTMA(8)  TYPE C,    "LEAD MR ORDER TO ACTUAL MR
    LTAB(8)  TYPE C,    "LEAD FROM ACTUAL MR TO SCHEDULE BILL ORDER
    LTBA(8)  TYPE C,    "LEAD TIME FROM SCHED BILL ORDER TO ACTUAL BILL
    SUM(8)  TYPE C ,    "TOTAL LEAD FROM UI TO ACTUAL BILL
    SERIAL  TYPE I ,
    BIS  LIKE  EGERH-BIS ,
       AB   LIKE  EGERH-AB,
       ZWGRUPPE LIKE EGERH-ZWGRUPPE ,
       EINBDAT LIKE EGERH-EINBDAT,
       AUSBDAT  LIKE EGERH-AUSBDAT,
       GERWECHS LIKE EGERH-GERWECHS,
       DEVLOC   LIKE EGERH-DEVLOC,
       SPARTE LIKE  EQUI-SPARTE,
        ANLART LIKE EANL-ANLART,
        HAUS  LIKE EVBS-HAUS,
        VBSART LIKE EVBS-VBSART,
        ABLBELNR LIKE EABLG-ABLBELNR,
       ABLESGR LIKE EABLG-ABLESGR ,
       ADAT LIKE V_EABL-ADAT ,
      VERTRAG LIKE EVER-VERTRAG,
          DESCRIPT(20) TYPE C, " LIKE EADRREGAREAT-DESCRIPT ,
         STATUS(40) TYPE C ,
     END OF ITFIN .
DATA : ITAAA LIKE ITFIN OCCURS 100 WITH HEADER LINE ,
       ITBBB LIKE ITFIN OCCURS 100 WITH HEADER LINE .
DATA : BEGIN OF ITTE4 OCCURS 100,
      GERWECHS LIKE TE401-GERWECHS,
      EAWKENNZE LIKE TE401-EAWKENNZE,
      EAWKENNZA LIKE TE401-EAWKENNZA,
      EAWKENNZW LIKE TE401-EAWKENNZW,
      GERWETXT  LIKE TE401T-GERWETXT ,
      END OF ITTE4 .
DATA : BEGIN OF ITEAS OCCURS 100,
       ANLAGE LIKE EASTL-ANLAGE,
       LOGIKNR LIKE EASTL-LOGIKNR,
      BIS LIKE EASTL-BIS,
      AB LIKE EASTL-AB,
       ERDAT LIKE EASTL-ERDAT,
        END OF ITEAS .
DATA : BEGIN OF ITDES OCCURS 0 ,
       LANGU LIKE EADRREGAREAT-LANGU,
       ROLE   LIKE EADRREGAREAT-ROLE ,
      REGIOAREA LIKE EADRREGAREAA-REGIOAREA ,
      DESCRIPT(20) type c ," LIKE EADRREGAREAT-DESCRIPT ,
      END OF ITDES .
DATA : BEGIN OF ITMX1 OCCURS 0 ,
       EQUNR LIKE EGERH-EQUNR,
       BIS  LIKE  EGERH-BIS ,
       AB   LIKE  EGERH-AB,
       LOGIKNR LIKE EGERH-LOGIKNR,
       ZWGRUPPE LIKE EGERH-ZWGRUPPE ,
       EINBDAT LIKE EGERH-EINBDAT,
       AUSBDAT  LIKE EGERH-AUSBDAT,
       GERWECHS LIKE EGERH-GERWECHS,
       DEVLOC   LIKE EGERH-DEVLOC,
       MATNR LIKE EQUI-MATNR,
       SERNR LIKE EQUI-SERNR,
       SPARTE LIKE EQUI-SPARTE,
        ANLAGE LIKE EASTL-ANLAGE,
        ERDAT_EAS LIKE EASTL-ERDAT, "ERDAT_EAS
        VSTELLE LIKE EANL-VSTELLE,
        ANLART LIKE EANL-ANLART,
        ERDAT_EAN LIKE EANL-ERDAT, "ERDAT_EAN
         HAUS  LIKE EVBS-HAUS,
         VBSART LIKE EVBS-VBSART,
         ERDAT_EVB LIKE EVBS-ERDAT,  "ERDAT_EVB
        REGIOGROUP LIKE EADRREGAREAA-REGIOGROUP,
         REGIOAREA LIKE EADRREGAREAA-REGIOAREA ,
         DESCRIPT(20) type c ,
          ABLBELNR LIKE V_EABL-ABLBELNR ,
        ABLESGR LIKE V_EABL-ABLESGR ,
        ADAT LIKE V_EABL-ADAT ,
        ADATSOLL LIKE V_EABL-ADATSOLL ,
        VERTRAG LIKE EVER-VERTRAG,
       VKONTO LIKE  EVER-VKONTO,
        BELNR LIKE ERCH-BELNR,
      VKONT LIKE ERCH-VKONT,
      BEGABRPE LIKE ERCH-BEGABRPE,
      ENDABRPE LIKE ERCH-ENDABRPE,
      ABRDATS LIKE ERCH-ABRDATS,
      BUDAT LIKE ERCHC-BUDAT,
       LFDNR LIKE ERCHC-LFDNR,
      END OF ITMX1 .
DATA : BEGIN OF ITMX2 OCCURS 0,
       EQUNR LIKE EGERH-EQUNR,
       BIS  LIKE  EGERH-BIS ,
       AB   LIKE  EGERH-AB,
      LOGIKNR LIKE EGERH-LOGIKNR,
       ZWGRUPPE LIKE EGERH-ZWGRUPPE ,
       EINBDAT LIKE EGERH-EINBDAT,
       AUSBDAT  LIKE EGERH-AUSBDAT,
       GERWECHS LIKE EGERH-GERWECHS,
       DEVLOC   LIKE EGERH-DEVLOC,
       MATNR LIKE EQUI-MATNR,
       SERNR LIKE EQUI-SERNR,
       SPARTE LIKE EQUI-SPARTE,
        ANLAGE LIKE EASTL-ANLAGE,
        LOGIKNR LIKE EGERH-LOGIKNR,
        ERDAT LIKE EASTL-ERDAT, "ERDAT_EAS
        END OF ITMX2 .
DATA : BEGIN OF ITMX4 OCCURS 0 ,
        ANLAGE  LIKE EANL-ANLAGE ,
        VSTELLE LIKE EANL-VSTELLE,
         HAUS  LIKE EVBS-HAUS,
         VBSART LIKE EVBS-VBSART,
         ERDAT LIKE EVBS-ERDAT,  "ERDAT_EVB
        REGIOGROUP LIKE EADRREGAREAA-REGIOGROUP,
         REGIOAREA LIKE EADRREGAREAA-REGIOAREA ,
          DESCRIPT(20) type c ,
       ANLART LIKE EANL-ANLART,
         END OF ITMX4 .
DATA : BEGIN OF ITEVE OCCURS 0 ,
        ANLAGE LIKE EVER-ANLAGE ,
         VKONTO LIKE  EVER-VKONTO,
        VERTRAG LIKE EVER-VERTRAG,
       SPARTE LIKE EVER-SPARTE ,
       END OF ITEVE .
DATA : BEGIN OF ITMX3 OCCURS 0 ,
         EQUNR  LIKE V_EABL-EQUNR ,
        ABLBELNR LIKE V_EABL-ABLBELNR ,
        ABLESGR LIKE V_EABL-ABLESGR ,
        ADAT LIKE V_EABL-ADAT ,
        ADATSOLL LIKE V_EABL-ADATSOLL ,
         ANLAGE LIKE EVER-ANLAGE ,
         VKONTO LIKE  EVER-VKONTO,
        VERTRAG LIKE EVER-VERTRAG,
       SPARTE LIKE EVER-SPARTE ,
     VKONT LIKE ERCH-VKONT,
      BEGABRPE LIKE ERCH-BEGABRPE,
      ENDABRPE LIKE ERCH-ENDABRPE,
      ABRDATS LIKE ERCH-ABRDATS,
        BELNR LIKE ERCH-BELNR,
      LFDNR LIKE ERCHC-LFDNR,
       BUDAT LIKE ERCHC-BUDAT,
      SWERK LIKE ILOA-SWERK ,
        END OF ITMX3.
data : BEGIN OF ITERC OCCURS 0 ,
      BEGABRPE LIKE ERCH-BEGABRPE,
      ENDABRPE LIKE ERCH-ENDABRPE,
      ABRDATS LIKE ERCH-ABRDATS,
      VERTRAG like ERCH-VERTRAG ,
      BELNR LIKE ERCH-BELNR,
      VKONT LIKE ERCH-VKONT ,
      LFDNR LIKE ERCHC-LFDNR,
       BUDAT LIKE ERCHC-BUDAT,
      END OF ITERC .
DATA : BEGIN OF ITMX7 OCCURS 0,
      SRNO   TYPE I  ,
       STATUS(40) TYPE C ,
       REGIOAREA  LIKE EADRREGAREAA-REGIOAREA ,
       REGIOGROUP LIKE EADRREGAREAA-REGIOGROUP ,
       DESCRIPT(20) TYPE C ," LIKE  EADRREGAREAT-DESCRIPT  ,
       V0_15  LIKE ITCOM-V0_15 ,
       V16_30 LIKE ITCOM-V16_30 ,
       V31_45 LIKE ITCOM-V31_45 ,
       V46_60 LIKE ITCOM-V46_60 ,
      V61_75 LIKE ITCOM-V61_75 ,
      V76_90 LIKE ITCOM-V76_90 ,
      V90   LIKE ITCOM-V90 ,
      VNTAV LIKE ITCOM-VNTAV  ,
      TOTAL TYPE I ,
         END OF ITMX7 .
DATA : BEGIN OF ITETD OCCURS 0,
      EQUNR LIKE ETDZ-EQUNR ,
      ZWNUMMER LIKE ETDZ-ZWNUMMER,
      ZWKENN  LIKE ETDZ-ZWKENN ,
      LOGIKZW LIKE ETDZ-LOGIKZW ,
      ANLAGE  LIKE EASTS-ANLAGE ,
     BIS     LIKE EASTS-BIS,
      ZWNABR  LIKE EASTS-ZWNABR ,
      END OF ITETD .
  DATA : BEGIN OF ITEAN OCCURS 100,
      ANLAGE LIKE  EASTL-ANLAGE,
     SPARTE LIKE  EQUI-SPARTE,
      VSTELLE LIKE EANL-VSTELLE,
      ANLART LIKE EANL-ANLART,
      ERDAT LIKE EANL-ERDAT ,
         HAUS  LIKE EVBS-HAUS,
         VBSART LIKE EVBS-VBSART,
         ERDAT_EVBS LIKE EVBS-ERDAT,  "ERDAT_EVB
        REGIOGROUP LIKE EADRREGAREAA-REGIOGROUP,
         REGIOAREA LIKE EADRREGAREAA-REGIOAREA ,
          DESCRIPT(20) type c ,
      END OF ITEAN .
DATA : BEGIN OF ITSPL OCCURS 0 ,
        TPLNR LIKE IFLOT-TPLNR ,
        TPLMA LIKE IFLOT-TPLMA ,
        HAUS  LIKE EHAUISU-HAUS ,
        REGIOGROUP LIKE EADRREGAREAA-REGIOGROUP ,
        END OF ITSPL .
DATA : BEGIN OF ITEGE OCCURS 0,
       EQUNR LIKE EGERH-EQUNR ,
       LOGIKNR LIKE EGERH-LOGIKNR,
       MATNR   LIKE EQUI-MATNR ,
       SERNR  LIKE EQUI-SERNR,
       SPARTE  LIKE EQUI-SPARTE,
       DEVLOC  LIKE EGERH-DEVLOC,
       END OF ITEGE .
DATA : ITMOD LIKE ITMX2 OCCURS 0 WITH HEADER LINE ,
       WA_ITMX2 LIKE ITMX2 .
DATA : WA-EQUNR LIKE EQUI-EQUNR ,
       WA-ANLAGE LIKE EASTL-ANLAGE .
  DATA : w_variant  like disvariant ,
         W_VARIANT_SAVE  TYPE C .
DATA : REP-ID LIKE SY-REPID,
     W_REPID LIKE SY-REPID .
DATA PUSH TYPE SSCRFIELDS-UCOMM .
DATA  COUNT TYPE I .
DATA : V13 TYPE I ,
       V17 TYPE  I.
DATA CNT TYPE I .
DATA VARIANT LIKE SY-TABIX .
DATA :  SNT TYPE I ,
        PNT TYPE I ,
     V_COUNT TYPE I VALUE 1 .
DATA: ylayout TYPE slis_layout_alv ,
     XLAYOUT TYPE SLIS_LAYOUT_ALV .
DATA  KNT TYPE I VALUE 0  .
DATA I_SORT TYPE slis_t_sortinfo_alv WITH HEADER LINE .
DATA : V_DATE LIKE SY-DATUM ,
      V_DATUM(10) TYPE C ,
      GX_VARIANT LIKE DISVARIANT,
      G_VARIANT LIKE DISVARIANT,
            G_SAVE(1) TYPE C VALUE 'A',
            G_EXIT(1) TYPE C,
            N TYPE I ,
            M TYPE I ,
            C TYPE I VALUE 0 .
DATA  G_REPID LIKE SY-REPID .
DATA: GT_PRINT TYPE SLIS_PRINT_ALV.
DATA YREPID LIKE SY-REPID .
DATA: X_LAYOUT TYPE SLIS_LAYOUT_ALV ,
      Y_LAYOUT TYPE SLIS_LAYOUT_ALV ,
      Z_LAYOUT TYPE SLIS_LAYOUT_ALV.
DATA : TITLE LIKE SY-TITLE .
DATA : V_ENTER TYPE I ,
       V_MODIFY TYPE I .
******************SELECTION SCREEN ************************
SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-001 .
PARAMETERS P_SPART LIKE EQUI-SPARTE DEFAULT  '01' .
SELECTION-SCREEN COMMENT 40(15)  TEXT-005 .
SELECT-OPTIONS : S_SWERK FOR ILOA-SWERK DEFAULT  'M011',
                 S_RAREA FOR EADRREGAREAA-REGIOAREA ,
                 S_RGROUP FOR EADRREGAREAA-REGIOGROUP,
                 S_AB FOR EGERH-AB OBLIGATORY .
SELECTION-SCREEN END OF BLOCK BL1 .
SELECTION-SCREEN BEGIN OF BLOCK BL2 WITH FRAME TITLE TEXT-002 .
SELECT-OPTIONS: S_SERNR FOR EQUI-SERNR ,
                S_MATNR FOR EQUI-MATNR OBLIGATORY ,
                S_VSTELL FOR EANL-VSTELLE ,
                S_HAUS FOR EHAUISU-HAUS .
SELECTION-SCREEN  END OF BLOCK BL2.
SELECTION-SCREEN BEGIN OF BLOCK BL3 WITH FRAME TITLE TEXT-003 .
SELECT-OPTIONS: S_VKONTO FOR EVER-VKONTO .
SELECTION-SCREEN END OF BLOCK BL3 .
SELECTION-SCREEN BEGIN OF BLOCK BL4 WITH FRAME TITLE TEXT-004 .
PARAMETERS: P_INSTA RADIOBUTTON GROUP RAD1 DEFAULT 'X' ,
            P_REPLC RADIOBUTTON GROUP RAD1 ,
            P_IP RADIOBUTTON GROUP RAD1 .
SELECT-OPTIONS : S_GERWE FOR EGERH-GERWECHS .
SELECTION-SCREEN END OF BLOCK BL4 .
SELECTION-SCREEN BEGIN OF BLOCK BL5 WITH FRAME TITLE TEXT-006.
PARAMETERS  : P_VARI LIKE DISVARIANT-VARIANT ."DEFAULT '/ALL'.
SELECTION-SCREEN COMMENT 47(40) varname FOR FIELD P_VARI .
SELECTION-SCREEN SKIP 1.
SELECTION-SCREEN PUSHBUTTON /5(25) BUT1 USER-COMMAND UCSS .
PARAMETERS: P_FIXVAR LIKE KAEP_SETT-FIXVAR NO-DISPLAY,
            P_MAXSEL LIKE KAEP_SETT-MAXSEL NO-DISPLAY DEFAULT 1000.
SELECTION-SCREEN END OF BLOCK BL5.
*******INITIALIZATION************************
INITIALIZATION .
SET PF-STATUS 'INST' .
G_REPID = SY-REPID.
PERFORM VARIANT_INIT.
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.
  MOVE 'Further Settings' TO BUT1 .
AT SELECTION SCREEN EVENT******
AT SELECTION-SCREEN .
  CASE SY-UCOMM .
    WHEN 'UCSS' .
      CALL FUNCTION 'K_LINE_ITEM_TECH_SETTINGS_SET'
           CHANGING
                C_FIXVAR = P_FIXVAR
                C_MAXSEL = P_MAXSEL.
  ENDCASE .
  IF NOT S_RAREA IS INITIAL .
    SELECT SINGLE * FROM EADRREGAREAA
     WHERE REGIOAREA IN S_RAREA .
    IF  SY-SUBRC <> 0 .
      MESSAGE E058(00) WITH S_RAREA-LOW S_RAREA-HIGH.
      LEAVE TO LIST-PROCESSING .
    ENDIF .
  ENDIF.
  IF NOT S_MATNR IS INITIAL .
    SELECT SINGLE * FROM ETYP
          WHERE MATNR IN S_MATNR
          AND KOMBINAT = 'Z'.
      IF SY-SUBRC <> 0 .
        MESSAGE E411(EG) .
        LEAVE TO  LIST-PROCESSING .
      ENDIF.
   ENDIF.
IF NOT S_SWERK IS INITIAL .
    SELECT SINGLE * FROM ILOA
          WHERE SWERK IN S_SWERK .
      IF SY-SUBRC <> 0 .
        MESSAGE E412(I0) .
        LEAVE TO LIST-PROCESSING .
      ENDIF.
ENDIF.
IF NOT S_RGROUP IS INITIAL .
    SELECT SINGLE * FROM EADRREGAREAA
          WHERE REGIOGROUP IN S_RGROUP .
      IF SY-SUBRC <> 0 .
        MESSAGE E025(E7) .
        LEAVE TO LIST-PROCESSING .
      ENDIF.
ENDIF.
IF NOT  S_HAUS IS INITIAL .
  SELECT SINGLE * FROM EHAUISU
    WHERE HAUS IN S_HAUS .
    IF SY-SUBRC <> 0 .
      MESSAGE E011(E9) WITH 'Connection Object' S_HAUS-LOW S_HAUS-HIGH .
        LEAVE TO LIST-PROCESSING .
      ENDIF.
ENDIF.
IF NOT  S_VSTELL IS INITIAL .
  SELECT SINGLE * FROM EANL
    WHERE VSTELLE IN S_VSTELL .
    IF SY-SUBRC <> 0 .
        MESSAGE E011(E9) WITH 'Premise' S_VSTELL-LOW S_VSTELL-HIGH .
        LEAVE TO LIST-PROCESSING .
      ENDIF.
ENDIF.
IF NOT  S_VKONTO IS INITIAL .
  SELECT SINGLE * FROM EVER
    WHERE VKONTO IN S_VKONTO .
    IF SY-SUBRC <> 0 .
        MESSAGE E001(>3) .
        LEAVE TO LIST-PROCESSING .
      ENDIF.
ENDIF.
IF NOT S_GERWE IS INITIAL .
  SELECT SINGLE * FROM TE401
   WHERE GERWECHS IN S_GERWE .
    IF SY-SUBRC <> 0 .
      MESSAGE E058(00) WITH S_GERWE-LOW S_GERWE-HIGH .
      LEAVE TO LIST-PROCESSING .
    ENDIF.
ENDIF.
IF NOT P_SPART IS INITIAL .
SELECT SINGLE * FROM EQUI
  WHERE SPARTE = P_SPART .
    IF SY-SUBRC <> 0 .
      MESSAGE E058(00).
       LEAVE TO LIST-PROCESSING .
    ENDIF.
ENDIF.
CASE SY-UCOMM .
WHEN '&LFO'.
WRITE:/ ' DOCUMENTATION' .
ENDCASE .
PERFORM VARIANT_EXISTENCE .
AT SELECTION-SCREEN OUTPUT .
  LOOP AT SCREEN .
    IF SCREEN-NAME = 'P_SPART' .
      SCREEN-INPUT = 0 .
      MODIFY SCREEN .
    ENDIF .
  ENDLOOP .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI .
PERFORM F4_FOR_VARIANT.
***************START OF SELECTION EVENT****************
START-OF-SELECTION .
  IF P_INSTA = 'X' .
    PERFORM INSTALL .
  ELSEIF P_REPLC = 'X' .
    PERFORM REPLACE .
  ELSEIF P_IP = 'X' .
    PERFORM INS_REPL .
  ENDIF.
IF SY-BATCH = ' ' .
  SELECT  A~EQUNR
         A~BIS
          A~AB
         A~LOGIKNR
          A~ZWGRUPPE
          A~EINBDAT
          A~AUSBDAT
          A~GERWECHS
          A~DEVLOC
          B~MATNR
          B~SERNR
          B~SPARTE
          D~ANLAGE
          D~LOGIKNR
          D~ERDAT  FROM ( ( EGERH AS A INNER JOIN EQUI AS B
                                ON AEQUNR = BEQUNR )
                  INNER JOIN EASTL AS D ON ALOGIKNR = DLOGIKNR )
                                    AND   ABIS     = DBIS
                                    AND   AAB      = DAB )
          INTO TABLE ITMX2 UP TO P_MAXSEL ROWS
          FOR ALL ENTRIES IN ITTE4
          WHERE  A~GERWECHS = ITTE4-GERWECHS
          AND    A~BIS GE S_AB-LOW
          AND  A~AB IN S_AB
          AND A~KOMBINAT = 'Z'
          AND A~EINBDAT NE '00000000'
          AND A~AUSBDAT EQ '00000000'
          AND B~MATNR  IN S_MATNR
          AND B~SERNR IN S_SERNR
          AND B~SPARTE = P_SPART
          AND D~BIS GE S_AB-LOW .
         AND D~AB IN S_AB .
ELSE.
    SELECT A~EQUNR
         A~BIS
          A~AB
         A~LOGIKNR
          A~ZWGRUPPE
          A~EINBDAT
          A~AUSBDAT
          A~GERWECHS
          A~DEVLOC
          B~MATNR
          B~SERNR
          B~SPARTE
          D~ANLAGE
          D~LOGIKNR
          D~ERDAT
          FROM ( ( EGERH AS A INNER JOIN EQUI AS B
                                ON AEQUNR = BEQUNR )
                  INNER JOIN EASTL AS D ON ALOGIKNR = DLOGIKNR )
                                    AND   ABIS     = DBIS
                                    AND   AAB      = DAB )
          INTO  TABLE ITMX2
          FOR ALL ENTRIES IN ITTE4
          WHERE  A~GERWECHS = ITTE4-GERWECHS
          AND    A~BIS GE S_AB-LOW
          AND  A~AB IN S_AB
          AND A~KOMBINAT = 'Z'
          AND A~EINBDAT NE '00000000'
          AND A~AUSBDAT EQ '00000000'
          AND B~MATNR  IN S_MATNR
          AND B~SERNR IN S_SERNR
          AND B~SPARTE = P_SPART
          AND D~BIS GE S_AB-LOW .
         AND D~AB IN S_AB .
ENDIF.
SORT ITMX2 BY ANLAGE EQUNR .
LOOP AT ITMX2 .
IF ITMX2-ANLAGE =  WA_ITMX2-ANLAGE .
     MOVE-CORRESPONDING WA_ITMX2 TO ITMOD .
     APPEND ITMOD.
     CLEAR ITMOD .
    MOVE-CORRESPONDING ITMX2 TO ITMOD .
     APPEND ITMOD.
     CLEAR ITMOD .
ENDIF.
MOVE-CORRESPONDING ITMX2 TO WA_ITMX2  .
ENDLOOP .
SORT ITMOD BY ANLAGE EQUNR .
DELETE ADJACENT DUPLICATES FROM ITMOD .
IF NOT ITMOD[] IS INITIAL .
SELECT A~EQUNR
       A~ZWNUMMER
       A~ZWKENN
       A~LOGIKZW
       B~ANLAGE
       B~ZWNABR
       FROM ( ETDZ AS A INNER JOIN EASTS AS B
              ON ALOGIKZW = BLOGIKZW )
        INTO TABLE ITETD
        FOR ALL ENTRIES IN ITMOD
        WHERE A~EQUNR = ITMOD-EQUNR
        AND   A~BIS  GE S_AB-LOW
       AND   A~AB   IN S_AB
        AND   A~ZWNUMMER = 1
        AND   B~ZWNABR NE 'X' .
SORT ITETD BY ANLAGE EQUNR .
LOOP AT ITMX2 .
   LOOP AT ITETD WHERE ANLAGE EQ ITMX2-ANLAGE .
          V_ENTER =  1 .
        IF ITETD-EQUNR  EQ ITMX2-EQUNR .
           V_MODIFY =  1 .
           EXIT .
       ENDIF.
  ENDLOOP .
     IF V_ENTER = 1 AND V_MODIFY =  0 .
        DELETE ITMX2 .
     ENDIF.
     CLEAR : ITMX2 ,V_ENTER ,V_MODIFY .
ENDLOOP .
ENDIF.
MESSAGE S015(ZS).
IF NOT ITMX2[] IS INITIAL .
SELECT  ANLAGE
         VSTELLE
         ANLART
         ERDAT
         FROM EANL INTO CORRESPONDING FIELDS OF TABLE ITEAN
         FOR ALL ENTRIES IN ITMX2
         WHERE ANLAGE = ITMX2-ANLAGE
         AND   SPARTE = P_SPART
         AND   VSTELLE IN S_VSTELL .
ENDIF.
SORT ITEAN BY ANLAGE .
IF NOT ITEAN[] IS INITIAL .
SELECT  E~ANLAGE
         E~VSTELLE
         F~haus
         F~VBSART
         F~ERDAT
         H~REGIOGROUP
         H~REGIOAREA
         L~DESCRIPT
     FROM ( ( ( ( EANL AS E INNER JOIN EVBS AS F
                       ON EVSTELLE = FVSTELLE )
                  INNER JOIN EHAUISU AS G ON FHAUS = GHAUS    )
                  INNER JOIN EADRREGAREAA AS H ON G~REGIOGROUP =
                                                        H~REGIOGROUP )
                  INNER JOIN EADRREGAREAT AS L ON H~REGIOAREA =
                                                       L~REGIOAREA   )
         INTO TABLE ITMX4
        FOR ALL ENTRIES IN ITEAN
         WHERE E~ANLAGE = ITEAN-ANLAGE
         AND   E~VSTELLE = ITEAN-VSTELLE
         AND   L~LANGU = SY-LANGU
         AND   H~REGIOGROUP IN S_RGROUP
         AND   H~REGIOAREA IN S_RAREA .
ENDIF.
*LOOP AT ITEAN .
READ TABLE ITMX4 WITH KEY  VSTELLE = ITEAN-VSTELLE .
  IF SY-SUBRC EQ 0 .
     MOVE-CORRESPONDING ITMX4 TO ITEAN .
     ITEAN-ERDAT_EVBS = ITMX4-ERDAT .
     MODIFY ITEAN .
  ENDIF.
*ENDLOOP .
LOOP AT ITMX2 .
  ITMX1-ERDAT_EAS = ITMX2-ERDAT .
MOVE-CORRESPONDING ITMX2 TO ITMX1 .
READ TABLE ITEAN WITH KEY ANLAGE = ITMX2-ANLAGE .
   IF SY-SUBRC EQ 0 .
         ITMX1-ERDAT_EAN = ITEAN-ERDAT .
         MOVE-CORRESPONDING ITEAN TO ITMX1 .
   READ TABLE ITMX4 WITH KEY ANLAGE = ITMX2-ANLAGE .
    IF SY-SUBRC EQ 0 .
          ITMX1-ERDAT_EVB = ITMX4-ERDAT .
        MOVE-CORRESPONDING ITMX4 TO ITMX1 .
    ENDIF.
WE WILL GET ONLY THOSE RECORDS THAT IS HAVING REGIO GROUP,DIVISON
    APPEND ITMX1.
    CLEAR ITMX1 .
  ENDIF.
ENDLOOP .
IF NOT ITMX4[] IS INITIAL .
SELECT  EQUNR
         ABLBELNR
         ABLESGR
         ADAT
         ADATSOLL
         ANLAGE FROM V_EABL
         INTO TABLE ITMX3
         FOR ALL ENTRIES IN ITMX1
         WHERE ANLAGE = ITMX1-ANLAGE
        AND   EQUNR  = ITMX1-EQUNR
        AND  ADATSOLL GE S_AB-LOW
        ANd ( ABLESGR  EQ  '01'
        OR  ABLESGR  EQ  '02'
        OR  ABLESGR  EQ  '03'
        OR  ABLESGR  EQ  '22'  ) .
SELECT  B~EQUNR
         A~ABLBELNR
         A~ABLESGR
         B~ADAT
         B~ADATSOLL
         A~ANLAGE
     FROM ( EABLG AS A INNER JOIN EABL AS B ON AABLBELNR = BABLBELNR
        INTO CORRESPONDING FIELDS OF TABLE ITMX3
        FOR ALL ENTRIES IN ITMX1
        WHERE A~ANLAGE = ITMX1-ANLAGE
        AND   B~EQUNR  = ITMX1-EQUNR
        AND  B~ADATSOLL GE S_AB-LOW
        AND  A~ABRDATS  GE S_AB-LOW
        AND ( A~ABLESGR EQ '01'
        OR  A~ABLESGR EQ '02'
        OR  A~ABLESGR EQ '03'
        OR  A~ABLESGR EQ '22'   ) .
ENDIF.
SELECT  ANLAGE
         VKONTO
         VERTRAG
         SPARTE
         FROM EVER INTO TABLE ITEVE
         FOR ALL ENTRIES IN ITMX1
         WHERE ANLAGE = ITMX1-ANLAGE
         AND   SPARTE = P_SPART .
LOOP AT ITMX1 .
READ TABLE  ITMX3 WITH KEY ANLAGE = ITMX1-ANLAGE
                            EQUNR  = ITMX1-EQUNR .
  IF SY-SUBRC EQ 0 .
   MOVE-CORRESPONDING ITMX3 TO ITMX1 .
   ENDIF.
  READ TABLE ITEVE WITH KEY ANLAGE = ITMX1-ANLAGE .
   IF SY-SUBRC EQ 0 .
      MOVE-CORRESPONDING ITEVE TO ITMX1 .
   ENDIF.
  MODIFY ITMX1 .
ENDLOOP .
SELECT J~BEGABRPE
         J~ENDABRPE
         J~ABRDATS
         J~VKONT
         j~vertrag
         K~BELNR
         K~LFDNR
         K~BUDAT
        FROM ( ERCH AS J INNER JOIN ERCHC AS K ON JBELNR = KBELNR )
        INTO CORRESPONDING FIELDS OF TABLE ITERC
         FOR ALL ENTRIES  IN ITMX1
         WHERE J~VERTRAG = ITMX1-VERTRAG
         AND   J~ADATSOLL GE S_AB-LOW .
*SELECT BEGABRPE
        ENDABRPE
        ABRDATS
        VKONT
        vertrag
        K~BELNR
        K~LFDNR
        K~BUDAT
       FROM  ERCH     INTO CORRESPONDING FIELDS OF TABLE ITERC
        FOR ALL ENTRIES  in ITMX1
        WHERE VERTRAG = ITMX1-VERTRAG
        and   ADATSOLL GE S_AB-LOW .
LOOP AT ITMX1 .
READ TABLE ITERC WITH KEY VERTRAG = ITMX1-VERTRAG .
  IF SY-SUBRC EQ 0 .
    ITMX1-BEGABRPE = ITERC-BEGABRPE .
   ITMX1-ENDABRPE = ITERC-ENDABRPE .
   ITMX1-ABRDATS = ITERC-ABRDATS .
   ITMX1-BELNR = ITERC-BELNR .
   ITMX1-LFDNR = ITERC-LFDNR .
   ITMX1-BUDAT = ITERC-BUDAT .
   MODIFY ITMX1 TRANSPORTING BEGABRPE ENDABRPE ABRDATS  BELNR
      LFDNR BUDAT .
   ENDIF.
ENDLOOP .
MESSAGE S014(ZS) .
LOOP AT ITMX1 .
MOVE-CORRESPONDING ITMX1 TO ITFIN .
  ITFIN-LTPU = ITMX1-ERDAT_EAN - ITMX1-ERDAT_EVB .
  ITFIN-LTUB  = ITMX1-ERDAT_EAS - ITMX1-ERDAT_EAN .
IF NOT ITMX1-ADATSOLL IS INITIAL AND ( NOT ITMX1-EINBDAT IS  INITIAL )
   ITFIN-LTBM  =  ITMX1-ADATSOLL - ITMX1-EINBDAT .
     ELSE .
         ITFIN-LTBM = 'NTAV'.
     ENDIF.
  IF NOT ITMX1-ADAT IS INITIAL  AND ( NOT ITMX1-ADATSOLL IS INITIAL ) .
    ITFIN-LTMA  =   ITMX1-ADAT - ITMX1-ADATSOLL .
  ELSE .
    ITFIN-LTMA = 'NTAV' .
  ENDIF.
  IF NOT ITMX1-ABRDATS IS INITIAL AND ( NOT ITMX1-ADAT IS INITIAL ) .
    ITFIN-LTAB  =   ITMX1-ABRDATS - ITMX1-ADAT .
  ELSE .
    ITFIN-LTAB =  'NTAV' .
  ENDIF.
  IF NOT ITMX1-BUDAT IS INITIAL AND ( NOT ITMX1-ABRDATS IS INITIAL ) .
       ITFIN-LTBA =   ITMX1-BUDAT - ITMX1-ABRDATS  .
ELSE.
    ITFIN-LTBA = 'NTAV'.
  ENDIF.
  ITFIN-SUM = 0.
  IF ITFIN-LTPU NE 'NTAV' AND ITFIN-LTPU NE 'N/A'.
    ITFIN-SUM = ITFIN-SUM + ITFIN-LTPU.
  ENDIF.
  IF ITFIN-LTUB NE 'NTAV' AND ITFIN-LTUB NE 'N/A'.
    ITFIN-SUM = ITFIN-SUM + ITFIN-LTUB.
  ENDIF.
  IF ITFIN-LTBM NE 'NTAV' AND ITFIN-LTBM NE 'N/A'.
    ITFIN-SUM = ITFIN-SUM + ITFIN-LTBM.
  ENDIF.
  IF ITFIN-LTMA NE 'NTAV' AND ITFIN-LTMA NE 'N/A'.
    ITFIN-SUM = ITFIN-SUM + ITFIN-LTMA.
  ENDIF.
  IF ITFIN-LTAB NE 'NTAV' AND ITFIN-LTAB NE 'N/A'.
    ITFIN-SUM = ITFIN-SUM + ITFIN-LTAB.
  ENDIF.
  IF ITFIN-LTBA NE 'NTAV' AND ITFIN-LTBA NE 'N/A'.
    ITFIN-SUM = ITFIN-SUM + ITFIN-LTBA.
  ENDIF.
  APPEND ITFIN .
  CLEAR ITFIN .
ENDLOOP .
DELETE ADJACENT DUPLICATES FROM ITFIN .
PERFORM SUMMARY .
Message S013(ZS).
PERFORM BACKGROUND .
CLEAR: ITMX2[] ,ITSPL[],ITEGE[] ,ITTE4[],ITMX7[] .
MESSAGE S017(ZS) .
SUBROUTINES********************************
FOR INSTALLATION********************************
FORM INSTALL .
  SELECT GERWECHS
        EAWKENNZE
        EAWKENNZW
         FROM TE401 INTO CORRESPONDING FIELDS OF TABLE ITTE4
        WHERE GERWECHS IN S_GERWE
          AND  EAWKENNZE = 'X' .
IF SY-SUBRC NE 0 .
   MESSAGE S002(ZS).
   LEAVE TO LIST-PROCESSING .
ENDIF.
ENDFORM .
************************REPLACE****************************
FORM REPLACE .
  SELECT GERWECHS
         EAWKENNZE
         EAWKENNZW FROM TE401 INTO CORRESPONDING FIELDS OF TABLE ITTE4
    WHERE GERWECHS IN S_GERWE
    AND  EAWKENNZW = 'X' .
IF SY-SUBRC NE 0.
   MESSAGE S003(ZS) .
   LEAVE TO LIST-PROCESSING .
ENDIF.
ENDFORM .
************************INSTALL/REPLACEMENT*********************
FORM INS_REPL .
  SELECT GERWECHS
       EAWKENNZE
       EAWKENNZA
       EAWKENNZW FROM TE401 INTO CORRESPONDING FIELDS OF TABLE ITTE4
  WHERE GERWECHS IN S_GERWE
  AND ( EAWKENNZE = 'X'
  OR  EAWKENNZW = 'X'  ) .
IF SY-SUBRC NE 0.
   MESSAGE S004(ZS) .
   LEAVE TO LIST-PROCESSING .
ENDIF.
ENDFORM .
FIELD CATALOG FOR DETAILED REPORT ******************
FORM FIELDCATALOG USING F_FIELDCAT .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'STATUS' .
  SFLD-SELTEXT_S = 'Details'.
  SFLD-SELTEXT_M = 'Details'.
  SFLD-JUST =   'L' .
  SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'EQUNR' .
  SFLD-SELTEXT_S = 'Equipment'.
  SFLD-SELTEXT_M = 'Equipment'.
  SFLD-JUST =   'L' .
  SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'ANLAGE' .
  SFLD-SELTEXT_S = 'Installat.'.
  SFLD-SELTEXT_M = 'Installation'.
  SFLD-JUST =   'L' .
  SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'SERNR' .
  SFLD-SELTEXT_S = 'Serial no.'.
  SFLD-SELTEXT_M = 'Serial number'.
  SFLD-JUST =   'L' .
SFLD-KEY  = 'X' .
SFLD-HOTSPOT = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'VKONTO' .
  SFLD-SELTEXT_S = 'Cont.Acct'.
  SFLD-SELTEXT_M = 'Contract Acct'.
  SFLD-JUST =   'L' .
SFLD-KEY  = 'X' .
SFLD-HOTSPOT = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'REGIOAREA' .
  SFLD-SELTEXT_S = 'Reg. area'.
  SFLD-SELTEXT_M = 'Reg. struc.area'.
  SFLD-JUST =   'L' .
  SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'REGIOGROUP' .
  SFLD-SELTEXT_S = 'RegStrGrp.'.
  SFLD-SELTEXT_M = 'Reg. Str. Grp.'.
  SFLD-JUST =   'L' .
  SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD  .
  SFLD-FIELDNAME = 'LTPU' .
  SFLD-SELTEXT_S = 'Prm-Util'.
  SFLD-SELTEXT_L = 'Premise to Utility installation in days'.
  SFLD-JUST =   'R' .
SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'LTUB' .
  SFLD-SELTEXT_S = 'Util-BInst'.
  SFLD-SELTEXT_L = 'Utility to Billing installation in days'.
  SFLD-JUST =   'R' .
SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'LTBM' .
  SFLD-SELTEXT_M = 'BInst-MRO'.
  SFLD-SELTEXT_L = 'Billing to Meter reading order in days'.
  SFLD-JUST =   'R' .
SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'LTMA' .
  SFLD-SELTEXT_M = 'MRO-AcRead'.
  SFLD-SELTEXT_L = 'Meter reading order to actual reading in days'.
  SFLD-JUST =   'R' .
SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'LTAB' .
  SFLD-SELTEXT_M = 'AcRead-BiOr'.
  SFLD-SELTEXT_L = 'Actual reading to Billing order in days'.
  SFLD-JUST =   'R' .
SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'LTBA' .
  SFLD-SELTEXT_M = 'BiOr-AcBill'.
  SFLD-SELTEXT_L = 'Billing order to Actual billing in days'.
  SFLD-JUST =   'R' .
SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'SUM' .
  SFLD-SELTEXT_M = 'TOTAL'.
  SFLD-SELTEXT_L = 'Total lead time in days'.
  SFLD-JUST =   'R' .
SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'VSTELLE' .
  SFLD-SELTEXT_S = 'Premise'.
  SFLD-SELTEXT_M = 'Premise'.
  SFLD-JUST =   'L' .
SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'LOGIKNR' .
  SFLD-SELTEXT_S = 'LogDev.no.'.
  SFLD-SELTEXT_M = 'Log. dev. no.'.
  SFLD-JUST =   'L' .
SFLD-KEY  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'BIS' .
  SFLD-SELTEXT_M = 'Valid to'.
  SFLD-SELTEXT_L = 'Date at Which a Time Slice Expires'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'AB' .
  SFLD-SELTEXT_M = 'Valid from'.
  SFLD-SELTEXT_L = 'Date from which time slice is valid'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'ZWGRUPPE' .
  SFLD-SELTEXT_S = 'Reg. group'.
  SFLD-SELTEXT_M = 'Register group'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'EINBDAT' .
  SFLD-SELTEXT_S = 'Inst. date'.
  SFLD-SELTEXT_M = 'Install. date'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD.
  SFLD-FIELDNAME = 'AUSBDAT' .
  SFLD-SELTEXT_S = 'Remov.date'.
  SFLD-SELTEXT_M = 'Removal date'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'GERWECHS' .
  SFLD-SELTEXT_S = 'Reason'.
  SFLD-SELTEXT_M = 'Activity reason'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'DEVLOC' .
  SFLD-SELTEXT_S = 'Dev. loc.'.
  SFLD-SELTEXT_M = 'Device location'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'SPARTE' .
  SFLD-SELTEXT_S = 'Division'.
  SFLD-SELTEXT_M = 'Division'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'ANLART' .
  SFLD-SELTEXT_S = 'Inst. type'.
  SFLD-SELTEXT_M = 'Inst. type'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'HAUS' .
  SFLD-SELTEXT_S = 'Conn.obj.'.
  SFLD-SELTEXT_M = 'Connection obj.'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD .
  SFLD-FIELDNAME = 'VBSART' .
  SFLD-SELTEXT_S = 'Prem. type'.
  SFLD-SELTEXT_M = 'Premise type'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD.
  SFLD-FIELDNAME = 'ABBELNR' .
  SFLD-SELTEXT_S = 'Int.MRD ID'.
  SFLD-SELTEXT_M = 'Int. MR doc. ID'.
  SFLD-JUST =   'C' .
  SFLD-NO_OUT  = 'X' .
  APPEND SFLD TO ITFLD .
  CLEAR SFLD.
  SFLD-FIELDNAME = 'ABLESGR' .

Similar Messages

  • Using an event in table maintenance view to populate a field

    I have a table maintenance view, and I would like to populate one field of the table with derived data. I am trying to do this by coding a routine for one of the events, but so far no luck. I have been able to chege the data in the TOTAL table, but still it does not populate the field on the screen.
    Note this is not for one row as it is entered, but I want all rows of the table displayed to show this field with derived data.
    So the question is: what is the correct event to use, and what is the correct internal table to update? Can I make changes to EXTRACT or TOTAL to do this?
    Kind Regards,
    Tony.

    Hi Rob,
    Sorry for being lazy; I'll close this and off and search :-}
    BR,
    Tony.

  • How to extract data from maintenance view

    Hi experts,
    How can I select the data from maintenance view. As you know select query doesn't work on the maintenance view. And View name will be known at run time only.
    Thanks
    Yogesh Gupta

    > Let me tell you that I am a SAP certified ABAP consultant having experience of 4.5 years.
    I suspect that we will be hearing more comments about that.
    > Whatever question I asked can't be replied with the basic training (if yes please tell me even one).
    Debugging a macro?
    Another one => FM or BAPI to create the Activity Group in 4.0B No answer is possible? You have to be joking!
    And in How to get email ID fo a SAP user you obviously didn't even try Graham's answer!
    > I closed some of the answered questions since I didn't get the answers for them for a long time and SDN site doesn't allow to keep more than 10 questions open.
    The "comment field" is not mandatory. You don't need to flood the forum with your questions again.
    > I do respect your  concerns but I have no intention to abuse this site as it has been very helpful for me.
    That is the most important part. Thank you. But you seem to be unaware of the "search" functionality.
    If you can imagine that you are not the first person to ask a certain question, then you can be sure that someone else already has and you can find the answers on your own. If you still have doubts, then ask a specific question providing the details.
    Based on your other questions, you are on release 4.0B. Is that still correct?
    Cheers and thanks for responding,
    Julius
    Edited by: Julius Bussche on Jan 23, 2009 12:06 AM

  • Add fields to maintenance view and update then using events

    Hi experts:
      I've created a table with 4 fields, one of them is userid. Also, there is a maintenance view to add new entries.
      I want to display user name when typing userid using events (1 or 21). I know how to do it if username is one of the fields of the table, but there is a requirement to not store username in the table, just userid.
    My question is: is possible to add a field into the maintenance view and update it using events but not store the value in DB?.
    Thanks in advance for your help.
    Regards,
    Carlos.

    In the save event just clear the entries of the field(user name) in the internal table.

  • Reg :-maintain a table maintenance view for the z table.suggest me the code

    i have question.i have created a z table related to pp module.the requirement is to maintain {table maintenance view} for this z table.how could this be done.can any one suggest me the code for this?

    Hi ,
    We have a lots of queries on table maintainance creation in the forum posted and replied to.Pls have a look at it first.
    In se11 -> change mode of the ztable -> goto -> utilities -> table maintainance generator -> click on it...
    it will give a new screen-> enter the required details like function group , authorisation(use &NC& or leave it blank if you dont know)  and screens
    2 step and 1 step means=> number of screens displayed in maintainace
    if step1 is selected then we have a screen which will be like a table control for data entry.........
    for step2 we have a table control screen and a more detailed individual field display as second screen
    click on the button 'find screen numbers' so that system automatically proposes the screen numbers
    after which click on the "create" button and follow the required instructions/messages
    once done go to SM30 enter the table name to check if maintainance has been created properly
    Hope it helps,Pls check and revert
    Regards
    Byju

  • Maintenance view event

    Hi,
    in a maintenance view if i want to control when a record table has been deleted, first i need to
    select the table record and then press save.the question is that inside this event (before save) how can i know that i´ve pressed before the delete button?.
    Best regards.

    Look at the following link
    <a href="http://help.sap.com/saphelp_47x200/helpdata/EN/91/ca9f0ba9d111d1a5690000e82deaaa/frameset.htm">Event Before Save</a>
    There is an example. Pay special attention to the link <b>field symbols <ACTION> and <ACTION_TEXT></b> within the documentation.
    in short when you loop at the internal table TOTAL, <ACTION> and <ACTION_TEXT> are populated with relevant indicators for new, changed and deleted entries.
    Cheers!
    Rishi

  • Maintenance view problem "No data maintenance Authorization; Display only"

    Maintenance view problem
    <b>Question 1>>>></b>
    > I have created a table with Display/maintenance allowed and technical setting Data class - APPL0 (master data, transparent tables).
    >> Then I have created a maintenance view thought utilities->table maintenance generator where i have specified the Authorization group as &NC& (w/o auth. group)
    ->and also created a function group and specified in the maintenance screen-> I have selected maintenance type as one step-> i have given the overview screen number->and in Recording routine i have selected - no, or user ,recording routine.
    >>> Now when i go to transaction SM30  and put the table name and press on maintain button I get a information box saying "<b>No data maintenance Authorization; Display only"....</b> and it only displays the data.
    my problem is I want to enter data through maintenance view (SM30).
    <b>2nd Question >>>></b> once i create a function group for maintenance view how can i assign a transaction for this. <i>(as if i do it as we do for a module pool program it gives me error)</i>Thank you.
    kailash

    SE93.  Enter a transaction name.  Create.  In the pop up enter a title and select 'Transaction with parameters'.
    Next screen fill the following;
    Transaction 'SM30'
    Check 'Skip first screen'
    In the table control at the bottom of the screen
    Name of screen field 'VIEWNAME'
    Value <your table name>
    Name of screen field 'SHOW'
    Value 'X'
    Save.
    Job done.

  • Maintenance View & Viewcluster & Check Table

    Hi all,
    I created a Viewcluster which includes three Maintenance Views. As you know after running the Viewcluster and when you enter a value to a field, the program checks the value according to the check table.
    In my example for REVUS field check table is USR02. So whenever I enter a value to REVUS, it checks USR02 table, and it gives an error if I enter incorrect value. The question is if enter just space (blank), it accepts is - it doesn't give error. What is the situation here? How can I prevent to enter blank value to REVUS.
    Thanks in advance.

    Narendran,
    Yes, this solves the problem. When I did like that it gives this error : Message no. 00 055 (Make an entry in all required fields).
    I found another solution too. I'd like to share with you.
    In the Maintenance View, we can define a Selection Condition  for REVUS field. It should be like that Operator: NE Comparative Value: <blank>. So when we do this the Clusterview doesn't allow to enter blank value and gives this error: Message no. SV 033 (Specify the key within the work area)
    It seems that second solution is better because if I choose the first solution when I need to change or modify the maintenance dialog I think I will need to change the screen again.
    Thanks,

  • Table maintenance view - tcode

    Hi experts,
    We have a tcode (already in production) created for table maintenace view of z-table.
    Everything is working fine.
    Now I added one new field to the z-table and changed the table maintenance view accordingly. In SM30 I can maintain the table without difficulties - the new field is visible and maintenable. However, when I call the transaction code created for this view, it doesn't have the new field yet.  I tried a lot but without success to update the tcode accordingly.
    How can I get the tcode adjusted with the new field?
    Thanks for your advise and help in advance!
    Your feedback will be << appreciated >>.
    Regards,
    Sally
    Please do not offer rewards.
    Edited by: Rob Burbank on Dec 6, 2009 5:22 PM

    It's about one week you asked the question, but I answer in case you didn't understand what happened:
    First, screens 1000-1010 can't be used in a table maintenance dialog (an error is mentioned by SAP when you try to use these numbers). So, I really don't understand how you can get 1000 in your table view!
    So, I think that your transaction is linked to a custom program (not the SM30 view). So you just need to adapt manually the custom program. Note: maybe the program is a partial copy of the SM30 function group, so maybe you may just copy the dynpro 1000 of the SM30 function group  to the dynpro 1001 of your custom program...
    Note: when you want to create a transaction which is linked to a table maintenance view (SM30), you must define a Z* transaction of type parameter, with reference to SM30 transaction, select "skip initial screen", do not choose any dynpro, and choose VIEWNAME = your view and UPDATE = X as parameter values.

  • Select statement on maintenance view.

    Hello Friends,
    I have a quick question. I have a maintenance view, and I want to do a select statement on this view in an ABAP program, but seems like the view is not filled with data when running the program.
    How do I get the view to be populated at runtime in the ABAP program? the work area and the internal table is TYPE of the  view..
    Here's the code:
    select * into wa
      from view
      where bukrs = P_BUKRS
               vtweg in S_CHNL.
        append wa to it.
      endselect.
    best regards B

    Hello B,
    Just to inform you: "You can select data only from Database Views".
    You can design a work-around for this, by taking look @ the Join tables. May i know form which View you want to get the data?
    BR,
    Suhas

  • F4 help for fields in maintenance view resp. generated maintenance screen

    Hello,
    I’m new to ABAP and I have to deal with the following requirement:
    I have a maintenance view V1 what from a maintenance screen was generated automatically by the maintenance screen generator.
    Now I have to add a search help for one field F1 of the maintenance screen. The values for the search help of F1 depend on a specific value of a second field F2 of the maintenance screen. So I need value of F2 as import parameter for f4-help. F1 and F2 come from different tables.
    As I’m new to ABAP I have several questions or thoughts:
    - I’m not able to easily add a search help to F1 because I’m using the maintenance view V1 and that’s why it is not possible to assign the import parameter F2 to the search help – right?
    - In general, its not that easy to add search help to views than tables or structures - why?
    - I’m not able to just modify the generated objects because further automatic generation of the maintenance screen will delete it – right?
    - The generated function module provides user includes to add user specific coding. Is there any chance to add a f4-help to field F1 and assign value of F2 to that search help as import parameter with coding in user include?
    - any other ideas? I did not expect this topic to be so complicated as the requirement to change f4-help in a maintenance view resp. screen isn't very special.
    can anyone help me?
    Thank You!
    Regards
    Fabian

    Hi Fabian,
    Phew! Thats quite a few questions in one... I'll try to answer them to best of my knowledge..
    You can definitely have an external Search Help for a field of a Maintenance View, by calling it directly in the Screen Action Flow, using a PROCESS ON VALUE-REQUEST (like PAI or PBO). While defining such custom code on a generated screen, always make sure you do not write the coding inside the generated includes (SVIM* or <FUGR>TOP, <FUGR>DAT, etc..). Define new includes, or use those which are not generated by View Maintenance. This way, even if the dialogue is regenerated, your custom code will not vanish.
    This will answer your questions 1 and 2 generally, and your question 3 also.
    A Maintenance View, is something where values are read and populated purely at run-time. It does not have an Entry Help or such options, as it depends on the underlying tables. I hope this further helps with questions 1 and 2.
    Coming to your question 4 and 5, which form the main question - pre-filling value of F2 while calling search-help for F1 - yes, it is possible. On the view maintenance screen, there are standard structure variables (like EXTRACT TOTAL etc), which will give you the field values of the current record. But, it can no way assure that when you call the help for F1, the field F2 is already filled!
    For this, I can suggest that you programmatically implement a check to see if F2 value is filled, and read if it is. Or, if it is not filled, maybe you can shoot a Pop-up for F2, take the value at run-time, find help for F1 and get value, and also fill the F2 value (from your implementation) into the currect screen F2 value! (Phew...it is complex...)
    But am sorry, there is no other way, wherein you can gaurentee that F2 value is pre-filled always, when you can help for F1. (You could try making F2 as obligatory on screen, but it still doesnt necessarily solve this purpose..!).
    Hope it helps. Get back to me by e-mail if you need more help, or simple post a reply.
    Regards,
    Rekha

  • Maintenance view of two tables

    I need to update two tables Header and Item with the hepl of maintenance view.There structure is as follows :
    Header - GRPKEY (Pr. Key)
                  Printchk
    Items :- GRPKEY ( Foreign key - check table Header-GRPKEY)
                fieldname ( Key)
               descr type char255
    Now i am creating maintenance view using header as base table. In this case its not showing fields of items in View fields tab and i can't have those fields for data entry.
    If i use items table as base table when i create data through this view header table doesn't get updated.
    Please suggest.
    Thanks

    Hi,
    My real question is, Will a maintenance view really enables me to enter data into two tables simultaneously?
    OR
    Is it just one table that I can enter data into and the fields from other table will appear based on the join condition?
    All SAP documentations talk about entering data into multiple tables using a maintenance view. But it was not practically possible for me when I tried.
    Regards,
    Mahesh

  • Customed maintenance view and assign T-Code

    Hello SAP exports,
    I have one question needs your help!
    We do not want the end users to maintenance V_T008 table directly by using SM30 in PRD.
    Therefore, I copy V_T008 view and create a custom view ZV_T008 by using SE11.
    The purpose is to create a maintenance view (ZV_T008) and assign a new T-Code in order to let user allows to maintenace ONLY in V_T001C table in PRD without using SM30.
    Is above the solution workable?
    I know how to assign a program to a new T-Code by using T-Code SE93.
    But, I do not know how to assign a maintenance view (ZV_T008) to a new T-Code.
    Please help.
    Thank you.
    Regards,
    Sylvia Chen

    Great thanks for the tips!
    Now I can run T-Code and SAP display the data table immediately.
    I can modify the data table directly without using SM30.
    This is great!
    Two more things need to solve.
    Can SAP only show one of the record of the data table?
    There are 10 records in the data table.
    The user ONLY needs to modify one record when the ZV_T008-ZAHLS = "K".
    The other thing needs to solve is following:
    when user inputs T-Code, SAP display the data table immediately.
    But, the description field (ZV_T008-TEXTL) is able to modify.
    How can I make this field become not able to modify?
    If you can provide the above solution, it will make me a very Merry Christmas!
    Regards,
    Sylvia Chen

  • Adding functions to customers maintenance views (customizing)

    Dear experts,
    I've just been asked the following question that I don't have an answer to (I actually would expect it to be "No" but I want to cross-check it with you experts):
    Thinking of the generated maintenance views as they are used hundredfold in SPRO/customizing: Do you know any way to add a dialog function (button) to those standard dialogs? For example to provide a shortcut to one of our own customizing dialogs that are meant to enhance the SAP standard customizing (let's say the settings for house bank accounts). To make it even more unlikely to get a positive answer: the solution should not require any kind of manual work at the customers side other than performing a regular import of a transport (or at least not much more than that). It shouldn't be necessary to do any programming on user-exits, et cetera.
    Thanks in advance
    Andreas

    Hi Yadesh,
    to be more precise: take the generated view V_T012 for house bank settings.
    Next to the standard functions such as "Toggle Display/Change", "New Entries", etc. I would like to have a button with which I could call up an own program for the maintenance of customizing settings that enhance the house bank settings.
    regards
    Andreas

  • What is maintenance View ?

    Hello experts,
    could anyone please help me in understanding what is a maintenance view n how it differs from other views?
    Thank you.
    Edited by: pramanik.santosh on Aug 1, 2010 10:04 PM

    Moderator message - Welcome to SCN
    But please read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting.
    PLease search the forum or use Google before asking a question here.
    Thread locked.
    Rob

Maybe you are looking for

  • How to put image file on client machine through JBOSS

    I need to imlement the functionality like google map on website, where my server is JBOSS server. We used the newest technology SVG(scalable vector graphics) which doesn't loose the image quaility on increasing the size of the image. we are doing bac

  • How to install fonts from net

    How do you install fonts from the net as the windows installer will only install them onto Word and I want them in PSE10

  • Make a field obligatory by clicking on a check box

    SELECT-OPTIONS:             so FOR ztable-so OBLIGATORY. SELECTION-SCREEN END OF BLOCK b1. SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-b02. PARAMETERS: check1 TYPE char1 AS CHECKBOX. SELECTION-SCREEN END OF BLOCK b2. here my requirement

  • Migration From Exchange 2010 Hybrid to Exchange 2013 Hybrid Deployment

    hi, I have existing Exchange Server 2010 Hybrid Deployment. Planning to migrate to Exchange 2013. However, while schema update, i am facing some errors/warnings as can be seen in attached screenshot.  I have already checked and current functional lev

  • Mavericks not in App Store

    I am now ready to install Mavericks but guess what? It's not available on the app store anymore. Apple, why do you do stuff like this? I wouldn't touch Yosemite with a ten-foot-pole for at least 2-3 updates. More and More I'm getting tired of Apple s