2008 Jun 11 4:54 AM
Hi Experts,
I have used listBox inside a table control.
When i try to retrieve the details, iam not able to get the value that was selected in the listbox which is inside the table control.
Can anyone help me on how to achieve it in detail. Step by step explanation with Sample code will be greatly appreciated.
Regards
Naveen
Hi Experts,
I have used listBox inside a table control.
When i try to retrieve the details, iam not able to get the value that was selected in the listbox which is inside the table control.
Can anyone help me on how to achieve it in detail. Step by step explanation with Sample code will be greatly appreciated.
Regards
Naveen
2008 Jun 11 1:18 PM
2008 Jun 11 1:49 PM
Hi,
I think you habe to apply F4 help to the List Box Field.
Regards
Sandipan
2008 Jun 30 10:34 AM
&----
*& Report ZTABLEC
*&
&----
*&
*&
&----
REPORT ZTABLEC.
tables : mara.
data : it like mara occurs 0 with header line.
data : begin of it1 occurs 0 ,
matnr like mara-matnr ,
end of it1 .
*data : begin of it occurs 0 ,
matnr like mara-matnr ,
end of it .
data: OK_CODE type SY-UCOMM .
data :STATUS like zaiod3-status .
controls : t1 type tableview using screen 1000.
call screen 1000.
&----
*& Module STATUS_1000 OUTPUT
&----
text
----
MODULE STATUS_1000 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
select * from mara into table it up to 10 rows.
ENDMODULE. " STATUS_1000 OUTPUT
&----
*& Module USER_COMMAND_1000 INPUT
&----
text
----
MODULE USER_COMMAND_1000 INPUT.
IF SY-UCOMM = 'SAVE'.
IT-MATNR = mara-matnr.
append it.
modify MARA from it.
ENDIF.
ENDMODULE. " USER_COMMAND_1000 INPUT
&----
*& Module create_dropdown_box INPUT
&----
text
----
MODULE create_dropdown_box INPUT.
SELECT matnr FROM mara
INTO CORRESPONDING FIELDS OF TABLE it1.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'MATNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT1
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.
ENDMODULE. " create_dropdown_box INPUT
procedure.....
above coding do in se38
go to se51 make a table control go to secondary window click on dictionary table control fields for passing data from database now select the column on which u want to list box double click on that in the toolbox click dropdownbox select listbox ...
save check activate
go to layout......
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
loop at it with control t1.
endloop.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1000.
loop at it.
endloop.
MODULE USER_COMMAND_1000.
PROCESS ON VALUE-REQUEST.
FIELD mara-matnr MODULE create_dropdown_box.
save check activate
regards
Aniruddh Singh
+9221425684
2008 Jul 01 7:37 AM