‎2009 Sep 24 5:10 PM
Hi all,
I need to use this function module or some else like this to show in a screen the values from an internal work area.
The problem with this function module is when i call it referring an internal table it doesn't show anything.
Example:
TYPES: BEGIN OF ty,
line1(20) TYPE c,
END OF ty.
DATA: popup_campos TYPE STANDARD TABLE OF sval,
popup_linha LIKE LINE OF popup_campos,
popup_retorno TYPE rf_kennzx,
itab TYPE STANDARD TABLE OF ty,
wa TYPE ty.
popup_linha-tabname = 'ITAB'.
popup_linha-fieldname = 'LINE'.
popup_linha-field_attr = '02'.
popup_linha-value = <col>.
popup_linha-fieldtext = wa_componentes-name.
APPEND popup_linha TO popup_campos.
UNASSIGN <col>.
READ TABLE itab INDEX 1 INTO wa.
CALL FUNCTION 'POPUP_GET_VALUES'
EXPORTING
popup_title = 'Detalhes'
IMPORTING
returncode = popup_retorno
TABLES
fields = popup_campos
.
is there another way of doing this?
Regards
‎2009 Sep 24 5:12 PM
‎2009 Sep 24 5:12 PM
‎2009 Sep 24 5:22 PM
Hi,
Try:
POPUP_WITH_TABLE_DISPLAY_OK
or
POPUP_WITH_TABLE_DISPLAY2
or
POPUP_WITH_TABLE
Regards,
Subramanian
‎2009 Sep 24 8:36 PM
Hi Subramanian, you could try u2018IHC_FXNET_POPUP_PICK_FROM_LISTu2019 . You just give it an internal table and it will create a popup list from which you can choose a line. Basically it returns a line index. There is also u2018POPUP_WITH_TABLE_DISPLAY_OKu2019 which simply displays the list.
Kevin
‎2009 Sep 25 4:57 AM
Hi Pedro,
Try this program.
Thanks
Venkat.O
REPORT ztest_notepad.
DATA: it_makt TYPE makt OCCURS 0.
DATA: it_return_tab TYPE ddshretval OCCURS 0,
wa_return LIKE LINE OF it_return_tab.
START-OF-SELECTION.
IF it_makt[] IS INITIAL.
SELECT * FROM makt INTO TABLE it_makt WHERE spras = sy-langu..
ENDIF.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR'
dynpprog = sy-repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = it_makt
return_tab = it_return_tab.
IF sy-subrc EQ 0.
READ TABLE it_return_tab INTO wa_return INDEX 1.
IF sy-subrc EQ 0.
WRITE wa_return-fieldval.
ENDIF.
ENDIF.
‎2009 Sep 25 5:11 AM
Hi,
In my code below, it displays the error messages contained in the table. Check it out:
DEFINE m_fill_fieldcat.
wa_fieldcat-fieldname = &1.
wa_fieldcat-tabname = &2.
wa_fieldcat-seltext_m = &3.
wa_fieldcat-icon = &4.
wa_fieldcat-outputlen = &5.
append wa_fieldcat to lt_fieldcat.
clear wa_fieldcat.
END-OF-DEFINITION.
m_fill_fieldcat 'DOCNUM' 'LT_VIEW_ERRORS' text-h24 '' '20'.
m_fill_fieldcat 'MESSAGE' 'LT_VIEW_ERRORS' text-h25 '' '100'.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
* I_TITLE =
i_selection = gc_x
i_allow_no_selection = gc_x
i_zebra = gc_x
* i_screen_start_column =
* i_screen_start_line =
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_CHECKBOX_FIELDNAME =
* I_LINEMARK_FIELDNAME =
i_scroll_to_sel_line = gc_x
i_tabname = 'LT_VIEW_ERRORS'
* I_STRUCTURE_NAME =
it_fieldcat = lt_fieldcat
* IT_EXCLUDING =
* I_CALLBACK_PROGRAM =
* I_CALLBACK_USER_COMMAND =
* IS_PRIVATE =
* IMPORTING
* ES_SELFIELD =
* E_EXIT =
TABLES
t_outtab = lt_view_errors
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.