Skip to Content

Mark just one line in ALV

Hi everybody!

I'm doing an ALV (with FM REUSE_ALV_GRID_DISPLAY) that the user should mark just one line and click in a button to starting the process... But today the user can mark more than one line. I don't know how to configure just to mark just one line...

Can you help me???

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 12:45 PM

    Hi,

    Check the number of lines selected and process further only if its equal to 1 else display an error message.

    regards,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 01:16 PM

    HI,

    you check the number of lines selected by the user

    if the user selects more then 1 line you can throw a error message

    refresh gt_selected_rows.

    call method vl31_grid->get_selected_rows

    importing et_index_rows = gt_selected_rows.

    *-- more than one line was marked

    READ TABLE gt_selected_rows INDEX 2 TRANSPORTING NO FIELDS.

    IF sy-subrc = 0.

    MESSAGE s755(06).

    EXIT.

    ENDIF.

    *-- nothing marked

    READ TABLE gt_selected_rows INDEX 1 INTO wa_selected_rows.

    IF sy-subrc <> 0.

    MESSAGE s277(me).

    Check the above example if the user selects more than one row throws a error message

    Regards,

    siva chalasani.

    <b>Reward points if usefull</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 03, 2007 at 02:23 PM

    Hi everybody!

    That's not the way I thinked to solve the problem, but I think that it doesn't have another way to solve the problem! I will do as you are telling me!

    Thank's for the help!

    BR

    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.