‎2008 Jun 27 6:47 PM
hi,
in 4.6, my statement was
READ TABLE S_XVTTS WHERE TKNUM = S_XVTTK-TKNUM
AND NOT S_XVTTS-VSTEL IS INITIAL.
This wont work in ECC 6.0, hence I need to modify this. so i write like
READ TABLE S_XVTTS INTO wa_vttsvb WITH KEY TKNUM = S_XVTTK-TKNUM ..................................
how to accomodate the check for NOT initial of S_XVTTS-VSTEL .. how will my statement look like ? thks
‎2008 Jun 27 7:50 PM
You can't use inequality condition in READ TABLE statement.
Try this:
S_XVTTS1[] = S_XVTTS[].
DELETE S_XVTTS1 where S_XVTTS-VSTEL IS NOT INITIAL.
READ TABLE S_XVTTS1 INTO wa_vttsvb WITH KEY TKNUM = S_XVTTK-TKNUM.
IF sy-subrc = 0.
ENDIF.
‎2008 Jun 27 6:50 PM
hello,
After the READ stmnt, use a CHECK stmnt for the logic that follows after ur READ stmnt.
READ... .
CHECK NOT XVTTS-VSTEL IS INITIAL.
..
..
ur logic.
Rgds,
Raghu.
‎2008 Jun 27 7:04 PM
Hi Sdnuser1,
Try to use LOOP statement as follow.
"// This LOOP read only one line of table s_xvtt exactly as READ TABLE do.
LOOP AT s_xvtts INTO wa_vttsv WHERE tknum EQ s_xvttk-tknum AND s_xvtts-vstel IS NOT INITIAL.
EXIT.
ENDLOOP.
IF sy-subrc IS INITIAL.
"// You can use wa_vttsv
ELSE.
"// Do something
ENDIF.
I hope it helps yous.
Greetings.
Marcelo Ramos
‎2008 Jun 27 7:09 PM
Hi,
If the value you are checking is initial then what is the purpose to read the table...
If this is your context.
Check that particular field whether it is initial or not before reading the table..
if not then read the table..
Hope this would help you.
Regards
Narin Nandivada.
‎2008 Jun 27 7:30 PM
‎2008 Jun 27 7:50 PM
You can't use inequality condition in READ TABLE statement.
Try this:
S_XVTTS1[] = S_XVTTS[].
DELETE S_XVTTS1 where S_XVTTS-VSTEL IS NOT INITIAL.
READ TABLE S_XVTTS1 INTO wa_vttsvb WITH KEY TKNUM = S_XVTTK-TKNUM.
IF sy-subrc = 0.
ENDIF.