Help on Table control

Hi,
I cretaed my own Z table and i ve to insert new records as well update them when necessary..
now i ve a table control for that..so how i can insert and update my ztable with table control..?
In PBO and PAI. what should i mention in Loop at ........?
Normally it allows only Itab which contains Ztable data. But here itab is empty. since i am not populating itab from Ztable,
I need to populate the Ztable from Table ctrl datas.
Is there any parameter which holds the number of rows entered in table Ctrl?
help me in this regard.

hello Ram
im sending one table contro program it may use ful top u..
REPORT zsiva_bdctable  .
*include bdcrecx1.
TYPES : BEGIN OF ty_head,
        auart(4),
        vkorg(4),  "Sales Organization
        vtweg(2),  "Distribution Channel
        spart(2),  "Division
        kunnr(10), "sold-to-party
        bstkd(10), "Customer purchase order number
        END OF ty_head.
TYPES: BEGIN OF ty_item,
       matnr(18) TYPE c,  "Material
       kwmeng(13) TYPE c, "Quantity
       END OF ty_item.
DATA: it_head TYPE TABLE OF ty_head.
DATA: wa_head LIKE LINE OF it_head.
DATA: it_item TYPE TABLE OF ty_item.
DATA: wa_item LIKE LINE OF it_item.
DATA :bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
DATA:v_kwmeng(30) TYPE c,
     v_mabnr(30) TYPE c.
DATA: val(2) TYPE n VALUE 01.
DATA : w_file2 TYPE string,
               w_file1 TYPE string.
PARAMETERS: filename LIKE rlgrap-filename.
PARAMETERS: filenam1 LIKE rlgrap-filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
  CALL FUNCTION 'F4_FILENAME'
    IMPORTING
      file_name = filename.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filenam1.
  CALL FUNCTION 'F4_FILENAME'
    IMPORTING
      file_name = filenam1.
START-OF-SELECTION.
  w_file2 = filename.
  w_file1 = filenam1.
HEADER ************************
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename            = w_file2
      filetype            = 'ASC'
      has_field_separator = 'X'
    TABLES
      data_tab            = it_head.
ITEM *******************
  CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      filename            = w_file1
      filetype            = 'ASC'
      has_field_separator = 'X'
    TABLES
      data_tab            = it_item.
**********CREATE SESSION***************
  CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
      client = sy-mandt
      group  = 'TABLECONT'
      keep   = 'X'
      user   = sy-uname.
******POPULATE BDCDATABLE***************
PERFORM open_group.
  LOOP AT it_head INTO wa_head.
    PERFORM bdc_dynpro      USING 'SAPMV45A' '0101'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'VBAK-AUART'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                          '/00'.
    PERFORM bdc_field       USING 'VBAK-AUART'
                                        wa_head-auart.
    PERFORM bdc_field       USING 'VBAK-VKORG'
                                 wa_head-vkorg.
    PERFORM bdc_field       USING 'VBAK-VTWEG'
                                        wa_head-vtweg.
    PERFORM bdc_field       USING 'VBAK-SPART'
                                        wa_head-spart.
    PERFORM bdc_dynpro      USING 'SAPMV45A' '4001'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
    PERFORM bdc_field       USING 'VBKD-BSTKD'
                                        wa_head-bstkd.
    PERFORM bdc_field       USING 'VBKD-BSTDK'
                                       '30.01.2006'.
    PERFORM bdc_field       USING 'KUAGV-KUNNR'
                                       wa_head-kunnr.
    PERFORM bdc_field       USING 'RV45A-KETDAT'
                                        '30.01.2006'.
    PERFORM bdc_field       USING 'RV45A-KPRGBZ'
                                        'D'.
    PERFORM bdc_field       USING 'VBKD-ZTERM'
                                        '0001'.
    PERFORM bdc_field       USING 'VBKD-INCO1'
                                        'CIF'.
    PERFORM bdc_field       USING 'VBKD-INCO2'
                                        ' COST INSUSRABCE FRIEGHT'.
    LOOP AT it_item INTO wa_item .
      CONCATENATE 'RV45A-MABNR(' '0' val ')' INTO v_mabnr.
      CONCATENATE 'RV45A-KWMENG(' '0' val ')' INTO v_kwmeng.
     PERFORM bdc_field       USING 'BDC_CURSOR'
                                   v_kwmeng.
      PERFORM bdc_field       USING v_mabnr
                                   wa_item-matnr.
      PERFORM bdc_field       USING v_kwmeng
                                    wa_item-kwmeng.
      PERFORM bdc_dynpro      USING 'SAPMV45A' '4001'.
      PERFORM bdc_field       USING 'BDC_OKCODE'
                                    '/00'.
      val = val + 1.          
      IF val >   5.
      val = 5.               
   ENDIF.
    ENDLOOP.
    val = 01.
    PERFORM bdc_dynpro      USING 'SAPMV45A' '4001'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                           '=SICH'.
    CALL FUNCTION 'BDC_INSERT'
      EXPORTING
        tcode     = 'VA01'
      TABLES
        dynprotab = bdcdata.
    REFRESH bdcdata.
