‎2011 Jan 25 4:03 AM
Hi EXperts,
Please guide me, i am new for modifiying the standard programs.
i want add the field custom field,i e pendding days.from iw59.
i copy the program to Z than i calculate the pendingdays.
that varible also append the final internal table.
but i cann't add the fieldcat,because there are not using manuallly.they are used as shown asbelow.
So please guide me any one how i can display the field.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = g_repid
i_internal_tabname = 'OBJECT_TAB'
i_structure_name = tabname
i_client_never_display = ' '
CHANGING
ct_fieldcat = g_fieldcat_tab[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
END-ENHANCEMENT-SECTION.
$$-Start: CREATE_FIELDCAT_F14_01----
$$
ENHANCEMENT 1 DIMP_GENERAL_MIOLXF14. "active version
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = g_repid
i_internal_tabname = 'OBJECT_TAB'
i_structure_name = tabname
i_client_never_display = ' '
INSERT BA-Project
i_bypassing_buffer = 'X'
END INSERT BA
CHANGING
ct_fieldcat = g_fieldcat_tab[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
ENDENHANCEMENT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_buffer_active = g_alv_buffer
i_callback_program = g_repid
i_callback_pf_status_set = g_form_set_pf_stat
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
is_layout = g_layout
it_fieldcat = g_fieldcat_tab[]
it_excluding =
it_special_groups = g_fieldgroups_tab[]
it_sort = g_sortfields_tab[]
it_filter =
is_sel_hide =
i_default = g_n
i_save = g_variant_save
i_save = g_a
is_variant = g_variant
it_events = g_events_tab[]
it_event_exit = g_event_exit_tab[]
is_print = g_print
i_screen_start_column = g_screen_start_column
i_screen_start_line = g_screen_start_line
i_screen_end_column = g_screen_end_column
i_screen_end_line = g_screen_end_line
it_except_qinfo = gt_qinf
importing
e_exit_caused_by_caller =
TABLES
t_outtab = object_tab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF NOT sy-subrc IS INITIAL.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ELSE.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_buffer_active = g_alv_buffer
i_callback_program = g_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
is_layout = g_layout
it_fieldcat = g_fieldcat_tab[]
it_excluding =
it_special_groups = g_fieldgroups_tab[]
it_sort = g_sortfields_tab[]
it_filter =
is_sel_hide =
i_default = g_n
i_save = g_variant_save
i_save = g_a
is_variant = g_variant
it_events = g_events_tab[]
it_event_exit = g_event_exit_tab[]
is_print = g_print
i_screen_start_column = g_screen_start_column
i_screen_start_line = g_screen_start_line
i_screen_end_column = g_screen_end_column
i_screen_end_line = g_screen_end_line
it_except_qinfo = gt_qinf
importing
e_exit_caused_by_caller =
TABLES
t_outtab = object_tab
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF NOT sy-subrc IS INITIAL.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Thanks advance
‎2011 Jan 25 4:09 AM
Hi,
Add your field to the structure : g_fieldcat_tab
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = '<your new field>'.
ls_fieldcat-ref_tabname = '<table reference>'.
ls_fieldcat-ddictxt = 'L'.
ls_fieldcat-outputlen = '15'.
APPEND ls_fieldcat TO g_fieldcat_tab.
Regards,
Srini.
‎2011 Jan 25 4:09 AM
Hi,
Add your field to the structure : g_fieldcat_tab
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
CLEAR ls_fieldcat.
ls_fieldcat-fieldname = '<your new field>'.
ls_fieldcat-ref_tabname = '<table reference>'.
ls_fieldcat-ddictxt = 'L'.
ls_fieldcat-outputlen = '15'.
APPEND ls_fieldcat TO g_fieldcat_tab.
Regards,
Srini.
‎2011 Jan 25 4:54 AM
Hi Srini,
Thanks For giving replay.
The problem was solved,
But whan i was run iw59 the output is coming Properlay,
than i copy the program and modifiyed as u said the out put fields are all not displayed.
Some of the field only displayed,it is showing the status main of userinterface zriqmel20 missing.
i copyed all the includes also,why it will shon like that,
please guide me what is problem.
Thanks advance.
‎2011 Jan 25 4:54 AM
Hi Srini,
Thanks For giving replay.
The problem was solved,
But whan i was run iw59 the output is coming Properlay,
than i copy the program and modifiyed as u said the out put fields are all not displayed.
Some of the field only displayed,it is showing the status main of userinterface zriqmel20 missing.
but i copyed all the includes ,why it will shon like that,
please guide me what is problem.
Thanks advance.
Edited by: krishnab121 on Jan 25, 2011 5:54 AM
‎2011 Jan 25 4:58 AM
Hi Krishna,
You also need to set the PF-status for your program. "zriqmel20".
Regards,
Srini.
‎2011 Jan 25 5:01 AM
Hi,
Please check if you have copied the PF-STATUS.. goto SE80 and give your program name in one session and the custom program name in other session..Now compare and see if you have copied everything.
Regards,
Nagaraj
‎2011 Jan 25 6:46 AM
Hi Srini,
THanks for giving repaly,
As you said i set the pf Satus.
Now the that msessge is not raise,but all the output fields are not displayed as like iw59.
There displayed only four to five fields.
Please guide me what is problem.
Thanks advance
‎2011 Jan 25 6:47 AM
Hi Nag,
THanks for giving repaly,
As you said i set the pf Satus.
Now the that msessge is not raise,but all the output fields are not displayed as like iw59.
There displayed only four to five fields.
Please guide me what is the problem.
Thanks advance
‎2011 Jan 25 6:58 AM
Hi,
Once you get the output please select the change layout button and then check and drag the fields ..
Regards,
Nagaraj
‎2011 Jan 25 8:24 AM