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

Select

hi all,

I select a value by using select quary and i

store the value in a variable but my problem is i dont

what to store in a variable i select the value only

for existancy check only when i store it in another

variable i get an error in EPC .

See the example code:

Select single

carrid

form spfli

into w_carrid

where carrid eq p_carrid.

if sy-subrc ne 0.

i wrote the code based on the existance-----

endif.

In the above code i never use the variable w_carrid in

my program so i got an EPC check plzz help mee

thanks

syamala

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 Jan 21, 2008 at 03:50 PM

    Try

    SELECT COUNT(*)

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 03:52 PM

    Hello,

    Just do this.

    Select single "# ECNEEDED

    carrid

    form spfli

    into w_carrid

    where carrid eq p_carrid.

    Cheers,

    Vasanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 03:53 PM

    Select count(*)

    form spfli

    where carrid eq p_carrid.

    check for sy-subrc and proceed as requied.

    This is the simple statement to check for existency of record.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 03:55 PM

    Select single

    carrid

    form spfli

    into w_carrid

    where carrid eq p_carrid.

    if sy-subrc ne 0.

    i wrote the code based on the existance-----

    else.

    *--as u don't need w_carrid.... clear it.....to use it....

    clear w_carrid.

    endif.

    try this way....!!!!!

    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.