‎2007 Jan 29 7:07 AM
c i have used a func. module to calculate the values of date , i wrote a subroutine i want the values of this to be dispalyed on the list...
now how do i get them to the list output, i mean how do i assign to the fieldcatalog?????
thanks,
CAPC
‎2007 Jan 29 7:10 AM
‎2007 Jan 29 7:11 AM
Hi
its unclear if u want to display the values on a normal list or alv..
however if its an alv use any of the following fms
reuse_alv_list_display
REUSE_ALV_FIELDCATALOG_MERGE
hope this helps,
all the best,
sampath
*mark helpful answers
‎2007 Jan 29 7:23 AM
hi
if you want to display a value calculated for date in every record then add a new field to the internal table which you are tying to give as output. populate this field with your vales and then use it for display.
if you are trying to get the values from the selection screen then make the parameter GET_SELINFOS in the layot structure as 'X'.
-
Santosh
‎2007 Jan 29 7:28 AM
Hi CAPC,
Plese find below a sample program which will solve u r broblem.
report abc.
TYPE-POOLS : slis.
*----
Data
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE t001.
DATA : flag tyPE c,
END OF itab.
DATA : alvfc TYPE slis_t_fieldcat_alv.
DATA : alvly TYPE slis_layout_alv.
*----
Select Data
SELECT * FROM t001 INTO TABLE itab.
*------- Field Catalogue
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB'
i_inclname = sy-repid
CHANGING
ct_fieldcat = alvfc
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*----
Display
alvly-box_fieldname = 'FLAG'.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
it_fieldcat = alvfc
i_callback_program = sy-repid "<-------Important
i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
is_layout = alvly
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
*----
CALL BACK FORM
*----
FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
slis_selfield.
data : msg(100) type c.
LOOP AT itab.
if itab-flag = 'X'.
msg = sy-tabix.
condense msg.
concatenate 'Row Number ' msg ' ' into msg
separated by space.
message msg type 'I'.
endif.
ENDLOOP.
ENDFORM. "ITAB_user_command
Regards,
Sunil
‎2007 Mar 22 5:49 AM