‎2007 Aug 28 9:00 AM
hallow
i try to do select from view and i get erorr ,what i miss?
LOOP AT zem_rec INTO wa_zem.
SELECT SINGLE ktext
FROM v_cskr_s
INTO wa_zem-ktext
WHERE resrc = g_r_resrc.
IF sy-sybrc = 0.
MODIFY zem_rec FROM wa_zem TRANSPORTING ktext.
ENDIF.
ENDLOOP.
<b>"V_CSKR_S" is not defined in the ABAP Dictionary as a table, projection
view, or database view.</b>
regards
‎2007 Aug 28 9:06 AM
hi
check whether a view with that name exists or not if not create one with that name
‎2007 Aug 28 9:05 AM
Hi!
v_cskr_s is a database view. Just check it out in SE11 transaction. It is a join of the tables
CSKR
CSKV
CSKR MANDT = CSKV MANDT
CSKR KOKRS = CSKV KOKRS
CSKR RESRC = CSKV RESRC
CSKR DATBI = CSKV DATBI
Put your select single, outside of the loop to increase the performance, if it is not using the wa in the where conditions. It will select always the same thing so it is not needed to run within the loop.
Regards
Tamá
‎2007 Aug 28 9:08 AM
hi Tamás Nyisztor
u can give me example i new with this topic?
Regards
‎2007 Aug 28 9:06 AM
hi
check whether a view with that name exists or not if not create one with that name
‎2007 Aug 28 9:22 AM
‎2007 Aug 28 9:37 AM
have you declared the view in the top of you're abap program in the table section ?
tables: v_cskr_s.
Message was edited by:
A. de Smidt
‎2007 Aug 28 9:45 AM
‎2007 Aug 28 9:47 AM
check if you can get values if you use se16n on that view otherwise use the joins instead for you're select.
‎2007 Aug 28 9:49 AM
hi a
u can give me example how to use join for that?
i reward
Regards
‎2007 Aug 28 9:55 AM
you don't need the join since all the fields are in cskv that you need
SELECT SINGLE ktext
FROM cskv
INTO wa_zem-ktext
WHERE resrc = g_r_resrc.
Message was edited by:
A. de Smidt