Need help to disable input selection-screen - very urgent
Hi SAP experts,
I have a requirement where in I need to disable ( Grey out ) the input fileds on the selection screen .
My problem is as I am using ABAP query I am not able to use any events ( AT SELECTION-SCREEN OUTPUT ).
My selection screen looks like this
MATERIAL NUMBER ( SELECT-OPTIONS)
MATERIAL TYPE ( PARAMETERS )
Now I want to add one more check box below the above fields on the selection-screen.When I click on the check-box,the MATERIAL NUMBER must be greyed out and MATERIAL TYPE should remain the same.
Please let me know the coding for the same. All answers would be rewarded.
Thanks in Advance,
Suresh.
Hi,
Check out these codes.
1.
TABLES : mara, makt.
parameter: p_matnr type mara-matnr,
p_maktx type makt-maktx.
at selection-screen output.
select single maktx
from makt
into p_maktx
where matnr = p_matnr
and spras = 'EN'.
loop at screen.
if screen-name = 'P_MAKTX'.
screen-input = 0.
modify screen.
endif.
endloop.
2.
TABLES : mara, makt.
TYPES:BEGIN OF tp_maktx,
maktx TYPE makt-maktx,
END OF tp_maktx.
DATA:t_maktx TYPE STANDARD TABLE OF tp_maktx,
wa_maktx TYPE tp_maktx.
SELECT-OPTIONS: s_matnr FOR mara-matnr.
SELECT-OPTIONS: s_maktx FOR makt-maktx.
INITIALIZATION.
REFRESH s_maktx[].
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'S_MAKTX-LOW' or screen-name = 'S_MAKTX-HIGH'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
REFRESH s_maktx[].
if s_matnr[] is not initial.
SELECT maktx FROM makt
INTO TABLE t_maktx
WHERE matnr IN s_matnr
AND spras = 'EN'.
endif.
LOOP AT t_maktx INTO wa_maktx.
s_maktx-low = wa_maktx-maktx.
APPEND s_maktx.
CLEAR:wa_maktx.
ENDLOOP.
3.
TABLES : mara, makt.
parameter p_cb1 type c as checkbox.
parameter p_cb2 type c as checkbox.
parameter p_cb3 type c as checkbox.
initialization.
loop at screen.
if screen-name = 'P_CB3'.
screen-invisible = 1.
modify screen.
endif.
endloop.
at selection-screen output.
*loop at screen.
*if screen-name = 'P_CB3'.
*screen-invisible = 1.
*modify screen.
*endif.
*endloop.
loop at screen.
if p_cb1 = 'X'.
if screen-name = 'P_CB2'.
screen-invisible = 1.
modify screen.
endif.
if screen-name = 'P_CB3'.
screen-invisible = 0.
modify screen.
endif.
endif.
if p_cb2 = 'X'.
if screen-name = 'P_CB3'.
screen-invisible = 1.
modify screen.
endif.
if screen-name = 'P_CB1'.
screen-invisible = 0.
modify screen.
endif.
endif.
if p_cb3 = 'X'.
if screen-name = 'P_CB1'.
screen-invisible = 1.
modify screen.
endif.
if screen-name = 'P_CB2'.
screen-invisible = 0.
modify screen.
endif.
endif.
endloop.
Reward if helpful..
Regards.
Similar Messages
-
Hiding variable values in the input selection screen.
Hello Experts,
We have an authorisation relevant characteristic on which we have built a variable. We have restricted few values for this characteristic through the analysis authorisation.
The business requirement is that these values which are maintained in the analysis authorisation should not be populated in the input selection screen for that particular variable. In other words we have to hide these values but the variable should a part of input selection screen.
Can anyone please guide on how can we hide these variable values inspite of maintaining them in our analysis authorisations.
Thanks..
Best Regds,
Suyog...Hi Suyog,
Have you got any solution on this issue. I have same kind of issue in BI7. When running the RSRT transaction manager has to give some comments for a document option. but the subordinates should not modify or see the comments. Is there any way to restrict this access to certain users. Our requirement is to either disable the document option or should not appear in the list.
please give your inputs to find a way to solution.
Thanks in advance.
Regards,,
Appala Raju -
I need below fields at my selection screen.From which table we can find the
Sales Org > only one selection field
Division > only one selection field
Channel > from u2013 to fields
Sales Office Channel > from u2013 to fields
Sales Rep Channel > from u2013 to fields
User ID of the CSR Channel > from u2013 to fields
Customer Channel > from u2013 to fields
Material Channel > from u2013 to fields
Date: Channel > from u2013 to fields
I need these fields at my selection screen.From which tables I find these things.I need this logic also.I need help
-
How to disable the Selection screens of LDB's ?
Hi,
How to disable the Selection screens of LDB's when we r using the predefined LDB for our executable pgm ? and how to include the predefined LDB can u write the Code for including LDb or if possible give an example of a Pgm using a Predefined LDB?
Thanks & Regards,
Gopi.Hi Gopi,
Go through the link,
http://www.sapdevelopment.co.uk/hr/hrhome.htm
Regards,
Azaz Ali. -
How to create a F4 help for a report selection screen field
hi,
can any one guide me to create F4 help for a field in a selection screen in a report program,plz give me a sample codehi,
Here are the following ways
1.with the help of match code objects we can create the F4 Functionality for Field.
Syntax is :
PARAMETERS: p_org LIKE t527x-orgeh MATCHCODE OBJECT zorg.
2. One more thing is we can do it with Search Help's also.
3. Even we can do it HELP Views also.
Help Views:
You have to create a help view if a view with outer join is needed as selection method of a search help
The selection method of a search help is either a table or a view. If you have to select data from several tables for the search help, you should generally use a database view as selection method. However, a database view always implements an inner join. If you need a view with outer join for the data selection, you have to use a help view as selection method.
All the tables included in a help view must be linked with foreign keys. Only foreign keys that have certain attributes can be used here. The first table to be inserted in the help view is called the primary table of the help view. The tables added to this primary table with foreign keys are called secondary tables.
The functionality of a help view has changed significantly between Release 3.0 and Release 4.0. In Release 3.0, a help view was automatically displayed for the input help (F4 help) for all the fields that were checked against the primary table of the help view. This is no longer the case in Release 4.0.
As of Release 4.0, you must explicitly create a search help that must be linked with the fields for which it is offered (see Linking Search Helps with Screen Fields ).
Existing help views are automatically migrated to search helps when you upgrade to a release higher than 4.0.
A help view implements an outer join, i.e. all the contents of the primary table of the help view are always displayed. You therefore should not formulate a selection condition for fields in one of the secondary tables of the help view. If records of these secondary tables cannot be read as a result of this selection condition, the contents of the corresponding fields of the secondary table are displayed with initial value.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 15, 2008 3:15 PM -
How to disable the selection screen element?
Hello Colleague,
I have a report which has a checkbox in the selection screen. Currently I need to create two transaction codes for the report. When Tcode1 is executed, the program will execute in normal way. When Tcode2 is executed, the checkbox should be selected and greyed (not ready to input).
To implement the requirement, I think I should control the screen in the INITIALIZATION event according to the SY-TCODE. But when I tried to use LOOP AT SCREEN, I find SCREEN is empty.
I search a lot of threads. They all introduce the selection control after screen is displayed.
Can any expert help me on the problem?
Thansk & Regards, Yongbo.I think you can use Screen Variants T.Code SHD0.
-
0FI_GL_4 data source input selection screen
Dear experts,
I have enabled the input selection option tickfor fields PRCTR and KOSTL in data source 0FI_GL_4 with RSA6.
Both the fields are available in extract checker RSA3 too. But while does not have any effect while running the extractor. PRCTR and KOSTL are not having any effect while using in selection screen. Kindly let me know if any process there to enhance the standard program by putting the extra field in the selection (open cursor).
JigarHi Leandro,
First, if you want to change a selection field, you need to do it in RSA6, checking the selection flag. I wouldn't touch the table..
Not always the filter is just checking the flag, I don't know particulary 0FI_GL_4, but the filter might be done in the Function Module logic.
Where have you updated that field? 0GL_ACCOUNT is an infoobject, so it's in BW. If you want to filter in the InfoPackage, you need to filter in ERP, so it's a field (HKONT) and not an Infoobject.
For 0FI_GL_4, if you check transaction RSA2, you'll see that selection is impossible, so I'm not sure if changing the table value manually would be enough.
Hope this helps.
Regards,
Diego -
Disable a selection screen field
Hi All,
I have 2 selection screen fields if enter any value in field 1 another field should be disabled with out pressing enter on the selection screen. am able to do disable by pressing enter onc i give the value in field 1.
Please do needful.
Thanks in advance.
Thanks,
Ramu.Hi Ramu,
As far as i know its not possible without pressing enter/Execute or any action on selection screen.
This is because report programming is event driven. So without any event i don't think we can achieve this.
Probably u can search in SDN/Google as well. If u r lucky enough some one has found some thing for you. But at the same time don't forget to update this thread if u find some thing:-)
Thanks,
Vinod. -
How to define f4 help for parameters in selection screen.
Hi Folks,
I have declared parametrs of type RLGRAP-FILENAME and i want to select the path for the application server file by pressing f4 during run time , not like typing the path in the field input. Pls help me how to do that.
Thanks in advance.
Regards
RajeshHai Rajesh
DATA: I_FILETABLE TYPE FILETABLE,
V_RC TYPE I.
PARAMETERS: P_FILE LIKE RLGRAP-FILENAME. "local file with contracts
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
EXPORTING
WINDOW_TITLE = 'Find File'
DEFAULT_EXTENSION = 'C:\'
DEFAULT_FILENAME = ''
FILE_FILTER = ',..'
INITIAL_DIRECTORY =
MULTISELECTION =
WITH_ENCODING =
CHANGING
FILE_TABLE = I_FILETABLE
RC = V_RC
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 4
others = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE I_FILETABLE INTO P_FILE INDEX 1.
Thanks & regards
Sreenivasulu P -
Help on having TWO selection screen in one report
Hi experts,
I do not know if this can be done. I need to have 2 selection screen. The first selection screen will get all the values from the database table based on the inputs.
After the user select the values already, it will do a database quay after which it will go to another selection screen for user to make further selection and after which it will display the results.
So i am wondering can this be done. And how do i do it?
Thanks!
LawrenceHi,
I getting the below code while browsing
===========================================
REPORT ztest.
TABLES : mara ,
t001 ,
t001w .
CONSTANTS : c_yes TYPE c VALUE '1' ,
c_no TYPE c VALUE '0' .
PARAMETERS : p_opt1 TYPE c RADIOBUTTON GROUP radi USER-COMMAND op1 ,
p_opt2 TYPE c RADIOBUTTON GROUP radi ,
p_opt3 TYPE c RADIOBUTTON GROUP radi .
SELECT-OPTIONS : s_mara FOR mara-matnr MODIF ID op1 , "Material
s_bukrs FOR t001-bukrs MODIF ID op2 , "Company Code
s_werks FOR t001w-werks MODIF ID op3 . "Plant
AT SELECTION-SCREEN OUTPUT .
LOOP AT SCREEN .
IF screen-group1 = 'OP1' .
IF p_opt1 = 'X' .
screen-invisible = c_no .
screen-active = c_yes .
ELSE.
screen-invisible = c_yes .
screen-active = c_no .
ENDIF.
MODIFY SCREEN .
ENDIF.
IF screen-group1 = 'OP2' .
IF p_opt2 = 'X' .
screen-invisible = c_no .
screen-active = c_yes .
ELSE.
screen-invisible = c_yes .
screen-active = c_no .
ENDIF.
MODIFY SCREEN .
ENDIF.
IF screen-group1 = 'OP3' .
IF p_opt3 = 'X' .
screen-invisible = c_no .
screen-active = c_yes .
ELSE.
screen-invisible = c_yes .
screen-active = c_no .
ENDIF.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
======================= -
F4 search-help in infoset query selection-screen fields
Hi all,
I created an infoset, and it's corresponding query, and now I need to associate F4 search-help in two of the selection-screen fields. Since they don't have any reference field associated (they are SAP standard table fields), there are no possible values available to select.
How can I do this?
I have already tried to use the "AT SELECTION-SCREEN OUTPUT" in the infoset, but I'm not able to do that. When I try to use the select-options generated by the query (SP$00013 and SP$00014) I have a syntax error with "Field not known".
Can you help me? I never done this before, so I really don't have a guess.
Thanks in advance.
Beste regards,
Sónia GonçalvesHi all,
I have found thread that helped me a lot in this issue.
I just have one more doubt: I created the selection criterion and I can already see it in the query selection-screen, but it's appearing in the top of the selection-screen, in a different area called "General data selections".
Isn't it possible to include it in the "Report-specific selctions"?
Thanks in advance.
Best regards,
Sónia Gonçalves -
Need solution for the following(Selection Screen)
Hi all,
currently iam working with report program,there i need to populate one field in the selection screen based on the another parameter in the same selection screen.
iam having field called work center as a parameter with the search help.
This search help is providing the corresponding plant for the particular work center.
Now what i need to do is,if i select the work center thru F4 help,i need the correseponding plant to get populated in the other textbox.
Currently iam having that work center field as parameter,
now i need another textbox for the plant adjacent to this workcenter textbox,in this textbox only i need that corresponding plant.
Following is the code for that workcenter textbox.
PARAMETERS:P_ARBPL LIKE CRHD-ARBPL MATCHCODE OBJECT CRAM.
Note: The Serach help CRAM is having corresponding plant with the workcenter.Hi swaminathan,
1. If u want to DIRECTLY
populate other fields
based upon selection,
then we have to use our own
selection function.
2. just copy paste this code in new program.
( it will display help for BUKRS
and AS SOON AS the user selects some company code,
the other fields
get populated AUTOMATICALLY)
3.
REPORT abc.
DATA : dd LIKE TABLE OF dselc WITH HEADER LINE. "*--- IMPORTANT
DATA : ft LIKE TABLE OF dfies WITH HEADER LINE.
DATA : t001 LIKE TABLE OF t001 WITH HEADER LINE.
PARAMETERS : bukrs LIKE t001-bukrs .
PARAMETERS : butxt LIKE t001-butxt.
PARAMETERS : ort01 LIKE t001-ort01.
PARAMETERS : waers LIKE t001-waers.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR bukrs.
SELECT * FROM t001 INTO TABLE t001.
IMPORTANT
REFRESH dd.
dd-fldname = 'BUTXT'.
dd-dyfldname = 'BUTXT'.
APPEND dd.
dd-fldname = 'ORT01'.
dd-dyfldname = 'ORT01'.
APPEND dd.
dd-fldname = 'WAERS'.
dd-dyfldname = 'WAERS'.
APPEND dd.
*------- IMPORTANT
REFRESH ft.
ft-tabname = 'T001'.
ft-fieldname = 'BUTXT'.
APPEND ft.
ft-tabname = 'T001'.
ft-fieldname = 'WAERS'.
APPEND ft.
ft-tabname = 'T001'.
ft-fieldname = 'ORT01'.
APPEND ft.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
ddic_structure = 'T001' "*----- IMPORTANT IF STANDARD STRUCT
retfield = 'BUKRS'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'BUKRS'
value_org = 'S'
TABLES
field_tab = ft "*---- IMPORTANT
value_tab = t001
dynpfld_mapping = dd "* IMPORTANT
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
regards,
amit m. -
F4 help on Bex query selection screen
Hi,
On the selection screen of a particular field of Bex query , if the user selects F4 help (input value help), typically it picks up all values in the infoprovider for that field.
Is there any way to retrict those values.
Eg : Cube has values A, B , C for field A .
When the user selects value help on field A of the Bex query written on the cube, the requirement is to show only A and B.
thanks.Hi,
We do this in our project:
you can use BW Reporting Variable type Auth Exit.
In the Step 0, you define what are allowed for that user. It will then automatically show only auth.zed values.
Best Regards,
Suan Liono. -
Need help in giving the selection criteria
Hi Guyz,
I have a table with to fields, From_field and to_field and i have a selection screen field s_input.
Now i need to fetch the row where s_input is between from_field and to_field.
I have written the logic as from_field >= s_input AND
to_field <= s_input.
It is not giving the correct results.
Can you suggest an alternative way to giving the condition.
Regards,
ChitrasenHi Chitrasen,
can you please bit clear about your requirement.
your input field is S_INPUT , Is It between FROM_DATE and TO_DATE or You need to fetch the data based on input passed in Selection screen ( LOW and HIGH value ) ?
Logic :
If your Input is a select option , try to write a logic like below.
Where FROM_DATE IN S_INPUT and TO_DATE in S_INPUT.
Edited by: Prasath Arivazhagan on May 27, 2010 2:41 PM -
Hi. I'm making a DateTimePicker (DTP), and I need help on getting a method to return a Date only when the DTP is closed, and I want this to be done in the DTP class itself.
For now, I've used an infinite loop and it seems to work fine without lagging the computer (my computer is above average), but I'm not sure if there's another more efficient way.
I would prefer not to use threads, but if that's the only option then I suppose it's unavoidable.
I'm using:
while(true){
switch(returnState){
case UNINITIALIZED: continue;
case SET: return cal.getTime();
case CANCELED:
default:
return null;
}Screenshots:
http://i34.tinypic.com/53rb7n.png
http://i33.tinypic.com/2nsxct4.png
Azriel~You could put any component in a JOptionPane or a JDialog and then easily query the component for results once it has returned.
For example:
QueryComponent.java creates a component that can be placed in a JOptionPane and then queried.
import java.awt.GridLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JComponent;
import javax.swing.JTextField;
* A simple component that has two JTextFields and two
* corresponding "getter" methods to extract information
* out of the JTextFields.
* @author Pete
public class QueryComponent
private JPanel mainPanel = new JPanel();
private JTextField firstNameField = new JTextField(8);
private JTextField lastNameField = new JTextField(8);
public QueryComponent()
mainPanel.setLayout(new GridLayout(2, 2, 5, 5));
mainPanel.add(new JLabel("First Name: "));
mainPanel.add(firstNameField);
mainPanel.add(new JLabel("Last Name: "));
mainPanel.add(lastNameField);
public String getFirstName()
return firstNameField.getText();
public String getLastName()
return lastNameField.getText();
// get the mainPanel to place into a JOptionPane
public JComponent getComponent()
return mainPanel;
}QueryComponentTest.java places the component above into a JOptionPane, shows the pane, and then queries the QueryComponent object for the results.
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JComponent;
public class QueryComponentTest
private JPanel mainPanel = new JPanel();
public QueryComponentTest()
JButton getNamesBtn = new JButton("Get Names");
getNamesBtn.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
getNamesAction();
mainPanel.add(getNamesBtn);
// occurs when button is pressed
private void getNamesAction()
// create object to place into JOptionPane
QueryComponent queryComp = new QueryComponent();
// show JOptionPane
int result = JOptionPane.showConfirmDialog(mainPanel,
queryComp.getComponent(), // place the component into the JOptionPane
"Get Names",
JOptionPane.INFORMATION_MESSAGE);
if (result == JOptionPane.OK_OPTION) // if ok selected
// query the queryComp for its contents by calling its getters
System.out.println("First Name: " + queryComp.getFirstName());
System.out.println("Last Name: " + queryComp.getLastName());
public JComponent getComponent()
return mainPanel;
private static void createAndShowUI()
JFrame frame = new JFrame("QueryComponentTest");
frame.getContentPane().add(new QueryComponentTest().getComponent());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
public static void main(String[] args)
java.awt.EventQueue.invokeLater(new Runnable()
public void run()
createAndShowUI();
}Edited by: Encephalopathic on Sep 29, 2008 8:16 PM
Maybe you are looking for
-
System is showing Bill Doc No in VF01 but in VF02 - No billing doc generate
While creating invoice using Billing Plan, only for certain contacts, we face an issue. In VF01-The system is saying Billing document XXXXXX123 is created but in VF02 , we are not able to see any document and the system says No billing document is g
-
Issue in 11.1.2 Essbase configuration on Linux 5.5 64Bit - Config hangs
Hi Experts, I am trying to do a fresh install and configure of EPM 11.1.2 in a distributed environment: 1. Oracle database version 11.20as repository on Linux server 1(linux 5.5, 64 bit) installed and working fine. 2. I installed and configured HSS o
-
Hello, i've a problem with my Q10 camera gallery whenever i take a photo from Q10 camera my photo gellery doesnt get updated with the latest photos i captured. but after some time (half an hour may be) it gets updated automatically with all latest p
-
We have a 2 x 2 GHz G5 which was recently upgraded to X.4.5 and connected to a Gigabit switch. Everything initially worked fine. The other day the computer crashed while compressing files in Cleaner, and since then it won't connect to our server anym
-
NoClassDefFoundError in PagePhaseListener
Hello, I have a extend class from PagePhaseListener and this is add to PageDef in property ControllerClass. When to perform the aplication in the Integrated WebLogic show the next Problem: ]] Root cause of ServletException. java.lang.NoClassDefFoundE