How to draw table in layout in module pool

how to draw table in layout in module pool with wizard or table control

Hi
Goto Screen Painter .
here we can create table in 2 ways,
with wizard and without wizard.
with wizard it will step by step...
for without wizard (its quite easy)
Click Table control and Drag into ur screen.
then --> click input box and place into to that table control
for two column do this two times.
then for header click the text icon in left side and drag into
correspoding places .. then ur table is ready..
then give names using double clicking the elements
See the prgrams:
DEMO_DYNPRO_TABLE_CONTROL_1 Table Control with LOOP Statement
DEMO_DYNPRO_TABLE_CONTROL_2 Table Control with LOOP AT ITAB
Reward if useful.

Similar Messages

  • How to use table maintenance view in module pool screen

    hi ,
    want to use table maintenance view in a module pool screen so that i can edit, insert, delete and update date in to the ztable.please help.

    You can simply call it via SM30.   Or you can call the table maintence view from any program(report or module pool) using a function module.
      call function 'VIEW_MAINTENANCE_CALL'
           exporting
                action                       = 'U'
                view_name                    = 'Z_Table_Name'
           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.
    Regards,
    RIch Heilman

  • How to Draw table in SAPscript ???

    Hi all Guru of SAPScript!
    I want to draw a table with column and row in SAPscript. Who can help me step by step?
    Thanks!
    Edited by: kathy a on May 6, 2008 11:53 AM

    Hi,
    Use BOx Syantax  How to Draw table in SAPscript ??? Pls Read the description
    Syntax:
    1. /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    2. /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    3. /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    BOX
    Syntax:
    /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]
    Effect: draws a box of the specified size at the specified position.
    Parameters: For each parameter (XPOS, YPOS, WIDTH, HEIGHT and FRAME), both a measurement and a unit of measure must be specified. The INTENSITY parameter should be entered as a percentage between 0 and 100.
    •XPOS, YPOS: Upper left corner of the box, relative to the values of the POSITION command.
    Default: Values specified in the POSITION command.
    The following calculation is performed internally to determine the absolute output position of a box on the page:
    X(abs) = XORIGIN + XPOS
    Y(abs) = YORIGIN + YPOS
    •WIDTH: Width of the box.
    Default: WIDTH value of the SIZE command.
    •HEIGHT: Height of the box.
    Default: HEIGHT value of the SIZE command.
    •FRAME: Thickness of frame.
    Default: 0 (no frame).
    •INTENSITY: Grayscale of box contents as %.
    Default: 100 (full black)
    Measurements: Decimal numbers must be specified as literal values (like ABAP/4 numeric constants) by being enclosed in inverted commas. The period should be used as the decimal point character. See also the examples listed below.
    Units of measure: The following units of measure may be used:
    •TW (twip)
    •PT (point)
    •IN (inch)
    •MM (millimeter)
    •CM (centimeter)
    •LN (line)
    •CH (character).
    The following conversion factors apply:
    •1 TW = 1/20 PT
    •1 PT = 1/72 IN
    •1 IN = 2.54 CM
    •1 CM = 10 MM
    •1 CH = height of a character relative to the CPI specification in the layout set header
    •1 LN = height of a line relative to the LPI specification in the layout set header
    Examples:
    /: BOX FRAME 10 TW
    Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT).
    /: BOX INTENSITY 10
    Fills the window background with shadowing having a gray scale of 10 %.
    /: BOX HEIGHT 0 TW FRAME 10 TW
    Draws a horizontal line across the complete top edge of the window.
    /: BOX WIDTH 0 TW FRAME 10 TW
    Draws a vertical line along the complete height of the left hand edge of the window.
    /: BOX WIDTH '17.5' CM HEIGHT 1 CM FRAME 10 TW INTENSITY 15
    /: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    /: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW
    Draws two rectangles and two lines to construct a table of three columns with a highlighted heading section.
    POSITION
    Syntax:
    /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]
    Effect: Sets the origin for the coordinate system used by the XPOS and YPOS parameters of the BOX command. When a window is first started the POSITION value is set to refer to the upper left corner of the window (default setting).
    Parameters: If a parameter value does not have a leading sign, then its value is interpreted as an absolute value, in other words as a value which specifies an offset from the upper left corner of the output page. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value. If one of the parameter specifications is missing, then no change is made to this parameter.
    •XORIGIN, YORIGIN: Origin of the coordinate system.
    •WINDOW: Sets the values for the left and upper edges to be the same of those of the current window (default setting).
    •PAGE: Sets the values for the left and upper edges to be the same as those of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm).
    Examples:
    /: POSITION WINDOW
    Sets the origin for the coordinate system to the upper left corner of the window.
    /: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'
    Sets the origin for the coordinate system to a point 2 cm from the left edge and 2.5 cm from the upper edge of the output page.
    /: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM
    Shifts the origin for the coordinates 1.5 cm to the left and 1 cm up.
    SIZE
    Syntax:
    /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]
    Effect: Sets the values of the WIDTH and HEIGHT parameters used in the BOX command. When a window is first started the SIZE value is set to the same values as the window itself (default setting).
    Parameters: If one of the parameter specifications is missing, then no change is made to the current value of this parameter. If a parameter value does not have a leading sign, then its value is interpreted as an absolute value. If a parameter value is specified with a leading sign, then the new value of the parameter is calculated relative to the old value.
    •WIDTH, HEIGHT: Dimensions of the rectangle or line.
    •WINDOW: Sets the values for the width and height to the values of the current window (default setting).
    •PAGE: Sets the values for the width and height to the values of the current output page.
    Examples:
    /: SIZE WINDOW
    Sets WIDTH and HEIGHT to the current window dimensions.
    /: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM
    Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm.
    /: POSITION WINDOW
    /: POSITION XORIGIN -20 TW YORIGIN -20 TW
    /: SIZE WIDTH +40 TW HEIGHT +40 TW
    /: BOX FRAME 10 TW
    A frame is added to the current window. The edges of the frame extend beyond the edges of the window itself, so as to avoid obscuring the leading and trailing text characters.
    Reward Helpfull Answers
    Regards
    Fareedas

  • How to put scrol bar in table viw control in module pool programming

    how to put scrool bar in table-view control in module pool programming

    Hi Rani,
       You need not insert Scrollbar in the table control, it appears automcatically once the amount of data vertical or horizontal limit of table control.
    Regards,
    Sathish
    Note : Reward useful Answers

  • How can i decleare select-options in module pool table control?

    Hi everybody!!
    Can anyone tell me how can I decleare select-options in module pool table control screen?. I have declared it in a screen with a table control but a dump is triggered due to an error when generating the selection screen.
    Regards...

    My suggestion will be try to use fm
        call function 'FREE_SELECTIONS_DIALOG'
    Please search this forum you can find lot of threads related to this.

  • How to get the Grand Total in Module pool Screen

    Hi Frds.
         How to get the Grand Total in Module pool Screen
    Example i have 10 different materials
    for each matarial has different moving . But in my case matarials is doesnt matter here
    10 material Moving Average price to do Frand total and display in one column...
    Please Help me out Frds.
    Regards,
    Kabil

    Hi
    You need to calculate the total in a module of PAI (or PBO) event:
    PROCESS PAI.
       LOOP.....
       ENDLOOP.
      MODULE CALCULATE_TOTAL.
      MODULE CALCULATE_TOTAL.
        GRAND_TOTAL = 0.
         LOOP AT ITAB,
            GRAND_TOTAL = GRAND_TOTAL + ITAB-PWB.
        ENDLOOP.
    ENDMODULE.
    In this way the grand total will be calculated as soon as the user presses enter or another command.
    You can't insert the calculation in the loop of table control, because this loop runs the visible lines only, so it's better to calculate the total out of those loop,

  • How to save Custom control records through module pool program ?

    Hi guru ,
    1. How to save Custom control records through module pool program ?
    I wrote multiple lines of record in custom control
    Who to save that records ?
    thanking you.
    Regards,
    Subash.

    Hi,
    can refer following code -
    IN PAI , CODE is as follows-
    *&      Form  editor_output
    FORM editor_output .
    NARRATION1 is name of custom controller
      IF v_editor IS INITIAL.
      Create obejct for custom container
        CREATE OBJECT v_custom_container
          EXPORTING
            container_name              = 'NARRATION1'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      Create obejct for the TextEditor control
        CREATE OBJECT v_editor
          EXPORTING
            wordwrap_mode              = cl_gui_textedit=>wordwrap_at_fixed_position
            wordwrap_position          = line_length
            wordwrap_to_linebreak_mode = cl_gui_textedit=>true
            parent                     = v_custom_container
          EXCEPTIONS
            error_cntl_create          = 1
            error_cntl_init            = 2
            error_cntl_link            = 3
            error_dp_create            = 4
            gui_type_not_supported     = 5
            OTHERS                     = 6.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " editor_output
    getting textdata in internal table as follows
    *&      Form  create_text
    FORM create_text .
      REFRESH : it_texttable,
                it_text.
      IF v_doc_number IS NOT INITIAL.
        IF v_editor IS NOT INITIAL.
          CALL METHOD v_editor->get_text_as_r3table
            IMPORTING
              table                  = it_texttable
            EXCEPTIONS
              error_dp               = 1
              error_cntl_call_method = 2
              error_dp_create        = 3
              potential_data_loss    = 4
              OTHERS                 = 5.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    Now, our final text data is in internal table it_texttable.
    pls, Reward if found helpful.

  • Table maintenance by using module pool program

    Hi
    Please give me step by step procedure to generate table maintenance by using module pool program

    While creating table maintenance, you can go thro' the module pool program used for that.In that,in PBO part,just try making particular field active = 1 inside loop at screen.
    Girish Kumar Lo...  
    Posts: 1,518
    Questions: 2
    Registered: 4/19/07
    Forum points: 1,982 
       Re: Regarding Table maintanence generator  
    Posted: Jun 26, 2007 9:02 AM    in response to: Younus Khan       Reply      E-mail this post 
    here is the code for that
    REPORT ZTAB_MAINT
           NO STANDARD PAGE HEADING
           MESSAGE-ID ZZ.
                      T Y P E  D E C L A R A T I O N S
    *--Types declaration for selection to be passed as parameter into
    *--VIEW_MAINTENANCE_CALL FM
    TYPES: BEGIN OF TP_RANGETAB.
            INCLUDE STRUCTURE VIMSELLIST.
    TYPES: END OF TP_RANGETAB.
                   D A T A  D E C L A R A T I O N S
    DATA: V_MATNR TYPE MATNR,              " Material Number
          V_WERKS TYPE WERKS_D,              " Plant
          V_KONOB TYPE KONOB,              " Product allocation object
          V_ZCPLT(40) TYPE C.              " Message
           I N T E R N A L  T A B L E  D E C L A R A T I O N S
    Internal table to subroutine code
    *Internal table used as selection for VIEW_MAINTENANCE_CALL FM
    DATA: IT_RANGETAB TYPE STANDARD TABLE OF TP_RANGETAB WITH HEADER LINE.
    *--Internal table used for getting the tablefields
    DATA: BEGIN OF IT_HEADER OCCURS 1.
            INCLUDE STRUCTURE VIMDESC.
    DATA: END   OF IT_HEADER.
    *--Name Tabel
    DATA: BEGIN OF IT_NAMTAB OCCURS 50.
            INCLUDE STRUCTURE VIMNAMTAB.
    DATA: END   OF IT_NAMTAB.
    *--Used for handling 'BT' option
    DATA: BEGIN OF IT_MATNR OCCURS 0,
            MATNR TYPE MATNR,
          END OF IT_MATNR.
    *--Used for handling 'BT' option
    DATA: BEGIN OF IT_WERKS OCCURS 0,
            WERKS TYPE WERKS,
          END OF IT_WERKS.
    *--Used for handling 'BT' option
    DATA: BEGIN OF IT_KONOB OCCURS 0,
            KONOB TYPE KONOB,
          END OF IT_KONOB.
    *--Used for handling 'BT' option
    DATA: BEGIN OF IT_ZCPLT OCCURS 0,
            ZCPLT(40) TYPE C,
          END OF IT_ZCPLT.
                       I N P U T  S C R E E N
    SELECTION-SCREEN BEGIN OF BLOCK SELSCR WITH FRAME TITLE TEXT-001.
    RANGES: R_MATNR FOR V_MATNR.
    RANGES: R_WERKS FOR V_WERKS.
    RANGES: R_KONOB FOR V_KONOB.
    RANGES: R_ZCPLT FOR V_ZCPLT.
    Select Options
    SELECT-OPTIONS: S_MATNR FOR V_MATNR NO-EXTENSION,     " Material
                    S_WERKS FOR V_WERKS NO-EXTENSION,     " Plant
                    S_KONOB FOR V_KONOB NO-EXTENSION,
                                            " Product allocation object
                    S_ZCPLT FOR V_ZCPLT NO-EXTENSION.     " Plant
    SELECTION-SCREEN END OF BLOCK SELSCR.
                 A T  S E L E C T I O N  S C R E E N
    AT SELECTION-SCREEN.
    Validate user inputs
      PERFORM FRM_VALIDATIONS.
                S T A R T  O F  S E L E C T I O N
    START-OF-SELECTION.
    Fetch Data from Data Base
      PERFORM FRM_GET_DATA.
                         S U B  R O U T I N E S
    *&      Form  frm_get_data
          Call the function module VIEW_MAINTENNACE_CALL to get data
          based on selection criteria
    FORM FRM_GET_DATA .
      CALL FUNCTION 'VIEW_GET_DDIC_INFO'
        EXPORTING
          VIEWNAME = 'ZTAB'
        TABLES
          X_HEADER = IT_HEADER
          X_NAMTAB = IT_NAMTAB
          SELLIST  = IT_RANGETAB
        EXCEPTIONS
          NO_TVDIR_ENTRY = 1
          TABLE_NOT_FOUND = 2.
      IF SY-SUBRC <> 0.
        MESSAGE E002 WITH 'Error in ZTAB table'(005).
      ENDIF.
      CLEAR: IT_RANGETAB,
             IT_RANGETAB[].
      LOOP AT IT_NAMTAB.
        CASE IT_NAMTAB-VIEWFIELD.
          WHEN 'MATNR'.
            CLEAR IT_RANGETAB.
            IT_RANGETAB-VIEWFIELD = 'MATNR'.
            IT_RANGETAB-TABIX     = SY-TABIX.
            IT_RANGETAB-DDIC      = IT_NAMTAB-READONLY.
            LOOP AT S_MATNR.
              CASE S_MATNR-OPTION.
                WHEN 'EQ'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR  = 'EQ'.
                  IT_RANGETAB-VALUE     = S_MATNR-LOW.
                  APPEND IT_RANGETAB.
                WHEN 'BT'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = 'GE'.
                  IT_RANGETAB-VALUE     = S_MATNR-LOW.
                  APPEND IT_RANGETAB.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = 'LE'.
                  IT_RANGETAB-VALUE     = S_MATNR-HIGH.
                  APPEND IT_RANGETAB.
                WHEN 'NB'.
                  CLEAR: R_MATNR,
                         R_MATNR[].
                  R_MATNR-SIGN = 'I'.
                  R_MATNR-OPTION = 'BT'.
                  R_MATNR-LOW = S_MATNR-LOW.
                  R_MATNR-HIGH = S_MATNR-HIGH.
                  APPEND R_MATNR.
                  SELECT MATNR
                         INTO TABLE IT_MATNR
                         FROM ZTAB
                         WHERE MATNR IN R_MATNR.
                  DELETE ADJACENT DUPLICATES FROM IT_MATNR COMPARING MATNR
                  LOOP AT IT_MATNR.
                    IT_RANGETAB-AND_OR    = 'AND'.
                    IT_RANGETAB-OPERATOR = 'NE'.
                    IT_RANGETAB-VALUE    = IT_MATNR-MATNR.
                    APPEND IT_RANGETAB.
                  ENDLOOP.
                WHEN 'NE'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR  = 'NE'.
                  IT_RANGETAB-VALUE     = S_MATNR-LOW.
                  APPEND IT_RANGETAB.
                WHEN OTHERS.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = S_MATNR-OPTION.
                  IT_RANGETAB-VALUE    = S_MATNR-LOW.
                  APPEND IT_RANGETAB.
              ENDCASE.
            ENDLOOP.
          WHEN 'WERKS'.
            CLEAR IT_RANGETAB.
            IT_RANGETAB-VIEWFIELD = 'WERKS'.
            IT_RANGETAB-TABIX     = SY-TABIX.
            IT_RANGETAB-DDIC      = IT_NAMTAB-READONLY.
            LOOP AT S_WERKS.
              CASE S_WERKS-OPTION.
                WHEN 'EQ'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR  = 'EQ'.
                  IT_RANGETAB-VALUE     = S_WERKS-LOW.
                  APPEND IT_RANGETAB.
                WHEN 'BT'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = 'GE'.
                  IT_RANGETAB-VALUE     = S_WERKS-LOW.
                  APPEND IT_RANGETAB.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = 'LE'.
                  IT_RANGETAB-VALUE     = S_WERKS-HIGH.
                  APPEND IT_RANGETAB.
                WHEN 'NB'.
                  CLEAR: R_WERKS,
                         R_WERKS[].
                  R_WERKS-SIGN = 'I'.
                  R_WERKS-OPTION = 'BT'.
                  R_WERKS-LOW = S_WERKS-LOW.
                  R_WERKS-HIGH = S_WERKS-HIGH.
                  APPEND R_WERKS.
                  SELECT WERKS
                         INTO TABLE IT_WERKS
                         FROM MARC
                         WHERE WERKS IN R_WERKS.
                  DELETE ADJACENT DUPLICATES FROM IT_WERKS COMPARING WERKS
                  LOOP AT IT_WERKS.
                    IT_RANGETAB-AND_OR    = 'AND'.
                    IT_RANGETAB-OPERATOR = 'NE'.
                    IT_RANGETAB-VALUE    = IT_WERKS-WERKS.
                    APPEND IT_RANGETAB.
                  ENDLOOP.
                WHEN 'NE'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR  = 'NE'.
                  IT_RANGETAB-VALUE     = S_WERKS-LOW.
                  APPEND IT_RANGETAB.
                WHEN OTHERS.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = S_WERKS-OPTION.
                  IT_RANGETAB-VALUE    = S_WERKS-LOW.
                  APPEND IT_RANGETAB.
              ENDCASE.
            ENDLOOP.
          WHEN 'KONOB'.
            CLEAR IT_RANGETAB.
            IT_RANGETAB-VIEWFIELD = 'KONOB'.
            IT_RANGETAB-TABIX     = SY-TABIX.
            IT_RANGETAB-DDIC      = IT_NAMTAB-READONLY.
            LOOP AT S_KONOB.
              CASE S_KONOB-OPTION.
                WHEN 'EQ'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR  = 'EQ'.
                  IT_RANGETAB-VALUE     = S_KONOB-LOW.
                  APPEND IT_RANGETAB.
                WHEN 'BT'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = 'GE'.
                  IT_RANGETAB-VALUE     = S_KONOB-LOW.
                  APPEND IT_RANGETAB.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = 'LE'.
                  IT_RANGETAB-VALUE     = S_KONOB-HIGH.
                  APPEND IT_RANGETAB.
                WHEN 'NB'.
                  CLEAR: R_KONOB,
                         R_KONOB[].
                  R_KONOB-SIGN = 'I'.
                  R_KONOB-OPTION = 'BT'.
                  R_KONOB-LOW = S_KONOB-LOW.
                  R_KONOB-HIGH = S_KONOB-HIGH.
                  APPEND R_KONOB.
                  SELECT KONOB
                         INTO TABLE IT_KONOB
                         FROM T190
                         WHERE KONOB IN R_KONOB.
                  DELETE ADJACENT DUPLICATES FROM IT_KONOB COMPARING KONOB
                  LOOP AT IT_KONOB.
                    IT_RANGETAB-AND_OR    = 'AND'.
                    IT_RANGETAB-OPERATOR = 'NE'.
                    IT_RANGETAB-VALUE    = IT_KONOB-KONOB.
                    APPEND IT_RANGETAB.
                  ENDLOOP.
                WHEN 'NE'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR  = 'NE'.
                  IT_RANGETAB-VALUE     = S_KONOB-LOW.
                  APPEND IT_RANGETAB.
                WHEN OTHERS.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = S_KONOB-OPTION.
                  IT_RANGETAB-VALUE    = S_KONOB-LOW.
                  APPEND IT_RANGETAB.
              ENDCASE.
            ENDLOOP.
          WHEN 'ZCPLT'.
            CLEAR IT_RANGETAB.
            IT_RANGETAB-VIEWFIELD = 'ZCPLT'.
            IT_RANGETAB-TABIX     = SY-TABIX.
            IT_RANGETAB-DDIC      = IT_NAMTAB-READONLY.
            LOOP AT S_ZCPLT.
              CASE S_ZCPLT-OPTION.
                WHEN 'EQ'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR  = 'EQ'.
                  IT_RANGETAB-VALUE     = S_ZCPLT-LOW.
                  APPEND IT_RANGETAB.
                WHEN 'BT'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = 'GE'.
                  IT_RANGETAB-VALUE     = S_ZCPLT-LOW.
                  APPEND IT_RANGETAB.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = 'LE'.
                  IT_RANGETAB-VALUE     = S_ZCPLT-HIGH.
                  APPEND IT_RANGETAB.
                WHEN 'NB'.
                  CLEAR: R_ZCPLT,
                         R_ZCPLT[].
                  R_ZCPLT-SIGN = 'I'.
                  R_ZCPLT-OPTION = 'BT'.
                  R_ZCPLT-LOW = S_ZCPLT-LOW.
                  R_ZCPLT-HIGH = S_ZCPLT-HIGH.
                  APPEND R_ZCPLT.
                  SELECT ZCPLT
                         INTO TABLE IT_ZCPLT
                         FROM ZTAB
                         WHERE ZCPLT IN R_ZCPLT.
                  DELETE ADJACENT DUPLICATES FROM IT_ZCPLT COMPARING ZCPLT
                  LOOP AT IT_ZCPLT.
                    IT_RANGETAB-AND_OR    = 'AND'.
                    IT_RANGETAB-OPERATOR = 'NE'.
                    IT_RANGETAB-VALUE    = IT_ZCPLT-ZCPLT.
                    APPEND IT_RANGETAB.
                  ENDLOOP.
                WHEN 'NE'.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR  = 'NE'.
                  IT_RANGETAB-VALUE     = S_ZCPLT-LOW.
                  APPEND IT_RANGETAB.
                WHEN OTHERS.
                  IT_RANGETAB-AND_OR    = 'AND'.
                  IT_RANGETAB-OPERATOR = S_ZCPLT-OPTION.
                  IT_RANGETAB-VALUE    = S_ZCPLT-LOW.
                  APPEND IT_RANGETAB.
              ENDCASE.
            ENDLOOP.
        ENDCASE.
      ENDLOOP.
      IF S_ZCPLT[] IS INITIAL.
        CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
          EXPORTING
            ACTION      = 'U'
            VIEW_NAME   = 'ZTAB'
          TABLES
            DBA_SELLIST = IT_RANGETAB
          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
            MAINTENANCE_PROHIBITED               = 14
            OTHERS                               = 15.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ELSE.
        CALL FUNCTION 'VIEW_MAINTENANCE_CALL'
          EXPORTING
            ACTION      = 'U'
            VIEW_NAME   = 'ZTAB_ZTEST'
          TABLES
            DBA_SELLIST = IT_RANGETAB
          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
            MAINTENANCE_PROHIBITED               = 14
            OTHERS                               = 15.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " frm_get_data
    *&      Form  frm_validations
          Validating field values
    FORM FRM_VALIDATIONS .
    Material number should not be validated (10/17/2005)
      CLEAR V_MATNR.
      SELECT SINGLE MATNR
                    INTO V_MATNR
                    FROM MARA
                    WHERE MATNR IN S_MATNR.
      IF SY-SUBRC <> 0.
        MESSAGE E002 WITH 'Material not found'.
      ENDIF.
      CLEAR V_WERKS.
      SELECT SINGLE WERKS
                    INTO V_WERKS
                    FROM ZTAB
                    WHERE WERKS IN S_WERKS.
      IF SY-SUBRC <> 0.
        MESSAGE E002 WITH 'Plant (WERKS) not found'(002).
      ENDIF.
      CLEAR V_KONOB.
      SELECT SINGLE KONOB
                    INTO V_KONOB
                    FROM ZTAB
                    WHERE KONOB IN S_KONOB.
      IF SY-SUBRC <> 0.
        MESSAGE E002 WITH ' Product allocation object not found'(003).
      ENDIF.
      CLEAR V_WERKS.
      SELECT SINGLE WERKS
                    INTO V_WERKS
                    FROM ZTAB
                    WHERE WERKS IN S_ZCPLT.
      IF SY-SUBRC <> 0.
        MESSAGE E002 WITH 'Plant (ZCPLT) not found'(004).
      ENDIF.
    ENDFORM.                    " frm_validations
    reward points if it is usefull ...
    Regarding Table maintanence generator

  • How to freeze the selection column in the table control of the module pool.

    hi ,
    in my module pool there is a row selection field  <b>w/selcolumn</b> of the table control called as mark.
    how to freeze the selection column where there is no record in the table control row.
    or in other words where wa is initial.
    thanks
    ekta

    Hi all,
    in the PBO of the screen the following code is written.
    say the selection column is MARK and is declared in the data as well.
    thanks
    ekta
    *************************C O D E **************************************************
    MODULE disp_tabctrl1 OUTPUT.
      IF flag_c = 1.
        READ TABLE it_create_data INTO wa_material_data
             INDEX tab_ctrl1-current_line.
      ELSE.
        READ TABLE it_material_data INTO wa_material_data
             INDEX tab_ctrl1-current_line.
        IF sy-subrc = 0.
          IF ok_code_0101 = '&SEL1'.
            mark = 'X'.
          ELSEIF ok_code_0101 = '&DSEL'.
            mark = ' '.
          ENDIF.
        ELSE.
          LOOP AT SCREEN.
            IF screen-name = 'MARK'.
              screen-input = 0.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
      index_t = tab_ctrl1-top_line.
      index_d = tab_ctrl1-top_line + n.
    ENDMODULE.                 " DISP_TABCTRL1  OUTPUT

  • 'how to code for table control wizard in module pool program

    Hi Gurus,
    Please provide me a sample code of table control wizard...
    Thanks in advance!!!!
    Regards,
    Kranthi

    Hi Kranti,
    check this code... it should be helpful
    *& Module pool       Z_TABLE_CONTROL_WIZARD_DEMO                       *
    PROGRAM  z_table_control_wizard_demo             .
    DATA: BEGIN OF lt_vbak OCCURS 0,
           flag  TYPE c,
           vbeln TYPE vbeln_va,
           netwr TYPE netwr,
           kunnr TYPE kunnr,
          END OF lt_vbak.
    DATA: sfkunnr TYPE kunnr.
    *&spwizard: declaration of tablecontrol 'TCONTROL' itself
    CONTROLS: tcontrol TYPE TABLEVIEW USING SCREEN 9000.
    *&spwizard: lines of tablecontrol 'TCONTROL'
    DATA:     g_tcontrol_lines  LIKE sy-loopc.
    DATA:     ok_code LIKE sy-ucomm.
    *&spwizard: output module for tc 'TCONTROL'. do not change this line!
    *&spwizard: update lines for equivalent scrollbar
    MODULE tcontrol_change_tc_attr OUTPUT.
      DESCRIBE TABLE lt_vbak LINES tcontrol-lines.
    ENDMODULE.                    "TCONTROL_change_tc_attr OUTPUT
    *&spwizard: output module for tc 'TCONTROL'. do not change this line!
    *&spwizard: get lines of tablecontrol
    MODULE tcontrol_get_lines OUTPUT.
      g_tcontrol_lines = sy-loopc.
    ENDMODULE.                    "TCONTROL_get_lines OUTPUT
    *&spwizard: input module for tc 'TCONTROL'. do not change this line!
    *&spwizard: modify table
    MODULE tcontrol_modify INPUT.
      MODIFY lt_vbak
        INDEX tcontrol-current_line.
    ENDMODULE.                    "TCONTROL_modify INPUT
    *&spwizard: input modul for tc 'TCONTROL'. do not change this line!
    *&spwizard: mark table
    MODULE tcontrol_mark INPUT.
      DATA: g_tcontrol_wa2 LIKE LINE OF lt_vbak.
      IF tcontrol-line_sel_mode = 1.
        LOOP AT lt_vbak INTO g_tcontrol_wa2
          WHERE flag = 'X'.
          g_tcontrol_wa2-flag = ''.
          MODIFY lt_vbak
            FROM g_tcontrol_wa2
            TRANSPORTING flag.
        ENDLOOP.
      ENDIF.
      MODIFY lt_vbak
        INDEX tcontrol-current_line
        TRANSPORTING flag.
    ENDMODULE.                    "TCONTROL_mark INPUT
    *&spwizard: input module for tc 'TCONTROL'. do not change this line!
    *&spwizard: process user command
    MODULE tcontrol_user_command INPUT.
      ok_code = sy-ucomm.
      PERFORM user_ok_tc USING    'TCONTROL'
                                  'LT_VBAK'
                                  'FLAG'
                         CHANGING ok_code.
      sy-ucomm = ok_code.
    ENDMODULE.                    "TCONTROL_user_command INPUT
    *   INCLUDE TABLECONTROL_FORMS                                         *
    *&      Form  USER_OK_TC                                               *
    FORM user_ok_tc USING    p_tc_name TYPE dynfnam
                             p_table_name
                             p_mark_name
                    CHANGING p_ok      LIKE sy-ucomm.
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA: l_ok              TYPE sy-ucomm,
            l_offset          TYPE i.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
    *&SPWIZARD: Table control specific operations                          *
    *&SPWIZARD: evaluate TC name and operations                            *
      SEARCH p_ok FOR p_tc_name.
      IF sy-subrc <> 0.
        EXIT.
      ENDIF.
      l_offset = STRLEN( p_tc_name ) + 1.
      l_ok = p_ok+l_offset.
    *&SPWIZARD: execute general and TC specific operations                 *
      CASE l_ok.
        WHEN 'INSR'.                      "insert row
          PERFORM fcode_insert_row USING    p_tc_name
                                            p_table_name.
          CLEAR p_ok.
        WHEN 'DELE'.                      "delete row
          PERFORM fcode_delete_row USING    p_tc_name
                                            p_table_name
                                            p_mark_name.
          CLEAR p_ok.
        WHEN 'P--' OR                     "top of list
             'P-'  OR                     "previous page
             'P+'  OR                     "next page
             'P++'.                       "bottom of list
          PERFORM compute_scrolling_in_tc USING p_tc_name
                                                l_ok.
          CLEAR p_ok.
    *     WHEN 'L--'.                       "total left
    *       PERFORM FCODE_TOTAL_LEFT USING P_TC_NAME.
    *     WHEN 'L-'.                        "column left
    *       PERFORM FCODE_COLUMN_LEFT USING P_TC_NAME.
    *     WHEN 'R+'.                        "column right
    *       PERFORM FCODE_COLUMN_RIGHT USING P_TC_NAME.
    *     WHEN 'R++'.                       "total right
    *       PERFORM FCODE_TOTAL_RIGHT USING P_TC_NAME.
        WHEN 'MARK'.                      "mark all filled lines
          PERFORM fcode_tc_mark_lines USING p_tc_name
                                            p_table_name
                                            p_mark_name   .
          CLEAR p_ok.
        WHEN 'DMRK'.                      "demark all filled lines
          PERFORM fcode_tc_demark_lines USING p_tc_name
                                              p_table_name
                                              p_mark_name .
          CLEAR p_ok.
    *     WHEN 'SASCEND'   OR
    *          'SDESCEND'.                  "sort column
    *       PERFORM FCODE_SORT_TC USING P_TC_NAME
    *                                   l_ok.
      ENDCASE.
    ENDFORM.                              " USER_OK_TC
    *&      Form  FCODE_INSERT_ROW                                         *
    FORM fcode_insert_row
                  USING    p_tc_name           TYPE dynfnam
                           p_table_name             .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_lines_name       LIKE feld-name.
      DATA l_selline          LIKE sy-stepl.
      DATA l_lastline         TYPE i.
      DATA l_line             TYPE i.
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>                 TYPE cxtab_control.
      FIELD-SYMBOLS <table>              TYPE STANDARD TABLE.
      FIELD-SYMBOLS <lines>              TYPE i.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: get looplines of TableControl                              *
      CONCATENATE 'G_' p_tc_name '_LINES' INTO l_lines_name.
      ASSIGN (l_lines_name) TO <lines>.
    *&SPWIZARD: get current line                                           *
      GET CURSOR LINE l_selline.
      IF sy-subrc <> 0.                   " append line to table
        l_selline = <tc>-lines + 1.
    *&SPWIZARD: set top line                                               *
        IF l_selline > <lines>.
          <tc>-top_line = l_selline - <lines> + 1 .
        ELSE.
          <tc>-top_line = 1.
        ENDIF.
      ELSE.                               " insert line into table
        l_selline = <tc>-top_line + l_selline - 1.
        l_lastline = <tc>-top_line + <lines> - 1.
      ENDIF.
    *&SPWIZARD: set new cursor line                                        *
      l_line = l_selline - <tc>-top_line + 1.
    *&SPWIZARD: insert initial line                                        *
      INSERT INITIAL LINE INTO <table> INDEX l_selline.
      <tc>-lines = <tc>-lines + 1.
    *&SPWIZARD: set cursor                                                 *
      SET CURSOR LINE l_line.
    ENDFORM.                              " FCODE_INSERT_ROW
    *&      Form  FCODE_DELETE_ROW                                         *
    FORM fcode_delete_row
                  USING    p_tc_name           TYPE dynfnam
                           p_table_name
                           p_mark_name   .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: delete marked lines                                        *
      DESCRIBE TABLE <table> LINES <tc>-lines.
      LOOP AT <table> ASSIGNING <wa>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
        IF <mark_field> = 'X'.
          DELETE <table> INDEX syst-tabix.
          IF sy-subrc = 0.
            <tc>-lines = <tc>-lines - 1.
          ENDIF.
        ENDIF.
      ENDLOOP.
    ENDFORM.                              " FCODE_DELETE_ROW
    *&      Form  COMPUTE_SCROLLING_IN_TC
    *       text
    *      -->P_TC_NAME  name of tablecontrol
    *      -->P_OK       ok code
    FORM compute_scrolling_in_tc USING    p_tc_name
                                          p_ok.
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_tc_new_top_line     TYPE i.
      DATA l_tc_name             LIKE feld-name.
      DATA l_tc_lines_name       LIKE feld-name.
      DATA l_tc_field_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <lines>      TYPE i.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get looplines of TableControl                              *
      CONCATENATE 'G_' p_tc_name '_LINES' INTO l_tc_lines_name.
      ASSIGN (l_tc_lines_name) TO <lines>.
    *&SPWIZARD: is no line filled?                                         *
      IF <tc>-lines = 0.
    *&SPWIZARD: yes, ...                                                   *
        l_tc_new_top_line = 1.
      ELSE.
    *&SPWIZARD: no, ...                                                    *
        CALL FUNCTION 'SCROLLING_IN_TABLE'
             EXPORTING
                  entry_act             = <tc>-top_line
                  entry_from            = 1
                  entry_to              = <tc>-lines
                  last_page_full        = 'X'
                  loops                 = <lines>
                  ok_code               = p_ok
                  overlapping           = 'X'
             IMPORTING
                  entry_new             = l_tc_new_top_line
             EXCEPTIONS
    *              NO_ENTRY_OR_PAGE_ACT  = 01
    *              NO_ENTRY_TO           = 02
    *              NO_OK_CODE_OR_PAGE_GO = 03
                  OTHERS                = 0.
      ENDIF.
    *&SPWIZARD: get actual tc and column                                   *
      GET CURSOR FIELD l_tc_field_name
                 AREA  l_tc_name.
      IF syst-subrc = 0.
        IF l_tc_name = p_tc_name.
    *&SPWIZARD: et actual column                                           *
          SET CURSOR FIELD l_tc_field_name LINE 1.
        ENDIF.
      ENDIF.
    *&SPWIZARD: set the new top line                                       *
      <tc>-top_line = l_tc_new_top_line.
    ENDFORM.                              " COMPUTE_SCROLLING_IN_TC
    *&      Form  FCODE_TC_MARK_LINES
    *       marks all TableControl lines
    *      -->P_TC_NAME  name of tablecontrol
    FORM fcode_tc_mark_lines USING p_tc_name
                                   p_table_name
                                   p_mark_name.
    *&SPWIZARD: EGIN OF LOCAL DATA-----------------------------------------*
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: mark all filled lines                                      *
      LOOP AT <table> ASSIGNING <wa>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
        <mark_field> = 'X'.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Form  FCODE_TC_DEMARK_LINES
    *       demarks all TableControl lines
    *      -->P_TC_NAME  name of tablecontrol
    FORM fcode_tc_demark_lines USING p_tc_name
                                     p_table_name
                                     p_mark_name .
    *&SPWIZARD: BEGIN OF LOCAL DATA----------------------------------------*
      DATA l_table_name       LIKE feld-name.
      FIELD-SYMBOLS <tc>         TYPE cxtab_control.
      FIELD-SYMBOLS <table>      TYPE STANDARD TABLE.
      FIELD-SYMBOLS <wa>.
      FIELD-SYMBOLS <mark_field>.
    *&SPWIZARD: END OF LOCAL DATA------------------------------------------*
      ASSIGN (p_tc_name) TO <tc>.
    *&SPWIZARD: get the table, which belongs to the tc                     *
      CONCATENATE p_table_name '[]' INTO l_table_name. "table body
      ASSIGN (l_table_name) TO <table>.                "not headerline
    *&SPWIZARD: demark all filled lines                                    *
      LOOP AT <table> ASSIGNING <wa>.
    *&SPWIZARD: access to the component 'FLAG' of the table header         *
        ASSIGN COMPONENT p_mark_name OF STRUCTURE <wa> TO <mark_field>.
        <mark_field> = space.
      ENDLOOP.
    ENDFORM.                                          "fcode_tc_mark_lines
    *&      Module  STATUS_9000  OUTPUT
    *       text
    MODULE status_9000 OUTPUT.
      SET PF-STATUS 'S9000'.
      SET TITLEBAR 'T9000'.
    ENDMODULE.                 " STATUS_9000  OUTPUT
    *&      Module  USER_COMMAND_9000  INPUT
    *       text
    MODULE user_command_9000 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK' OR 'EXIT' OR 'CANCEL'.
          LEAVE TO SCREEN 0.
        WHEN 'DISP'.
          SELECT vbeln netwr kunnr INTO CORRESPONDING FIELDS OF TABLE lt_vbak
          FROM vbak
          WHERE kunnr = sfkunnr.
    *    LEAVE TO LIST-PROCESSING [AND RETURN TO SCREEN <nnnn>].
    *    By default, the dialog processor returns to the PBO processing of
    *    the screen from which the list processor was called. The optional
    *    addition AND RETURN TO SCREEN allows you to specify a different
    *    screen in the current screen sequence at whose PBO event you want
    *    to resume processing.
        when 'LIST'.
        LEAVE TO LIST-PROCESSING.
        WRITE:/ 'Time  :', SY-UZEIT.
        LOOP AT LT_VBAK.
        WRITE:/ LT_VBAK-VBELN,
                LT_VBAK-NETWR,
                LT_VBAK-KUNNR.
        ENDLOOP.
        WHEN 'SUBM'.
    *& You can call executable programs from other ABAP programs using the
    *& following statement:
    *& SUBMIT <rep>|(<field>) [AND RETURN] [<options>].
          SUBMIT z_submit_report VIA SELECTION-SCREEN AND RETURN.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_9000  INPUT
                                                     TABLE CONTROL WIZARD SE51 CODE
    PROCESS BEFORE OUTPUT.
    *&spwizard: pbo flow logic for tablecontrol 'TCONTROL'
      module TCONTROL_change_tc_attr.
    *&spwizard: module TCONTROL_change_col_attr.
      loop at   LT_VBAK
           with control TCONTROL
           cursor TCONTROL-current_line.
        module TCONTROL_get_lines.
    *&spwizard:   module TCONTROL_change_field_attr
      endloop.
    MODULE STATUS_9000.
    PROCESS AFTER INPUT.
    *&spwizard: pai flow logic for tablecontrol 'TCONTROL'
      loop at LT_VBAK.
        chain.
          field LT_VBAK-VBELN.
          field LT_VBAK-NETWR.
          field LT_VBAK-KUNNR.
          module TCONTROL_modify on chain-request.
        endchain.
        field LT_VBAK-FLAG
          module TCONTROL_mark on request.
      endloop.
      module TCONTROL_user_command.
    *&spwizard: module TCONTROL_change_tc_attr.
    *&spwizard: module TCONTROL_change_col_attr.
    MODULE USER_COMMAND_9000.
    regards
    padma

  • How to take backup of an entire module pool program with code,screen,etc.

    Hi experts,
    I have some important data in the ides server for which i want to take backup of them.
    I have some question regarding the same.
    1.How to take backup/download of an entire module pool program with code,screen,etc.
    2.How can we take backup/download for a DB table with its structure?
    3.How can we take backup of a search help?
    Please give some suggestions abt the same.
    Regards,
    Ashesh.

    Hi,
    May be just for viewing, try downloading from SE80 transaction from the others option.
    Here just try issuing the print, it will generate the spool.
    Now using the spool, download to your desktop as required. It will have all the information regarding the attributes, fields, elements everything.
    The only issue is, may be you need to take all the screens separately.
    Regards,
    Santhosh.

  • How to valid inputs from user in module pool

    hi,
    i m using table control in module pool and in 1 of the table control fields i m using user defined F4 help which is getting filled from a internal table. if the user enters anything apart from the contents in my F4 help the record should not get saved and system should return error . how and where to put this validation?
    please help.
    thank you.

    hi,
    Write the code in PROCESS ON VALUE REQUEST in the Module pool Program ....
    PROCESS ON VALUE REQUEST
    FIELD <Field_name> MODULE <Module_name> ..
    Double click on this field then write the function moduel to get the Internal table values when the user press F4 on that field, after completing this check by pressing the F4, if it working fine then the Validation is automatically done by this POV ..
    if the USer enters other than the internal table values then the Error message will raised at that stage
    Regards
    Sudheer

  • How to make a fld mandatory in module pool program?

    I need help on following 2 things
    I have module pool program created, in that many screen subscreens created.
    1.I want to make a field mandatory
    second one  is, I have a general tab and  data tab.
    General tab screen - 2101
    Data tab = 2102
    In general tab, I have edited the values (change mode), when change the values and try to save it,
    It is holding old value.but If i exucute the transaction once again, it is showing the changed value(new value)
    For ex: there is a date field  value is 03/08/2009
    If I change this to 03/09/2009 and press on Save button from the standard menu, still it is showing the  value 03/08/2009. but I execute this transaction once again it is showing the value as 03/09/2009
    I will be thankful if someone helps me here

    Hi Chitra,
    Go to the properties of the filed select program tab and say input required.
    then you will get the problem solved.
    For second one actually its saving but not displaying the saved value at the same time ,
    for this you write the select statement after saving , so that once save is execute m, select statement also will execute  and it will display the newly saved value.
    so after saving imdeatly u write the select statement.
    like case sy-ucomm.
    when 'SAVE'.
    insert ztable.
    select filed from z table.
    endcase.
    let me know if ur problem solved.
    Regards
    Rajendra

  • How to handle The Back button on Module Pool screen

    Hi Gurus,
                  I have created a module pool screen. In that screen I have used some input/output fields(text box) which i have marked mandatory by making the input field as "required" under program tab.
    now when running the screen if no data is entered into these mandatory input field then BACK button does not work. First I have to enter some data into the input filed only then the BACK button works. How should i code so that the back button works even without entering the data into these mandatory fields.

    hi,
    use AT EXIT-COMMAND with the module.
    eg. module user_command at exit command.
    then there will be no problem.

  • How to Change the Font Size in Module Pool Selection Screen?

    Hi,
    There is a module pool, and I need to change the font size mentioned in the selection screen. Could you plaese tell me, how will I be able to do that?

    Hi ,
    If you are asking for text field , then check the options avaliable in Display tab of Attributes.
    Hope this helps you.

