2007 Aug 11 10:00 AM
hi frnds
some of them r telling that oo concept never allow Internal table with header ....i want 2 know that it is true r not ?...... is it true means they how selecting screen is working? it consist in build internal table with header.....
Hi Rama,
It is true that in OO internal table with header line is not allowed when passing to the methods as parameters only but not in the other cases. You will declare a work area inside your method or declare it globally to available to the class.
You wont pass select-options to the parameters of the methods.
Thanks,
Vinay
2007 Aug 11 10:04 AM
hI ram
in case of oops concept we have to create header line and internal table separately and we have to process recors from separate work area to internal table..
Rewar points to all helpful answers,
kiran.M
2007 Aug 11 10:10 AM
Hi Rama,
It is true that in OO internal table with header line is not allowed when passing to the methods as parameters only but not in the other cases. You will declare a work area inside your method or declare it globally to available to the class.
You wont pass select-options to the parameters of the methods.
Thanks,
Vinay
2007 Aug 11 9:19 PM
Hello Ramasubramanian
In classes we (fortunately) have to use itabs without header lines. Thus, you always have to use table types, either from the DDIC or self-defined.
Example:
DATA:
lt_knb1 TYPE STANDARD TABLE OF knb1,
ls_knb1 TYPE knb1.
SELECT * FROM knb1 INTO TABLE lt_knb1.
LOOP AT lt_knb1 INTO ls_knb1. " separate workarea, no header line
ENDLOOP.Within global classes you cannot call selection-screens directly. Instead you could call a function module where a selection screen is defined. You have to transfer the select-options (= itab with header line) to an itab without header line.
For details please refer to:
Regards
Uwe
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |