Reg. table transport.....have ur points.

Hi all,
As we know we can't directly put data in table in production server, I've a z table on development server. I used it for validation purpose. So when i'll transport it...how i will put data in production server..
Pleas assist me.
Have ur point.s

Please check the code ..
First create table maintaince.
now create program and add table name in list.
select one of the radio button ,it will take you sm30 and when you create record at Sm30 -> then it will ask request #.
so you can transport the data.
Table diclaration
tables: tvdir.
Selection screento table View
  selection-screen skip 2.
  parameter p_tabnm(30) as listbox visible length 30 obligatory.
  selection-screen skip 1.
  selection-screen begin of block s1 with frame title text-001.
  parameter: p_radio1 radiobutton group g1,
             p_radio radiobutton group g1.
  selection-screen end of block s1.
Add values to list box
at selection-screen output.
  type-pools: vrm.
  data: name  type vrm_id,
        list  type vrm_values,
        value like line of list.
  name = 'P_TABNM'.
  refresh list.
  <b>value-key = 'Table name'.   " Add your table name</b> 
     value-text = text-002. "'Table description'.
  append value to list.
  call function 'VRM_SET_VALUES'
       exporting
            id     = name
            values = list.
start-of-selection.
Get flag of corresponding table view
  select single tabname flag from tvdir into tvdir
                where tabname = p_tabnm.
Set flag of corresponding table view
  if p_radio1 eq 'X'.
    if tvdir-flag ne 'X'.
      update tvdir set: flag  = 'X'
                 where tabname = p_tabnm.
    endif.
  endif.
  if p_radio eq 'X'.
    if tvdir-flag eq 'X'.
      update tvdir set: flag  = ''
                   where tabname = p_tabnm.
    endif.
  endif.
Execute View/Table
  call function 'VIEW_MAINTENANCE_CALL'
    exporting
      action                               = 'U'
      view_name                            = p_tabnm
   exceptions
     client_reference                     = 1
     foreign_lock                         = 2
     invalid_action                       = 3
     no_clientindependent_auth            = 4
     no_database_function                 = 5
     no_editor_function                   = 6
     no_show_auth                         = 7
     no_tvdir_entry                       = 8
     no_upd_auth                          = 9
     only_show_allowed                    = 10
     system_failure                       = 11
     unknown_field_in_dba_sellist         = 12
     view_not_found                       = 13
     others                               = 14.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
            with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
Reset flag of corresponding table view
  update tvdir set: flag  = tvdir-flag
                where tabname = p_tabnm.
Thanks
Seshu