Maybe you are looking for

  • Memory on GNB MAX

    Hi there, i have a queestion about memory type for the GNB MAX, in the specifications it says that the type of memory should be 2100 (266), but can i use another newer? for example one memory at 2700? i know that maybe the performance is not the same

  • Video out from ipod classic

    OK, so I have an Ipod Classic. I jsut got the DYNEX IPAVC cable, and that doesnt work (no video, audio only). I also have an Accurian Dock-same deal, no video, only audio. Ive read a bunch that the Classics require newer hardware to get video to work

  • Boot Device Not Found Please Intall an Operating system on your hard disk. Hard Disk - (3F0)

    Hello, I tried to re-install de OS from windows 7 to windows 8.1 and when the bios update driever was installed and the laptop was restaring it appeared the folowing window and message: Boot Device Not Found Please Intall an Operating system on your

  • Fan runs constantly (not my printer)

    Hi, I've had this problem for a while and it's really getting to me. The fan on my black MacBook (purchased April 2007 and treated very well) runs constantly. Not upon startup, but as soon as I open Firefox it's going until I shut down. I've read abo

  • My Safari program will not shut down so I cannot shut down my MacOSX

    My Safari program will not shut down (shut down line is greyed out.)  How can I shut it down , so that I can shut down the Mac OSX?