05-18-2006 6:24 PM
Hello,
I have a seleccion screen and after the user inputs the values i make a select and with that i make a list using the function Display_Basic_List. What i want to know is how i can change the gui status when the list shows up.
Thanks,
Ricardo
05-18-2006 6:36 PM
Hi,
using the option 'excluding'
set pf-status 'STAT' excluding 'OKCODE'. or
set pf-status 'STAT' excluding extab.
extab is table of type sy-ucomm , it holds all okcodes to be deleted/excluded from status.
Regards
vijay
05-18-2006 6:39 PM
This may give you some idea.
data: fieldtab like dfies occurs 0 with header line.
* Field Catalog
data: begin of imarafc occurs 0,
fieldtext(50) type c,
end of imarafc.
* Data
data: begin of imaradt occurs 0.
include structure mara.
data: check(1) type c.
data: end of imaradt.
* Selected Records
data: begin of iseltab occurs 0.
include structure mara.
data: end of iseltab.
data: iconbutton(20) type c.
select-options: s_matnr for mara-matnr.
start-of-selection.
* Get Data
select * into corresponding fields of table imaradt
from mara
where matnr in s_matnr.
* Get the field table for table
call function 'GET_FIELDTAB'
exporting
langu = sy-langu
tabname = 'MARA'
withtext = 'X'
tables
fieldtab = fieldtab
exceptions
others = 1.
* Build field labels into field catalog
loop at fieldtab.
clear imarafc.
imarafc-fieldtext = fieldtab-fieldtext.
append imarafc.
endloop.
<b>* Build button 2
write icon_display as icon to iconbutton.
concatenate iconbutton 'Display' into iconbutton
separated by space.</b>
* Throw ALV
call function 'DISPLAY_BASIC_LIST'
exporting
basic_list_title = 'This is the title'
file_name = 'TEST'
head_line1 = 'This is heading 1'
head_line2 = 'This is heading 2'
* HEAD_LINE3 = ' '
* HEAD_LINE4 = ' '
foot_note1 = 'This is foot 1'
foot_note2 = 'This is foot 2'
* FOOT_NOTE3 = ' '
* LAY_OUT = 0
<b> dyn_pushbutton_text1 = 'Hey' " Buttons
dyn_pushbutton_text2 = iconbutton</b>
* DYN_PUSHBUTTON_TEXT3 =
* DYN_PUSHBUTTON_TEXT4 =
* DYN_PUSHBUTTON_TEXT5 =
* DYN_PUSHBUTTON_TEXT6 =
* DATA_STRUCTURE = ' '
current_report = 'ZRICH_0001' " Save Display Variant
* LIST_LEVEL = ' '
* ADDITIONAL_OPTIONS = ' '
* WORD_DOCUMENT =
* APPLICATION =
* OLDVALUES = ' '
* NO_ALV_GRID = 'X'
alv_marker = 'CHECK' " Selection field
* IMPORTING
* RETURN_CODE =
tables
data_tab = imaradt " Data
fieldname_tab = imarafc " Column Headings
select_tab = iseltab " Selected Rows
* ERROR_TAB =
* RECEIVERS =
* EXCEPTIONS
* DOWNLOAD_PROBLEM = 1
* NO_DATA_TAB_ENTRIES = 2
* TABLE_MISMATCH = 3
* PRINT_PROBLEMS = 4
* OTHERS = 5
.
<b> case sy-ucomm.
when 'BUT1'.
write:/ 'Button 1 was pressed'.
when 'BUT2'.
write:/ 'Button 2 was pressed'.
endcase.</b>
Regards,
RIch Heilman