Tabindex in  module pool

friends
how could be set the tabindex for the different input/ouput boxes in a module pool
hope u got the point
Which property selected for tabindex
Do tell me
With Best Regards
ruby

Hi,
Go to perticular screen -> Select Field -> double click to open property/ Attribute -> Check Line and Column
Also in Group you can assign group name in first box and number in second box.
Like, field 1 -> grooup A no: 1
field 2 -> grooup A no: 2
Reward if useful!

Similar Messages

  • Module pool to maintiane table ztavble

    hi
    can anyone send me complete code to refer for maintaining a ztable
    following validation are required like
    1) sortiing
    deletein and addition save etc all as in table maintianece i need to code by module pool becasue in table maintainece sorting coding is not possible...
    also validation are
    1) whne user enters ship to info name 1 should automatically be populated from kna1 on pressing enter how to acheive this by module pool
    2) email verification format should be correct? how to acheive this by module pool
    3) sorting on basis of all fields
    regards
    Nishant

    Hi Nishanth,,,
    I also developed the same kind of Program for maintaining the Ztable...
    Jus create a new GUI Staus...with the required functions....
    Refer the below code:
       REPORT                     : Z0BRAP_TAX_EXCEPTION .
    TITLE                      : Tax Exceptions Table
    AUTHOR                     : Swaminathan PJ
    DATE                       : 04/12/2006
    DDN NUMBER                 : SAP-BR-TB0020
    TRANSPORT REQUEST NUMBER   : D12K912309
    REFERENCE                  :
    DESCRIPTION
    Program Z0BRAP_TAX_EXCEPTION is an Report program to update the table
    ZTBRAP_TAX_EXCPT,here user can Create/Change/Display the table entrie
    s and can perform the following functions (Filter,Sort,Summation and
    Subtotal).
    AMENDMENTS
    CHANGES REF         DATE         PERSON         Tran.Req. Number
    DESCRIPTION:
                   Include for Global Declarations                       *
       INCLUDE: znbrap_tax_exception_top.                                           " Include for Global Declarative elements
         Include
    All the subroutines are include
       INCLUDE znbrap_tax_exception.                                                " Include for all Subroutines
         START OF SELECTION
       START-OF-SELECTION.
      Main Subroutine
         PERFORM  procMain.
                         End of Selection                                *
       END-OF-SELECTION.
    INCLUDE                    : ZNBRAP_TAX_EXCEPTION_TOP
    TITLE                      : Data Declarations
    AUTHOR                     :
    DATE                       : 04.12.2006
    TRANSPORT REQUEST NUMBER   : D12K912309
    DESCRIPTION
    Global Data Declarations for Z0BRAP_TAX_EXCEPTION
    AMENDMENTS
    CHANGES REF         DATE         PERSON         Tran.Req. Number
    DESCRIPTION:
    ALV Declarations
    TYPE-POOLS: slis.
    Types contains the structure of the table
    *TYPES :   BEGIN OF gy_tax_exception.
               INCLUDE STRUCTURE ztbrap_tax_excpt.
                 mandt           TYPE   mandt,
                 zmonat          TYPE   monat,
                 zbukrs          TYPE   bukrs,
                 zlifnr          TYPE   lifnr,
                 zexctype        TYPE   zebrap_exctype,
                 zstcd1          TYPE   stcd1,
                 zaugdt_other    TYPE   budat,
                 zbelnr          TYPE   belnr,
                 zdmbtr          TYPE   dmbtr,
                 zwhtinssca      TYPE   dmbtr,
                 zuserch         TYPE   syuname,
                 zdate_change    TYPE   datum,
                 ztime_change    TYPE   uzeit,
    *TYPES:          END OF gy_tax_exception.
    Tables for the structure defined above
    *TYPES : gy_tax_exception_tab  TYPE STANDARD TABLE OF gy_tax_exception.
    Internal Table
    DATA: gt_tax_excpt_tab        TYPE   STANDARD TABLE OF ztbrap_tax_excpt WITH HEADER LINE, "Global internal table for Tax exceptions data
          gt_fieldcat                   TYPE   slis_fieldcat_alv OCCURS 0 WITH HEADER LINE.         "Global internal table for fieldcat
    *&  Include           ZNBRAP_TAX_EXCEPTION                             *
    *&      Form  procMain
          text
    -->  p1        text
    <--  p2        text
    FORM procMain .
    Set PF-Status
      perform procInitialize.
    Select Tax Exceptions Data
      perform procGetTaxExceptionsData.
    Display ALV Report with Tax Exceptions Data
      perform procDisplayTaxExceptionsData.
    ENDFORM.                    " procMain
          FORM initialize                                               *
    form procInitialize.
      CONSTANTS :
      lc_pfstatus               TYPE    abnkr VALUE 'ZTAX_EXCEPTION'. "Pf Status
    Set status
      set pf-status lc_pfstatus.
    endform.                    "procInitialize
          FORM retrieve_data                                            *
          Retrieve data from SAP                                        *
    form procGetTaxExceptionsData.
      REFRESH: gt_tax_excpt_tab.
      select * from ztbrap_tax_excpt
        appending corresponding fields of table gt_tax_excpt_tab.
    endform.                    "procGetTaxExceptionsData
    Called by REUSE_ALV_GRID_DISPLAY when user interacts.               *
    In this case, there are a number of buttons / menu options for      *
    user to select for non-standard functions:                          *
    o Single Display                                                    *
    o Single Change                                                     *
    o Single create                                                     *
    o Single Delete                                                     *
          --> lv_ucomm                                                  *
          --> LW_SELFIELD                                               *
    form user_command using lv_ucomm like sy-ucomm
                      lw_selfield type slis_selfield.
    Work area
      DATA: lw_update_tax_excpt TYPE    ztbrap_tax_excpt. " work area for tax exceptions data
      DATA: lw_tax_exception    TYPE    ztbrap_tax_excpt. " work area for tax exceptions data
    Variables
      DATA: lv_key              TYPE    abkrs ,                 "key fields
            lv_non_key          TYPE    abkrs,                  "Non Key Fields
            lv_insert           TYPE    ablnv,                  "Insert
            lv_change           TYPE    ablnv,                  "Change
            lv_entry            TYPE    ablnv,                  "Popup title
            lv_display          TYPE    ablnv,                  "Display
            lv_delete           TYPE    ablnv,                  "Delete
            lv_mode             TYPE    ablnv .                 "Menu options
    Constants
      CONSTANTS:
           lc_new               TYPE    alind VALUE 'ZNEW',     "Fcode for new
           lc_update            TYPE    alind VALUE 'ZBR',      "Fcode for change
           lc_view              TYPE    alind VALUE 'ZDISP',    "Fcode for display
           lc_delete            TYPE    alind VALUE 'ZDEL ',    "Fcode for delete
           lc_show_field        TYPE    abkrs VALUE '00',       "Show field
           lc_hide_field        TYPE    abkrs VALUE '02'.       "Hide field
    Clear Local Work Area
      CLEAR :
           lw_update_tax_excpt.
    Clear Local Variables
      CLEAR :
           lv_key,
           lv_non_key,
           lv_mode,
           lv_insert,
           lv_delete,
           lv_change,
           lv_display.
    Retrieve data for selected line & store it in a temp structure.
      READ TABLE gt_tax_excpt_tab index lw_selfield-tabindex .
      if sy-subrc is not initial and lv_ucomm <> lc_new  and lv_ucomm(6) <> 'DELETE'.
        message w123(m&).   " Position the cursor on a valid line
        exit.
      endif.
    Moving the contents to workarea
    MOVE gt_tax_excpt_tab-zmonat         TO lw_update_tax_excpt-zmonat.
    MOVE gt_tax_excpt_tab-zbukrs         TO lw_update_tax_excpt-zbukrs.
    MOVE gt_tax_excpt_tab-zlifnr         to lw_update_tax_excpt-zlifnr.
    MOVE gt_tax_excpt_tab-zexctype       to lw_update_tax_excpt-zexctype.
    MOVE gt_tax_excpt_tab-zstcd1         to lw_update_tax_excpt-zstcd1.
    MOVE gt_tax_excpt_tab-zaugdt_other   to lw_update_tax_excpt-zaugdt_other.
    MOVE gt_tax_excpt_tab-zbelnr         to lw_update_tax_excpt-zbelnr.
    MOVE gt_tax_excpt_tab-zdmbtr         to lw_update_tax_excpt-zdmbtr.
    MOVE gt_tax_excpt_tab-zwhtinssca     to lw_update_tax_excpt-zwhtinssca.
    MOVE gt_tax_excpt_tab-zuserch        to lw_update_tax_excpt-zuserch.
    MOVE gt_tax_excpt_tab-zdate_change   to lw_update_tax_excpt-zdate_change.
    MOVE gt_tax_excpt_tab-ztime_change   to lw_update_tax_excpt-ztime_change.
    Move the text for Add,Change,Display
      Move text-019 To lv_insert.
      Move text-020 To lv_change.
      Move text-021 To lv_display.
      Move text-023 To lv_delete.
    Now see which button / menu option user has selected
      case lv_ucomm.
        when lc_view.               "Display a single entry
          lv_mode    = lv_display.
          lv_key     = lc_hide_field.     "hide key fields
          lv_non_key = lc_hide_field.     "hide non key fields
          perform procFindKeyFields
                         using lw_update_tax_excpt lv_mode lv_insert lv_delete
                               lv_change lv_display lv_key lv_non_key lw_selfield.
        when lc_update .          "Update a single entry (show non-key fields)
          lv_mode    = lv_change.
          lv_key     = lc_hide_field.    "hide key fields
          lv_non_key = lc_show_field.    "show non-key fields
          perform procFindKeyFields
                         using lw_update_tax_excpt lv_mode lv_insert lv_delete
                               lv_change lv_display lv_key lv_non_key lw_selfield.
        when lc_new. "Add a single new entry (show all fields)
          lv_mode    = lv_insert.
          lv_key     = lc_show_field.
          lv_non_key = lc_show_field.
          clear lw_update_tax_excpt.  "Empty structure to give new entry.
          perform procFindKeyFields
                         using lw_update_tax_excpt lv_mode lv_insert lv_delete
                               lv_change lv_display lv_key lv_non_key lw_selfield.
        WHEN lc_delete.               " Delete current entry
          lv_mode   = lv_delete.
          lv_key    = lc_hide_field.
          lv_non_key = lc_hide_field.
         perform procFindKeyFields
                         using lw_update_tax_excpt lv_mode lv_insert lv_delete
                               lv_change lv_display lv_key lv_non_key lw_selfield.
      endcase.
    endform.                    "user_command
          FORM procFindKeyFields                                        *
    -->  lw_tax_excpt                                                  *
    -->  lw_update_tax_excpt                                           *
    -->  lv_ret                                                        *
    form procFindKeyFields  using  lw_update_tax_excpt structure  ztbrap_tax_excpt
                                   lv_mode
                                   lv_insert
                                   lv_delete
                                   lv_change
                                   lv_display
                                   lv_key
                                   lv_non_key
                                   lw_selfield type slis_selfield.
    Work area
      DATA:lw_key_table         TYPE    dfies occurs 0 with header line,      "Work area for for key fields
           lw_tax_excpt         TYPE    sval  occurs 0 with header line.      "Work area for tax exceptions data
    Variables
      DATA: lv_ret              TYPE    char1,                                "Return parameter
            lv_title            TYPE    text60,                               "Popup title
            lv_excpt_type       TYPE    ZEBRAP_EXCTYPE,                       "Exception type
            lv_entry            TYPE    ablnv,                                "Popup text
            lv_vendor           TYPE    lifnr,                                "Vendor
            lv_vendor_no        TYPE    lifnr,                                "Vendor
            lv_co_code          TYPE    bukrs,                                "Company code
            lv_comp_code        TYPE    bukrs,                                "Company code
            lv_answer           TYPE    aavis.                                "Return parameter
    Constants
      CONSTANTS:
            lc_ref_tab          TYPE    ablnv VALUE 'T001',                   "Reference table
            lc_ref_fld          TYPE    ablnv VALUE 'WAERS',                  "Reference field
            lc_hide_fld         TYPE    abkrs VALUE '04',                     "Hide field
            lc_client           TYPE    amert VALUE 'MANDT',                  "Client
            lc_user             TYPE    amert VALUE 'ZUSERCH',                "User
            lc_date             TYPE    amert VALUE 'ZDATE_CHANGE',           "Date
            lc_time             TYPE    amert VALUE 'ZTIME_CHANGE',           "Time
            lc_taxno            TYPE    amert VALUE 'ZSTCD1',                 "Tax Number
            lc_vendor           TYPE    amert VALUE 'ZLIFNR',                 "Vendor
            lc_exception_typ    TYPE    amert VALUE 'ZEXCTYPE',               "Exception type
            lc_clearing_dt      TYPE    amert VALUE 'ZAUGDT_OTHER',           "Clearing date
            lc_period           TYPE    amert VALUE 'ZMONAT',                 "Period
            lc_co_code          TYPE    amert VALUE 'ZBUKRS',                 "Company code
            lc_gross_amt        TYPE    amert VALUE 'ZDMBTR',                 "Gross amount
            lc_excpt_amt        TYPE    amert VALUE 'ZWHTINSSCA',             "Exception amount
            lc_period_def       TYPE    abkrs VALUE '00',                     "Default value for period
            lc_amount_def       TYPE    amert VALUE '0.00',                   "Default value for amount
            lc_date_def         TYPE    amert VALUE '00000000',               "Default value for date
            lc_exctype_mf       TYPE    abkrs VALUE 'MF',                     "Exception type value
            lc_exctype_gr       TYPE    abkrs VALUE 'GR',                     "Exception type value
            lc_field_obl        TYPE    aavis VALUE 'X',                      "Obligatory
            lc_cancel           TYPE    aavis VALUE 'X',                      "Obligatory
            lc_return           TYPE    aavis VALUE 'A',                      "Return parameter
            lc_mandatory        TYPE    aavis VALUE '?',                      "Mandatory
            lc_space            TYPE    abkrs VALUE ' ',                      "Space
            lc_notsupported     TYPE    agitt VALUE 1,                        "Exception for FM
            lc_others           TYPE    agitt VALUE 2,                        "Exception for FM
            lc_error            TYPE    agitt VALUE 1,                        "Exception for FM
            lc_confirm          TYPE    agitt VALUE 1,                        "Exception for FM
            lc_text             TYPE    agitt VALUE 1,                        "Exception for FM
            lc_start_column     TYPE    abkrs VALUE '50',                     "Start column
            lc_start_row        TYPE    aavis VALUE '7',                      "Start column
            lc_tabname          TYPE    amert VALUE 'ZTBRAP_TAX_EXCPT',       "Table name,
            lc_column           TYPE    SY-CUCOL VALUE 25,                    "Start column
            lc_row              TYPE    SY-CUROW VALUE 6.                     "Start row
    Clear Local Work Area
      CLEAR :
           lw_tax_excpt,
           lw_key_table .
    Clear Local Variables
      CLEAR :
            lv_ret,
            lv_title,
            lv_excpt_type,
            lv_vendor,
            lv_vendor_no,
            lv_co_code,
            lv_comp_code,
            lv_answer.
    Field symbol
      field-symbols:            <lf_tax_excpt>,                                         "Tax exceptions values
                                <lf_tax_excpt_value>.
    Move the text for entry
      Move text-022 To lv_entry.
      REFRESH lw_tax_excpt.
      lw_tax_excpt-field_obl = lc_field_obl.
      lw_tax_excpt-tabname =   lc_tabname.
    Determine which are key fields in the table. This is necessary to
    control which fields are available for display
      call function 'GET_KEY_FIELDS_OF_TABLE'
        EXPORTING
          tabname       = lw_tax_excpt-tabname
          mandt_needed  = lc_field_obl
        TABLES
          key_fieldtab  = lw_key_table
        EXCEPTIONS
          not_supported = lc_notsupported
          others        = lc_others.
      if sy-subrc is not initial.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        exit.
      endif.
      loop at gt_fieldcat.
        case gt_fieldcat-fieldname.
    Supress fields you don't want to show
          when lc_client or  lc_user or lc_date or lc_time.
          when OTHERS.
            READ TABLE lw_key_table with key fieldname = gt_fieldcat-fieldname.
            if sy-subrc is initial.
              lw_tax_excpt-field_attr = lv_key.
              lw_tax_excpt-field_obl = lc_field_obl.
            else.
              lw_tax_excpt-field_attr = lv_non_key.
              lw_tax_excpt-field_obl = lc_space.
            endif.
            lw_tax_excpt-fieldname = gt_fieldcat-fieldname.
            assign component lw_tax_excpt-fieldname of
                            structure lw_update_tax_excpt to <lf_tax_excpt>.
            lw_tax_excpt-value =    <lf_tax_excpt>.
            lw_tax_excpt-fieldtext = gt_fieldcat-seltext_l.
    Remove the condition obligatory
            IF lw_tax_excpt-fieldname = lc_taxno.
              lw_tax_excpt-field_obl = lc_space.
            ENDIF.
            append lw_tax_excpt.
        endcase.
      endloop  .
    Appending the reference table and field for amount field
      if lv_mode = lv_insert.
        lw_tax_excpt-tabname    = lc_ref_tab.
        lw_tax_excpt-fieldname  = lc_ref_fld.
        lw_tax_excpt-field_attr = lc_hide_fld.
        append lw_tax_excpt.
      endif.
    IF lv_mode  NE lv_delete.
    Show selected entry
      CONCATENATE lv_mode lv_entry INTO lv_title SEPARATED BY space.
      do.
        call function 'POPUP_GET_VALUES'
          EXPORTING
            popup_title     = lv_title
            start_column    = lc_start_column
            start_row       = lc_start_row
          IMPORTING
            returncode      = lv_ret
          TABLES
            fields          = lw_tax_excpt
          EXCEPTIONS
            error_in_fields = lc_error
            others          = lc_others.
    Exit if Error, Display or Delete
        if sy-subrc is not initial or lv_ret = lc_return
                                   or lv_mode = lv_display
                                   or lv_mode = lv_delete..
          exit.
        endif.
    Validate fields involved in ADDING NEW ENTRY
        IF lv_mode  = lv_insert .         "ADD new Entry
    Validate the field Period
          READ TABLE lw_tax_excpt with key fieldname = lc_period.
          IF lw_tax_excpt-value EQ lc_period_def.
            PERFORM procWarnuser USING  text-001 text-003 .
            CONTINUE.
          ENDIF.
    Validate the field Company code
          READ TABLE lw_tax_excpt with key fieldname = lc_co_code.
          lv_co_code = lw_tax_excpt-value.
          select single bukrs from t001 into lv_comp_code
          where bukrs = lv_co_code.
          IF sy-subrc is not initial.
            PERFORM procWarnuser USING  text-001 text-028 .
            CONTINUE.
          ENDIF.
    Validate the field Vendor
          READ TABLE lw_tax_excpt with key fieldname = lc_vendor.
          lv_vendor = lw_tax_excpt-value.
          select single lifnr from lfa1 into lv_vendor_no
          where lifnr = lv_vendor.
          IF sy-subrc is not initial.
            PERFORM procWarnuser USING  text-001 text-024 .
            CONTINUE.
          ENDIF.
    Store the value of exception type in a variable
          READ TABLE lw_tax_excpt with key fieldname = lc_exception_typ.
          lv_excpt_type = lw_tax_excpt-value.
    Validate the field Tax number1 other entities
          READ TABLE lw_tax_excpt with key fieldname = lc_taxno.
          IF lv_excpt_type EQ lc_exctype_mf or  lv_excpt_type EQ lc_exctype_gr.
            IF lw_tax_excpt-value EQ space.
              PERFORM procWarnuser USING  text-001 text-002 .
              CONTINUE.
            ENDIF.
          ENDIF.
    Validate the field Clearing date
          READ TABLE lw_tax_excpt with key fieldname = lc_clearing_dt.
          IF lw_tax_excpt-value EQ lc_date_def.
            PERFORM procWarnuser USING  text-001 text-004.
            CONTINUE.
          ENDIF.
    Validate the field Gross amount
          READ TABLE lw_tax_excpt with key fieldname = lc_gross_amt.
          condense lw_tax_excpt-value no-gaps.
          IF lw_tax_excpt-value EQ lc_amount_def OR
             lw_tax_excpt-value EQ space.
            PERFORM procWarnuser USING  text-001 text-005.
            CONTINUE.
          ENDIF.
    Validate the field Exception amount
          READ TABLE lw_tax_excpt with key fieldname = lc_excpt_amt.
          condense lw_tax_excpt-value no-gaps.
          IF lw_tax_excpt-value EQ lc_amount_def OR
             lw_tax_excpt-value EQ space.
            PERFORM procWarnuser USING  text-001 text-006.
            CONTINUE.
          ENDIF.
          delete lw_tax_excpt index 10.
        ENDIF.
      all checks successful !!!!
        exit.
      enddo.
    endif.
    IF lv_mode  EQ  lv_delete.
    CONCATENATE lv_mode lv_entry INTO lv_title SEPARATED BY space.
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
           TITLEBAR                    = lv_title
           text_question               = text-025
           TEXT_BUTTON_1               = text-026
           TEXT_BUTTON_2               = text-027
           DISPLAY_CANCEL_BUTTON       = lc_space
           START_COLUMN                = lc_column
           START_ROW                   = lc_row
         IMPORTING
           ANSWER                      = lv_answer
         EXCEPTIONS
           TEXT_NOT_FOUND              = lc_text
           OTHERS                      = lc_others
        IF sy-subrc is not initial.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    ENDIF.
    Need to pop-out of the sub if "cancel" was selected
      if lv_ret = lc_return or lv_mode = lv_display.
        exit.
      endif.
    copy contents of pop-up back into structure
      loop at lw_tax_excpt.
        check lw_tax_excpt-value <> lc_mandatory.
        assign component lw_tax_excpt-fieldname
                         of structure lw_update_tax_excpt to <lf_tax_excpt_value>.
        <lf_tax_excpt_value> = lw_tax_excpt-value.
      endloop.
    update the database accordingly.
      case lv_mode.
        when lv_insert.           "Insert
    Give other required field values
          lw_update_tax_excpt-mandt        = sy-mandt.   "Client
          lw_update_tax_excpt-zuserch      = sy-uname.   "User
          lw_update_tax_excpt-zdate_change = sy-datum.   "Date
          lw_update_tax_excpt-ztime_change = sy-uzeit.   "Time
          INSERT into ztbrap_tax_excpt values lw_update_tax_excpt.
          message s036(zmbrap).
        WHEN lv_change.            "Change
    Give other required field values
          lw_update_tax_excpt-mandt        = sy-mandt.   "Client
          lw_update_tax_excpt-zuserch      = sy-uname.   "User
          lw_update_tax_excpt-zdate_change = sy-datum.   "Date
          lw_update_tax_excpt-ztime_change = sy-uzeit.   "Time
          MODIFY ztbrap_tax_excpt FROM lw_update_tax_excpt.  "Update record
          message s037(zmbrap).
        WHEN lv_delete.             "Delete
          IF lv_answer = lc_confirm.
          DELETE FROM ztbrap_tax_excpt WHERE
                  zmonat       =   lw_update_tax_excpt-zmonat       AND
                  zbukrs       =   lw_update_tax_excpt-zbukrs       AND
                  zlifnr       =   lw_update_tax_excpt-zlifnr       AND
                  zexctype     =   lw_update_tax_excpt-zexctype     AND
                  zstcd1       =   lw_update_tax_excpt-zstcd1       AND
                  zaugdt_other =   lw_update_tax_excpt-zaugdt_other AND
                  zdmbtr       =   lw_update_tax_excpt-zdmbtr       AND
                  zwhtinssca   =   lw_update_tax_excpt-zwhtinssca.
          message s038(zmbrap).
          ENDIF.
      endcase.
    Now do refresh ...
      if sy-subrc is not initial.
        rollback work.
        message e033(zmbrap).
      else.
        perform procGetTaxExceptionsData.
        commit work.
        perform procGetTaxExceptionsData.
        lw_selfield-refresh    = lc_field_obl.
        lw_selfield-col_stable = lc_field_obl.
        lw_selfield-row_stable = lc_field_obl.
      endif.
    endform.                    "procFindKeyFields
          FORM procDisplayTaxExceptionsData                             *
    Produce ALV report                                                  *
    form procDisplayTaxExceptionsData.
    Variables
      DATA: lv_layout         TYPE       slis_layout_alv,                                 "Layout
            lv_dispvariant    TYPE       disvariant,                                      "For display
            lv_events         TYPE       slis_t_event,                                    "Events
            lv_grid_settings  TYPE       lvc_s_glay,                                      "Grid settings
            lv_event          TYPE       slis_alv_event.                                  "Events
    Constants
      CONSTANTS:
            lc_user_command   TYPE       slis_formname VALUE 'USER_COMMAND',              "User command
            lc_pf_status      TYPE       slis_formname VALUE 'PF_STATUS_SET_SHOW_LIST',   "Pf status
            lc_top_of_page    TYPE       slis_formname VALUE 'TOP_OF_PAGE',               "Top of page
            lc_tab_name       TYPE       tabname       VALUE  'ZTBRAP_TAX_EXCPT',         "Table name
            lc_stripes        TYPE       aavis         VALUE 'X',                         "Stripes
            lc_save           TYPE       aavis         VALUE 'A',                         "Save
            lc_repid          TYPE       sy-repid      VALUE sy-repid,                    "Program name
            lc_inconsistent   TYPE       agitt         VALUE 1,                           "Exception for FM
            lc_program        TYPE       agitt         VALUE 2,                           "Exception for FM
            lc_others         TYPE       agitt         VALUE 3.                           "Exception for FM
    Clear Local Variables
      CLEAR:
            lv_layout,
            lv_dispvariant,
            lv_events,
            lv_grid_settings,
            lv_event.
    *Set up ALV structures
      lv_dispvariant-report   = lc_repid.
    gv_repid = sy-repid.
      lv_dispvariant-username = sy-uname.
    *Set alternate stripes for ALV report
      lv_layout-zebra = lc_stripes .
      lv_grid_settings-coll_top_p = lc_stripes .
    *Set up exit structure for top of coverpage
      lv_event-name = slis_ev_top_of_coverpage.
      lv_event-form = slis_ev_top_of_coverpage.
      append  lv_event to lv_events.
    *Set up exit for top of page
      lv_event-name = slis_ev_top_of_page.
      lv_event-form = slis_ev_top_of_page.
      append  lv_event to lv_events.
    *Build field catalog for List Viewer
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = lc_repid
          i_inclname             = lc_repid
          i_structure_name       = lc_tab_name
        CHANGING
          ct_fieldcat            = gt_fieldcat[]
        EXCEPTIONS
          inconsistent_interface = lc_inconsistent
          program_error          = lc_program
          others                 = lc_others.
    field controls
      PERFORM procBuildFieldcat.
    Call ABAP/4 List Viewer
      check not gt_fieldcat[] is initial.
      call function 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = lc_repid
          i_callback_user_command  = lc_user_command
          i_callback_pf_status_set = lc_pf_status
          i_callback_top_of_page   = lc_top_of_page
          is_variant               = lv_dispvariant
          i_grid_settings          = lv_grid_settings
          is_layout                = lv_layout
          it_fieldcat              = gt_fieldcat[]
          it_events                = lv_events
          i_save                   = lc_save  " A = All => Standard & User
        TABLES
          t_outtab                 = gt_tax_excpt_tab.
    endform.                    "procDisplayTaxExceptionsData
    **&      Form  PF_STATUS_SET_SHOW_LIST
          Set modified standard status for list
    form pf_status_set_show_list
                     using lw_excpt_tab TYPE slis_t_extab.
    Workarea
      DATA : lw_tax_tab       TYPE       slis_extab.                                      "Type group Slis
    Constants
      DATA : lc_pfstat        TYPE       amert    VALUE 'ZTAX_EXCEPTION',                 "Pf status
             lc_prog          TYPE       sy-repid VALUE sy-repid,                         "Program name
             lc_fcode         TYPE       gui_code VALUE 'SELI'.                           "Function code
    Clear Workarea
      CLEAR :lw_tax_tab.
      lw_tax_tab-fcode = lc_fcode.
      append lw_tax_tab to lw_excpt_tab.
      set pf-status lc_pfstat of program lc_prog excluding lw_excpt_tab.
    endform.                               "PF_STATUS_SET_SHOW_LIST
    **&      Form  procBuildFieldcat
          text
    -->  p1        text
    <--  p2        text
    form procBuildFieldcat .
    Constants
      CONSTANTS :
            lc_co_code          TYPE    amert VALUE 'ZBUKRS',                             "Company code
            lc_vendor           TYPE    amert VALUE 'ZLIFNR',                             "Vendor
            lc_docu_no          TYPE    amert VALUE 'ZBELNR',                             "Document Number
            lc_user             TYPE    amert VALUE 'ZUSERCH',                            "User
            lc_date             TYPE    amert VALUE 'ZDATE_CHANGE',                       "Date
            lc_time             TYPE    amert VALUE 'ZTIME_CHANGE',                       "Time
            lc_taxno            TYPE    amert VALUE 'ZSTCD1',                             "Tax Number
            lc_exception_typ    TYPE    amert VALUE 'ZEXCTYPE',                           "Exception type
            lc_clearing_dt      TYPE    amert VALUE 'ZAUGDT_OTHER',                       "Clearing date
            lc_period           TYPE    amert VALUE 'ZMONAT',                             "Period
            lc_gross_amt        TYPE    amert VALUE 'ZDMBTR',                             "Gross amount
            lc_excpt_amt        TYPE    amert VALUE 'ZWHTINSSCA'.                         "Exception amount
    Set the Fieldtext for the Dictionary fields
      LOOP AT gt_fieldcat.
        gt_fieldcat-key = space.
        CASE gt_fieldcat-fieldname.
          WHEN lc_period.
            gt_fieldcat-seltext_l = text-007.
            MODIFY gt_fieldcat.
          WHEN lc_co_code.
            gt_fieldcat-seltext_l = text-008.
            MODIFY gt_fieldcat.
          WHEN lc_vendor.
            gt_fieldcat-seltext_l = text-009.
            MODIFY gt_fieldcat.
          WHEN lc_exception_typ.
            gt_fieldcat-seltext_l = text-010.
            MODIFY gt_fieldcat.
          WHEN lc_taxno.
            gt_fieldcat-seltext_l = text-011.
            MODIFY gt_fieldcat.
          WHEN lc_clearing_dt.
            gt_fieldcat-seltext_l = text-012.
            MODIFY gt_fieldcat.
          WHEN lc_docu_no.
            gt_fieldcat-seltext_l = text-013.
            MODIFY gt_fieldcat.
          WHEN lc_gross_amt.
            gt_fieldcat-seltext_l = text-014.
            gt_fieldcat-outputlen = 12.
            MODIFY gt_fieldcat.
          WHEN lc_excpt_amt.
            gt_fieldcat-seltext_l = text-015.
            MODIFY gt_fieldcat.
          WHEN lc_user.
            gt_fieldcat-seltext_l = text-016.
            MODIFY gt_fieldcat.
          WHEN lc_date.
            gt_fieldcat-seltext_l = text-017.
            MODIFY gt_fieldcat.
          WHEN lc_time.
            gt_fieldcat-seltext_l = text-018.
            MODIFY gt_fieldcat.
        ENDCASE.
      ENDLOOP.
    endform.                    " procBuildFieldcat
    *&      Form  procWarnuser
          Warn User - Give error message
         -->P_TEXT      text
         -->P_TEXT      text
         -->P_lw_tax_excpt_VALUE  text
    FORM procWarnuser  USING    uv_title TYPE itex132
                                uv_text1 TYPE itex132.
    Constants
      CONSTANTS :
            lc_start_column       TYPE    SY-CUCOL VALUE 25,                             "Start column
            lc_start_row          TYPE    SY-CUROW VALUE 15.                             "Start row

  • Issue Related to Module pool

    Hi,
    I have issue related to module pool Prog.
    Actually i have one screen[Dialog] in that i am having one field <b>License No</b> as input enabled.
    In that <b>License No</b> field when i press <b>F4</b>
    i am using one Function module called <b>REUSE_ALV_POPUP_TO_SELECT</b> to populate some fields in it.
    In <b>SE51</b> i called that code as below.
    <b>PROCESS ON VALUE-REQUEST.
      FIELD v_zzexgen MODULE f4_help_for_zzexgen.</b>
    Now when i select one row/record from all the populated records it is filling only value into <b>License No[v_zzexgen]</b> , There in the same screen i am not able  to get the values for other fields like <b>v_modco,v_gennr</b> etc..
    Though they are in populated screen.
    Actually after calling <b>POPUP</b> F.M i had written follow code:
        READ TABLE i_pdata INDEX k_selfield-tabindex.
    <b>    IF sy-subrc EQ 0.
    Then move all the fields of selected record into 9002 screen
          v_zzexgen  = i_pdata-zzexgen.
          v_zzgeart  = i_pdata-zzgeart.
          v_modco    = i_data-modco.
          v_zzgmaxw  = i_pdata-orgamt.
          v_zzgaufw  = i_pdata-conamt.
        ENDIF.</b>
    Can anybody tell me what is the issue out here for not filling other fields.
    What is the reason for populating only one field when i am getting other field values also to be populated!
    Thanks in advance.
    Thanks & Regards,
    Rayeez.

    call function <b>'DYNP_GET_STEPL'</b>
                importing
                  povstepl        = step_line
                exceptions
                  stepl_not_found = 1
                  others          = 2.
              clear: ltab_fields.
              refresh : ltab_fields.
              ltab_fields-fieldname  = 'ZMM_TABLE-TABNAME'.
              ltab_fields-fieldvalue = t_f4_table-tabname.
              ltab_fields-stepl = step_line.
              append ltab_fields.
              ltab_fields-fieldname  = 'ZMM_TABLE-FLDNAME'.
              ltab_fields-fieldvalue = t_f4_table-fieldname.
             <b> ltab_fields-stepl = step_line.</b>   
              append ltab_fields.
              ltab_fields-fieldname  = 'ZMM_TABLE-VALUE'.
              ltab_fields-fieldvalue = t_f4_table-fieldtext.
              ltab_fields-stepl = step_line.
              append ltab_fields.
              call function <b>'DYNP_VALUES_UPDATE'</b>
                exporting
                  dyname     = lc_dyname
                  dynumb     = lc_dynumb
                tables
                  dynpfields = ltab_fields
                exceptions
                  others     = 8.
              commit work and wait.
    OR u have to use<b> SET PARAMETERS ID</b>
    IN <b>PAI</b>
    regards
    vinod

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • 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

  • Error while transporting modification in module pool of a specific infotype

    HI experts,
    While transporting some modifications that have be done on the PAI of a module pool of a specific infotype, we have an error with code return = 8, the error is --> Original object R3TRPROGMP900730 must not be changed!!!
    Any suggestion .
    Tanhks a lot .

    Hi ,
    Nice to know that your problem is solved. If any of the replies were usefull please acknowledge their work.
    And it would be great if you can just put in your remarks about the best  solution you had in solving that problem.
    It might be useful to other users when they encoutner such problem.
    BR,
    Vijay.

  • Getting error while calling a subscreen in  module pool program

    HI  ALL,
                         ACTUALLY I'M GETTING A SYNTAX ERROR WHILE I'M CALLING A SUBSCREEN
                       IN A MODULE POOL PROGRAM IN PAI MODULE
                       THE ERROR IS AS FOLLOW
                           "." or "ID ... FIELD ..." expected after "SUBSCREEN"
                        CAN ANYBODY PLS HELP ME.
    REGARDS
    ANDREWS

    HI MAX ,
                      THE CODE IS AS FOLLOWS:
    *& Report  ZTABSTRIP_PS
    REPORT  ZTABSTRIP_PS.
    type-pools : vrm.
    DATA:number1 type I,
         number2 type I,
         result  type I,
         ok_code like SY-UCOMM,
         employee1 type c,
         ABAP(19)    type c,
         SALES(19)  type c,
         HR(19)      type c,
         MM(19)     type  c,
    employee type c.
        emp type c.
    CONTROLS  tabstrip TYPE TABSTRIP.
    CALL SCREEN 100.
    call screen 110.
    call screen 130.
    call screen 120.
    call screen  140.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'STATUS'.
      SET TITLEBAR 'TITLE'.
      CASE OK_CODE.
        WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program.
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
       WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
      when 'TAB1'.
    tabstrip-activetab = 'TAB1'.
       when 'TAB2'.
    tabstrip-activetab = 'TAB2'.
    result = number1 + number2.
       when 'TAB3'.
      tabstrip-activetab = 'TAB3'.
    SET TITLEBAR 'TITLE1'.
      when 'TAB4'.
        tabstrip-activetab = 'TAB4'.
       if employee = 'NEERAJ'.
         ABAP = 'NEERAJ'.
       elseif employee = 'UMESH'.
         SALES = 'UMESH'.
       ELSEIF employee = 'RAM'.
         HR = 'RAM'.
       elseif employee = 'ANIL'.
         MM = 'ANIL'.
         endif.
       employee = employee.
    WHEN 'BACK'.
        leave PROGRAM.
    when  'EXIT' or 'DELETE'.
        leave to screen 0.
        WHEN 'SAVE'.
          MESSAGE 'please choose a valid function' TYPE 'I'.
    ENDCASE.
       WHEN 'BACK' or 'EXIT' or 'DELETE'.
         leave program .
         WHEN 'SAVE'.
           MESSAGE 'please choose a valid function' TYPE 'I'.
    endcase.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0110  OUTPUT
          text
    **MODULE STATUS_0110 OUTPUT.
    SET PF-STATUS 'STATUS1'.
    SET TITLEBAR 'xxx'.
    **case ok_code.
    **WHEN 'back' or 'exit' or 'delete'.
        leave PROGRAM.
        WHEN 'save'.
          MESSAGE 'please choose a valid function ' TYPE 'W'.
    ENDCASE.
    **ENDMODULE.                 " STATUS_0110  OUTPUT
    *&      Module  USER_COMMAND_0110  INPUT
          text
    MODULE USER_COMMAND_0110 INPUT.
      number1 = number1.
      number2 = number2.
    CLEAR NUMBER1.
    CLEAR NUMBER2.
    REFRESH NUMBER1.
    REFRESH NUMBER2.
    ENDMODULE.                 " USER_COMMAND_0110  INPUT
    *&      Module  STATUS_0130  OUTPUT
          text
    MODULE STATUS_0130 OUTPUT.
    SET PF-STATUS 'STATUS2'.
    SET TITLEBAR 'xxx'.
    RESULT = number1 + number2.
    *CLEAR RESULT.
    REFRESH RESULT.
    ENDMODULE.                 " STATUS_0130  OUTPUT
    *&      Module  STATUS_0120  OUTPUT
          text
    MODULE STATUS_0120 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    DATA:  l_name TYPE vrm_id,
            li_list TYPE vrm_values,
            l_value LIKE LINE OF li_list.
      l_value-key = '1'.
      l_value-text = 'ANIL'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '2'.
      l_value-text = 'RAM'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '3'.
      l_value-text = 'NEERAJ'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
      l_value-key = '4'.
      l_value-text = 'UMESH'.
      APPEND l_value TO li_list.
      CLEAR l_value.
    CLEAR li_list.
    l_name =  'employee'.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID                    =  l_name
          VALUES                =  li_list
       EXCEPTIONS
         ID_ILLEGAL_NAME       = 1
         OTHERS                = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CLEAR li_list.
    ENDMODULE.                 " STATUS_0120  OUTPUT
    *&      Module  USER_COMMAND_0120  INPUT
          text
    MODULE USER_COMMAND_0120 INPUT.
    INCLUDING sy-repid '140'.
    employee1 = employee.
    IF employee1 CS 'NEERAJ'.
      call SUBSCREEN    sub4  .
      ABAP = 'NEERAJ'.
      CLEAR ABAP.
    ELSEIF employee1 CS 'UMESH'.
       call SUBSCREEN  sub4  .
        SALES = 'UMESH'.
        CLEAR SALES.
    elseif employee1 CS 'RAM'.
      call SUBSCREEN sub4 .
       HR = 'RAM'.
       CLEAR  HR.
    ELSEIF employee1 CS 'ANIL'.
       call SUBSCREEN sub4 .
       MM = 'ANIL'.
       CLEAR MM.
       endif.
    ENDMODULE.                 " USER_COMMAND_0120  INPUT
    *&      Module  STATUS_0140  OUTPUT
          text
    MODULE STATUS_0140 OUTPUT.
    *CASE OK_CODE.
       WHEN employee1  'NEERAJ'.
         screen-active = 1.
         ABAP = 'NEERAJ'.
       WHEN employee1 = 'UMESH'.
         screen-active = 1.
         SALES = 'UMESH'.
       WHEN employee1 = 'RAM'.
         screen-active = 1.
         HR = 'RAM'.
       WHEN employee1 = 'ANIL'.
         screen-active = 1.
         MM = 'ANIL'.
         endif.
    *ENDCASE.
    ENDMODULE.                 " STATUS_0140  OUTPUT

  • Module pool - table control - update ztable

    hello , i doing a module pool that will have few screens , now i have one screen with a table control that fetch the data from a ztable when screen is call the table control is showing the data and is in grey and no editable i add a pf-status for change that mode i can delete the row from the table control but i don't figure out how update to the ztable when i press save , i wan't too another button for add a new row ( and remain the already in grey ) for add new entrie in the table and update the ztable
    pd: sorry for my bad english
    this is my code:
    TOP:
    PROGRAM  z_pp_lote_etiquetas MESSAGE-ID zz.
    TABLES:zc2p_lote_etique,
           zc2p_lider_modul.
    DATA: ok_code LIKE sy-ucomm.
    DATA save_ok LIKE sy-ucomm.
    * internal table
    DATA: it_zc2p_lote_etique LIKE STANDARD TABLE OF zc2p_lote_etique.
    DATA: it_zc2p_lider_modul TYPE STANDARD TABLE OF zc2p_lider_modul WITH HEADER LINE.
    DATA: it_zc2p_lider_modul_del TYPE STANDARD TABLE OF zc2p_lider_modul WITH HEADER LINE.
    **************Workarea
    DATA: wa_c2p_lote_etique TYPE zc2p_lote_etique.
    DATA: wa_c2p_lider_modul TYPE zc2p_lider_modul.
    DATA: wa_c2p_lider_modul_del TYPE zc2p_lider_modul.
    DATA: sel.
    DATA: MARK.
    DATA: init.
    DATA:  col TYPE scxtab_column.
    DATA: lines TYPE i.
    * Variable Declaration
    DATA : flg, "Flag to set the change mode
    ln TYPE i. "No. of records
    * Table Control Declartion.
    CONTROLS: zc2p_lider_crtl TYPE TABLEVIEW USING SCREEN '101'.
    **PROCESS BEFORE OUTPUT INCLUDE **
    *&  Include           Z_PP_LOTE_ETIQUETAS_O01
    *& Module set_status OUTPUT
    * Setting the GUI status
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'Z_PP_LOT_ETIQ_MENU'.
      SET TITLEBAR 'Z_PP_LOT_ETIQ'.
    ENDMODULE. " set_status OUTPUT screen 100
    *  MODULE status_0101 OUTPUT
    * Setting the GUI status
    MODULE status_0101 OUTPUT.
      SET PF-STATUS 'Z_PP_LOT_ETIQ_ME_101'.
      SET TITLEBAR 'Z_PP_LOT_ETIQ'.
    * Data retreving
      if init is INITIAL.
      select * from zc2p_lider_modul into CORRESPONDING FIELDS OF TABLE it_zc2p_lider_modul.
        DESCRIBE TABLE it_zc2p_lider_modul LINES ln.
        zc2p_lider_crtl-lines = ln + 10.
        init = 'X'.
    endif.
    ENDMODULE.                    "status_0101 OUTPUT
    module change_sdyn_conn output.
    * you can change the content of current table control line via
    * sdyn_conn
      READ TABLE it_zc2p_lider_modul INTO zc2p_lider_modul INDEX zc2p_lider_crtl-current_line.
    endmodule.                             " FILL_TABLE_CONTROL  OUTPUT
    MODULE set_screen_fields OUTPUT.
    LOOP AT SCREEN.
    IF flg IS INITIAL.
    screen-input = 0.
    ELSE.
    screen-input = 1.
    ENDIF.
    *ENDIF.
    * Modifying the screen after making changes
    MODIFY SCREEN.
    ENDLOOP.
    ENDMODULE. " set_screen_fields OUTPUT
    PROCESS AFTER INPUT INCLUDE.
    *  MODULE USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'LIDM'.
          CALL SCREEN 101.
        WHEN 'CANC'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                    "USER_COMMAND_0100 INPUT
    *  MODULE USER_COMMAND_0101 INPUT
    MODULE user_command_0101 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'SORT'.
          DATA: fldname(100),help(100).
          READ TABLE zc2p_lider_crtl-cols INTO col WITH KEY selected = 'X'.
          SPLIT col-screen-name AT '-' INTO help fldname.
          SORT it_zc2p_lider_modul BY (fldname).
        WHEN 'CHANGE'.
    * Setting the flag to make the table control in editable mode[excluding
    * primary key].
          flg = 'Y'.
        WHEN 'BACK'.
          CALL SCREEN 100.
          LEAVE SCREEN.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'SAVE'.
          MODIFY  zc2p_lider_modul FROM it_zc2p_lider_modul.
          COMMIT WORK.
      ENDCASE.
    ENDMODULE.                    "USER_COMMAND_0101 INPUT
    *  MODULE read_table_control INPUT
    MODULE read_table_control INPUT.
    * Check input values
      IF mark = 'X' AND save_ok = 'DELETE'.
        DELETE TABLE it_zc2p_lider_modul FROM zc2p_lider_modul.
        DESCRIBE TABLE it_zc2p_lider_modul LINES zc2p_lider_crtl-lines.
      ENDIF.
    ENDMODULE.                             " READ_TABLE_CONTROL  INPUT
    Screen Flow Logic 100
    PROCESS BEFORE OUTPUT.
    MODULE status_0100.
    PROCESS AFTER INPUT.
    MODULE user_command_0100.
    Screen Flow Logic 101.
    PROCESS BEFORE OUTPUT.
      MODULE status_0101.
      LOOP AT it_zc2p_lider_modul INTO zc2p_lider_modul WITH CONTROL
    zc2p_lider_crtl.
    * Dynamic screen modifications
        MODULE set_screen_fields.
        MODULE change_sdyn_conn.
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_0101.
      LOOP AT it_zc2p_lider_modul.
        MODULE read_table_control.
      ENDLOOP.
    i hope somebody can help for what i missing here  thanks

    >
    Sanjeev Kumar wrote:
    > Hello Edgar,
    >
    > Problem seems to be there in the flow logic of 101
    >
    >
    > PROCESS BEFORE OUTPUT.
    >   MODULE status_0101.
    >   LOOP AT it_zc2p_lider_modul INTO zc2p_lider_modul WITH CONTROL
    > zc2p_lider_crtl. " no need to have 'INTO zc2p_lider_modul' above
    > * Dynamic screen modifications
    >     MODULE set_screen_fields.
    >     MODULE change_sdyn_conn.
    >   ENDLOOP.
    > *
    > PROCESS AFTER INPUT.
    >   MODULE user_command_0101. "this should be shifted after the following LOOP...ENDLOOP.

    >   LOOP AT it_zc2p_lider_modul. "need to have 'WITH CONTROL zc2p_lider_crtl' here
    >     MODULE read_table_control.
    >   ENDLOOP.
    >
    >
    >
    > With MODULE user_command_0101 call before the LOOP calls the MODIFY statement (under case save_ok 'SAVE') first and Z-table is updated with the old values as the changes are transferred from screen into the internal table it_zc2p_lider_modul in the LOOP...ENDLOOP later.
    >
    > Try these changes and I hope it will work.
    >
    > Thanks
    > Sanjeev
    i do the firts advice but the second one i get syntax error :
    my code :
    PROCESS AFTER INPUT.
      LOOP  at it_zc2p_lider_modul WITH CONTROL zc2p_lider_crtl.
        MODULE read_table_control.
      ENDLOOP.
       MODULE user_command_0101.
    error :
    In the event PROCESS AFTER INPUT, no additions are allowed with "LOOP     
    AT".

  • Can we use Initilization event in module pool program?

    Hi All,
    Can we use Initialization event in module pool program? If not why?
    Thanks In Advance!!!!!!!!!

    The runtime environment creates the INITIALIZATION event and calls the corresponding event block (if it has been defined in the ABAP program).
    http://help.sap.com/saphelp_nw70/helpdata/EN/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    SEE THE ABOVE LINK...THINK IT WILL SOLVE ALL YOUR DOUBTS
    REGARDS
    RACHEL

  • Module Pool - Table Control - Data not getting displayed in Control

    Hi,
    I have a table contol in my module pool program. In my processing I am filling an internal table & then in my PBO I am linking the internal table to table control. The issue is that even though the internal table is getting filled correctly (found through debugging), the data is not getting populated in table control. Nothing is populated on screen. I am writing part of code below
    Declaration:
    Types: begin of ty_control,
            SELECTED TYPE C,
            TEXT TYPE DPR_CAUSE_T-TEXT,
          end of ty_control.
    CONTROLS :  TBL_CONT TYPE TABLEVIEW USING SCREEN '9001'.
    DATA:       lt_table_cont type TABLE OF ty_control with header line.
    Fields in TBL_CONT:
       TBL_CONT-SELECTED
      TBL_CONT-TEXT
    PBO Flow Logic:
      MODULE STATUS_9001.
    MODULE fill_data.
      LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
      ENDLOOP.
    PAI Flow Logic:
    Loop at lt_table_cont.
       MODULE UPDATE_DATA.
    endloop.
    MODULE USER_COMMAND_9001.
    PLZ let me know what might be the problem. I have been trying to figure out but cant.
    Thanks.

    Hi Sonali,
               When ever you need to do anything with the table control, i mean if u want to display data in table control or you want to validate the data entered in table control Should be done within Loop and Endloop.(PBO or PAI's which ever is appropriate)
    Here the data is not bieng displayed in ur table control because you have not used the MODULE fill_data  between
    LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
    ENDLOOP.
    so do it like this
    LOOP AT lt_table_cont WITH CONTROL TBL_CONT cursor TBL_CONT-top_line.
    MODULE fill_data 
    ENDLOOP.
    this will solve your problem.
    Regards,
    Syed

  • Text elements in module pool

    Hi,
    How can we print Descriptions and other text as text lable in module pool????
    Thx,
    Shashi.

    Hi,
    IF you want text for box heading in moodule pool...
    than just double click on that box and write for lable in text part of attribute window.
    <REMOVED BY MODERATOR>
    Gaurav J.
    Edited by: Alvaro Tejada Galindo on Aug 15, 2008 3:46 PM

  • Edit a field in ALV tree in a subscreen of a module pool

    Hi
    I want to make a field editable in the ALV tree based on some condtions in a subscreen of a module pool.  I used the edit = 'X' field in the fieldcatalog still it  is showing the field as display and not edit.
    Please help me to get the field as editable and save it to the database table.
    Please not this is ALV TREE
    Regards,
    Mozila

    Hi Mayank,
    Thanks for the reply
    I am using oops method.
    I tried making the field which is to be made editable  as wa_fieldcatalog-edit = 'X'. But its not working. I didnt get you when you said  edit in layout object.
    I also went through the demo programs but these programs are not having editable fields.
    My code is as follows:
    IF tree4 IS INITIAL.
    * create container for alv-tree
      l_tree_container_name = 'TREE4'.
      CREATE OBJECT l_custom_container
        EXPORTING
          container_name              = l_tree_container_name
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          lifetime_dynpro_dynpro_link = 5.
    * create tree control
      CREATE OBJECT tree4
        EXPORTING
          i_parent                    = l_custom_container
          i_node_selection_mode       = cl_gui_column_tree=>node_sel_mode_multiple
          i_item_selection            = 'X'
          i_no_html_header            = 'X'
          i_no_toolbar                = 'X'
        EXCEPTIONS
          cntl_error                  = 1
          cntl_system_error           = 2
          create_error                = 3
          lifetime_error              = 4
          illegal_node_selection_mode = 5
          failed                      = 6
          illegal_column_name         = 7.
    * create hierarchy
      CALL METHOD tree4->set_table_for_first_display
        EXPORTING
          is_layout       = s_layo
        CHANGING
          it_sort         = it_sort
          it_outtab       = it_final
          it_fieldcatalog = it_fieldcat.
    ELSE.
      CALL METHOD tree4->refresh_table_display
        EXPORTING
          it_sort           = it_sort
        EXCEPTIONS
          program_error     = 1
          failed            = 2
          cntl_system_error = 3
          others            = 4
      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.

  • Remove field in Alv grid module pool

    Hi Experts,
    I have a requirement where in I need to remove a field on the display screen for a particular record.
    In detail..
    I have a created a module pool program where in the final out put was shown using CL_gui_alv_grid on the new screen.The normal display will start with a check box(editable),kunnr,ktokd etc..The requirement is for a particular record the check box should either disappear or disable.Please help me out in achieving this.Thanks in advance.
    Initially I got very good response from Neha and Satya and felt very confident enough in the fix but I dont know where I am doing wrong the issue is not yet fixed.Satya or Neha can you tell me where am I doing wrong seeing the below code.
    types:BEGIN OF lty_final,
          chbox       TYPE char1,
          org_nam     TYPE name1_gp,
          vkorg       TYPE vkorg,
          parvw       TYPE parvw,
          ktokd       TYPE ktokd,
          kunnr       TYPE kunnr,
          pr_cnt      TYPE char3,
          fir_nam     TYPE name1_gp,
          las_nam     TYPE name1_gp,
          parau       TYPE parau,
          telf1       TYPE telf1,
          STYLE       TYPE lvc_t_styl,        " New field added in the structure
         END OF lty_final.
    data:lt_final type table of lty_final,
           ls_final type lty_final.
    DATA : ls_stylerow TYPE lvc_s_styl ,
           lt_styletab TYPE lvc_t_styl .
    loop at lt_final into ls_final.          """Final internal table
        if ls_final-pr_cnt = lc_yes.
          ls_stylerow-FIELDNAME = 'CHBOX'.
          ls_stylerow-STYLE     = cl_gui_alv_grid=>mc_style_disabled .
          APPEND ls_stylerow TO lt_styletab.
          CLEAR ls_stylerow.
          ls_final-STYLE = LT_STYLETAB.
          MODIFY lt_final INDEX sy-tabix FROM ls_final TRANSPORTING style.
        endif.
      endloop.
    gs_layout-zebra        = 'X'.
      gs_layout-edit         = ' '.
      gs_layout-no_rowmark   = 'X'.
      gs_layout-stylefname   = 'LT_STYLETAB'.
      CALL METHOD grid_display->set_table_for_first_display
        EXPORTING
          i_save                        = 'X'
          i_default                     = 'X'
          is_layout                     = gs_layout
        CHANGING
          it_outtab                     = lt_final
          it_fieldcatalog               = gt_fieldcat
        EXCEPTIONS
          invalid_parameter_combination = 1
          program_error                 = 2
          too_many_lines                = 3
          OTHERS                        = 4.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    With Regards,
    Srini...

    Use the following codes in loop it will work.
    Loop at lt_final into ls_final. """Final internal table
    if ls_final-pr_cnt = lc_yes.
    ls_stylerow-FIELDNAME = 'CHBOX'.
    ls_stylerow-STYLE = cl_gui_alv_grid=>mc_style_disabled .
    INSERT ls_stylerow  INTO TABLE lt_final-STYLE.                         " use insert
    *APPEND ls_stylerow TO lt_styletab.
    *CLEAR ls_stylerow.
    *ls_final-STYLE = LT_STYLETAB.
    *MODIFY lt_final INDEX sy-tabix FROM ls_final TRANSPORTING style.
    endif.
    endloop.
    Regards,
    Gurpreet

  • Regarding selection-screen in module pool

    hi
    experts,
    i am having doubt in module pool programing...
      i want create selection screen(pop screen with field)  in modulepool., before the display screeen deatils
    ex :   if i want display the   record   details  for  that particular
    record number.......
    while  i am click on display..
      pop-up-selection screen will come  with record number field..
    i f enter the record no, display s the  details...
    Ananand

    Please see Rich's answer here:
    [Dialog programming - How to place a select-option field in a dialog screen;
    Rob

  • Input must bein module pool and the output should be in ALV report

    Dear Friends,
    Greetings.....................
    Please give me solution for my problem.
    Consider there is one module pool screen with the fields empno, edob, ecity.There is one search button.if the user clicks the search button.it should display the employee details based on empno and output must be in ALV reports.
    Thanks in advance
    Raj

    Hi,
    Try to use
    call function 'REUSE_ALV_POPUP_TO_SELECT'
           exporting
                i_title               = text-021
                i_zebra               = 'X'
                i_tabname             = 'P_YSIZE1'
                it_fieldcat           = p_fieldcat[]
                it_excluding          = p_excltab[]
                i_screen_start_column = 02
                i_screen_start_line   = 02
                i_screen_end_column   = 45
                i_screen_end_line     = 15
           importing
                e_exit                = p_exit
                es_selfield           = p_selfield
           tables
                t_outtab              = p_ysize1.

Maybe you are looking for

  • Top Of Page in MB5B.

    Dear Sir/Madam, There is a requirement from one of our customers that they want their Company name as well as the address to be printed at the top of the page in the standard transaction MB5B (Which displays the report for Stock on Posting date). Is

  • HELP needed to write a function returning 1 record from join tables

    Hi, I would like to have some help to write a function so It can return 1 result. I post my question in the APEX Express sextion but I think it's belong here. Mount Points and Home Directory Also, can I move a thread in another forum? thanks Roseline

  • SVG Pie Chart drill down report

    I have created a svg pie chart report within a chart region. the chart contains url drill down. The urls work fine but it opens the result from the url in the same chart region on the same page. How can I get it to open on either a new page altogethe

  • PLEASE HELP! THIS IS URGENT! CAN'T INSTALL PRO AS IT SAYS DO NOT MEET MINIMUM SYSTEM REQUIREMENTS!

    I have a Macbook 10.6.8 and have AE CS5.5 installed already but when installing Premiere Pro it says cannot meet system requirements. At first I started to download and everything seemed ok until I put 2 nd disk in and then it just crashed. I cannot

  • Windows not retaining settings after 10.4.11 update

    Hello everyone, I just updated my PowerBook G4/667 Titanium to Mac OS X 10.4.11 (from 10.4.1) and everything is working fine but there is one annoying problem. Every time I restart, when I open some of the windows on my computer, they do not retain t