Table control - doubt?

I have given my code here, I dont know why the data from the table is not displayed in the table control.
table control name - TABLE_CONTROL
internal table name - TCTRL
Flow logic:
   PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP at tctrl into zalvrg_cx_fcat WITH CONTROL TABLE_CONTROL.
  LOOP AT tctrl with control table_control cursor
table_control-current_line.
  ENDLOOP.
MODULE TAB_CONT.
PROCESS AFTER INPUT.
  module exit_program at exit-command.
  field rs38m-programm module check_programm.
  module init_controls.
  module pop_tblnam.
  loop at tctrl.
    MODULE PAI_TAB_CONT.
  endloop.
MODULE USER_COMMAND_0100.
in module pai_tab_cont-
  LOOP AT T_FIELDS.
    MOVE: T_FIELDS-TABNAME   TO TCTRL-TABNAM,
          T_FIELDS-FIELDNAME TO TCTRL-FIELDNAME,
          T_FIELDS-POSITION  TO TCTRL-COLPOS,
          T_FIELDS-OUTPUTLEN TO TCTRL-OUTLEN,
          T_FIELDS-FIELDTEXT TO TCTRL-COLHEAD.
    APPEND TCTRL.
  ENDLOOP.
I have the data in t_fields internal table. I have to display in table control.

HI
GOOD
go through these links, which ll give you brief idea about the table control, that you can implement in your requirement,
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb381a358411d1829f0000e829fbfe/content.htm
http://abap4.tripod.com/SAP_Functions.html
thanks
mrutyun^

