2008 Jun 16 3:59 PM
Hi,
i have this code and i have to use it in many FM (same function group) there is a way to use it in object oriented ?
i new to abap object.
PERFORM qua TABLES periods USING sy-datum.
READ TABLE periods INTO wa_periods INDEX 1.
PERFORM quar TABLES periods USING wa_periods-low.
READ TABLE periods INTO wa_periods INDEX 8.
PERFORM quar TABLES periods USING wa_periods-low.
SORT periods BY low.
DELETE ADJACENT DUPLICATES FROM periods.
LOOP AT periods ASSIGNING <fs_periods>.
IF sy-tabix < 8.
APPEND : <fs_periods> TO periods1.
ENDIF.
IF sy-tabix > 9.
APPEND : <fs_periods> TO periods2.
ENDIF.
ENDLOOP.Regards
2008 Jun 16 4:12 PM
you can create method with internal table periods as your input parameter
Do you just want to convert this bit alone into OO?
you can create method with internal table periods as your input parameter
Do you just want to convert this bit alone into OO?
2008 Jun 16 4:12 PM
you can create method with internal table periods as your input parameter
Do you just want to convert this bit alone into OO?
2008 Jun 16 9:05 PM
Hi Sriram Chandran ,
yes this is what i wont,
to convert this bit alone into OO.
.
Regards
2008 Jun 16 6:56 PM
i wouldn't bother with all that.
I would just create a new function module with that code. Add the appropriate IMPORTING/EXPORTING/TABLES parameters and you're ready to go.
Otherwise, you can just create a new INCLUDE program and store the code there. Then, whenever you need to call that code, just put
INCLUDE zyour_include_name
it doesn't have to be difficult.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |