11-23-2007 11:23 AM
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
11-23-2007 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.
11-23-2007 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
11-23-2007 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.
11-23-2007 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.
11-23-2007 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
11-23-2007 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