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

Regarding table control logic

Hi,

I got stuck with a very simple logic in table control.

In my table control having column as A.

On entering of duplicate values , it should throw error message and does not allow to go further.

Can someone let me know the logic?

A

__

1

__

4

5

6

BR

Sumeet

800723660

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 11, 2015 at 05:15 PM

    Hi Sumeet,

    You have to use CHAIN Statement.

    CHAIN.

    FIELD fieldname.

    MODULE Check_Duplicate ON CHAIN-REQUEST.

    ENDCHAIN.

    In the module you can validate whether duplicate or not. In case of duplicate you can show the error message.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 11, 2015 at 05:16 PM

    Hi Sumeet,

    In PAI you can do like this:

    Inside zmodule:

    READ TABLE itab with key A = itab-A.

    if sy-subrc is initial.

    'Duplicated!!'

    endif.


    img1.JPG (15.4 kB)
    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.