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

Table Control

hi all,

I am doing table control program.

I know about view data from database in table control program.

but i want to search the data in table control.

First type as input field in empno. then click as search button..

view data in table control..

how is the program it..

if u can it then send me program..

reply me soon.

thx,

s.suresh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 09:51 AM

    Hi,

    DATA text_table TYPE TABLE OF string.

    APPEND: 'Sweet child in time' TO text_table,

    'you''ll see the line' TO text_table,

    'the line between' TO text_table,

    'good and bad.' TO text_table.

    SEARCH text_table FOR '.see.' AND MARK.

    in the same way u can search table control.

    Plzz reward points if it helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 09:59 AM

    hi,

    Do u want like this ?

    U displaying ur data in table control and when u press search button it should ask for input and then it will find that entry from table control?

    If u looking for this then i can help u......

    reply me

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      In first screen say 0100 create a button for "position", if user click on that button call anothoer screen (0210) with input search fields, here if user click on ok it will back to the main screen (0100) at the seleted field: check the code which I used:

      *In MAin screen (0100) PAI:

      WHEN 'POSI' .

      CALL SCREEN 0210 STARTING AT '27' '7' ENDING AT '70' '14' .

      ENDCASE.

      *In screen 210 PAI

      PROCESS AFTER INPUT.

      MODULE USER_COMMAND_0210.

      CASE sy-ucomm.

      WHEN 'CANC'. "Cancel

      CLEAR : g_210plant ,

      g_210reqno .

      WHEN 'OK'. "OK

      LOOP AT gt_scr200 TRANSPORTING NO FIELDS

      WHERE werks = g_210plant OR reqpr = g_210reqno.

      SET CURSOR LINE sy-tabix.

      tc_scr200-top_line = sy-tabix .

      CLEAR : g_210plant ,

      g_210reqno .

      EXIT.

      ENDLOOP.

      ENDCASE.

      LEAVE TO SCREEN 0 .

      *g_210plant and g_210reqno are my search fields*

      tc_scr200 is a table contron in first screen,

      gt_scr200 is the internal table.

      Thanks,

      Sridhar

      Edited by: sridher reddy on Jan 30, 2008 1:30 PM

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 10:05 AM

    hi

    good

    The fun module TABLE_GET_KEY_TO_SET_CUR_ROW is called for the Function position to find the correct Row .

    Means suppose in you table control you have lot of records .To find particular and select that this Fm is useful..

    EX:

    1) add a button say search box .

    2) when user clicks on this button show

    dialog box with enter key field No:

    3) when user enter box no search table control

    intternal table and if found

    set tc1-current_line = sy-tabix of record found.

    DATA : ata: h_table_key(20) type c.

    'V_TQ85 is internal table.

    call function 'TABLE_GET_KEY_TO_SET_CUR_ROW'

    EXPORTING

    table = 'V_TQ85'

    IMPORTING

    table_key = h_table_key

    EXCEPTIONS

    cancelled_by_user = 1

    table_not_found = 2

    others = 3.

    reward point if helpful.

    thanks

    mrutyun^

    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.