‎2008 Sep 15 2:24 PM
hi,
i have a selection screen having 3 fields:-
SELECTION-SCREEN: BEGIN OF SCREEN 300.
SELECT-OPTIONS : S_VBELN FOR VBAK-VBELN,
S_FKDAT FOR VBRK-FKDAT,
S_KUNNR FOR KNA1-KUNNR.
SELECTION-SCREEN: END OF SCREEN 300.
when user enters data in this feilds and press F8 the output should be displayed in a table control picking data from table zmail.
how to code this..and bring the result to table control.
thnx..
‎2008 Sep 15 2:35 PM
Hi,
Use the Function Module to show the output in Table Control Format : REUSE_ALV_GRID_DISPLAY
Revert back need any help.
Regards,
Saran
‎2008 Sep 15 2:37 PM
Hi,
I think you need some more functions after displaying the data.
Otherwise ALV could be enough.
To display the data through table control,
create an internal table containing the fields you need and
create a screen, assume numbered as 0100 and
on this screen, go to layout of this screen and
use Table Control With Wizard(third button from buttom)
at later steps select Internal Program Table instead of Dictionary table and provide your internal table that you have created at source code side.
Go on the way please.
Hope helps.
deniz.
‎2008 Sep 15 3:02 PM
Hi Rudra Narayan Sahoo,
Do you know the logic of dialog programming and the logic of using table control?
You have to select your data 'process before output' of the screen and you can process data after process after input.
Since your internal table is the table used at table control,
it will display all data selected.
deniz.
‎2008 Sep 15 3:44 PM
Hi,
1. create a program in se38 as,
REPORT zgtest100.
TABLES :zmail.
CONTROLS tcn TYPE TABLEVIEW USING SCREEN 100.
DATA : itab LIKE STANDARD TABLE OF zmail.
SELECTION-SCREEN: BEGIN OF SCREEN 300.
SELECT-OPTIONS : S_VBELN FOR VBAK-VBELN,
S_FKDAT FOR VBRK-FKDAT,
S_KUNNR FOR KNA1-KUNNR.
SELECTION-SCREEN: END OF SCREEN 300.
CALL SCREEN 300.
if S_VBELN is not initial.
call screen 100.
endif.
&----
*& Module fill_itab OUTPUT
&----
text
----
MODULE fill_itab OUTPUT.
select * from ZMAIL into corresponding fields of table itab
where vbeln in S_VBELN and
fkdat in S_FKDAT and
kunnr in S_KUNNR .
ENDMODULE. " fill_itab OUTPUT
2. Create a screen in SE51 with the same program name as above.
-place a table control.
-import the structure by clicking F6.
in flow logic write the code as below,
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
module fill_itab. " module written above
loop at itab into zmail with control tcn.
endloop.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
loop at itab.
endloop.