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

Focus on a cell in a table view

Hi Experts,

My requirement is to get the focus on the Product ID field in the Items tab. when ever a user enters an Item and hits enter key then the focus should be in the Product ID field of the new line.

Thanks & Regards,

Rakesh

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 09:36 AM

    We also have this problem. Do anyone have a solution. We thought that it should be standard behavior to have the focus on the new row when you press enter.

    Regards

    Anders

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 07, 2010 at 09:40 AM

    To clarify my other post: We want to add a product to an order. When we press enter after we have entered the first product a new empty row is created. The focus is still on the first row and not on the new row.

    Regards

    Anders

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Rakesh/Evelina,

      Thsi can be resolved at the time of addition of the new entity to the collection wrapper.

      IN your code ,check where do you create the new entity.ie,when you add a new row to the table,there would be some code which is called (maybe an ADD method or somethign similar) where in you create a new entity for the table context ndoe and add it to the collection wrapper.NOw after creation,when you call the method colleaction_wrapper->add(iv_entity=entity_name)

      method,also pass one more attribute,iv_set_focus=abap_true.The value of this attribute is false by default.

      So your add method call shoudl look like this:

      me-->typed_context->context_node_name->colleaction_wrapper->add(iv_entity=entity_name iv_set_focus=abap_true)

      This will set the focus on the newly created entity everyitme.

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.