Process on value request for table control

I have 10 rows in a table control,when a F4 for
a particular column in a row is called,process on value request is called here i call a customized F4 based on the structure mapped to the row,but unfortunaletly unlike the screen the mapped structure is not populated,so is
there a way of getting the structure mapped to the row.

Hi Kaushik
As I guess solution would be reading the row into the structure which the F4 screen uses.
<u><b>e.g.</b></u>
GET CURSOR LINE lv_linno .
lv_linno = lv_linno + <table_control_name>-top_line - 1 .
READ TABLE <itab> INTO <screen_structure> INDEX lv_linno.
If this is not the case, then posting your POV coding will be better to analyze your code.
*--Serdar

Similar Messages

  • PROCESS ON VALUE-REQUEST - my table to display

    Hi all,
    this is my question:
    on value request i want to display a window with my personal values of an internal table and  choose one of them (like an help).
    field11 | field11 | field13
    field21 | field22 | field23
    field31 | field32 | field33
    field41 | field42 | field43
    How to do this?
    thanks a lot
    Regards.
    Massimo

    hI,
    refer this sample e.g.:
    F4 help – using internal table example:
    DATA: BEGIN OF LI_FABGRP OCCURS 0,
    FABGRP LIKE ZAPO_FABGRP-FABGRP,
    BEGDA LIKE ZAPO_FABGRP-BEGDA,
    END OF LI_FABGRP.
    DATA : T_RETURN TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE,
    L_RETFIELD TYPE DFIES-FIELDNAME.
    parameters : S_FABGR like ZAPO_FABGRP-FABGRP.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_FABGR.
    SELECT FABGRP BEGDA FROM ZAPO_FABGRP INTO table LI_FABGRP.
    SORT LI_FABGRP BY FABGRP ASCENDING BEGDA DESCENDING.
    * Henter de mulige fabriksgrupper med nyeste BEGDA *indenfor hver
    DELETE ADJACENT DUPLICATES FROM LI_FABGRP COMPARING FABGRP.
    L_RETFIELD = 'FABGRP'.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = L_RETFIELD
    DYNPPROG = SY-REPID
    DYNPNR = '1000'
    DYNPROFIELD = 'S_FABGR'
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    TABLES
    VALUE_TAB = LI_FABGRP
    RETURN_TAB = T_RETURN
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3.
    Jogdand M B

  • I want an example for event Process on Value-request in Module Pool

    Hi,
      I need to populate f4 values for a field in module pool program under POV event.
      Can anyone send me the sample code.
      Helpful answers will be rewarded .
      Thanks and Regards
      Aditya

    Hi
    For F4 Values on Screen:
    PROCESS ON VALUE_REQUEST
    using module call starting with FIELD i.e FIELD field MODULE module
    There are number of function modules that can be used for the purpose, but these
    can fullfill the task easily or combination of them.
    DYNP_VALUE_READ
    F4IF_FIELD_VALUE_REQUEST
    F4IF_INT_TABLE_VALUE_REQUEST
    POPUP_WITH_TABLE_DISPLAY
    DYNP_VALUE_READ
    This function module is used to read values in the screen fields. Use of this
    FM causes forced transfer of data from screen fields to ABAP fields.
    There are 3 exporting parameters
    DYNAME = program name = SY-CPROG
    DYNUMB = Screen number = SY-DYNNR
    TRANSLATE_TO_UPPER = 'X'
    and one importing TABLE parameter
    DYNPFIELDS = Table of TYPE DYNPREAD
    The DYNPFIELDS parameter is used to pass internal table of type DYNPREAD
    to this FM and the values read from the screen will be stored in this table.This
    table consists of two fields:
    FIELDNAME : Used to pass the name of screen field for which the value is to
    be read.
    FIELDVALUE : Used to read the value of the field in the screen.
    e.g.
    DATA: SCREEN_VALUES TYPE TABLE OF DYNPREAD ,
    SCREEN_VALUE LIKE LINE OF SCREEN_VALUES.
    SCREEN_VALUE-FIELDNAME = 'KUNNR' . * Field to be read
    APPEND SCREEN_VALUE TO SCREEN_VALUES. * Fill the table
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    DYNAME = SY-CPROG
    DYNUMB = SY-DYNNR
    TRANSLATE_TO_UPPER = 'X'
    TABLES
    DYNPFIELDS = SCREEN_VALUES.
    READ TABLE SCREEN_VALUES INDEX 1 INTO SCREEN_VALUE.Now the screen value for field KUNNR is in the SCREEN_VALUE-FIELDVALUE and can be used for further processing like using it to fill the internal table to be used as parameter in F4IF_INT_TABLE_VALUE_REQUEST ETC.
    F4IF_FIELD_VALUE_REQUEST
    This FM is used to display value help or input from ABAP dictionary.We have to pass the name of the structure or table(TABNAME) along with the field name(FIELDNAME) . The selection can be returned to the specified screen field if three
    parameters DYNPNR,DYNPPROG,DYNPROFIELD are also specified or to a table if RETRN_TAB is specified.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    TABNAME = table/structure
    FIELDNAME = 'field name'
    DYNPPROG = SY-CPROG
    DYNPNR = SY-DYNR
    DYNPROFIELD = 'screen field'
    IMPORTING
    RETURN_TAB = table of type DYNPREAD
    F4IF_INT_TABLE_VALUE_REQUEST
    This FM is used to dsiplay values stored in an internal table as input
    help.This FM is used to program our own custom help if no such input help
    exists in ABAP dictionary for a particular field. The parameter VALUE_TAB is used to pass the internal table containing input values.The parameter RETFIELD
    is used to specify the internal table field whose value will be returned to the screen field or RETURN_TAB.
    If DYNPNR,DYNPPROG and DYNPROFIELD are specified than the user selection is passed to the screen field specified in the DYNPROFIELD. If RETURN_TAB is specified the selectionis returned in a table.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = field from int table whose value will be returned
    DYNPPROG = SY-CPROG
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'screen field'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = internal table whose values will be shown.
    RETURN_TAB = internal table of type DDSHRETVAL
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 2
    others = 3.
    POPUP_WITH_TABLE_DISPLAY
    This FM is used to display the contents of an internal table in a popup window.The user can select a row and the index of that is returned in the CHOISE
    parameter.The VALUETAB is used to pass the internal table.
    A suitable title can be set using TITLETEXT parameter. The starting and end position of the popup can be specified by the parameters STARTPOS_COL / ROW and ENDPOS_ROW / COL .
    CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
    EXPORTING
    ENDPOS_COL =
    ENDPOS_ROW =
    STARTPOS_COL =
    STARTPOS_ROW =
    TITLETEXT = 'title text'
    IMPORTING
    CHOISE =
    TABLES
    VALUETAB =
    EXCEPTIONS
    BREAK_OFF = 1
    OTHERS = 2.
    e.g.
    DATA: w_choice TYPE SY-TABIX.
    DATA: BEGIN OF i_values OCCURS 0 WITH HEADER LINE,
    values TYPE I,
    END OF i_values.
    PARAMETRS : id TYPE I.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR id
    i_values-values = '0001'.
    APPEND i_values.
    i_values-values = '0002'.
    APPEND i_values.
    i_values-values = '0003'.
    APPEND i_values.
    i_values-values = '0004'.
    APPEND i_values.
    CALL FUNCTION 'POPUP_WITH_TABLE_DISPLAY'
    EXPORTING
    ENDPOS_COL = 40
    ENDPOS_ROW = 12
    STARTPOS_COL = 20
    STARTPOS_ROW = 5
    TITLETEXT = 'Select an ID'
    IMPORTING
    CHOISE = w_choice
    TABLES
    VALUETAB = i_values
    EXCEPTIONS
    BREAK_OFF = 1
    OTHERS = 2.
    CHECK w_choice > 0.
    READ TABLE i_values INDEX w_choice....now we can process the selection as it is contained
    ...in the structure i_values.
    Other FM that may be used to provide input help is HELP_START .
    Reward points if useful
    Regards
    Anji

  • Equivalent for 'process on value-request' in WDA ?

    Hello again,
    i have one more requirement in building a wda-gui for an existing transaction.
    In the flow-logic of the SAPGUI-transaction we have an event 'process on value-request', it is triggered when a user pushes the F4-Button or clicks onto the icon belonging to the InputField.
    I need to have an equivalent in WDA.
    Any ideas / workarounds ? Is perhaps OVS a possible way ?
    Thanks a lot !

    Hi Andreas,
    You can achieve this functionality by specifying the Input help mode property of the attribute to which you are binding your input field. You can choose among the various possibilities as Dictionary Search Help/Object Value Selector/User-Defined Programming. You can even just leave it as Automatic to allow the system take care of the search help to be displayed. No matter which option you use among the above quoted ones you would be able to get your search help. You need to go for OVS only when,
    "Say, for example, the value help should take into account or fill multiple input fields of your view composition. However, the different input fields are related to different value nodes, which in turn refer to different ABAP Dictionary structures. ABAP Dictionary search helps are not able to fulfill this task, since the maximum scope of such a search help is the structure to which it is related. "
    The OVS component offers an interface that can:
    1)  Receive information about which input fields should be displayed on the selection screen,
    2)  Receive information about the initial values of these input fields
    3)  Hand back the user's input into these input fields
    4)  Receive the result from the data retrieval in order to display the list
    5)  Hand back the selected data set to the consumer program
    (The above has been quoted from the SAP's standard guide)
    Regards,
    Uday

  • Copy selected values from a table control into another table control

    hi there,
    as seen in the subject i need to copy selected values from a table control into another table control in the same screen. as i dont know much about table controls i made 2 table controls with the wizard and started to change the code... right now im totally messed up. nothing works anymore and i don't know where to start over.
    i looked up the forums and google, but there is nothing to help me with this problem (or i suck in searching the internet for solutions)
    i have 2 buttons. one to push the selected data from the top table control into the bottom tc and the other button is to push selected data from the bottom tc into the top tc. does somebody has a sample code to do this?

    you're funny
    i still don't get it... can't believe, there is no tutorial or sample code around how to copy multiple selected rows from a tc.
    here's my code, maybe you can tell me exactly were i have to change it:
    tc1 = upper table control
    tc2 = lower table control
    SCREEN 0100:
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE get_nfo. --> gets data from the dictionary table
      MODULE tc1_change_tc_attr.
      LOOP AT   it_roles_tc1
           INTO wa_roles_tc1
           WITH CONTROL tc1
           CURSOR tc1-current_line.
      ENDLOOP.
      MODULE tc2_change_tc_attr.
      LOOP AT   it_roles_tc2
           INTO wa_roles_tc2l
           WITH CONTROL tc2
           CURSOR tc2-current_line.
      ENDLOOP.
    PROCESS AFTER INPUT.
      LOOP AT it_roles_tc1.
        CHAIN.
          FIELD wa_roles_tc1-agr_name.
          FIELD wa_roles_tc1-text.
        ENDCHAIN.
        FIELD wa_roles_tc1-mark
          MODULE tc1_mark ON REQUEST.
      ENDLOOP.
      LOOP AT it_roles_tc2.
        CHAIN.
          FIELD wa_roles_tc2-agr_name.
          FIELD wa_roles_tc2-text.
        ENDCHAIN.
        FIELD wa_roles_tc2-mark
          MODULE tc2_mark ON REQUEST.
      ENDLOOP.
      MODULE ok_code.
      MODULE user_command_0100.
    INCLUDE PAI:
    MODULE tc1_mark INPUT.
      IF tc1-line_sel_mode = 2
      AND wa_roles_tc1-mark = 'X'.
        LOOP AT it_roles_tc1 INTO g_tc1_wa2
          WHERE mark = 'X'.    -
    > big problem here is, that no entry has an 'X' there
          g_tc1_wa2-mark = ''.
          MODIFY it_roles_tc1
            FROM g_tc1_wa2
            TRANSPORTING mark.
        ENDLOOP.
      ENDIF.
      MODIFY it_roles_tc1
        FROM wa_roles_tc1
        INDEX tc1-current_line
        TRANSPORTING mark.
    ENDMODULE.                    "TC1_MARK INPUT
    MODULE tc2_mark INPUT.
      IF tc2-line_sel_mode = 2
      AND wa_roles_tc2-mark = 'X'.
        LOOP AT it_roles_tc2 INTO g_tc2_wa2
          WHERE mark = 'X'.             -
    > same here, it doesn't gets any data
          g_tc2_wa2-mark = ''.
          MODIFY it_roles_tc2
            FROM g_tc2_wa2
            TRANSPORTING mark.
        ENDLOOP.
      ENDIF.
      MODIFY it_roles_tc2
        FROM wa_roles_tc2
        INDEX tc2-current_line
        TRANSPORTING mark.
    ENDMODULE. 
    thx for anybody who can help with this!

  • Process on Value-Request

    hello experts...
    i have a table control that display Item information. I would like to add value-request on vendor text field based on the item.
    Example: Item A have Vendor 1 and Vendor 2 maintain in Source list.
    if i click the value-request for vendor only vendor1 and vendor2 will show, not all the vendor registered in SAP.
    Please help on how can i achieve this
    thank you

    Hi,
    I think you are working with Module-Pool programming....
    So,In Module Pool programing goto the particularScreen Flowlogic tab where u are looping in table control.--> Goto its layout ..In layout -
    >in the Right side u can enter its check table or search help.
    OR
    IN FLOW LOGIC use EVENT PROCESS ON VALUE REQUEST
    Both the solution will work ...
    just try it.
    Affable
    Arbind

  • Regarding process on value request

    I am displaying two column help on pressing f4 but i don't know how to assign those to corresponding screen field in the table control.

    Hi,
    execute this program and check for process on value request.
    REPORT  ZKEERTHI_EX1.
    tables:mara,makt,mseg.
    parameters: p_bukrs type t001-bukrs,
                p_butxt type t001-butxt,
                p_ort01 type t001-ort01,
                p_land1 type t001-land1.
    data: dynfields type table of dynpread with header line.
    data: return type table of ddshretval with header line.
    at selection-screen on value-request for p_bukrs.
      call function 'F4IF_FIELD_VALUE_REQUEST'
           exporting
                tabname           = 'T001'
                fieldname         = 'BUKRS'
                dynpprog          = sy-cprog
                dynpnr            = sy-dynnr
                dynprofield       = 'P_BUKRS'
           tables
                return_tab        = return
           exceptions
                field_not_found   = 1
                no_help_for_field = 2
                inconsistent_help = 3
                no_values_found   = 4
                others            = 5.
      refresh dynfields.
      read table return with key fieldname = 'P_BUKRS'.
    Add it back to the dynpro.
      dynfields-fieldname = return-retfield.
      dynfields-fieldvalue =  return-fieldval.
      append dynfields.
    Get the company code from db and add to dynpro
      data: xt001 type t001.
      clear xt001.
      select single * into xt001
             from t001
            where bukrs = return-fieldval.
      dynfields-fieldname = 'P_BUTXT'.
      dynfields-fieldvalue = xt001-butxt.
      append dynfields.
      dynfields-fieldname = 'P_ORT01'.
      dynfields-fieldvalue = xt001-ort01.
      append dynfields.
      dynfields-fieldname = 'P_LAND1'.
      dynfields-fieldvalue = xt001-land1.
      append dynfields.
    Update the dynpro values.
      call function 'DYNP_VALUES_UPDATE'
           exporting
                dyname     = sy-cprog
                dynumb     = sy-dynnr
           tables
                dynpfields = dynfields
           exceptions
                others     = 8.
    regards,
    keerthi

  • F4 help needed in Process on value-request

    Hi,
    I have two fields on screen: region and its description in a dialog program. I want region description to be populated as soon as I  select F4 help for region. Description field is output only . I want to do it using a module in Process On value-request. Field p_region MODULE GET_REGION_DESCRIPTION.
    Using standard F4 help I can do it. If in my table I assign search help at field level for region. For example :
    Search Help: ZREGION_SHLP.  Selection method: ZREGION. Fields: Region and Description.
    Table name : ZREGION.
    i)   1st Fields:  REGION , Data Element - ZREGN, Domain: ZZREGN ( CHAR2), Value table: ZREGN. Assign Search help at field level instead of data element level.
    ii)   2nd Field: REGION_DESC, Data Element - BEZEI30.
    in program:  DATA: p_region like zregion-region. So if I press F4 help and select one region, description field gets populated.
    I don't want to use standard functionality but want to write code in POV event. If I use F4IF_INT_TABLE_VLUE_REQUEST  function module, I will get all the values associated with the field region. Since I don't know which region user has selected, i  can't populate description. How to get the selected value in POV for that particular field. How can I get the value selected for region and then use DYNP_VALUES_UPDATE function module to update the description field. I tried search help exit event return to return the selected value. How to pass that value in POV module  as you cannot use FORM ENDFORM . inside MODULE ENDMODULE.
    Regards,
    DPM

    1st step is:
    choose screen 2000 for the program using t-code se80.
    at the end of the coding enter the below code:
    process ON VALUE-REQUEST.
    FIELD screen field name module f4_zsearchhelp.
    after typing the code double click on f4_zsearch help.
    it ll ask for includes, Choose as main program.
    then enter the below code after choosing:
    DATA : t_dynpro_value TYPE TABLE OF dynpread,
    v_field_value LIKE LINE OF t_dynpro_value,
    lt_fields TYPE TABLE OF dfies,
    t_return_str TYPE TABLE OF ddshretval,
    w_return_str TYPE ddshretval,
    v_text TYPE char25.
    DATA: t_ty_prov_id TYPE STANDARD TABLE OF ty_prov_id,
    w_ty_prov_id TYPE ty_prov_id.
    CLEAR: t_ty_prov_id], w_ty_prov_id, t_return_str[, w_return_str.
    enter the select query from the description table to get the description for the particular code.
    in this i had mentioned with an example that i m getting description for massg :
    p9001-massg ll have the value and v_text ll have the description.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = 'TY_TAB'
    retfield = 'MASSG'------>returning field
    PVALKEY = ' '
    dynpprog = sy-repid
    dynpnr = sy-dynnr
    dynprofield = 'P9001-ZMASSG'----
    > pass the screen field name
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    value_org = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ''
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    TABLES
    value_tab = t_ty_prov_id
    field_tab = lt_fields
    return_tab = t_return_str
    DYNPFLD_MAPPING =
    EXCEPTIONS
    parameter_error = 1
    no_values_found = 2
    OTHERS = 3.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ TABLE t_return_str INTO w_return_str WITH KEY retfield = 'P9001-ZMASSG'.
    IF sy-subrc IS INITIAL.
    READ TABLE t_ty_prov_id INTO w_ty_prov_id WITH KEY zmassg_desc = w_return_str-fieldval.
    IF sy-subrc eq 0.
    DATA: et_desc(20) TYPE c.
    et_desc = w_ty_agrtx-v_gtext.
    MODIFY SCREEN.
    CLEAR : v_field_value,t_dynpro_value[].
    v_field_value-fieldname = 'P9001-ZMASSG'.
    v_field_value-fieldvalue = w_ty_prov_id-action_resn.
    APPEND v_field_value TO t_dynpro_value .
    CLEAR : v_field_value.
    v_field_value-fieldname = 'V_TEXT'.
    v_field_value-fieldvalue = w_ty_prov_id-zmassg_desc.
    APPEND v_field_value TO t_dynpro_value .
    CLEAR : v_field_value.
    ENDIF .
    ENDIF.
    CALL FUNCTION 'DYNP_VALUES_UPDATE'
    EXPORTING
    dyname = sy-cprog
    dynumb = sy-dynnr
    TABLES
    dynpfields = t_dynpro_value
    EXCEPTIONS
    invalid_abapworkarea = 1
    invalid_dynprofield = 2
    invalid_dynproname = 3
    invalid_dynpronummer = 4
    invalid_request = 5
    no_fielddescription = 6
    undefind_error = 7
    OTHERS = 8.
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    you can add the v_text in layput .
    hope it ll satisfy your requirement.

  • Screen Variant for table control in FB60

    Hi ,
    I need to create variant to show Quantity and Base Unit of Measure columns in the table control which is available at the first screen of FB60 . I tried using the option screen variant - > create variant. i couldnt see the options of colmuns properties for table control on click that small icon available at the right conner. Pls guide.
    Thanks

    In transaction SHD0 you need to create a new variant.
    After that you will be taken into FB60.
    Press Enter as if you are trying to process vendor invoice. It will take you to a screen "Screen values    1100 Program  SAPMF05A"
    There you will have 3 columns Output only, Invisible and Mandatory.
    Select as you want.
    Just try out carefully, you will be able to get the desired result.
    It is very difficult to guide you in details.
    Please let me know if you face any problems.
    Rgds,
    Harmees

  • AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_locat.

    Experts,
    In BW, does anybody have some simple code for when on your selection-screen you have an input parameter for the location of the file you want to upload. In SAP/R3 there use to be "Perform get_local_path" to drill down thru your hard drive to find the file you want to select to upload. I am not sure what to use in BW to execute a drill down process for getting the file in a drop down window.
                 Thank-You!

    Are you trying to browse the local PC or the appliation server. 
    Implement the program above,  give it a try.  When you hit F4, you will get a file open dialog,  selection your file, then click open, this will fill the pathfile into your parameter on the selection screen.  IS this whay you are looking for?
    You don't need to provide anything, but you can if you want.  There are import parameters.
    report zrich_0001.
    data: ifile type filetable.
    data: xfile like line of ifile.
    data: return type i.
    parameters: p_file type localfile.
    at selection-screen on value-request for p_file.
      call method cl_gui_frontend_services=>file_open_dialog
      EXPORTING
    <b>     WINDOW_TITLE            = 'Please choose a file'
    *     DEFAULT_EXTENSION       =
         DEFAULT_FILENAME        = 'Test.xml'
    *    FILE_FILTER             =
         INITIAL_DIRECTORY       = 'C:'
    *    MULTISELECTION          =</b>
        changing
          file_table              = ifile
          rc                      = return.
      read table ifile into xfile index 1.
      p_file = xfile-filename.
    Regards,
    Rich Heilman

  • AT SELECTION-SCREEN ON VALUE-REQUEST FOR

    Experts,
    I have two selection parameters on Selection_Screen as subscreen, as below:
    Custom Selection Screen 1010
    selection-screen begin of screen 1010 as subscreen.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
    SELECT-OPTIONS :
         s_matnr FOR mara-matnr  MODIF ID sc1,     "Material
         s_grid FOR mara-J_3APGNR MODIF ID sc6,    "Grid values   "pkb001
    SELECTION-SCREEN END OF BLOCK b2.
    selection-screen end of screen 1010.
    Now i want to populate  s_grid (Grid value) based on the values enterd for s_matnr  (material ).
    but when i want use:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_grid,  
    I'm not getting the values eneterd in s_matnr..
    is the problem beacuse of subcreen?
    Answers are highly appriciated.
    Thanks.

    Yes that is correct, Once I hit enter key, then only the value for s_matnr populates, but it is not a good Idea to expect the user to hit the enter key. is there any way i can imitate/simulate "enter" key in the program?
    also I'm using the FM:'DYNP_VALUES_READ'  but that is also not getting me any value..
    below is the code I'm using,
    FORM sub_get_grid .
      Refresh: t_mara.
      data: lin type i.
      data: l_dyname type standard table of dynpread,
      w_dynpread type dynpread.
      clear w_dynpread.
      w_dynpread-fieldname = 'S_MATNR'.
      append w_dynpread to l_dyname.
      clear w_dynpread.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = sy-repid
          dynumb     = sy-dynnr
        TABLES
          dynpfields = l_dyname.
    *Do not allow to select more than 1 material at a time.
      SELECT
        MARA~MATNR
        INTO TABLE t_mara
        FROM MARA
        WHERE MARA~MATNR IN s_matnr.
      describe table t_mara LINES lin.
      If lin > 1.
        Refresh: s_matnr.
        MESSAGE i000 WITH text-033.
        LEAVE LIST-PROCESSING.
    *    LEAVE TO SCREEN 100.
      endif.
    ENDFORM.   

  • PAI process on value-request.

    Hi
    In PAI of one of the screens I have module that has to be triggered on value request and show table with possible entries for that screen field (lbl_printer) .
    When transaction is executed the module is not called when i hit icon close to input field (lbl_printer)so I cannot get entry help. I set up break point in the module but I didn't get  in to module " request printer". It looks like program do not recognize this module at all.
    Please advice .
    Krsto  
    process after input.
      module user_command_0105.
    process on value-request.
      field lbl_printer module request_printer.

    FIELD dynp_field MODULE mod [ {ON INPUT}
                                | {ON REQUEST}
                                | {ON *-INPUT}
                                | {ON {CHAIN-INPUT|CHAIN-REQUEST}}
                                | {AT CURSOR-SELECTION}.
    [http://help.sap.com/saphelp_nw73/helpdata/en/4a/3bb5668c412baee10000000a421937/frameset.htm]
    BR,
    Robert

  • PROCESS ON VALUE-REQUEST question..

    Hi, can anyone make a suggestion:
    I have an input field (on screen 200) which can be prompted with F4. When this happens the PROCESS ON VALUE-REQUEST calls a module to bring up a choice window (screen 300). Once the choice is made, a selection statement in screen 300 populates the description field on screen 200. However, while screen 200 shows the new <i>value</i> chosen, the <i>description</i> field still holds the old description. This is only refreshed when the user hits ENTER. I would like the description field to be showing the correct description immediately after the choice was made in the F4 prompt. Hope this make sense.
    (I notice even standard SAP programs have this too - just hit F4 on a choice field in say VD02, the description doesn't change until the next ENTER or button click).

    Hi,
    Providing Input Help (F4 Help)
    Use
    Users of an SAP System can use the F4 key to obtain information about the possible input values for a certain field on the screen.
    Information about the possible values for a field should also be available to those users who are working with the data in the SAP System from an external program, via BAPI calls. For example, the user of a Visual Basic program, which incorporates a BAPI to display or modify data in an SAP System, should have transparent access to the functions of the F4 input help.
    Features
    In order to provide input help, a calling program can use the BAPI HelpValues.GetList(). This method is based on the RFC-enabled function module BAPI_HELPVALUES_GET, which obtains the possible input values for a field that is passed in a BAPI call. For detailed information about the structure and use of the HelpValues.GetList() BAPI, see the documentation on the function module BAPI_HELPVALUES_GET, which implements the Helpvalues.GetList method.
    To determine the possible input values for a field in the check table, the BAPI HelpValues.GetList() uses the elementary search help or the domain fixed values linked to the field in the ABAP Dictionary.
    For this reason, you have to create or specify relevant check tables, elementary search helps (matchcodes) or domain fixed values. Only then can the calling program access the relevant input values for your BAPI fields using the BAPI HelpValues.GetList().
    As of Release 4.5A, you have to specify a foreign key, if a check table has been defined in the domain. Otherwise F4 input help cannot be displayed.
    Authorization Check
    In some cases you will only want to allow only those persons with a specific user profile to access information in F4 input help. To do this you can carry out authorization checks within the BAPI using table BAPIF4T.
    Table BAPIF4T is provided for this purpose. This table comprises the following fields, which you have to fill with the values for your BAPI.
    OBJTYPE (object type)
    The technical name of the SAP business object type, for example, BUS1065.
    METHOD (verb)
    The name of a BAPI for the business object type named above, for example, GetList.
    DTEL (data element)
    The name of a data element for which a possible entry is specified. For example, an elementary input help could be specified for the data element PERNR_D and be protected from unauthorized access.
    FNAM (name of the function module)
    The name of the function module that you have to create and that checks authorizations for the data element. This function module must have the following predefined interface:
    ""Local interface:
    *" IMPORTING
    *" VALUE(OBJTYPE) LIKE BAPIF4F-OBJTYPE
    *" VALUE(METHOD) LIKE BAPIF4F-METHOD
    *" VALUE(DTEL) LIKE BAPIF4F-DTEL
    *" VALUE(SHLPNAME) LIKE BAPIF4F-SHLPNAME
    *" VALUE(TABNAME) LIKE BAPIF4F-TABNAME
    *" EXPORTING
    *" VALUE(RETURN) LIKE BAPIF4F-RETURN
    As the template for your function module you can use the function module BF_BAPI_F4_AUTHORITY which provides exactly this interface. Copy this function module and follow the documentation provided with it.
    The additional parameter SHLPNAME contained in the function module interface provides the name of the active input help for the table or for the data element. The parameter TABNAME contains the name of the value table.
    The return code of the parameter RETURN is:
    'X' if the user of the BAPI is not authorized to call up the valid input values for a field.
    ' ' (no value), if the user of the BAPI is authorized to display the input values for a field.
    During runtime the function module is called dynamically by the BAPI HelpValues.GetList().
    An authorization check can be carried out at business object type, method or data element level:
    To check authorizations at this level…
    ... ......the following fields in table BAPIF4T must be filled.
    Business object type
    OBJTYPE, FNAM
    BAPI
    OBJTYPE, METHOD, FNAM
    Data Element
    OBJTYPE, METHOD, DTEL, FNAM
    Thanks,
    Shankar

  • How to use F4 help in screens(Process on Value-request) ?

    Hi experts,
      Can someone provide me some code which uses Process on Value-request in dialog programming? I have  a requirement of entering a path on a modal dialog box that i have designed and i need to attach the f4_filename function module to it ?Please help...
    Thanks in advance,
    regards
    Ashwin.

    Hi Ashwin,
    Can use the function module HELP_VALUES_GET_NO_DD_NAME.
    Here is the sample code that can help you using this for F4 help.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_field-low.  
      PERFORM F4_HELP.                                
    *&      Form  F4_HELP
    FORM F4_HELP .
      CLEAR   : I_FIELDS1,I_CONTENTS1.
      REFRESH : I_FIELDS1,I_CONTENTS1.
      I_FIELDS1-TABNAME    = 'YHPA0TPROJ'.
      I_FIELDS1-FIELDNAME  = 'YHPPROJ'.
      I_FIELDS1-SELECTFLAG = 'X'.
      APPEND I_FIELDS1.
      CLEAR  I_FIELDS1.
      I_FIELDS1-TABNAME    = 'YHPA0TPROJ'.
      I_FIELDS1-FIELDNAME  = 'YHPPDES'.
      I_FIELDS1-SELECTFLAG = ' '.
      APPEND I_FIELDS1.
      CLEAR  I_FIELDS1.
      SELECT YHPPROJ
             YHPPDES
             FROM YHPA0TPROJ
             INTO TABLE I_CONTENTS1.
      IF NOT I_CONTENTS1[] IS INITIAL.
        CALL FUNCTION 'HELP_VALUES_GET_NO_DD_NAME'
             EXPORTING
                  SELECTFIELD                  = 'YHPPROJ'
             IMPORTING
                  IND                          = V_IND1
             TABLES
                  FIELDS                       = I_FIELDS1
                  FULL_TABLE                   = I_CONTENTS1
             EXCEPTIONS
                  FULL_TABLE_EMPTY             = 1
                  NO_TABLESTRUCTURE_GIVEN      = 2
                  NO_TABLEFIELDS_IN_DICTIONARY = 3
                  MORE_THEN_ONE_SELECTFIELD    = 4
                  NO_SELECTFIELD               = 5
                  OTHERS                       = 6.
        IF SY-SUBRC EQ 0.
          READ TABLE I_CONTENTS1 INDEX V_IND1.
          P_PROJ   = I_CONTENTS1-YHPPROJ.
         P_YHPDES = I_CONTENTS1-YHPPDES.
        ENDIF.
      ELSE.
       MESSAGE I000(YHPA0K) WITH 'No projects available'.
        MESSAGE I519(YHPA0K). " No projects available
        EXIT.
      ENDIF.
    ENDFORM.                   
    Hope this helps you.
    Regards,
    Saumya

  • Unable get the table scroll for table control

    hai
    i unable get horizontal scrolling for table control when the output is dislayed
    help me
    very urgent

    Hi,
    check out the sample program it might help you
    See the following simple ex
    *& Module pool ZTEST_TBLCTRL
    PROGRAM ZTEST_TBLCTRL.
    ***&SPWIZARD: DATA DECLARATION FOR TABLECONTROL 'TC1'
    *&SPWIZARD: DEFINITION OF DDIC-TABLE
    TABLES: ZFG_SRNO, ZFIH0004.
    *&SPWIZARD: TYPE FOR THE DATA OF TABLECONTROL 'TC1'
    *TYPES: BEGIN OF T_TC1,
    ZSRNO LIKE ZFG_SRNO-ZSRNO,
    SCRNAME LIKE ZFIH0004-SCRNAME,
    END OF T_TC1.
    *TYPES: BEGIN OF T_TC1.
    STRUCTURE ZFG_SRNO.
    END OF T_TC1.
    *&SPWIZARD: INTERNAL TABLE FOR TABLECONTROL 'TC1'
    *DATA: G_TC1_ITAB TYPE T_TC1 OCCURS 0 WITH HEADER LINE,
    G_TC1_WA TYPE T_TC1. "work area
    DATA: G_TC1_ITAB LIKE ZFG_SRNO OCCURS 0 WITH HEADER LINE,
    G_TC1_WA LIKE G_TC1_ITAB. "work area
    DATA: G_TC1_COPIED. "copy flag
    *&SPWIZARD: DECLARATION OF TABLECONTROL 'TC1' ITSELF
    CONTROLS: TC1 TYPE TABLEVIEW USING SCREEN 0100.
    *&SPWIZARD: LINES OF TABLECONTROL 'TC1'
    DATA: G_TC1_LINES LIKE SY-LOOPC.
    DATA: OK_CODE LIKE SY-UCOMM,
    S_CODE LIKE SY-UCOMM,
    MARK.
    DATA: T1(10).
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: COPY DDIC-TABLE TO ITAB
    MODULE TC1_INIT OUTPUT.
    IF G_TC1_COPIED IS INITIAL.
    *&SPWIZARD: COPY DDIC-TABLE 'ZFG_SRNO'
    *&SPWIZARD: INTO INTERNAL TABLE 'g_TC1_itab'
    SELECT * FROM ZFG_SRNO
    INTO CORRESPONDING FIELDS
    OF TABLE G_TC1_ITAB.
    G_TC1_COPIED = 'X'.
    REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
    IF T1 <> SPACE.
    G_TC1_ITAB-ZSRNO = T1.
    CLEAR T1.
    APPEND G_TC1_ITAB.
    REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
    ENDIF.
    *TC1-TOP_LINE = 1.
    ENDIF.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MOVE ITAB TO DYNPRO
    MODULE TC1_MOVE OUTPUT.
    MOVE-CORRESPONDING G_TC1_WA TO ZFG_SRNO.
    if sy-subrc ne 0.
    *append G_TC1_WA to G_TC1_ITAB.
    *endif.
    READ TABLE G_TC1_ITAB INDEX TC1-CURRENT_LINE.
    IF SY-SUBRC = 0.
    G_TC1_WA-ZSRNO = G_TC1_ITAB-ZSRNO.
    ENDIF.
    MOVE-CORRESPONDING G_TC1_ITAB TO ZFG_SRNO.
    REFRESH CONTROL 'TC1' FROM SCREEN '8001'.
    *******Below line is the logic for scrolling.
    tc1-lines = G_TC1_LINES + 100.
    ENDMODULE.
    *&SPWIZARD: OUTPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: GET LINES OF TABLECONTROL
    MODULE TC1_GET_LINES OUTPUT.
    G_TC1_LINES = SY-LOOPC.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: MODIFY TABLE
    MODULE TC1_MODIFY INPUT.
    *break-point.
    MOVE-CORRESPONDING ZFG_SRNO TO G_TC1_ITAB.
    MODIFY G_TC1_ITAB INDEX TC1-CURRENT_LINE.
    G_TC1_COPIED = 'X'.
    REFRESH CONTROL 'TC1' FROM SCREEN '8001'.
    MOVE-CORRESPONDING ZFG_SRNO TO G_TC1_WA.
    MODIFY G_TC1_ITAB
    FROM G_TC1_WA
    INDEX TC1-CURRENT_LINE.
    G_TC1_COPIED = 'X'.
    if sy-subrc ne 0.
    append G_TC1_WA to G_TC1_ITAB.
    endif.
    *modify G_TC1_ITAB INDEX TC1-CURRENT_LINE.
    ENDMODULE.
    *&SPWIZARD: INPUT MODULE FOR TC 'TC1'. DO NOT CHANGE THIS LINE!
    *&SPWIZARD: PROCESS USER COMMAND
    MODULE TC1_USER_COMMAND INPUT.
    OK_CODE = SY-UCOMM.
    PERFORM USER_OK_TC USING 'TC1'
    'G_TC1_ITAB'
    'FLAG'
    CHANGING OK_CODE.
    SY-UCOMM = OK_CODE.
    ENDMODULE.
    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 D20XX_INIT OUTPUT
    text
    MODULE D20XX_INIT OUTPUT.
    *if screen-name = 'ZSRNO'.
    SCREEN-INPUT = 0.
    SCREEN-COLOR = 0.
    MODIFY SCREEN.
    endif.
    ENDMODULE. " D20XX_INIT OUTPUT
    *& Module STATUS_0100 OUTPUT
    text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    *CLEAR R1_REF.
    DO 30 TIMES.
    APPEND G_TC1_ITAB.
    ENDDO.
    DESCRIBE TABLE G_TC1_ITAB LINES TC1-LINES.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module TAB1_INIT OUTPUT
    text
    MODULE TAB1_INIT OUTPUT.
    ENDMODULE. " TAB1_INIT OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    text
    MODULE USER_COMMAND_0100 INPUT.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module MESSAGE INPUT
    text
    MODULE MESSAGE INPUT.
    OK_CODE = SY-UCOMM.
    S_CODE = OK_CODE.
    CLEAR OK_CODE.
    if S_CODE = 'DELE'.
    loop at G_TC1_ITAB.
    if G_TC1_ITAB-scrname = 'X'.
    delete g_tc1_itab.
    endif.
    endloop.
    ELSEIF S_CODE = 'SAVE'.
    G_TC1_WA-ZSRNO = T1.
    MOVE-CORRESPONDING G_TC1_WA TO ZFG_SRNO.
    REFRESH CONTROL 'TC1' FROM SCREEN '0100'.
    ENDIF.
    ENDMODULE. " MESSAGE INPUT
    *& Module DELETE_RECORD INPUT
    text
    MODULE DELETE_RECORD INPUT.
    IF MARK = 'X' AND S_CODE = 'DELE'.
    DELETE TABLE G_TC1_ITAB FROM ZFG_SRNO.
    DESCRIBE TABLE G_TC1_ITAB LINES TC1-LINES.
    ENDIF.
    ENDMODULE. " DELETE_RECORD INPUT
    *********************Screen modules*********************
    PROCESS BEFORE OUTPUT.
    *&SPWIZARD: PBO FLOW LOGIC FOR TABLECONTROL 'TC1'
    MODULE TC1_INIT.
    *&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.
    LOOP AT G_TC1_ITAB
    INTO G_TC1_WA
    WITH CONTROL TC1
    CURSOR TC1-CURRENT_LINE.
    *&SPWIZARD: MODULE TC1_CHANGE_FIELD_ATTR
    MODULE TC1_MOVE.
    MODULE TAB1_INIT.
    MODULE TC1_GET_LINES.
    ENDLOOP.
    MODULE D20XX_INIT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TC1'
    *BREAK POINT.
    LOOP AT G_TC1_ITAB.
    CHAIN.
    FIELD ZFG_SRNO-ZSRNO.
    MODULE TC1_MODIFY ON CHAIN-REQUEST.
    MODULE TC1_MODIFY.
    ENDCHAIN.
    MODULE MESSAGE .
    MODULE DELETE_RECORD.
    ENDLOOP.
    MODULE TC1_USER_COMMAND.
    *&SPWIZARD: MODULE TC1_CHANGE_TC_ATTR.
    *&SPWIZARD: MODULE TC1_CHANGE_COL_ATTR.
    MODULE USER_COMMAND_0100.
    please check out the link below for more information it might help you
    http://help.sap.com/saphelp_sm32/helpdata/en/9f/dbac9f35c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d1/801c7b454211d189710000e8322d00/content.htm
    http://www.sapbrainsonline.com/REFERENCES/ABAP_SYNTAX/SAP_ABAP_SYNTAX.html
    *********please reward points if the information is helpful to you*************

Maybe you are looking for

  • Kind of query on an array

    Hi, I have an array like this : DATA | YEAR | SCENARIO | JAN | FEB | MAR | .... data1 2008 1 120 101 109 data2 2008 2 120 105 104 data3 2007 1 100 108 111 data4 2008 1 124 101 116 and I want to search something like we do with a query but on an array

  • Power Mac Mirror Door DVI or ADC to SINGLE RCA VIDEO OUT to a TV...adapter?

    I have a Mirror Door G4 tower that I would like to use as a media center, with an old(er) Magnavox 19" television that only has the single yellow VIDEO IN jack, and the red and white audio L and R. Is there a converter cable that is similar to the on

  • SE/SW Cad Integration -- File Names

    Hello All, Just wanted to make sure in Solid Edge/Solid Work --SAP Integration that we for a Drawing and the Part from which views are generated there is no problem to keep file/original name unique (different). For example Part with file name Bracke

  • Install EBS R12 Problem - Post Install Checks

    Folks, Hello. I am installing EBS R12 using "rapidwiz". The Install Wizard almost finishs installing and gets to "Post Install Checks". The message is as follows: Validate System Configuration: Database Availability Environment File HTTP Virtual Dire

  • I downloaded 'instagram' from app store

    I downloaded Instagarm app from app store but am not able to put it in my iPod. when am trying to do so, an error msg comes saying that my computer is not authorized to do so. how iam supposed to authorize my computer to add apps on my iPod. plz help