2008 Jan 04 11:15 AM
Hi Experts
I want to display the data as listbox in the dialog program, the data has to be read from the database as we see some standard transactions.
How to display the data into listbox, whether we need to write coding or can we set the property of the field.
Pls advise me.
Regards
Rajaram
Hi Experts
I want to display the data as listbox in the dialog program, the data has to be read from the database as we see some standard transactions.
How to display the data into listbox, whether we need to write coding or can we set the property of the field.
Pls advise me.
Regards
Rajaram
2008 Jan 04 12:02 PM
hi,
take that field as list box in screen.......
then make on module in POV...after PAI...
PROCESS ON VALUE-REQUEST.
FIELD ifmtp-form_type MODULE fm_drop.
Make one module in PAI....
MODULE fm_drop INPUT.
CLEAR ifmtp.
REFRESH ifmtp.
ifmtp-form_type = 'C'.
APPEND ifmtp.
ifmtp-form_type = 'F'.
APPEND ifmtp.
ifmtp-form_type = 'H'.
APPEND ifmtp.
ifmtp-form_type = 'D'.
APPEND ifmtp.
here write ur query ( Select Statement )
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FORM_TYPE'
value_org = 'S'
TABLES
value_tab = ifmtp.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDMODULE. " fm_drop INPUT
here ifmtp-form_type is my field which i take as listbox.....
and
DATA : BEGIN OF ifmtp OCCURS 0,
form_type LIKE zform_track_mast-form_type,
END OF ifmtp.
take one internal table with field which u declare as list box...
reward if useful...
2008 Jan 04 12:18 PM
i am giving here sample code for list box.hope it helps.thank you.
TYPES : BEGIN OF ty_code,
code TYPE zcomp_ys-comp_code,
END OF ty_code.
TYPES : BEGIN OF ty_comp,
code TYPE zcomp_ys-comp_code,
language TYPE zcomp_ys-language,
comp_name TYPE zcomp_ys-comp_name,
country TYPE zcomp_ys-country,
END OF ty_comp.
DATA : it_code TYPE STANDARD TABLE OF ty_code WITH HEADER LINE,
it_comp TYPE STANDARD TABLE OF ty_comp WITH HEADER LINE.
*&----
SELECTION SREEEN
*&----
SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETER : p_code LIKE it_code-code AS LISTBOX VISIBLE LENGTH 10.
SELECTION-SCREEN : END OF BLOCK b1.
*&----
AT SELECTION-SCREEN OUTPUT
*&----
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_code.
SELECT comp_code FROM zcomp_ys INTO TABLE it_code.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'CODE'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
callback_program = 'ZAL_REPT_LISTBOX_YS'
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = it_code
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*&----
START-OF-SELECTION
*&----
START-OF-SELECTION.
SELECT comp_code language comp_name country FROM zcomp_ys INTO TABLE
it_comp WHERE comp_code EQ p_code.
LOOP AT it_comp.
WRITE : / it_comp-code,
IT_COMP-COMP_NAME,
IT_COMP-LANGUAGE,
IT_COMP-COUNTRY.
ENDLOOP.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |