How to change the view element visibility Dynamically?
Hi,
Can any one please suggest that how can I make one of the viewUIElements from the view, visible on the whole screen? Basically i want to make the data in the table, available for printing. I want when user clicks on the print button, he should see only the data in the table on the whole screen and some icons, nothing else. Again when he clicks one back button icon on the screen, he should return to the previous view.
Thanks and Regards,
Smriti
<b>Hi smriti Behl
I Think you can get something from the below explanation
Create one UI Element For example "Visible" and make the type as
com.sap.ide.webdynpro.uielementdefinitions.Visibility
Now bind this Context Value with the UI Elements ie UI elements which you want to make Not Visible When you click Print Button. You can write the Following Code inside the print button
wdContext.currentContextElement().setVisible(WDVisibility.NONE);
When you want to make the UI Elements Visble When Click Back Button Write Following code In side Back Buuton Method
wdContext.currentContextElement().setVisiblity(WDVisibility.VISIBLE);
May i Know Your Problem Solved ..............
Regards
Chandran S</b>
Similar Messages
-
How to change the screen element to be ineditable in Dynpro POV
Hi Experts, any one has experience on how to change the screen element to be ineditable in Dynpro POV?
Write this piece of code in the PROCESS ON VALUE-REQUEST..
PROCESS ON VALUE-REQUEST.
FIELD MARA-MATNR MODULE matnr_mod.
MODULE matnr_mod input.
LOOP at Screen.
if screen-name=<field_name>.
screen-input = 0.
modify screen.
endif.
ENDLOOP.
ENDMODULE.
Thanks
Venkat.O -
How to change the text of label dynamically
Hi all,
I have done a dynpro program.It requires to implement the dynamically display the label text, for example: there is a label, sometimes, we want to display "Purchase Order" and sometimes we want to display "Sales Order". Can anyone tell me how to change the text of label according to my requirements? thanks in advance!Hi Wei,
AS of now you will not be able to change the Text Field ( Label ) dynamically or at runtime. This is a limitation.Refer to this link:
http://help.sap.com/saphelp_nw04/helpdata/en/e4/2adbef449911d1949c0000e8353423/frameset.htm
But, there is a way around.
You can make a text field Visible / Invisible based on your program logic. So, based on what you want, you can process a module which will take care of that.
Have a look at these DEMO Code. You can have a good idea to implement the logic.
DEMO_DYNPRO_MODIFY_SCREEN - Demonstration of Dynamic Screen Modifications
Thanks,
Samantak. -
How to change the Views or Pop-ups?
Hi All,
I have a huge user interface with many views and pop-ups, and want to know what is the best method to make changes to them.
I need to add or change input fields in the views, but some of the fields are not yet available from the RFC models. Therefore, in this case, is it acceptable to use Apply Template (even though some fields are not be available) or should I create/change the ui elements individually or manually change their properties? Would the second option, which is to manually create/change the input fields on the screens, be acceptable practice?
Also, how should I go about re-arranging or re-aligning the buttons, check boxes, etc? I have tried drag-and-drop, but it is very difficult to line things up. Is there an easier way?
Thanks so much for your help.I have not receive a response.
My question is, if I make changes to my views WITHOUT using Apply Template, will that pose a problem later on when I do the binding against the new fields that will be coming from the RFC model?
Is it necessary to wait until the RFC model has been updated with the new fields before proceeding with the changes to the screens?
The reason I'm asking is because in the interest of time, the client has asked me to complete the screen layouts first. Then the bindings can take place later once changes to the Remote-enabled Function Modules (adaptive RFC) have been completed. What is the common practice in this case?
Please offer your expert advice as this is urgent.
Thanks so much. -
How to change the default element tag using dbms_xmlgen
here is my code that generate output for purchase order data. I followed the syntax shown in xml db developer guide.
I am getting the results but element tags are CAPS letters( As the coloumn names in the type defenitions are stored in CAPS in Oracle). but I need to show in small letters as per my requirement.
can anyone help me how to change the default tag names for elements.
==================================HERE IS THE CODE==================
DECLARE
qryCtx DBMS_XMLGEN.ctxHandle;
result CLOB;
BEGIN
qryCtx := DBMS_XMLGEN.newContext
('SELECT PODL_H_T
( CLOSEDDATETIME ,
COMPANY ,
CAST(MULTISET
(SELECT LINENUMBER ,
COMPANY ,
PURCHASEORDERID ,
ITEM ,
QUANTITYUM ,
TOTALQUANTITY
FROM cpo_wms_podl_LINES
WHERE PURCHASEORDERID = PH.PURCHASEORDERID) as PurchaseOrderDetailList
FROM cpo_wms_podl_HEADERS PH ');
-- now get the result
DBMS_XMLGEN.setRowSetTag(qryCtx, 'Receipts' );
DBMS_XMLGEN.setRowTag(qryCtx, 'PurchaseOrder' );
result := DBMS_XMLGEN.getXML(qryCtx);
INSERT INTO temp_clob_tab VALUES (result);
DBMS_XMLGEN.closeContext(qryCtx);
END;
-- select * from temp_clob_tab
===========create type script=====================
cpo_wms_podl_HEADERS
CREATE or replace TYPE PurchaseOrderDetail AS OBJECT(
LINENUMBER VARCHAR2(400 BYTE),
COMPANY VARCHAR2(400 BYTE),
PURCHASEORDERID VARCHAR2(400 BYTE),
ITEM VARCHAR2(400 BYTE),
QUANTITYUM VARCHAR2(400 BYTE),
TOTALQUANTITY NUMBER
create type PurchaseOrderDetailList as table of PurchaseOrderDetail
create table temp_clob_tab(result CLOB)
create type podl_HEADERS_list_t as table of podl_HEADERS_t
CREATE or replace TYPE PODL_H_T AS OBJECT
CLOSEDDATETIME DATE,
COMPANY VARCHAR2(400 BYTE),
CREATEDDATETIME DATE,
PURCHASEORDERID VARCHAR2(400 BYTE),
SHIP_TO VARCHAR2(400 BYTE),
linelist PurchaseOrderDetailList
)but I need to show in small letters as per my requirement.add alias column names in double quotes as in
SQL> select dbms_xmlgen.getxmltype('select dname "DeptName", loc "Location" from dept') dept_xml from dual
DEPT_XML
<ROWSET>
<ROW>
<DeptName>ACCOUNTING</DeptName>
<Location>NEW YORK</Location>
</ROW>
<ROW>
<DeptName>RESEARCH</DeptName>
<Location>DALLAS</Location>
</ROW>
<ROW>
<DeptName>SALES</DeptName>
<Location>CHICAGO</Location>
</ROW>
<ROW>
<DeptName>OPERATIONS</DeptName>
<Location>BOSTON</Location>
</ROW>
<ROW>
<DeptName>SALES</DeptName>
<Location>MUNICH</Location>
</ROW>
</ROWSET>
1 row selected. -
How to change the view of the basic search portlet
Hi,
I want to change the view of the basic search portlet. To be more precise, I just want a text box and a Go button in it. Cananybody advise on how to do this?
Regards,
PriyaIndeed the 'Basic Search Box' item is what you want to use. You can choose what label you want or an icon if desired.
As mentioned in a previous reply, you need to edit the properties of the Page Group where you want to add the item and add the 'Basic Search box' to the list of available items that a user can add to the page group.
Navigator -> Properties (for the desired page group) -> Configure Tab -> Edit link in the 'Content Type and Classification' section -> Item Types section add the 'Basic Search Box'.
Now in a page in that page group, add an item, and from the list of 'Built-In Navigation Item Types' you will see the 'Basic Search Box'. -
How to change the text in JTextField Dynamically
i am trying to change the contents of JTextField dynamically like this
textfield.setText();but it is giving error...........how can i do it....here is the code .....it is showing error in line 18 and 20 as identifier expected
their i am trying to make JTextField editable....
plz have a look
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.filechooser.*;
import javax.swing.SwingUtilities.*;
import javax.swing.filechooser.FileFilter;
//import javax.swing.JEditorPane;
import java.net.URL;
public class tm extends JFrame implements ActionListener
public JTextField[] programtext = new JTextField[30];
public JTextField[] tapetext = new JTextField[30];
tapetext.setEditable(true);
public JTextField[] statetext = new JTextField[30];
statetext.setEditable(true);
int count =0;
public static void main (String arg[]){
tm m=new tm();
m.setSize(1000,500);
m.show();
JButton loadp, run, step,loadi,loads;
public tm()
Container c ;
c = getContentPane();
c.setLayout(new FlowLayout());
loadi = new JButton("LOAD INPUT STRING");
c.add(loadi);
loadi.addActionListener(this);
loadi.setBounds(200,25,100,50);
loadp = new JButton("LOAD PROGRAM");
c.add(loadp);
loadp.addActionListener(this);
loadp.setBounds(300,25,100,50);
run = new JButton("RUN");
c.add(run);
run.addActionListener (this);
run.setBounds(400,25,100,50);
step = new JButton("STEP");
c.add(step);
step.addActionListener(this);
step.setBounds(500,25,100,50);
loads = new JButton("LOAD STATES");
c.add(loads);
loads.addActionListener(this);
loads.setBounds(600,25,100,50);
JPanel prog = new JPanel();
prog.setLayout(new GridLayout(30,1));
for(int i=0;i<programtext.length;i++)
programtext= new JTextField(10);
prog.add(programtext[i]);
JPanel tape = new JPanel();
tape.setLayout(new GridLayout(30,1));
for(int i=0;i<tapetext.length;i++)
tapetext[i]= new JTextField(10);
tape.add(tapetext[i]);
JPanel state = new JPanel();
state.setLayout(new GridLayout(30,1));
for(int i=0;i<statetext.length;i++)
statetext[i]= new JTextField(10);
state.add(statetext[i]);
JPanel contentPane3 = new JPanel();
contentPane3.setBorder(BorderFactory.createEmptyBorder(50, 50, 50, 50));
contentPane3.setLayout(new BorderLayout());
contentPane3.add(state, BorderLayout.CENTER);
contentPane3.add(c, BorderLayout.NORTH);
contentPane3.add(prog, BorderLayout.WEST);
contentPane3.add(tape, BorderLayout.EAST);
setContentPane(contentPane3);
public void actionPerformed(ActionEvent e)
try{
if(e.getSource ()==loadp)
JFileChooser chooser=new JFileChooser();
int r= chooser.showOpenDialog(this);
if(r==JFileChooser.APPROVE_OPTION )
String name=chooser.getSelectedFile().getName();
File f=chooser.getSelectedFile();
FileInputStream filestream = new FileInputStream(f);
BufferedInputStream bufferstream = new BufferedInputStream(filestream);
DataInputStream datastream = new DataInputStream(bufferstream);
String record = null;
programtext[0].setText("");
try {
int i = 0;
while (true)
record=datastream.readLine();
if(record == null){
break;
programtext[i].setText(record);
i++;
count = count + 1;
System.out.println ("the no of lines of the program are"+ count);
catch (Exception p)
System.out.println(p);
else if(e.getSource()==loads)
JFileChooser chooser3=new JFileChooser();
int r3= chooser3.showOpenDialog(this);
if(r3==JFileChooser.APPROVE_OPTION)
String name=chooser3.getSelectedFile ().getName();
File f3=chooser3.getSelectedFile();
FileInputStream filestream3 = new FileInputStream(f3);
BufferedInputStream bufferstream3 = new BufferedInputStream(filestream3);
DataInputStream datastream3 = new DataInputStream(bufferstream3);
String record3 = null;
statetext[0].setText("");
try {
int i = 0;
while (true)
record3=datastream3.readLine();
if(record3 == null){
break;
statetext[i].setText(record3);
i++;
catch (Exception p3)
System.out.println(p3);
else if(e.getSource()==loadi)
JFileChooser chooser2=new JFileChooser();
int r2= chooser2.showOpenDialog(this);
if(r2==JFileChooser.APPROVE_OPTION )
String name=chooser2.getSelectedFile().getName();
File f2=chooser2.getSelectedFile();
FileInputStream filestream2 = new FileInputStream(f2);
BufferedInputStream bufferstream2 = new BufferedInputStream(filestream2);
DataInputStream datastream2 = new DataInputStream(bufferstream2);
String record2 = null;
tapetext[0].setText("");
try {
int i = 0;
while (true)
record2=datastream2.readLine();
if(record2 == null){
break;
tapetext[i].setText(record2);
i++;
catch (Exception p2)
System.out.println(p2);
else if(e.getSource ()==run)
String temp="";
String statetemp=" ";
String tapetemp=" ";
int l=0;
int tp=0;
String pars[][] = new String[50][5];
for(int m=0;m<count;m++){
temp = programtext[m].getText();
String str[]=temp.split(" ");
for(int k=0;k<5;k++){
pars[m][k] =str[k];
System.out.println(pars[m][k]);
statetemp = statetext[0].getText();
tapetemp = tapetext[l].getText();
while(pars[tp][0]==statetemp && pars[tp][1]==tapetemp && tp><count)
statetemp = pars[tp][2];
tapetemp = pars[tp][3];
statetext[0].setText() = statetemp;
tapetext[tp].setText() = tapetemp;
if(pars[tp][4]=="R")
l=l+1;
else{
l=l-1;
tp++;
else if(e.getSource()==step)
catch(Exception t)
System.out.println(t); -
How to change the view criteria at run time for af:query
Hi,
I've a usecase where I need to change the view criteria of the af:query at run time.
Use case:
=======
1) Consider a check box (Show Emps Under Dept 10) in the query panel when user selects and clicks 'Search' button should show the employees under dept 10. If user searches without selecting the check box, the results should show all the employees in all the departments.
2) I need to have a check box always in the query panel. Its mandatory.
The way I implemented:
==============
1) Created a transient variable 'Show Emps Under Dept 10' in the EmployeeVO and also created a bind variable bind_DeptNo.
2) Create a view criteria 'AllEmployees' which has only the transient attribute as the view criteria item and whose value set to 'false' by default.
3) Created another view criteria 'EmpUnderDept' which has 'DepartmentId' as the view criteria item and whose value set to the bind variable 'bind_DeptNo'.
4) Dropped the view criteria 'EmpUnderDept' as the 'af:query' panel in the jspx page.
5) Overridden the queryListener as '#{EmpBean.empSearch}'
6) Has the below code in the empSearch method as below. When user selects the check box, applying the other criteria 'EmpUnderDept' and setting the bind variable to '10'.
public void empSearch(QueryEvent queryEvent) {
// Add event code here...
QueryDescriptor queryDesc = (QueryDescriptor) queryEvent.getDescriptor();
ConjunctionCriterion conCrit = queryDesc.getConjunctionCriterion();
List<Criterion> criterionList = conCrit.getCriterionList();
List criterionValues = new ArrayList();
Object criteriaValue = null;
int criteriaNo = 0;
DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
FacesContext facesContext = FacesContext.getCurrentInstance();
for (Criterion criterion : criterionList) {
AttributeDescriptor attrDescriptor = ((AttributeCriterion)criterion).getAttribute();
System.out.println("============== attrDescriptor.getName() =================== " + attrDescriptor.getName());
criteriaValue = ((AttributeCriterion)criterion).getValues().get(0);
if(criteriaNo==0) {
Boolean val = (Boolean) ((AttributeCriterion)criterion).getValues().get(0);
if (val.equals(true)) {
OperationBinding method = (OperationBinding) ADFUtil.findOperation("ExecuteWithParams");
if(method!=null) {
Map params = method.getParamsMap();
//params.put(key, value)
method.getParamsMap().put("bind_DeptId", 10L);
method.execute();
ADFUtil.invokeMethodExpression( "#{bindings.EmpUnderDeptCriteiaQuery.processQuery}", queryEvent);
} else {
//ADFUtil.invokeEL("#{bindings.ExecuteWithParams.execute}");
ADFUtil.invokeMethodExpression( "#{bindings.AllEmployeesCriteriaQuery.processQuery}", queryEvent);
But this approach is not working and its always showing all the employees in all the departments.
Please let me know if there is a way to change the view criteria at run time depending on the values set at run time for one of the view criteria items.
JDev version am using is '11.1.1.5'
Thanks,
LakshmanHi Shay,
It worked for me without overriding the executeQuery() method in the ViewImpl.java.
Instead of creating 2 view criteria, I created only one which has both transient variable and the DepartmentId = <bind_DeptId>. With the above code, it worked properly. Now I am using only one view criteria.
Thank you. -
How to change the screen element of a single field in a table control
Hi Gurus,
I want to change the screen element of a single field (or the whole row) in a table control according to a condition.
I have 2 columns in the table control. One is an input column and one output only. When user enters values into the input column, they need to be compared against the values in the other column, and if there is a discrepancy, the row where the discrepancy is needs to be highlighted.
I have tried the following code which highlights the whole column ...
CONTROLS: TC_ZVOYG_BINS TYPE TABLEVIEW USING SCREEN 0500.
DATA: wa_tc_zvoyg_col LIKE LINE OF TC_ZVOYG_BINS-cols.
LOOP AT G_TC_ZVOYG_BINS_ITAB
INTO G_TC_ZVOYG_BINS_WA.
if G_TC_ZVOYG_BINS_WA-zdelivery_bin ne G_TC_ZVOYG_BINS_WA-zactual_bin.
loop at screen.
IF screen-name = 'ZVOYG_BINS-ZACTUAL_BIN'.
wa_tc_zvoyg_col-screen-intensified = 1.
MODIFY tc_zvoyg_bins-cols FROM wa_tc_zvoyg_col TRANSPORTING
screen-intensified WHERE screen-name = screen-name.
endif.
endloop.
endif.
endloop.
And also the following code which makes no change ...
LOOP AT G_TC_ZVOYG_BINS_ITAB
INTO G_TC_ZVOYG_BINS_WA.
if G_TC_ZVOYG_BINS_WA-zdelivery_bin ne G_TC_ZVOYG_BINS_WA-zactual_bin.
loop at screen.
IF screen-name = 'ZVOYG_BINS-ZACTUAL_BIN'.
screen-intensified = '1'.
modify screen.
endif.
endloop.
endif.
endloop.
Thanks in advance.Hi,
The modification of a screen element attribute (LOOP AT SCREEN...MODIFY SCREEN) must always be done in the PBO (for a dynpro, it will be in a PBO module, i.e. declared by MODULE ... OUTPUT)
About the loop at the internal table, it is done automatically by the system, also during the PBO, you'll find something like LOOP [AT itab] ... WITH CONTROL ... in the PBO part of the screen flow logic (note: you may have to complete with a supplementary READ TABLE if you don't use AT itab). So you don't need an additional loop.
Best regards
Sandra -
View will not reset to "actual size"; suggestions?
When opening a PDF document it is zoomed at 173%, which is "Fit Width". I want them to open at 100% or Actual Size. Every time I open a PDF I have to click on View, then Zoom, then click Actual Size. I have gone to Adobe Acrobat Professional and clicked on Edit, then Preferences, then under Default Layout & Zoom and changed from "automatic" to 100%, hit OK -- but nothing changed, even after a reboot, which is sometimes needed to hold changes. I work with PDFs quite a bit & it's just frustrating to have to keep changing the view. Thanks for any assistance you can provide.
-
How to set the fields invisible/visible dynamically with screen-exits
<b>Goal:</b> I am changing the subscreen from standard screen for mobile device interface, i.e. function group LMOB. With a scanner I am to read a material number and have it confirmed by the SAP system. For this I need an input field which is already supplied by the standard program. The users require the screen to be dynamic, i.e. I can not do the settings in the screen-painter.
<b>Problem occurred:</b> After I have changed to use the customized subscreen 1202 in function group XLRF, not all the fields are displayed. It seems that the values for setting the screen elements are lost when calling the subscreen (3202, copy of screen 2202). For instance, it does not show my input field. Somewhere there need to be a list that contains all these parameter switches? I know how Loop at screen works but cant find the values that are supposed to be passed over to the subscreen.
Would be grateful for some help.Hi Niklas!
Unfortunately I don't know the transaction you're working on, but I had a similar problem once.
You have to use the commands <b>LOOP AT SCREEN</b> and <b>MODIFY SCREEN</b>. I found some online help here: <a href="http://help.sap.com/saphelp_470/helpdata/en/9f/dba70535c111d1829f0000e829fbfe/frameset.htm">SAP Online Help</a>. The fields of the pseudo-table <b>SCREEN</b> can be found here: <a href="http://help.sap.com/saphelp_470/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/frameset.htm">SAP Online Help</a>. I think you have to set <b>INVISIBLE</b> to 'X' - but you may have to experiment.
Another thing to look out for is that you have to call this method in the <b>PBO</b> section of the dynpro. Take care no SAP logic is executed after your modification that changes your settings...
Hope this helps (please reward me if it does),
Joerg -
How to change the Data base connection Dynamically
Hi
Hi create a crystal reports using crystal report 12.0 in this i use the standard wizard and local data base connection and create a dotnet programme for this .Now i want to change the database because because i want to instal it in client they use a different connection so i need to change the connection .How is it possible . PLzzzzz tell me it is urgen t
Addvance thnksHi
To change the database you can use DataSource Option that is present in the Menu Bar.
Go to Database
->Set Datasource Location
->Replace the current Data Source with the new Datasource.
Hope this helps
Shraddha -
How to change the column header name dynamically based on sysdate
Post Author: senthi_gokul
CA Forum: WebIntelligence Reporting
Dear All,
i have designed some reports. i would like to change the column header dynamically based on sysdate. up to 24 months. can u help me, which add month function using the universe. i dont know if-then-else function is having the universe tool or not?Post Author: prasingh
CA Forum: WebIntelligence Reporting
Are you saying you are not able to create an object by value (select: statement) as sysdate and put it onto the headers of your report? You can use the add_months() function on the object to add the numbers of months you wish.
Please let me knnow for more.. You can get in touch with me on [email protected] for quick reply. -
Hi All,
I have created a view of type "List" . can i change it to Form view by any method?
Regards
AshimHi Ashim,
The view presentation finally depends on the tag you use in .htm file. So, you can't change a list view to a form view by some method. It is better to create a separate view. But, if you want to experiment with it, the you can replace the tag in .htm that currently makes it a list view (generally it is <chtmlb:configTable>) by the form view configuration tag <chtmlb:config>. You then need to open the view configuration and pull fields from context nodes to complete the UI.
Regards,
Shiromani -
How to change the smtp. element of the outbound mail server
When adding an existing email account it is not possible to change the 'smtp.' portion of the outbound mail server address.
My smtp server name is 'mailout.easymail.ca'
How can I set this?It is NOT a prefix. It is a label. It indicates the type of server this particular setting will connect to.
Here are the relevant bits of two of my accounts settings.
account27:<br>
INCOMING: account27, , (imap) mail.tamba.co.uk:143, plain, passwordCleartext<br>
OUTGOING: mail.tamba.co.uk:25, plain, passwordCleartext, true<br>
<br>
account29:<br>
INCOMING: account29, , (imap) mail.btinternet.com:993, SSL, passwordCleartext<br>
OUTGOING: mail.btinternet.com:465, SSL, passwordCleartext, true<br>
No skulldduggery was required to get those ''mail'' "prefixes" in place. ;-)
Maybe you are looking for
-
Logic 7 waveforms not loading in logic 8
Hi, please help! i had a bunch of stuff recorded in logic 7 (from someone else's computer) that i'm trying to load on my logic 8. when i load the projects, none of the waveforms for the tracks show up, it's just blank. i can still play the tracks, bu
-
I downloaded the new IOS 7 and it asked for a pass code to unlock it when it finished, however, I haven't used a pass code in so long, I don't remember what it is! I have tried all I have ever used and still no luck. Now my phone is disabled and I c
-
Is it possible to access the http web interface over the fa1 management interface?
Hello All, I am remotely connected into a Cat 4500 + Supervisor V module via console cable and point to point connection from laptop to fa1 management interface on SupV. SupV module is running IOS 15.0(2)SG8. I am not able to physically chan
-
Creator 2 for OS X on Intel Core Duo?
Hi, Does anyone know if the current Creator2 release for Mac OS X supports the machines with the new Intel Core Duo chips (e.g. iMac)? If not, does anyone know when the new machines are expected to be supported? I tried installing Creator2 on an iMac
-
How can I remove a download progress bar from under my downloads file on my dock?