*PERFORM bdc_transaction USING 'VA01'.
  ENDLOOP.
PERFORM close_group.
CALL FUNCTION 'BDC_CLOSE_GROUP'.
       Start new screen                                              *
FORM bdc_dynpro USING program dynpro.
  CLEAR bdcdata.
  bdcdata-program  = program.
  bdcdata-dynpro   = dynpro.
  bdcdata-dynbegin = 'X'.
  APPEND bdcdata.
ENDFORM.                    "BDC_DYNPRO
       Insert field                                                  *
FORM bdc_field USING fnam fval.
  CLEAR bdcdata.
  bdcdata-fnam = fnam.
  bdcdata-fval = fval.
  APPEND bdcdata.
ENDFORM.                    "BDC_FIELD

Similar Messages

  • Search Help on Table Control - Fill more than one field in the table?

    Hey everyone,
    I have built a screen with a Table Control on it... the fields of the table control are linked to an internal table...  The internal table has the line type of a structure I've defined in the data dictionary.  Within that structure in the data dictionary, I've linked some fields to search helps (For example, a MATNR and CUSTOMER search help)...  I've defined in the structure definition which fields from the search help are to be returned to which fields in the structure.
    The problem is, even though I have the search help set to export both the customer number and location when using the search help on the customer field, it still does not fill the location field within the table.  Is this a limitation of using search helps within table controls?
    I'm also finding that by defining the search help through the structure, instead of directly within the screen, the search help round button does not show up on the field, yet I can still press F4 to bring up the search help.  Is there a reason why it's not showing the search help clickable button even though it works fine using F4?
    For doing search helps in Table Controls, is it better to just build the search help, attach it directly to the field in the table, and then after the user picks the single field, use the PAI to run a select and fill the rest of the fields required?
    Thanks,
    Dallas

    Hi Dallas,
    (1)
    What  i understood is that you added a search help by defining it in the internal table type for a field customer number..in the search help you have 2 fields customer number and location...user press the search help ..then you need to fill 2 different fields or 1 field?
    if you need to fill the customer location or location (only one) then you need to set the "import" in the search help for whichever is required.....
    if you need to fill 2 or more different fields..then you can use the technique you have mentioned last , to do a select in PAI and fill the fields....but this you can use if the combination for the fields is unique...eg: u have customer number and location..if customer X can be mapped to location X and location Y..when a select statement is done there are 2 options..so in such cases it is better to leave the option to the user otherwise if there is a clear mapping like customer X can be mapped only to location X then you can use the select..
    (2)
    usually when you define it as a type in the internal table the icon doesn't show up..but you can do alternative like mentioned..go to the table,find the search help for the required field if present or create a new one if required and place the search help mentioned in the screen itself..so as to see the icon...sometimes users are adamant that they need the search help icon to be seen..so it depends on if your user
    (3)
    as in the example of customer number and location mentioned we can provide them different search helps and do the needful processing in PAI to fill the fields
    Table controls may be used for different purposes and requirements....even a checkbox,push button can be placed as a field in table control and used,but yes most of the time requirements are like what is mentioned in your case...
    Regards
    Byju

  • F4 help in table control. - Urgent  Please

    Hi all,
    Iam using F4 help in table control. when the user selects the data in F4 values 4 more fields that are displayed in the F4 has to be updated in the table control
    What function modules should I use to capture the f4 values and keep in the current table control record. Please help by sending some code.
    Helpful answers will be rewarded.
    Thankhs
    Aditya

    Hi ,
    Check out the follwing Eg.
    To read the remaining fields in the corresponding row use <b>dynpfld_mapping</b> parameters in Table option of F4 help Function Module.And then use <b>DYNP_VALUES_UPDATE </b> FM to populate into the screen fields.
    MODULE shlpcntno INPUT.
      DATA : BEGIN OF i_cntno OCCURS 0,
              contnum LIKE zmps_veh_entry-contnum,
              contsl LIKE zmps_veh_entry-contsl,
              END OF i_cntno.
      CLEAR: i_cntno,i_cntno[],i_return,i_return[],i_map,i_map[].
      SELECT contnum contsl FROM zmps_veh_entry INTO TABLE i_cntno.
      i_map-fldname = 'F0001'.
      i_map-dyfldname = 'I_CNTNO-CONTNUM'.
      APPEND i_map.
      CLEAR i_map.
      i_map-fldname = 'F0002'.
      i_map-dyfldname = 'I_CNTNO-CONSTL'.
      APPEND i_map.
      CLEAR i_map.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'CONTNUM'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'W_CONTNUM'
          value_org       = 'S'
        TABLES
          value_tab       = i_cntno
          dynpfld_mapping = i_map
          return_tab      = i_return.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      LOOP AT i_return.
        IF i_return-fieldname = 'F0001'.
          w_contnum = i_return-fieldval.
        ELSEIF i_return-fieldname = 'F0002' AND flag = 3.
          w_slno = i_return-fieldval.
          CLEAR: i_dynread, i_dynread[].
          i_dynread-fieldname = 'W_SLNO'.
          i_dynread-fieldvalue = w_slno.
          APPEND i_dynread.
          CLEAR i_dynread.
          CALL FUNCTION 'DYNP_VALUES_UPDATE'
            EXPORTING
              dyname                     = sy-repid
              dynumb                     = sy-dynnr
            TABLES
              dynpfields                 = i_dynread
          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.
      ENDLOOP.
    ENDMODULE.

  • How to implement F4 help in table control

    Hi all,
    I am working on a table control in a module pool program. I have three fields in table control , material no. , material description and quantity. my requirement is , in table control , i need to provide the F4 help for material no. and material description, in a way, if i select material no. using F4, the corresponding material description field would be entered automatically in the table control field.
    Pls suggest me on this , if possible pls give me code or logic to do this.
    Thanks
    Saravan
    Moderator message: please don't post the identical question again after the first attempt was locked for good reasons. Search for available information before asking.
    Edited by: Thomas Zloch on Mar 3, 2011 11:54 AM

    Hi Saravana,
    Please search in SCN before posting. You will find many threads related to this question. The basic logic is you have to get the selected row of table control  using DYNP_GET_STEPL function in your POV. Then using function DYNP_VALUES_READ read the material and create the description to be displayed. You have use function F4IF_INT_TABLE_VALUE_REQUEST to display search help.

  • Transfering multiple fields from help in table control

    Hi everyone.
    I have a table control in a dynpro.
    The table control has many fields: x, y, z ...
    I have a module in PROCESS ON VALUE REQUEST for a field "x".
    The module calls a function to search values for field "x" and for field "y".
    How can I transfer the value of field "y" to the screen?
    I know that I can use the function DYNP_VALUES_UPDATE but it updates the field "y" in the wrong position of the table.
    Thanks so much for your help.

    Hi Sara
    It seems you are a new member; welcome to SDN forums. According to SDN customs, you can assign points to posts to thank people. You can do this by clicking the yellow star icon at header of each post. You can assign;
    - one 10 points (solved)
    - two 6 points (very helpful answer)
    - many 2 points (helpful answer)
    Kind regards...
    *--Serdar

  • Multiple selection in F4 help in table control

    Hi,
    I am providing F4 help for a particular field in the table control. User must be able to select multiple values from this F4 help this is done using the function module F4IF_INT_TABLE_VALUE_REQUEST. Now the selected fields have to be transferred to screen, this is done using FM DYNP_VALUES_UPDATE.
    My problem is i have 6 rows displayed in my table control. So only first 6 values from the user selected values are getting updated in my screen fields others are not getting updated. Say if the user selects 10 values out of them only 6 is populating in the screen. How do i get the others also? Please help.
    Thanks,
    Karthik

    Hi,
    Check the Following threads
    can we select multiple entries from a F4 result?
    Table Control dynamic F4
    After you select Multiple rows from F4 Help these are stored in RETURN table.
    Now in main program modify the Internal Table.
    In PAI
    loop at itab.
    " You can not handle this in this Loop
    endloop.
    module modify_from_f4
    process on value-request
    field fname module get_f4 " Here you get the F4 Help and the values are in RETURN tab
    in Program
    module modify_from_f4.
    " in this module you can use the RETURN TAB like
    loop at itab
    read table RETURN with key fnam = itab-fnam " and get the corresponding value and modify itab from RETURN tab
    if you can not find common fields and just want to pass the values then
    read table RETURN INDEX SY-TABIX. " IF the Itab is empty then follow below loop
    endloop.
    loop at return.
    move return-fieldvalue to itab-fnam
    append itab.
    endloop.
    endmodule.
    Cheerz
    Ram

  • Search help for table control input value

    Hi,
    We have designed a GUI for supply invoice approval workflow with table control.
    In the table control fields, we assigned one search help on one field.
    We can enter the values(F4 Help) up 8 row in the default screen, which is having 8 row.
    After scrolling down for 9th row, I am not getting any F4 help, which I am able to get upto 8 rows.
    Please any one could help me in this...
    BR,
    Thirupathi

    Hi,
    Did you assign the search help to the <b>Search Help</b> of the <b>Attributes -> Dictionary</b> tab of the field?
    Irrespective of scrolling, the F4 help should work for the field in table control.
    Regards,
    Raj

  • Problem in Search help in Table control

    Dear ABAPers,
    I am using the Table control.In that i am using F4 help.the F4 Value should be based o the
    another field in the Table control.how to do this.
    Thanks & Regards,
    Ashok.

    I had a similar requirement. In this table control the values for the F4 help for the shipping conditions depend on the vendor the user selects in the first column.
    Here is my code:
    PROCESS ON VALUE-REQUEST.
      FIELD gs_pod_screen-ship_cond
        MODULE f4_ship_cond.
    MODULE f4_ship_cond INPUT.
      PERFORM f4_pod_shipping_conditions.
    ENDMODULE.                 " f4_ship_cond  INPUT
    FORM f4_pod_shipping_conditions .
      DATA: lt_return TYPE TABLE OF ddshretval,
            ls_return TYPE ddshretval,
            lv_line   TYPE i,
            lv_vendor TYPE bu_partner,
            ls_shlp   TYPE shlp_descr,
            ls_selopt TYPE ddshselopt,
            ls_if     TYPE ddshiface,
            lv_c(132) TYPE c.
    * where on the table control did we hit F4?
      GET CURSOR LINE lv_line.
      READ TABLE gt_pod_sales
           INTO gs_pod_screen
           INDEX lv_line
           TRANSPORTING vendor.
      CHECK NOT gs_pod_screen-vendor IS INITIAL.
    * the possible values always depend on the vendor => build it every time
    * get the search help parameters first
      CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
        EXPORTING
          shlpname = gc_shlp_shipcon
        IMPORTING
          shlp     = ls_shlp.
    * now we have to set restrictions based on the vendor
      CLEAR ls_selopt.
      ls_selopt-shlpname  = gc_shlp_shipcon.
      ls_selopt-shlpfield = gc_name_vendor.
      ls_selopt-sign      = gc_i.
      ls_selopt-option    = gc_eq.
      ls_selopt-low       = gs_pod_screen-vendor.
      APPEND ls_selopt TO ls_shlp-selopt.
    * set the field for the output
      READ TABLE ls_shlp-interface INTO ls_if
           WITH KEY shlpfield = gc_name_ship_cond.
      IF sy-subrc EQ 0.
        ls_if-valfield = gc_field_shipcon.
        MODIFY ls_shlp-interface FROM ls_if
               INDEX sy-tabix TRANSPORTING valfield.
      ENDIF.
    * pass in the base date and call the search help
      CALL FUNCTION 'F4IF_START_VALUE_REQUEST'
        EXPORTING
          shlp                = ls_shlp
        TABLES
          return_values       = lt_return.
      READ TABLE lt_return INTO ls_return INDEX 1.
      IF sy-subrc EQ 0.
        gs_pod_screen-ship_cond = ls_return-fieldval.
      ELSE.
        CLEAR gs_pod_screen-ship_cond.
      ENDIF.
    * transfer the value
      MODIFY gt_pod_sales
             FROM gs_pod_screen
             INDEX lv_line
             TRANSPORTING ship_cond.
    ENDFORM.                    " f4_shipping_conditions
    Hope that helps,
    Michael

  • SEARCH HELP IN TABLE CONTROL

    Hi friends,
           In dialog programming i am using table control for getting material details
          in material number field i am using search help "sales material description(MAT1S)"
          if i select the material number using search help then it display the sales organization
            i give "conver. exit" = MATN1
                    "search help" = MAT1S
    Thanks & Regards,
    Vallamuthu.M

    I solved my own

  • Search help in table control using attributes window in layout

    Hi.
    I am trying to use search help for my table control fields. the table control basically displays product details.
    I have a name field, description field and price field. I have named my field to match the the structure of my search help (stProducts-name, stProducts-description and stProducts-price respectfully). then for each i entered shProducts (my search help) in the search help field.
    However, upon running the program, in the name, description and price field, by clicking f4 the name of the product is displayed in the field irrespective to which column I am selecting. Also the values in the other fields are not affected.
    Any help would be appreciated
    Thank you

    Hi Charla,
    <li> Here is a sample program how to update other fields when you select f4 help for one field.
    <li> Need to apply in module pool program..
    REPORT zvenkat_f4_for_parameters MESSAGE-ID zmsg .
    TYPES:
       BEGIN OF t_t001w,
         werks       TYPE t001w-werks,
         name1       TYPE t001w-name1,
       END OF t_t001w,
       t_return_tab  TYPE ddshretval.
    DATA:w_t001w      TYPE t_t001w,
         w_return_tab TYPE t_return_tab.
    DATA:i_t001w      TYPE STANDARD TABLE OF t_t001w,
         i_return_tab TYPE STANDARD TABLE OF t_return_tab.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS :p_werks TYPE t001w-werks,
                p_name1 TYPE t001w-name1.
    SELECTION-SCREEN END OF BLOCK b1.
    " AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
      PERFORM f4_help_for_palant.
    *&      Form  f4_help_for_palant
    FORM f4_help_for_palant.
      DATA:
          w_dynpfields TYPE dynpread,
          i_dynpfields LIKE STANDARD TABLE OF dynpread.
      IF i_t001w[] IS INITIAL.
        SELECT werks name1
        FROM t001w
        INTO TABLE i_t001w.
      ENDIF.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield    = 'WERKS'
          dynpprog    = sy-repid
          dynpnr      = sy-dynnr
          dynprofield = 'P_WERKS'
          value_org   = 'S'
        TABLES
          value_tab   = i_t001w
          return_tab  = i_return_tab.
      READ TABLE i_return_tab INTO w_return_tab INDEX 1.
      p_werks = w_return_tab-fieldval.
      READ TABLE i_t001w INTO w_t001w WITH KEY werks = p_werks.
      IF sy-subrc = 0.
        w_dynpfields-fieldname    = 'P_NAME1'.
        w_dynpfields-fieldvalue   = w_t001w-name1.
        APPEND w_dynpfields TO i_dynpfields.
        CLEAR w_dynpfields.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname     = sy-repid
            dynumb     = sy-dynnr
          TABLES
            dynpfields = i_dynpfields.
      ENDIF.
    ENDFORM.                    " f4_help_for_palant
    Thanks
    Venkat.O

  • Attaching search help to table control

    i want to attach search help to a field in table control. and based on that entry i want to fill the corresponding columns of that row

    HI Sarath,
    Welcome to SDN..
    Check out this thread ..
    How to create Search Help for a field in Table control !!
    Regards,
    Santosh

  • Help in table control

    Hi all,
    I have created a table control and assigned the f4 help menu to it. If the It is working fine. But now , without choosing the f4 help if we key in the data it should be validated and the corresponding sub menu should appear.
    Please tell me how to do this?
    Thanks,
    PRIYA

    Hi,
    PROCESS AFTER INPUT.
    LOOP AT it_parts.
        CHAIN.
          FIELD :
            wa_parts-matnr.
          MODULE check_matnr.
        ENDCHAIN.
    ENDLOOP.
    MODULE CHECK_MATNR.
    Do the validation here
    select matnr
         from mara
        where matnr = wa_parts-matnr.
    If sy-subrc ne 0.
    MEssage e001. " Invalid material number
    else.
    append wa_parts to it_parts.
    endif.
    ENDMODULE.
    Best regards,
    Prashant
    PS : Please reward all helpful answers

  • Please help in Table control for fetching

    Below is the code which i m using ......but while i use modify statement after selecting row in table control it is not geting  modified.When i saw thru debugger ....it is only modifing the data which is in Header line.....plz help in this
    WHEN 'FETCH'.
    MODIFY NO_TEMP INDEX TEMP_DET-CURRENT_LINE
    FROM NO_TEMP TRANSPORTING ZCHECK.
    REFRESH IT_PO_DET.
    CLEAR IT_PO_DET.
    LOOP AT NO_TEMP WHERE ZCHECK  EQ 'X'.
      LOOP AT I_YPO_TEST
      WHERE SOLD_TO_PARTY_CD EQ NO_TEMP-SOLD_TO_PARTY_CD.
      APPEND I_YPO_TEST TO IT_PO_DET.
      ENDLOOP.
    ENDLOOP.
    IF SY-SUBRC EQ 0.
            MESSAGE S001(Z1) WITH 'RECORD FETCHED SUCCESSFULLY'.
          ELSE.
            MESSAGE E001(Z1) WITH 'NO RECORD FETCHED SUCCESSFULLY'.
          ENDIF.

    Hi dheeraj,
    The part of the code which you are showing us must be in a module which is called in the loop of the table control , in the flow logic.
    PAI section.
    loop at no_temp."
    module user_command_0100.
    endloop.
    module user_command_0100.
    WHEN 'FETCH'.
    MODIFY NO_TEMP INDEX TEMP_DET-CURRENT_LINE
    FROM NO_TEMP TRANSPORTING ZCHECK.
    REFRESH IT_PO_DET.
    CLEAR IT_PO_DET.
    endmodule.

  • Search help on table control field which imports info from same record

    Hi Team ABAP,
    i got a slight problem here and kinda dont know how to proceed.
    I got a DDIC structure containing fields KSCHL and NACHA.
    Additionally i got a customizing table based on kschl, where allowed NACHA´s per KSCHL get customized.
    Now i got a table control, containing records of type of above described structure.
    I created a search help for Field NACHA which actually uses KSCHL as importing since we just want to see those NACHA´s allowed for the given KSCHL.
    Search help itself works fine. I got problems in how to tell it which kschl to import.
    I have coded an routine in event PROCESSES ON VALUE REQUEST.
    There i could do DYNP_VALUES_READ or get my data right out of the itab on which the table control is based. i just got the problem that i dont have a clue how identify which search help of which table control line got clicked.
    having a first look i dont see any of SY fields changing using different lines. So i´m stuck. any Ideas?
    regards
    Edited by: Florian Kemmer on Nov 30, 2010 9:01 AM
    Edited by: Florian Kemmer on Nov 30, 2010 9:01 AM

    Use FM [DYNP_GET_STEPL|http://www.sdn.sap.com/irj/scn/advancedsearch?query=dynp_get_stepl] "Current sy-stepl at Event POV", then use the returned povstepl value in DYNP_VALUES_READ (and DYNP_VALUES_UPDATE if required)
    Regards,
    Raymond

  • Help regarding 'table controls' and 'internal table' updation

    Hi all.
    Basically this is what i have done..... I have created a table control in module pool program. I declared an Internal table and also have populated it from a database table. I have also used insert statement to insert an blank record in the table control view and delete statements to delete any record,  also in the table control view... .
    But I am not able to update any new record into an Internal table or  the  original table ..
    Any Ideas how to do it ,Gurus
    Thanks

    HEllo,
    Check thsi simple report.
    REPORT ZTFH_TABLECONTROL .
    TABLES : ZEMPTABLE.
    DATA : SELLINE .
    DATA : FLD(20).
    DATA : LINNO TYPE I , OFF TYPE I.
    DATA : ITAB LIKE ZEMPTABLE OCCURS 10 WITH HEADER LINE.
    CONTROLS  : CON_TAB TYPE TABLEVIEW USING SCREEN 100.
    SELECT * FROM ZEMPTABLE INTO TABLE ITAB.
    DESCRIBE TABLE ITAB LINES CON_TAB-LINES.
    CALL SCREEN 100.
    *&      Module  EXT_COMM  INPUT
    *       text
    MODULE EXT_COMM INPUT.
    LEAVE PROGRAM.
    ENDMODULE.                 " EXT_COMM  INPUT
    *&      Module  TAB_UPDATE  INPUT
    *       text
    MODULE TAB_UPDATE INPUT.
    CASE SY-UCOMM.
    WHEN 'DEL'.
          IF SELLINE = 'X'.
            DELETE ITAB WHERE EMPNO = ITAB-EMPNO.
            MESSAGE I000(ZYF_DEL).
          ENDIF.
    WHEN 'UPD'.
        IF SELLINE = 'X'.
             MODIFY ITAB INDEX CON_TAB-CURRENT_LINE.
             MESSAGE I001(ZYF_DEL).
        ENDIF.
    WHEN 'INS'.
         IF SELLINE = 'X'.
          GET CURSOR FIELD FLD LINE LINNO OFFSET OFF.
          SET CURSOR FIELD FLD LINE LINNO OFFSET OFF.
          IF FLD CP 'ITAB*' AND SY-SUBRC = 0.
            IF LINNO >= 1.
              LINNO = LINNO + CON_TAB-TOP_LINE - 1.
              CLEAR ITAB.
              INSERT ITAB INDEX LINNO.
              CON_TAB-LINES = CON_TAB-LINES + 1.
            ELSE.
              CLEAR ITAB.
              APPEND ITAB.
              CON_TAB-LINES = CON_TAB-LINES + 1.
            ENDIF.
          ENDIF.
        ENDIF.
    WHEN 'SAV'.
      MODIFY ITAB INDEX CON_TAB-CURRENT_LINE.
      MESSAGE I002(ZYF_DEL).
    ENDCASE.
    ENDMODULE.                 " TAB_UPDATE  INPUT
    “ FLOW LOGIC
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT ITAB WITH CONTROL CON_TAB.
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_0100.
    MODULE EXT_COMM AT EXIT-COMMAND.
    LOOP AT ITAB.
    MODULE TAB_UPDATE.
    ENDLOOP.     
    REgards,
    Vasanth

Maybe you are looking for