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

table control records are getting cleared on pressing enter key

Hi To all....

my Queerry is u i have created one table control to inseret the records in databse .after entering the records in table control

when i press save it is is getting saved in databse. but when i press enter key records which i have entered are getting cleared . can u pls give me the solution for that .

Regards

Sunil...

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2010 at 08:39 AM

    Hi

    Please check PBO. You must be clearing the internal table in PBO.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2010 at 08:43 AM

    Hi

    1. You need to append the record to internal table in PAI after validations.

    2. Check did u refreshed the internal table any where after append.

    Regards,

    Raghu.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2010 at 08:43 AM

    Please search the forum before posting.

    Sujay

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 08, 2010 at 09:14 AM

    I guess you created your table control with wizard. The wizard generates the code to modify your internal table.

    You should see the module in screen flow logic like:

    MODULE tc_item_modify ON CHAIN-REQUEST.
    

    Module is coded like this:

    MODULE tc_item_modify INPUT.
      MODIFY gt_item
        FROM gs_item
        INDEX tc_item-current_line.
    ENDMODULE.
    

    You should do this:

    MODULE tc_item_modify INPUT.
      MODIFY gt_item
        FROM gs_item
        INDEX tc_item-current_line.
      IF sy-subrc ne 0.
        APPEND gs_item TO gt_item.
      ENDIF.
    ENDMODULE.
    

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2010 at 09:29 AM

    Hi sunil,

    Check in the PBO at first step only try to fetch data from database table and move to Internal table of table control.

    from next step on wards try to Move the Internal table table of table conrol to workarea

    and try to write MOdify itab command in PAI. and read command in PBO.

    Prabhudas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2010 at 09:52 AM

    i suppose in PBO you are clearing the LINES attribute of your tablecontrol.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2010 at 12:04 PM

    Thanks I got the solution

    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.