04-20-2009 7:34 PM
Hi All,
I have a requiremnet to generate the list similar to F4 help. I am using the FM "F4IF_INT_TABLE_VALUE_REQUEST" for genrating the list and this list contain all the valid data. Now the issue is i am using this FM on PAI event so the screen input has been disabled and i am not able to select any values from this list. This is working fine in POV. Any suggestion...............or any alternative solution is more than welcome.........
Thanks,
Manish
04-20-2009 7:45 PM
HI Manish,
See the sample code how to use FM 'REUSE_ALV_POPUP_TO_SELECT' in PAI
gt_fieldcat_drd-seltext_m = 'OpenQty'.
gt_fieldcat_drd-fieldname = 'MENGE'.
APPEND gt_fieldcat_drd.
CLEAR : gt_fieldcat_drd.
gt_fieldcat_drd-seltext_m = 'Delvry Date'.
gt_fieldcat_drd-fieldname = 'EINDT'.
APPEND gt_fieldcat_drd.
CLEAR : gt_fieldcat_drd.
gt_fieldcat_drd-seltext_m = 'Sloc'.
gt_fieldcat_drd-outputlen = 4.
gt_fieldcat_drd-fieldname = 'LGORT'.
APPEND gt_fieldcat_drd.
CLEAR : gt_fieldcat_drd.
DESCRIBE TABLE t_sto LINES w_ln.
IF w_ln GT 1.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
i_title = w_text "Pop up screen titile
i_selection = 'X'
i_screen_start_column = 5 "default screen size
i_screen_start_line = 5 "default screen size
i_screen_end_column = 106 "default screen size
i_screen_end_line = 20 "default screen size
i_tabname = 'T_STO' "table name in sngle codes
it_fieldcat = gt_fieldcat_drd[] "BUild Field catalog like Alv report
IMPORTING
es_selfield = gc_selfield "It caches the index and field you selected
TABLES
t_outtab = t_sto "table name for F4 help
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc = 0.
"* Reading table and populating values to screen
READ TABLE t_sto INTO wa_sto INDEX gc_selfield-tabindex.
If sy-subrc = 0.
Move respective field to screen field.
endif.
ENDIF.
ELSE.
"* Reading table and populating values to screen
READ TABLE t_sto INTO wa_sto INDEX 1.
If sy-subrc = 0.
Move respective field to screen field.
endif.
ENDIF.
...manish put some flag or check other wise the PopUp will trigger every time when ever PAI is triggered..
Regds / Prabhu
04-20-2009 7:39 PM
04-20-2009 7:45 PM
HI Manish,
See the sample code how to use FM 'REUSE_ALV_POPUP_TO_SELECT' in PAI
gt_fieldcat_drd-seltext_m = 'OpenQty'.
gt_fieldcat_drd-fieldname = 'MENGE'.
APPEND gt_fieldcat_drd.
CLEAR : gt_fieldcat_drd.
gt_fieldcat_drd-seltext_m = 'Delvry Date'.
gt_fieldcat_drd-fieldname = 'EINDT'.
APPEND gt_fieldcat_drd.
CLEAR : gt_fieldcat_drd.
gt_fieldcat_drd-seltext_m = 'Sloc'.
gt_fieldcat_drd-outputlen = 4.
gt_fieldcat_drd-fieldname = 'LGORT'.
APPEND gt_fieldcat_drd.
CLEAR : gt_fieldcat_drd.
DESCRIBE TABLE t_sto LINES w_ln.
IF w_ln GT 1.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
i_title = w_text "Pop up screen titile
i_selection = 'X'
i_screen_start_column = 5 "default screen size
i_screen_start_line = 5 "default screen size
i_screen_end_column = 106 "default screen size
i_screen_end_line = 20 "default screen size
i_tabname = 'T_STO' "table name in sngle codes
it_fieldcat = gt_fieldcat_drd[] "BUild Field catalog like Alv report
IMPORTING
es_selfield = gc_selfield "It caches the index and field you selected
TABLES
t_outtab = t_sto "table name for F4 help
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc = 0.
"* Reading table and populating values to screen
READ TABLE t_sto INTO wa_sto INDEX gc_selfield-tabindex.
If sy-subrc = 0.
Move respective field to screen field.
endif.
ENDIF.
ELSE.
"* Reading table and populating values to screen
READ TABLE t_sto INTO wa_sto INDEX 1.
If sy-subrc = 0.
Move respective field to screen field.
endif.
ENDIF.
...manish put some flag or check other wise the PopUp will trigger every time when ever PAI is triggered..
Regds / Prabhu