‎2007 Jul 26 7:59 AM
i am getting 8 records thru my select query ,now i want to save six records in six different variables via using case statement...
and later i will use all this variables in fetching data from database.
just go thru my codes:
select ATINN ATNAM from CABN into corresponding fields of I_CABN .
so when i_cabn-atnam = 'Z_BP_SOURCE'.
SOURCE = I_CABN-ATINN.
this i want to do 4 another 6 variables
just help
thanks in advance.
‎2007 Jul 26 8:04 AM
See this dynamic query
parameter : p_matnr type mara-matnr.
select single * from mara into wa_mara where (p_matnr).
Reward if useful
‎2007 Jul 26 8:07 AM
Hi
declare the 8 varaibles and
after select statement write the case statement and move the fields to these variables
select ATINN ATNAM from CABN into corresponding fields of I_CABN .
case i_cabn-atinn.
when 'Z_BP_SOURCE'.
v_var1 = i_cabn-atnam (or some other field).
when 'ZB_ATYUN'.
v_var2 = i_cabn-atnam .
.....................................
.....................................
endcase.
<b>Reward points for useful Answers</b>
Regards
Anji
‎2007 Jul 30 8:31 AM
‎2007 Jul 26 8:14 AM
sample:
data: condition1 type string.
concatenate 'ATINN =' I_CABN-ATINN into condition1.
select * from CABN
where (condition1).