Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reg: ListBox in table control

Former Member
0 Likes
758

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

4 REPLIES 4
Read only

sivasatyaprasad_yerra
Product and Topic Expert
Product and Topic Expert
0 Likes
731

Hi,

Check this thread : [;

Reward points if useful

Regards,

Siva.

Read only

Former Member
0 Likes
731

Hi,

I think you habe to apply F4 help to the List Box Field.

Regards

Sandipan

Read only

Former Member
0 Likes
731

&----


*& 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

Read only

former_member200872
Active Participant
0 Likes
731

Hi,

check this out >>

With Regards,

Wajid Hussain P