Similar Messages

  • Doubt in table control

    I have a table control on a custom screen containing several rows of data depending on the user input on the selection screen . This table control has 5 columns .
    The first column name is KEY . it contains value of a number of fields concatenated together forming a key .
    For eg : the fields are matnr mblnr xblnr , so the value in this column would be something like : value of all 3 fields together without any space . My problem is that i do not know the number of these fields till run time , so i do not know whether the key field will contain data from 5 fields or 4 fields ..
    My question is this : I want to make the column heading dynamic for this field ..for eg if there is data for 2 fields like matnr and xblnr ,then the heading shud be material number - xblnr or if there are 4 fields ..then the heading shud be the description of those 4 fields ..
    Is this possible . Can i make the column header of a table control dynamic .
    Kindly help me out as it is urgent ..
    I will duly reward all ..
    Thanks in advance
    Ankit

    Hi Ankit,
    I dont think its possible in Table Control to change the column headings dynamically.
    But this is possible in ALV. You just need to put a If condition in the field catalog.
    Will suggest you to go for ALV.
    Best regards,
    Prashant
    Pls. mark points for helpful answers

  • Doubt in smartform table control

    hi,
      in my smartform i want to display the table control, i got that normal table control, but i want to change the table control format, that means in write side in the tabs column no need of calculation i need event tab, how to make that?
    Thanks and regards,
    Gowri.

    Hi Gowri,
    You cannt display Table control in smartform output. As it is reporting tool. Not Dialog Module.
    In data tab of table control you can have events.
    Reward if useful.

  • Doubt in table control in wd abap

    Hi experts,
        In webdynpro abap i can able to insert a single row in a table control, but how i can able to insert multiple lines in the webdynpro. If possible send me a piece of code to implement this. It will be very helpful for me.
    Regards...
    Arun.

    Hi,
      Let you internal table be lt_user , LV_USERNODE be the corresponding context node where you want the binding.You need to append empty rows if you need to have multiple rows where user can enter values.
    Like follows
    DO 5 TIMES.
    Append ls_user to lt_user.   ( here ls_user in initial )
    ENDDO
    CALL METHOD LV_USERNODE->BIND_TABLE
      EXPORTING
        NEW_ITEMS            = lt_user
       SET_INITIAL_ELEMENTS = ABAP_TRUE
       INDEX                =
    Thanks
    Anzy

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • Drop down list in Table Control - Value disappeared after pressing ENTER

    Dear Gurus,
    I have a problem in one of my development where I used a table control in which one field is a drop down list.
    I used VRM_SET_VALUES and VRM_GET_VALUES for populating the values from the programand not use any domain level value table for that field.
    My problem is when I select one value from this list , and pressing enter , the value get disappeared. But if I use a domain for this field with value table then everything working properly.
    My doubt is am I doing some miss coding or using the VRM_ function modules improperly ?
    I am sharing some code with you
    in PAI :
    CALL FUNCTION 'VRM_GET_VALUES'
        EXPORTING
          id            = 'ITAB-FIELD3'    "This is drop down list element on screen
        IMPORTING
          values        = values[]    " even it is not the expor parameter...it will work..
       EXCEPTIONS
         id_not_found   = 1
         OTHERS         = 2.
      IF sy-subrc NE 0.
      No sy-subrc check required.
      ENDIF.
    IN PBO
    CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id     = 'IVBAP-ERNAM'
                values = values[].
    Can you please help me.
    Thanks .

    HI,
    The link contains the list box creation, just check if this might help.
    Re: Getting values back from a listbox.
    Regards and Best wishes.

  • Table control problem

    Dear Friends!
       How are you,
              I am having one doubt to ask. I have developed one table control application, With the help of table control I am changing the record of table, and saves it to the internal table this what i am supposed to do.
    what  I am doing is:
    I have fiil the table control from the internal table like this way:
    name  -
    number
    abc           23423
    efg            56456
    jgf             64564
    now i want to change the number column and save it again to internal table this way:
    name -
    number <- on save event or ok_code = save.
    abc           22222
    efg            55555
    jgf             66666
    i have dont this flow logic programing.
    process before output.
    *&spwizard: pbo flow logic for tablecontrol 'MY_TAB'
      module my_tab_change_tc_attr.
    *&spwizard: module MY_TAB_change_col_attr.
      loop at   it_item
           into wa_item
           with control my_tab
           cursor my_tab-current_line.
        module my_tab_get_lines.
    *&spwizard:   module MY_TAB_change_field_attr
      endloop.
      module status_0100.
      module set_curson.
      module get_date.
      module ok_code.
    process after input.
    *&spwizard: pai flow logic for tablecontrol 'MY_TAB'
      loop at it_item.
        chain.
          field wa_item-item_no.
          field wa_item-material_code.
          field wa_item-description.
          field wa_item-unit_of_measure.
          field wa_item-quantity.
          field wa_item-rflag.
          module my_tab_modify on chain-request.
        endchain.
        endloop.
      module my_tab_user_command.
    *&spwizard: module MY_TAB_change_tc_attr.
    *&spwizard: module MY_TAB_change_col_attr.
      module user_command_0100.
      module get_vendor_name.
      module move_data_from_table.  <----- here i m copying the data from table control to internal table.
    process on value-request.
    field mseg-mblnr module get_mat_doc.
    module move_data_from_table input. <---PAI code.
    to move the data from the table control to internal table.
    it_item-name = my_tab-name.
    it_item-number = my_tab-number.
    append it_name.
    clear it_name.
    endmodule.                 " move_data_from_table  INPUT
    now i m receiving the error.. data object my_tab doesnot have the componet called it_item.
    here my_tab is table control name.
    apparently my code is not perfect as i dont know how to do processes over Table control please help me to develop such application
    Any help would be appreciated.
    Regards
    Naeem

    Hi,
    Your code should be in loop endloop of PAI
    MODIFY <internal table> INDEX <table control>-CURRENT_LINE.

  • Closing INDIVIDUAL lines for input in a table control

    Right, hopefully I can explain my issue clearly enough to get an answer that will help me resolve this pain in the *** issue.
    My table control has a delete function but the client doesn't want the line removed from the control table they simply want the line in question to be greyed out (closed for input). Has anyone achieved this in the past? I know it's possible to grey out columns but I can't see any way of doing individual lines.
    For all answers that help me I will shout a beer provided you are in either Sydney or Adelaide.

    Hi,
    >
    Neil Gardiner wrote:
    > Right, hopefully I can explain my issue clearly enough to get an answer that will help me resolve this pain in the *** issue.
    >
    > My table control has a delete function but the client doesn't want the line removed from the control table they simply want the line in question to be greyed out (closed for input). Has anyone achieved this in the past? I know it's possible to grey out columns but I can't see any way of doing individual lines.
    >
    > For all answers that help me I will shout a beer provided you are in either Sydney or Adelaide.
    Refer:-
    it_zekpo is my internal table w/o header line,
    wa_zekpo is work area.
    Name of input/output fields on screen are:-
    wa_zekpo-field1,
    wa_zekpo-field2, and so on...
    Add a field as flag(1) type c in the internal table and work area
    And keep a name of SELCOL in the attributes of table control as wa_zekpo-flag
    Take the group1 for all textboxes as 'ABC' in the table control
    Try using code:-
    At screen logic:
    PROCESS BEFORE OUTPUT.
    *  MODULE status_8003.
      LOOP WITH CONTROL po_tb.
        MODULE read_data.
      ENDLOOP.
    PROCESS AFTER INPUT.
    *  MODULE user_command_8003.
      LOOP WITH CONTROL po_tb.
        MODULE modify_data.
      ENDLOOP.
    In PBO
    *&      Module  READ_DATA  OUTPUT
    MODULE read_data OUTPUT.
      READ TABLE it_zekpo INTO wa_zekpo INDEX po_tb-current_line. "po_tab is table control name
      data : line_count type i.
      describe it_zekpo
      lines line_count.
      po_tb-lines = line_count + 10.
      "to increase the number of lines in table control dynamically
      if sy-ucomm = 'DELETE'. "<--when user click delete button
        if wa-zekpo-flag = 'X'. "<--if record selected
          if screen-group1 = 'ABC'.
            loop at screen.
              screen-input = 0. "disable
              screen-active = 0.
            endloop.
            modify screen.
          endif.
        else. "<--if record not selected
          if screen-group1 = 'ABC'.
            loop at screen.
              screen-input = 1. "enable
              screen-active = 1.
            endloop.
            modify screen.
          endif.
        endif.
      endif.
    ENDMODULE.                 " READ_DATA  OUTPUT
    In PAI
    *&      Module  MODIFY_DATA  INPUT
    MODULE MODIFY_DATA INPUT.
      MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tb-currentline.
      "this will insert a new line
      "and will modify the contents of existing line
    ENDMODULE.                 " MODIFY_DATA  INPUT
    Hope this helps you.
    Let mw know if you have any doubts.
    Regards,
    Tarun

  • How to add rows in table control for data recording BDC?

    hello,
    pl tell me the way to upload data through BDC in table control of screen .
    how to add fields inrecording of table control?
    Please give some code in this regard.
    I am generous in giving points..pl help!

    Hi,
    While doing code under recording first you need to do the recording with sample data under a particular transaction like T-code XK01 (Vendor creation).
    Take an example of create vendor using T-code XK01:
    Go to t-code 'SHDB' under make recording for XK01 with sample data and once if you complete the recording means after vendor creation check the source code bye by pressing the button  'Program', it shows the total coding for recording of what you entered the test data.
    Then you will create one program and copy that source code of recording into your program, and now you have to remove the values at perform statement and give the internal table field name.
    Like that you can develop your own code along with your validations.
    my best suggestion is don’t see the example code of recording method because any one for standard t-code should get the code from recording with sample data, so first tryout with your own recording method and you can understand the code step by step.
    With these I hope you will get some idea of recoding method.
    Let me know for further doubts.
    Regards,
    Vijay.

  • Restricting rows in table control.

    I only want 4 rows in my table control but it is coming as a number of rows...I want to restrict row in my table control,Please tell me how do that?

    Hi priya
         I am sending the code which i used in my screen see weather it will suite you.if any doubts let me know as well this is for 10 lines
    MODULE COUNT_UPDATE INPUT.
      data cnt(10).
       DESCRIBE TABLE itab1 lines cnt.
    append itab1 TO ITAB2.
    LOOP AT itab2.
       IF itab2-srno is INITIAL.
         cnt = cnt + 1.
         CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
           EXPORTING
             INPUT         = cnt
          IMPORTING
            OUTPUT        = itab2-srno
        itab2-srno = cnt.
       ENDIF.
       READ TABLE itab1 WITH TABLE KEY srno = itab2-srno aufnr = itab2-aufnr." vbeln = itab2-vbeln.
       IF sy-subrc eq 0.
         MOVE-CORRESPONDING itab2 to itab1.
        MODIFY itab2.
        MOVE itab2[] to itab1[].
       else.
         MOVE-CORRESPONDING itab2 to itab1.
        append itab1.
       ENDIF.
    ENDLOOP.
    PERFORM operations.
    REFRESH CONTROL 'TCL' FROM SCREEN '1000'.*
    tcl-lines = 10.  " for 10 lines
    clear itab2.
    CLEAR itab2[].
    ENDLOOP.
    ENDMODULE.

  • Blank Row in table control

    Hi,
      Could anybody tell me how to add a n  number of blank lines to the table control UI element on some event. I have tried with the method CREATE_ELEMENT but its clearing the table control.
    I have two nodes called   "lines" and "table".  "Lines" node contains attribute "Count". and this attribute is binded to inputfiled "INP".
    When i click on button , based on inputfield value (INP)  that many blank rows should get appended to the table control.
    Can anybody advice me how can i get this ?
    Can anybody send me the sample code of CREATE_METHOD if its correct approach.
    Thanks and Regards
    Sireesha.

    Hi Saurav,
       Thanks a lot for your reply.  I am very Sorry to miss one point in my first thread. With the CREATE_ELEMENT its adding the blank rows to the table control but its adding in the second page. I thought its clearing the table control entries but in fact the blank rows are getting added in the second page.
    My doubt is how to add blank rows only in the first page.  I have unchecked the "footerVisible" property for the table control. so when i add rows to the table i cannt see the new rows.
    How to add blank rows only in the first page...?
    Thanks for your help.
    Regards
    Sireesha.

  • Drop Down in table control

    Hi All,
    I am facing Problems here ;-
    I have developed a table control in WDA4 application i have 3 dropdowns which are dependent on each other i.e. when i select the entry in the first one then corresponding to that entry the data should be shown in next drop down and same goes for the third one .I am using dropdown by index here .
    Thnks ,
    Sahil

    Hello Sahiil,
          You need to bind the table to a context node and the three drop downs separately to three context nodes. when you click one one of the drop downs, populate the the other nodes.
    I hope this works for you.
    Please feel free to ask if you have any further doubts.
    Regards,
    Ritwik.

  • Selection of records in TABLE CONTROL.

    hello friends, this is venkat.
    I have been using a table contrlo to display the contents of a custom table.
    my table control can display 10 records in one shot and my custom table had more than that. vertical scroll bar has been working properly so i can see all the records in the table control area.
    now my problam is after i selecting one record, to select another record i am using the vertical scroll bar. but the moment i am scrolling the vertical scroll bar the previously selected one becomes non selected..
    how can i select a record and still scroll down or up to select some more records..
    another doubt i had is when ever i use vertical scroll bar PAI is geeting triggered but i am not gettig any information in SY-UCOM... how can i catch this event...
    just like checking  for function code when we click on PUSH BUTTON.
    i will be very thanful if any one can give me some guidance.....
    Venkat.

    Hi Venkat,
    Basically there are 2 ways in which u can create a table control either for a internal table or for database table.
    u can use the wizard from within the screen painter OR
    create a table control manually adding individual fields and handling the table control on your own.
    in the former method, SAP generates the code behind automatically which is not really comprehendable.
    I prefer the later method where u code and have a lot of flexibility of changing the table control at a later stage.
    For information on creating table controls, please refer SAP library under
    ABAP Programming>ABAP User dialogs>Screens>Complex screen elements>Table controls

  • Regarding table controls

    Hi experts,
    please claer my doubts the below
    1.what is a tableview?
    2.how to capture a new record in table control?
    3. what is a custom control?
    and please let me know how to reward.
    Thanks in advance
    Regards
    Ranga

    Hi srinivas,
    1.
       for table view plese refer to the thread:
       <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/collaboration">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/collaboration</a>
    2. to capture a new record in table control write this code in pai
    LOOP AT itab.
        MODULE modify_itab.
      ENDLOOP.
    in the module modify_itab write the foolowing line
    MODIFY itab INDEX tabcontrol-current_line.
    this will pick all the values of table control into internal table itab.
    3. for custom control refer to folloing link.
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/86/2d61d859c711d29bd90000e8a47b2e/frameset.htm">http://help.sap.com/saphelp_nw04/helpdata/en/86/2d61d859c711d29bd90000e8a47b2e/frameset.htm</a>
    Hope it helps
    And if you want to reward points  mark this thread as 'Problem Solved' or with appropriate points on the side of ur post.
    Regards
    Gaurav
    reward points accordingly.

  • BDC - table control - experts please help

    Hi experts,
    Please help. I am in need of your help.
    I am working with BDC and I have a table control in one of the screen. Table control has a check box in the first column. While recording how I entered the data is : I select the check box in a row, enter two values in next two columns of that row and then hit enter then the other columns in that row turn from grey to white (initially these columns are greyed out).
    NOw in BDC when I run my session in foreground, I am able to check(select) the check box and enter the values in next two columns and then I have a Enter OKCODE. But when I hit enter it is not able to recognize the row and its unable to turn the greyed out columns in that particular row to white.
    Is there a way to specify in my program that I am hitting enter in one particular row.
    Please help. Let me know if something is not clear. Very urgent . Pleasee respond. Thanks

    Hi Rich,
    Thanks for the replies. I will try that. I got one more doubt. While manually creating the recipes using C201, there is a screen Recipe header. When I record this transaction, I see a different screen for the Recipe header. Fro example the screen numbers are like 4210(manual) and 4211(recording).
    But my problem is there are two fields which are missing in the screen which I am getting while recording C201. These two fields are present on the screen for manual creation. I need to enter those two fields while I record. But how can I do this.
    Please help.

