Skip to Content

at selection-screen problem

Hi all,

my report has selection-screen with fields lifnr and ekorg (mandatory field).

and output is lifnr , ekorg and some fields from lfb1.

i selected ekorg and lifnr from lfm1. and make relation with lfb1 table.

i want a at selection screen. in which it should display that vendor does not exits

in this organization. Please let me know the sol.

Example. : i give in selection-screen

vendor 1003

ekorg a100

If vendor is not in a100. it should display a message like E001(message zm)

Vendor does not exist in this ekorg.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2009 at 07:58 AM

    Hi.

    You can do a select single to LFM1 table with the vendor and pur org..

    if value exists vendor is corect or else wrong.

    Regards

    Ansari

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 07, 2009 at 08:00 AM

    Hi,

    Check this ,

    select-options: s_lifnr for lfm1-lifnr,
                            s_ekorg for lfm1-ekorg.
    
    
    AT selection screen. 
    
    select single * 
    from lfm1
    where lifnr in s_lifnr and 
                ekorg in s_ekorg.
    
    If sy-subrc NE 0.
    message E001 with 'Vendor does not exist in the purch org' .
    endif.
    

    Regards,

    Vikranth

    Add a comment
    10|10000 characters needed characters exceeded

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

    hi ravi,

    use this

    select-options: s_lifnr for lfm1-lifnr,

    s_ekorg for lfm1-ekorg.

    at selection-screen.

    IF NOT S_LIFNR IS INITIAL.

    SELECT SINGLE * FROM lfm1

    WHERE LIFNR IN S_LIFNR.

    IF SY-SUBRC <> 0.

    MESSAGE TEXT-001 TYPE 'E'.

    ENDIF.

    ENDIF.

    IF NOT S_EKORG IS INITIAL.

    SELECT SINGLE * FROM lfm1

    WHERE EKORG IN S_EKORG.

    IF SY-SUBRC <> 0.

    MESSAGE TEXT-002 TYPE 'E'.

    ENDIF.

    ENDIF.

    rgds/

    shivraj

    Edited by: ShivrajSinha on Sep 7, 2009 10:44 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 08, 2009 at 05:12 AM

    answered

    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.