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

How to validate with LIFNR

Hi ABAPer's ,

I have a question that how to validate the screen input field using key LIFNR with the tables given:

EKKO,

EKPO,

EKET,

LFA1,

MAKT,

TOO1W.

in ALV Classical report?

If i give 1 to some char in select options i should not get the values, if i give the lifnr values i should get the values.

Plz help me out of this.

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 Aug 11, 2008 at 02:50 PM

    hi raja,

    You have to validate the field by its check table only, i.e in table KNA1 field land1 is validated by Table t005

    so you have to validate lifnr by its check tabke LFA1.

    here is the code, remember that select option create a internal table, in which user can enter the multiple selection, so here is the solution to handle single as well as multiple selection values,

    select-options: s_lifnr for lfa1-lifnr.

    LOOP AT S_LIFNR.

    CHECK S_LIFNR-OPTION = 'EQ'.

    SELECT SINGLE LIFNR FROM LFA1 INTO LFA1-LIFNR

    WHERE LIFNR = S_LIFNR-LOW.

    IF SY-SUBRC NE 0.

    MESSAGE E001 WITH S_LIFNR-LOW.

    . ENDIF.

    ENDLOOP.

    you can use the same code for S_LIFNR-HIGH also

    Yogesh Nigam

    Edited by: Yogesh N on Aug 11, 2008 10:51 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2008 at 02:40 PM

    Hi,

    Use your screen element type as Ekko-lifnr

    Regards,

    Nishant

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 01:45 AM

    Hi ABAPer's,

    I didn't get raletion between eket to make and too1w. How to make an interactive using for all entries.

    Plz go thru it and reply me soon.

    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.