01-09-2008 12:52 PM
hi anyone can help and advise how i can use contain string coz below it doesn't work
do you think
may b i can concatenate wa_edmse-lfsnr + * in a variable
then read where that variable
loop i_edmsa into wa_edmse
read table i_nast into wa_nast
with key objky CS wa_edmse-lfsnr.
endloop
01-09-2008 3:56 PM
In the READ TABLE statement, key fields are assigned values using '=' operator. Most people confuse '=' with the 'EQ' operator in the READ statement as this interchangeabilty is allowed in other statements like IF e.g.
IF something EQ something_else.
vs
IF something = something_else.
Both the above IF statements work correctly. But the same is not true with READ TABLE. You have to use '=' operator (instead of CS) as that is the operator for the assignment.
I think, you need to use a loop for i_nast with a where clause and then in the where clause you may use CS.
Hope this helps.
Thanks
Sanjeev
01-09-2008 3:56 PM
In the READ TABLE statement, key fields are assigned values using '=' operator. Most people confuse '=' with the 'EQ' operator in the READ statement as this interchangeabilty is allowed in other statements like IF e.g.
IF something EQ something_else.
vs
IF something = something_else.
Both the above IF statements work correctly. But the same is not true with READ TABLE. You have to use '=' operator (instead of CS) as that is the operator for the assignment.
I think, you need to use a loop for i_nast with a where clause and then in the where clause you may use CS.
Hope this helps.
Thanks
Sanjeev
01-10-2008 4:32 AM
what if i do like that
SELECT objky datvr uhrvr
FROM nast
INTO TABLE i_nast
WHERE kappl EQ c_v2
AND vstat EQ c_1
AND kschl EQ lv_zzparm1.
IF sy-subrc EQ 0.
SORT i_nast BY objky.
LOOP AT i_EDMSE
CLEAR: wa_nast, lv_lfnr.
Search object key that contain delivery note
CONCATENATE wa_edmse-lfsnr c_ast INTO lv_lfnr.
READ TABLE i_nast INTO wa_nast
WITH KEY objky = lv_lfnr.
IF sy-subrc EQ 0.
exclude AAD print output that was processed after goods issue
IF wa_nast-datvr LT wa_edmse-budat.
CONTINUE.
ENDIF.
endloop
01-10-2008 4:39 AM
Hi,
I don't think read table can work with CS..
Regards,
Mohaiyuddin
01-10-2008 4:55 AM
Hi,
you can do this way :
Loop at itab.
if not fld CS 'xxxxx'
delete the row .
continue.
endloop.
Regards,
Rajashree
01-10-2008 4:57 AM
Hi ,
you can do this way :
Loop at itab.
if not fld CS 'xxxxx'
Do the reqd processing..
endloop.
Regards,
Rajashree
01-10-2008 5:06 AM
CONCATENATE wa_edmse-lfsnr c_ast INTO lv_lfnr.
READ TABLE i_nast INTO wa_nast
WITH KEY objky = lv_lfnr.
Note that lv_lfnr = wa_edmse-lfsnr + *