05-12-2009 9:56 AM
I made an Internal Table and then append rows........enter hardcoded rows in the Internal Table.......
and now i made Parameter through where i enter id and semester and two group button options....
I know comparison operator but i can't do comparison between Internal Table Field and through Parameter value.........solove my problem.
Thanks in advance
05-12-2009 9:59 AM
Hi MKashif,
You need to loop through the internal table. Move every row of your internal table in to a structure. The compare the strucutre field with your parameter value. Guess this is what you were looking for.
Best Regards,
Ram.
05-12-2009 9:59 AM
you have to read the internal table and then compare with the parameter...
05-12-2009 10:00 AM
Hello,
1. Loop at the internal table
2. compare the field of the internal table with the parameter entered. suppose field2 is the corresponding field for parameter value, then use the statement : If tab-field2 eq p_parameter.
Thanks,
Sowmya
05-12-2009 10:02 AM
Hi,
You can do it, simply by looping the itab.
data: begin of itab occurs 0,
val1(10) type c,
end of itab.
parameters: p_val(50) type c.
itab-val1 = 'SAP ABAP'.
append itab. clear itab.
loop at itab.
if itab-val1 = p_val.
write:/ 'Equal'.
else.
write:/ 'Not equal'.
endif.
endloop.
05-12-2009 10:04 AM
Hi:
read table <Internal table> into <workarea> with key
id = parameter-id
semester = parameter-semester.
or
loop at itab into workarea
if workarea-id = parameter-id
endif.
endloop.
Like this you can do.
Regards
Shashi
05-12-2009 10:12 AM
types : begin of itab,
F1(10) type c,
F2(10) type c,
F3(10) type c,
F4(10) type c,
end of itab.
Data : wa_itab type itab,
Itab2 type itab occurs 0 with header line.
parameter : ERP(10) type c,
Modul(10) type c,
site(10) type c,
subtype(10) type c.
at selection-screen .
wa_itab-F1 = 'sap'.
wa_itab-F2 = 'abap'.
wa_itab-F3 = 'sdn'.
wa_itab-F4 = 'forums'.
append wa_itab to itab2.
clear wa_itab.
TRANSLATE ERP TO LOWER CASE.
loop at itab2 into wa_itab.
if ERP = wa_itab-f1.
message 'Parameter input is correct' TYPE 'I'.
else.
message 'wrong entry' TYPE 'E'.
endif.
endloop.
05-12-2009 10:56 AM
basically i work on Student Transcript System.
i have done insertion in internal table via hardcoding.........and then make parameters of 3 types id, session and full or partial (Radio Group)......
so i make comparison twice at time
1. id & partial condition
if i select partial........then it shows only session result which i wrote in parameter field
2. id & full condition
if i select full......then complete result is shown of the given ID.
Now i am facing problem how to compare radio group option & session value & id of student?
Thanks in advance.
07-24-2009 12:59 PM