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

Logical expression?

Hi,

I was written the statement below.

READ TABLE t_vttk_vttp INTO w_vttk_vttp WITH KEY

vbeln = t_vbuk-vbeln

tplst = c_tplst6 and

tplst = c_tplst2

tplst = c_tplst3

tplst = c_tplst4.

But iam getting the error TRSTA is not expected. when i give the sinlge stament it is not giving error.

READ TABLE t_vttk_vttp INTO w_vttk_vttp WITH KEY

vbeln = t_vbuk-vbeln

tplst = c_tplst6.

How to write the logical statment for above statement,

Regardsm

srihitha

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 11:26 AM

    READ TABLE t_vttk_vttp INTO w_vttk_vttp

    if ( vbeln = t_vbuk-vbeln and

    tplst = c_tplst6 ) and

    ( tplst = c_tplst2 and

    tplst = c_tplst3 and

    tplst = c_tplst4 ).

    else.

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 11:29 AM

    you have to do like this

    READ TABLE t_vttk_vttp INTO w_vttk_vttp WITH KEY

    vbeln = t_vbuk-vbeln

    tplst = c_tplst6

    tplst = c_tplst2

    tplst = c_tplst3

    tplst = c_tplst4.

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 23, 2007 at 11:30 AM

    Hi,

    Remove the and statement in

    READ TABLE t_vttk_vttp INTO w_vttk_vttp WITH KEY

    vbeln = t_vbuk-vbeln

    tplst = c_tplst6<b> "and</b>

    tplst = c_tplst2

    tplst = c_tplst3

    tplst = c_tplst4.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 11:32 AM

    Remove the 'and' with the key in the code you have written and execute,

    READ TABLE t_vttk_vttp INTO w_vttk_vttp WITH KEY

    vbeln = t_vbuk-vbeln

    tplst = c_tplst6 "and

    tplst = c_tplst2

    tplst = c_tplst3

    tplst = c_tplst4.

    I hope it will work.

    Rewards if useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 11:33 AM

    Hi

    READ TABLE t_vttk_vttp

    INDEX sy-index

    INTO w_vttk_vttp WITH KEY vbeln = t_vbuk-vbeln COMPARING (tplst = c_tplst6 ) and

    ( tplst = c_tplst2) and

    tplst = c_tplst3) and

    tplst = c_tplst4 ).

    Hope this helps you

    Regards

    Sreenivas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 12:17 PM

    Hi,

    When i give the statement like

    LOOP AT t_vbuk WHERE trsta = c_trsta_b.

    l_count = sy-tabix.

    READ TABLE t_vttk_vttp INTO w_vttk_vttp WITH KEY

    vbeln = t_vbuk-vbeln

    tplst = c_tplst6 OR

    tplst = c_tplst2 OR

    tplst = c_tplst1 OR

    tplst = c_tplst4 OR

    tplst = c_tplst3 OR.

    IF sy-subrc NE 0.

    DELETE t_vbuk INDEX l_count.

    ENDIF.

    ENDLOOP.

    Iam getting the error "Unable to interpt "TPLST".Possible causes of error.Incorrect comma or spelling error".Please give me suggestions.

    Regards,

    srihitha

    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.