Skip to Content
author's profile photo Former Member
Former Member

table control

hi,

i have an issue

i have created a table-control in module programming with four columns.

correspondigly i have four text fields in the same screen.

Now if i select a line(row) from the table control

and press a button (say a pushbutton which i created),

i need the data of the selected line (in table control) to appear in the corresponding text fields.

How should i do that.

pls help me.

Deepak

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2005 at 02:18 PM

    Say your internal table on the control is I_TAB and control name is myControl. The statement will be as following.

    read table I_TAB into w_TAB index myControl-current_line.

    W_TAB will have the data of the selected line.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2005 at 02:21 PM

    In the PAI of the screen, check for the record selected. For this you need to have W/sel column checkbox selected in the table control properties and assign a field. This will be set to 'X' when you select the record.

    In PAI loop at table control and select the record with this field = 'X'. This is the record user has selected in the table control.

    Assign the values to respective 4 fields.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2005 at 02:23 PM

    see example prg

    DEMO_DYNPRO_TABCONT_LOOP

    DEMO_DYNPRO_TABCONT_LOOP_AT

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2005 at 02:21 PM

    Hi,

    I suppose that when you push the pushbutton you use a user-command. There you must check in the table control which is the selected line ( I suppose you have a flag to know the selected line). You can read table i_control with key flag = 'X' for example. And then when you have in the header line of i_control de data, you can put them into the text fields.

    Regards.

    Mireia

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.