10-10-2008 4:12 PM
Hi,
I have created a drop down list using Selection-Screen code. I have three values in it. I would like to make one of the option as a default value. How to achieve it?
I am working on module pool program. I have few screens as a part of my program. I have created print button on tool bar of one screen but that print button is appearing on the other screens too. How to avoid it?
Help would be appreciated...
Thanks
Edited by: mohammed ibrahim on Oct 10, 2008 8:43 PM
10-10-2008 4:28 PM
if you make the list box field mandatory then it will be defaulted to some value. to avoid the print button in otherscreens you have two options , one using a different status . or using exclude option.
set pf-status 'STATUS' excluding 'PRINTSTATUS'.
10-11-2008 10:18 AM
Hey Vijay,
I want to make one particular value as default not any value from all the options.
and for the print option...
there is not PF Status for other screens on which this Print option is appearing
10-10-2008 5:15 PM
Hi,
TO make default valu in the list box, try using CALL FUNCTION 'VRM_SET_VALUES' in PBO.
Create your set PF-Status based on the screen nu,ber.
10-11-2008 10:33 AM
1) let drop down box be g_dd.
if g_dd is initial.
g_dd = option2.
endif.
2)
by default same pf-status is used by all the screens in the same program
if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
set pf-status 'abc' excluding 'fcode_of_button'
endif.
or
data: git_fcode type sy-ucomm with header line.
git_fcode = 'fcode_of_button'.
append git_fcode.
if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
set pf-status excluding git_fcode
endif.
Edited by: Amit Gupta on Oct 11, 2008 11:36 AM
10-11-2008 11:11 AM
Hi,
I also faced the same problem, just assign the default value in the parameter AT SELECTION SCREEN OUTPUT event
Eg.
AT SELECTION-SCREEN OUTPUT.
Build Drop down menu in the selection screen
PERFORM build_menu.
pr_doc = 'Default'.
Hope this helps.
Regards
Bikas
10-11-2008 11:22 AM
U can set the default values in the event 'INITIALIZATION'
example...
INITIALIZATION.
PERFORM initialization.
FORM initialization .
WRITE sy-datum(4) TO year1. "year1 is set using VRM_SET_VALUES.
ENDFORM. " INITIALIZATION
i think this will solve ur problem.....
10-14-2008 5:06 AM
Hey guys,
I could not solve my problem yet. Waiting for your help.
10-14-2008 5:35 AM
what exactly you are doing..? there is nothing complex in it. tell me where you facing the problem..
10-14-2008 5:51 AM