Maybe you are looking for

  • In case of problems with SAP GUI for Java  ...

    Hello all, in case of having problems (errors, ABAP dumps etc.) with SAP GUI for Java, please create an OSS message on component BC-FES-JAV with information described in OSS note 326558 http://www.service.sap.com/~form/sapnet?_FRAME=CONTAINER&_OBJECT

  • Skin Setting not working with XML file

    I am trying to use the Adobe Flash Playback with a flashvars skin setting.  I am pointing this setting to an xml file where I am trying to overide the playButtonOverlay image.  Below is my code.  I am using MVC, so you will see a couple Html Helpers.

  • Importing classes does not increases SWF size

    Hi, there! I was doing tests, and realized that the some classes of AS3 does not increases the size of the SWFs. In AS2 UIComponent class, for sample, the SWF increases 4 kbytes importing this class (UIComponent). So, I ask you: which classes does in

  • CUP Custom Role Attributes

    All - My question is about creating custom role attributes in CUP. I read in the "SAPu2122 GRC Access Control 5.3 Document Version 3.10 u2013 December 2009" on page 245 that "You can also define your own attributes to support your needs by adding cus

  • ADF faces jar files needed (urgent)

    Hi, I have downloaded one sample adf faces application from oracle site, but it does not have the jar files. They are saying that you can download the neccassary jar files from the Oracle Technology Network (OTN) Web site as a .zip archive that conta