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

show the message in the status bar

I have a report in which i have to update the standard table depending on the entries i get in the internal table.

i have to give a message

Update VBRP table if atleast one entries are found in the internal table else

No entries found.

Can anyone give me a code for this? i think we have to use some system fields..

But not sure which one.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 07:44 AM

    My question is that it will always show the first message as sy-subrc is 0 even if the entries are not found in the internal table as the loop is sucessfully executed. so i dont think that sy-subrc would work?

    i want a message if the entries are not found in the internal table.

    Sy-subrc would be zero even if i dont get entries in the internal table.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 07:39 AM

    Hi!

    It's not as though as you think.

    Define an error message in SE91 transaction. F.e ZSD/000 - No entries found.

    Then is your program:

    MESSAGE E000(ZSD).

    Regards

    Tamá

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 07:39 AM

    Hi

    after writing the code you need to put message as lik this

    if sy-subrc NE 0

    MESSAGE S100 with text .

    else

    MESSAGE S101 with text .

    ENDIF.

    here S for status

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2007 at 07:43 AM

    Hi,

    u have to give like this

    if sy-subrc NE 0

    MESSAGE E001 with text .

    else

    MESSAGE S002 with text .

    ENDIF.

    Regards,

    nagaraj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 30, 2007 at 08:10 AM

    Hi,

    I am assuming Itab1 is the internal table.

    select * from db_table into table itab2 for all entries in itab1

    where primary_key1 = itab1-primary_key

    and primary_key2 = itab1-primary_key2.

    if not itab2[] is initial.

    modify db.....

    else.

    message s000 with 'No entries found'.

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 08:56 AM

    Hey tamas..

    Thank you so much..

    Your code worked.

    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.