Similar Messages

  • Values cannot added into z-table fields.. (have  full points..)

    Hi All,
      I have one problem .
       I made a z-table,included a z-structure, two times in this  z-table.
      while inserting  some values in the table field. it is ok with the z-table fields but  i am able to inseert values in the z-structure fields used in the table.
    Thankx in advance..
    Lakhan

    Hi..Lakhan..
    Observe these points carefully . you will get the solution.
    To add the Same structure multiple times in the Same Table We have to Assign the Suffix while including the Structure.
       How To:
          Open the Table in Change mode in SE11
          Select the Menu path : EDIT->Include->INSERT.
             Enter  Structure : <Your Z structure>
                       Suffix     :   <any character string Eg: A>
             Save .
             Now you can see all the Fields from include structure will have Suffix A.
           Same way you can include the Structure Several times to the
           Table using a different suffix each time.
           This ensures that the field names are not duplicated.
           Finally Activate your Table.
           Now create the entries.
    <b>Reward if Helpful</b>

  • Reg. operation & frequency in PM ...... Have ur points.

    Hi all,
    Which table link the operation and frequency related data in PM module.
    Note :- Here operation means .. which we write in IA05(TASK LIST).
              & Frequency means .. which we assign to that operation.
    Pleas assist me.
    <b>Have ur points.</b>
    Regards,
    pradeep phogat

    Hi yaar..thanx for reply....my requirement is not fullfilled.
    <u>pleas understand the req.</u>
    In transactin IA05, we make tasklist master.
    I want to link (task group->group counter->operation->frequency) in my itab. Pleas suggest me the table in which i can link the operation with frequency.
    Very urgent....thanks in advance
    yaar Here frequency means the frequncy of operation which we set after clicking on maintenance package.
    PLPO Is task-list operation/activity master, contains data regarding operations....there is no field by which i can link the operation with the frequency.
    We have some tables of maintence package master....that also don't have the linking field.
    following are the tables.
    T351P
    T351X
    T351
    T351T
    Pleas assist me....

  • Reg. QS17 & ST05----Have ur points

    Hi all,
    in tcode- qs17, i want to see table where 'specification data is going on'. for that i used ST05, I got lot of tables here....now wht is the way for finding my specification fields.
    Pleas help me out...
    Have ur points...
    Regards,
    pradeep phogat

    Hi,
    SQL Trace
    SQL trace(ST05) provides the developer with the ability to analyse database select statements. Simply execute ST05
    to turn on SQL trace, then execute the statement/program you want to analyse. Now turn off SQL trace using ST05
    and click on list trace to view the details.
    You can also perform traces on other items such as authorisation objects.
    Authorisation trace analysis 1. Open two sessions
    2. Execute transaction ST01 in one of the sessions
    3. Select the authorisation checkbox, note the other traces
    you can perform (SQL, RFC, Table Buffer etc)
    4. Click the 'Trace On' button
    5. Within your other session execte the transaction/report
    you want to trace or get the user in question to do it
    6. Return to the session where you turned the trace on and
    click on 'Trace Off' otherwise it will continue to record
    all athorisation checks
    7. Click on the 'Analysis' button
    8. Enter appropriate data into selection screen such as
    Username, type of trace records (i.e. Authorization check)
    9. Click on the Execute button.
    10. Report displaying trace results will now be displayed
    http://www.sapdevelopment.co.uk/perform/perform_sqltrace.htm
    Some useful transaction related to this are ..
    ST01 SAP system trace
    ST02 Buffer statistics.
    ST03 Workload analysis.
    ST04 Database performance analysis.
    ST05 SQL trace .
    ST06 Operating system monitor ...
    From the recorded SQL trace you can deduce:
    · Which SQL statements your application carries out
    · Which values the system uses for specific database accesses and changes
    · How the system translates ABAP OPEN SQL commands (such as
    SELECT) into standard SQL commands
    · Where your application positions COMMIT statements
    · Where your application makes repeated database accesses
    · What database accesses or changes occur in the update section of your
    application
    Look at the below links, you will get the idea
    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/801f89454211d189710000e8322d00/content.htm
    http://www.sapbrain.com/TOOLS/SQLTRACE/SQL_TRACE.html
    Check the following links:
    http://www.sapbrainsonline.com/TOOLS/RUNTIMEanalysis/SAP_runtime_analysis.html
    http://www.sapbrainsonline.com/TOOLS/SQLTRACE/SQL_TRACE.html

  • Reg. module pool....have ur points..

    Hi all,
    In module pool programming, we see "MODULE CANCEL AT EXIT-COMMAND" in PAI. Pleas let me know the meaning of this in simple language.....
    <b>n Have ur points.</b>

    Hi,
    AT EXIT-COMMAND, only checks for the function code which is marked as 'E' in PF-STATUS, and the module below that is executed whenever you press that key associated with the function code.
    AT USER-COMMAND, works for all keys with function-code.
    So if you press F3, which is BACK and is usually associated with 'E' , and if you have both AT EXIT-COMMAND and AT USER-COMMAND, module below AT EXIT-COMMAND will be executed.
    MODULE
    Syntax
    MODULE mod [ AT {EXIT-COMMAND|CURSOR-SELECTION} ]
    [ ON {CHAIN-INPUT|CHAIN-REQUEST} ].
    ... AT EXIT-COMMAND
    Effect
    Addition AT EXIT-COMMAND at the event PAI causes module mod to be called exactly if:
    The function used to trigger event PAI has function type "E"
    Into the input field of the standard toolbar, the user entered a character string starting with "E" and confirmed it using ENTER.
    The dialog module is called before the automatic input checks defined in the system or in the ABAP Dictionary and independent of its position in the event block. The only screen field transported to the ABAP program is the OK field. If the function that triggered the PAI event does not fulfill any of the above prerequisites, the MODULE statement is not executed.
    If several MODULE statements have the AT EXIT COMMAND addition, only the first one is executed. If no MODULE statement has the addition AT EXIT COMMAND, a normal PAI processing is executed: The predefined input checks are executed and then the PAI event block is processed sequentially. Provided the screen processing is not terminated in the dialog module mod, after the return from the dialog module, the complete PAI processing is executed. You must not use the addition AT EXIT COMMAND in connection with the statement FIELD.
    Note
    The function type of a function is determined in the Screen Painter or Menu Painter. Usually those functions of the user interface are defined with function type "E" that are assigned to the icons Back, Exit and Cancel in the standard toolbar of the GUI status. Therefore, the called dialog module should terminate the screen processing and allow security checks, if required.
    reward if it helps..
    Regards,
    Omkar.

  • Urgent....work-center/cost center table...have ur point.s

    Hi all,
    I have work-center, I want to find the corresponding cost-center.
    But on screen i m getting structure CRKEYK.
    Please let me know the table...
    Urgent.
    <b>Help me ....n have ur points.</b>
    regards,

    Hi Pradeep,
    AFRV is the table which will have both work center & cost center.
    <b>Reward points if it helps,</b>
    Satish

  • Reg. cursor-selection in module pool....have ur points.

    Hi all,
    Pleas. help me with  a simple example of at cursor-selection in module pool programming.
    with simple code & steps
    <b>Have ur points.</b>
    Regards,
    [email protected]

    Hi Pradeep,
    The Best explanation with example comes from our help.sap.com....
    <i><b>http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabbd35c111d1829f0000e829fbfe/content.htm</b></i>
    Also this might help...
    <b>MODULE mod [ AT {EXIT-COMMAND|CURSOR-SELECTION} ]
    [ ON {CHAIN-INPUT|CHAIN-REQUEST} ]
    [ SWITCH switch ].
    ... AT CURSOR-SELECTION</b>
    The AT CURSOR-SELECTION addition at the event PAI causes the module mod to be called only if
    The function used to trigger event PAI has function code "CS" and function type "S"
    The cursor is placed on a single input or output field of the screen at the moment of the user action
    The call occurs within the usual PAI processing, meaning that the automatic input checks defined in the system or in the ABAP Dictionary are executed and the MODULE statement is called according to its position in the event block. You can use the addition in connection with the FIELD statement.
    If the PAI event is triggered under the above circumstances, the function code is not passed to sy-ucomm and the OK field. They keep their previous values.
    <b>Note</b>
    The function type and function code of a function are determined in the Screen Painter or in the Menu Painter. We recommend to assign function code "CS" in the Menu Painter to function key F2 in order to simultaneously assign the double-click function of the mouse to it. This allows you to assign dialog modules to the selection of input or output fields.
    <b><u>Refer thread:</u></b> <i><b>Re: MODULE REQUEST
    Hope that helps!!
    <i><b>*Reward useful answers*</b></i>
    Regards,
    Naveenan.

  • Reg. POV in module pool---have ur points...

    Hi all,
    I m trying to use POV event in module pool, I wrote
    PROCESS ON VALUE-REQUEST.
    FIELD ZPHOGAT-ROLLNO MODULE ABC.
    Here in module ABC is wrote 'break-point'. when i click on F4 help of that field i my break-point is not getting executed.
    Pleas help me out...
    Have ur point.s
    regards,

    First make sure everything is compiled, then try an extended check on the main program to make sure you have your variable names, module pool name etc etc synchonised (in case you have a typo in the module or variable name)... then try changing your break-point for "message s398(00) with 'This is my POV' space space space." or something similar.

  • Reg. lengh of header of alv grid.....have ur points.

    Hi all,
    -I want to show text on the right side of the header of ALV grid.
    -Secondly i have limit of around 60 characters in a line...i want to add more words in the same line.....
    <b>see the code...here..</b>
      wa_listheader-typ = 'S'.
      wa_listheader-info = 'THE FUNCTIONAL LOCATION WISE PERCENTAGE   IMPLEMENTAION'.
      APPEND wa_listheader TO it_listheader.
      CLEAR wa_listheader.
    <b>Thanx in advance..</b>
    Have ur points.
    Regards,
    pradeep phogat

    Try this
    WA_LINE-TYP = 'S'..----
    ><b>'H' to print in header</b>
    CONCATENATE 'THE FUNCTIONAL LOCATION WISE PERCENTAGE IMPLEMENTAION'.
    V_RYEAR INTO WA_LINE-INFO
       SEPARATED BY SPACE.
    APPEND WA_LINE TO IT_LIST_TOP_OF_PAGE.
    Thanks

  • Reg. call screen stmt.......Have ur points.

    Hi all,
    I have 2 screens 1000 & 2000 in module pool. In PAI of 1000, i am using CAll screen 2000. 
    As we know in case of <b>call screen</b> we can come back to the previous screen.
    Now when i write leave screen in PAI of 2000. Control is not going to 1000 screen.
    Pleas assist me.
    <b>Have ur points.</b>
    Regards,

    Hello Pradeep..
    There is also one more point..
    You can see in the attributes tab of any screen created in the "Other Attributes"
    the following details
    Next Screen              
    Cursor position
    Screen group
    Lines/Columns   Occupied 26    141
                    Mainten. 28    141
    Context menu FORM ON CTMENU
    The next screen always refer the next screen being/to be called..so in screen 2000 pls try putting the next screen as '1000'
    Reward if helpful and pls revert if the solution is feasible for the situation
    Regards
    Byju

  • Reg. scheduling of program.......have ur points.

    Hi all,
    I want to schedule a program, so that i'll run automatically at 7 A.M in the morning for 1 year daily.
    Pleas let me know step by step.
    <b>Thanx in advance& have ur points.</b>
    Regards,
    pradeep phogat

    HI,
    Tcode SM36
    Here we can Schedule the Executable Programs (Reports) in Background.
    Create a Job.
    Create the Steps - Assign the Report name and Variant.
    Enter the Start Condition.
    Save the Job.
    Job status can be monitorEd in Tcode SM37
    Or
    Use the following function modules.
    job_open
    job_close
    Thanks,
    Reward If Helpful.

  • Reg. title bar.....have ur points.

    Hi all,
    I am using  SET TITLEBAR 'MYTITLE' WITH 'HELLO FRIENDS' in dialog programming.
    Now thing is "HELLO FRIENDS" is not displayed on the title.
    Pleas assist me ....
    <b>Have ur points.</b>
    Regards,
    pradeep phogat

    when you double click on PBO -> it creates new module,here you will have pf-status as well title bar.
    just uncomment title bar -> give some name with singlle quotation -> save and activate.
    now double click on name -> here -> give the text -> save -> activate it.
    note : Please activate all screens in dialog programs ( Including pbo screen), if you did not activate then you will not get it
    Thanks
    Seshu

  • POH in module pool.....have ur points..

    Hi ALL,
    -I took a text box with name 'AGE' in layout of the screen.
    -Now i want to give F1 help to this filed.
    -I used PROCESS ON HELP-REQUEST.   field AGE with 'for user age'.
    now i m executing the transaction & pressing F! help there...but no help
    ples help me...
    <b>have ur points..</b>
    Regards,
    pradeep phogat

    Hi,
    <u><b>Calling Help Texts from Dialog Modules</b></u>
    If data element supplement documentation is insufficient for your requirements, or you want to display help for program fields that you have not copied from the ABAP Dictionary, you can call dialog modules in the POH event:
    PROCESS ON HELP-REQUEST.
    FIELD <f> MODULE <mod>.
    After the PROCESS ON HELP-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F1 for a field <f>, the system calls the module <mod> belonging to the FIELD <f> statement. If there is more than one FIELD statement for the same field <f>, only the first is executed. However, the contents of the screen field <f> are not available in the module <mod>, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. The field help should not be
    dependent on the user input.
    The module <mod> is defined in the ABAP program like a normal PAI module. The processing logic of the module must ensure that adequate help is displayed for the field in question. Instead of calling an extra screen with text fields, you should use one of the following function modules to display a suitable SAPscript document:
      HELP_OBJECT_SHOW_FOR_FIELD
    This function module displays the data element documentation for components of any structure or database table from the ABAP Dictionary. You pass the name of the component and structure or table to the import parameters FIELD and TABLE.
      HELP_OBJECT_SHOW
    Use this function module to display any SAPscript document. You must pass the
    document class (for example, TX for general texts, DE for data element documentation) and the name of the document to the import parameters DOKCLASS and DOKNAME. For technical reasons, you must also pass an empty internal table with the line type TLINE to the tables parameter of the function module.
    Ex.
    Field help on screens.
    REPORT DEMO_DYNPRO_F1_HELP.
    DATA: TEXT(30),
    VAR(4),
    INT TYPE I,
    LINKS TYPE TABLE OF TLINE,
    FIELD3, FIELD4.
    TABLES DEMOF1HELP.
    TEXT = TEXT-001.
    CALL SCREEN 100.
    MODULE CANCEL INPUT.
    LEAVE PROGRAM.
    ENDMODULE.
    MODULE F1_HELP_FIELD2 INPUT.
    INT = INT + 1.
    CASE INT.
    WHEN 1.
    VAR = '0100'.
    WHEN 2.
    VAR = '0200'.
    INT = 0.
    ENDCASE.
    ENDMODULE.
    MODULE F1_HELP_FIELD3 INPUT.
    CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
    EXPORTING
    DOKLANGU = SY-LANGU
    DOKTITLE = TEXT-002
    CALLED_FOR_TAB = 'DEMOF1HELP'
    CALLED_FOR_FIELD = 'FIELD1'.
    ENDMODULE.
    MODULE F1_HELP_FIELD4 INPUT.
    CALL FUNCTION 'HELP_OBJECT_SHOW'
    EXPORTING
    DOKCLASS = 'TX'
    DOKLANGU = SY-LANGU
    DOKNAME = 'DEMO_FOR_F1_HELP'
    DOKTITLE = TEXT-003
    TABLES
    LINKS = LINKS.
    ENDMODULE.
    Regards,
    Bhaskar

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

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

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

  • Problem in smartform...quantity field....have ur points..

    HI ALL,
    I m transferring my itab from main program to SMARTFORMS...itab has a quantity type field.
    When i execute my program, i get error message "Reference field WA-CR is unknown in form".
    <b>Have ur points..</b>
    Regards,

    Every quantity field has a reference field.
    Check the reference field in the table through SE11 transaction & click on REFERENCE tab. Trace your quantity field & corresponding reference field.
    In the Smartform mention the same reference field against the quantity field declaration & activate it.

Maybe you are looking for