Passing values to table
Hi,
I've create a node called node1 which contains 3 attributes str1, str2, str3. I've created a table in the layout which is binded with the node1. Could any body tell me how to write the code so that i can pass and display my own values in the table.
Regards
Swapna
Hi Swapna,
I think you are new to WD ABAP. Welcome to community as well.... as you can see this is one of the basci issue i am sure you might have got the thread or blog or wiki for the same. now why i am saying this is because you can save your time and you dont have to wait for anybody's reply......
for your question... you have to create an internal table and you have to bind it with your node...
see the code below...
data lo_nd_cn_table type ref to if_wd_context_node." i am creating refrence to my node
data lo_el_cn_table type ref to if_wd_context_element " to element of node
data it_table type wd_this->elements_cn_table. " an internal table of type of your node
data wa_table type wd_this->element_cn_table. " work area for internal table
data it type standard table of t005t.
data wa type t005t.
select * from t005t into table it.
loop at it into wa.
wa_table-ca_one = wa-land1. " ca_one, ca_two are all my attributes name....
wa_table-ca_two = wa-landx.
wa_table-ca_three = wa-natio.
wa_table-ca_enable = abap_true.
append wa_table to it_table.
endloop.
lo_nd_cn_table = wd_context->get_child_node( name =
wd_this->wdctx_cn_table ).
* get element via lead selection
lo_el_cn_table = lo_nd_cn_table->get_element( ).
lo_nd_cn_table->bind_table( it_table ).
data lo_nd_cn_table2 type ref to if_wd_context_node.
" i am binding my internal table with UI
"table node
Please note one thing name of the attribute and name of the columns of internal table which you are binding with node must be same
regards
Pranav
Similar Messages
-
Passing values in table from one component to another component in gp
hai all,
I have a table with 5 rows in a view in component1.I need to pass the values in the table from component1 to table in component2.Plz help me with coding of interface controller of both component.
Thanks in advance
regards
Sharanya.RHi,
Here more than coding its mapping of your components are important to transfer data
Ex:
You need to have a public part that exposes the node which is bound to the table in COMPA.
Then in COMPB you need to make COMPA as used COMP.
Then you need to map the contexts between them.
Once this is done . You will need to code if you want to iterate through the elements.
Following Docs will help you get a clear understanding
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f727d100-0801-0010-4cbd-b0ad5c161945
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e1f4df00-0801-0010-6298-8fdf667bbd0f
Regards
Ayyapparaj -
Passing values for Table in Adaptive RFC model
Hi ,
I am new to WebDynpro ,I have a requirement I need to pass a table for the back end BAPI, the table has two columns say (column1 and column2), before calling the BAPI I need to fill values in the column1 and the when the BAPI returns it should fill the column2 values, Is this possible to do, If so do I need to call invalidate for the values to get reflected after the BAPI returns??
Can some one send me the sample code as to how to do this??
Regards,
emrin.Hi,
After creating model and context mapping to table,
u write the following code in component controller,
WD Doinit();
Bapi_Flight_Getlist_Input bap=new Bapi_Flight_Getlist_Input();
wdContext.nodeBapi_Flight_Getlist_Input().bind(bap);
try{
wdContext.nodeBapi_Flight_Getlist_Input).currentBapi_Flight_Getlist_InputElement().modelObject().execute();
wdContext.nodeOutput().invalidate();
catch(Exception e)
e.getStackTrace(); -
How to pass value in Table import parameter of an RFC
Hi all,
I have an RFC in which import parameters are in the form of a table
so now when i imported that RFC in my webdynpro application and Apply Service Template to it, it created the structure but when i applied form template to it all the inputfields were readonly
and also when i tried to set the input parameter of that table like:
wdContext.currentBAPI_CREATEElement.set<field>("value");
it shows null pointer exception
MY Context structure created after service template is as follows:
Model Node Zcreate_rfc, it icludes another model node
BAPI_CREATE, and it then includes the input parameters
Please tell me how to solve the problemSuppose the RFC is called ZRFC, and the table structure is called TableStruct, then this works for me (in execute method before calling execute):
ZRFCInput input = wdContext.currentZRFCElement().modelObject();
// these are regular import parameters
input.setAaa(aaa);
input.setBbb(bbb);
if (input.getTableStruct()!=null) {
input.getTableStruct().clear();
// In this loop table rows are added
for (int i=0; i<sourcList.size(); i++) {
ZTableStruct table = new ZTableStruct();
table.setDdd(((SomeBean) sourcList.get(i)).getDdd()); // for property ddd
input.addTableStruct(table);
Good luck, Roelof
Edited by: R. Knibbe on Jan 23, 2008 3:25 PM -
Trouble with passing values into table !
Well my problem seems to be very small but have tried a lot of books and e-books to get a possible solution, but all in vain.
The problem is I have a table, lets say 'tab', which has a varchar2 column, lets say 'col'.
I want to be able to make an insert into this 'col' column of the table 'tab'.
Simple inserts with all symbols work fine. But when I run the following insert, it fails.....
insert into tab
values('abcn&def');
Assume the table tab has a single column 'col' of varchar2 datatype. When I run the insert statement it prompts a value. Is there anyway I can store '&' as a part of the data?In SQL*Plus ampersand character (&) is the default character to identify a parameter.
Either use set define off or set define to a different character.
SQL > set define off
--- this will turn off & as the input parameter definition charatcer
or use
SQL > set define *
-- this will set * as the input parameter definition charatcer instead of &
Shakti
(http://www.impact-sol.com)
(Developers of Guggi Oracle) -
Passing value from table to form
hi,
i have a requirement in which i have to store the selected row of a table(coming from database) in my input text of a form.
code for my form as follows.
<af:form id="f1">
<af:inputText label="id" id="it1" value="#{full.id}"/>
<af:commandButton text="search" id="cb1">
<af:showPopupBehavior popupId="p1"/>
</af:commandButton>
<af:inputText label="name" id="it2" value="#{full.name}"/>
<af:popup id="p1">
<af:panelFormLayout id="pfl1" inlineStyle="width:337px;">
<af:table value="#{bindings.PlantMasterView1.collectionModel}"
var="row" rows="#{bindings.PlantMasterView1.rangeSize}"
emptyText="#{bindings.PlantMasterView1.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.PlantMasterView1.rangeSize}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.PlantMasterView1.collectionModel.selectedRow}"
selectionListener="#{bindings.PlantMasterView1.collectionModel.makeCurrent}"
rowSelection="single" id="t1">
<af:column sortProperty="PlantId" sortable="false"
headerText="#{bindings.PlantMasterView1.hints.PlantId.label}"
id="c2">
<af:outputText value="#{row.PlantId}" id="ot2">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.PlantMasterView1.hints.PlantId.format}"/>
</af:outputText>
</af:column>
<af:column sortProperty="PlantName" sortable="false"
headerText="#{bindings.PlantMasterView1.hints.PlantName.label}"
id="c1">
<af:outputText value="#{row.PlantName}" id="ot1"/>
</af:column>
</af:table>
<af:commandButton text="ok" id="cb2" action="#{full.act}"/>
</af:panelFormLayout>
</af:popup>
</af:form>
the code of my managed bean is as follows
public class full {
private String id;
private String name;
public String act() {
String plantid =jsfutils.resolveExpressionAsString("#{bindings.PlantId.inputValue}"); //attribute bindings plantid and plantname are created //
String plantname =jsfutils.resolveExpressionAsString("#{bindings.PlantName.inputValue}");
id=plantid;
name=plantname;
return null;
public void setId(String id) {
this.id = id;
public String getId() {
return id;
public void setName(String name) {
this.name = name;
public String getName() {
return name;
but here the problem is when i press ok button in popup it throws a error ie.
Error 500--Internal Server Error
javax.servlet.ServletException: java.lang.ClassCastException: oracle.jbo.domain.Number
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:421)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:421)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.jbo.domain.Number
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:699)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
... 34 more
Caused by: java.lang.ClassCastException: oracle.jbo.domain.Number
at oracle.adf.jsfutils.resolveExpressionAsString(jsfutils.java:111)
at oracle.adf.full.act(full.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
... 42 more
can anybody solve this?....thanx jobinesh for the reply.
it is solved. But i have one more issue . i.e i want to insert the fields id and name to the database table through managed bean . so i have taken a button
<af:commandButton text="submit" id="cb3" action="#{full.done}"/>
and wrote function in managed bean i.e
public String done() {
ViewObject vo = adfutils.findIterator("TestView1Iterator").getViewObject(); //EName and EId are attribute bindings.
vo.getCurrentRow().setAttribute("EName",name);
vo.getCurrentRow().setAttribute("EID",id);
BindingContext cntx = BindingContext.getCurrent();
cntx.getCurrentBindingsEntry().getOperationBinding("Commit").execute();
return null;
but when i press submit button it throws a error i.e
Error 500--Internal Server Error
javax.servlet.ServletException: java.lang.NullPointerException
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:421)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:421)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:699)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
... 34 more
Caused by: java.lang.NullPointerException
at oracle.adf.full.done(full.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:698)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
... 9 more -
Popup2 in SQL report not passing values of table fields
Hello All,
Can some one help me with this popup 2 case statement.
Instead of the values behind the fields being passed the literal text of "A.Metric" & "A.Month" is beaing passed into the new page instead.
A.Metric has a value of 10 and A.Month has a value of '01/May/2008'
CASE WHEN ANALYSIS IS NOT NULL THEN
'<a href="javascript:popUp2('''
|| 'f?p=&APP_ID.:305:&SESSION.::&DEBUG.::'
|| 'P305_METRIC_TYPE,P305_METRIC_MONTH:A.METRIC_TYPE,A.MONTH'
|| ''', 890, 460);style="text-decoration:underline;color:black; font-size: 90%">'
|| '<img src="#APP_IMAGES#notes.jpg">'
|| '</a>' END "Analysis"
FrankSpecies 5618 wrote:
Hello All,
Can some one help me with this popup 2 case statement.
Instead of the values behind the fields being passed the literal text of "A.Metric" & "A.Month" is beaing passed into the new page instead.
A.Metric has a value of 10 and A.Month has a value of '01/May/2008'
----------------------------------------------------------------------------------------------------------------------<font face="Arial">CASE WHEN ANALYSIS IS NOT NULL THEN
'<a href="javascript:popUp2('''
|| 'f?p=&APP_ID.:305:&SESSION.::&DEBUG.::'
|| 'P305_METRIC_TYPE,P305_METRIC_MONTH:'
|| A.METRIC_TYPE,A.MONTH
|| ''', 890, 460);"style="text-decoration:underline;color:black; font-size: 90%">'
|| '<img src="#APP_IMAGES#notes.jpg">'
|| '</a>' END "Analysis"</font>
Franksorry did not realise that my text was being changed by this forum's application edit tool
Here is the SQL statement again
Frank
Edited by: Species 5618 on Apr 15, 2009 10:03 AM
I also Tried this with no success (&
<font face="Arial">CASE WHEN ANALYSIS IS NOT NULL THEN
'<a href="javascript:popUp2('''
|| 'f?p=&APP_ID.:305:&SESSION.::&DEBUG.::'
|| 'P305_METRIC_TYPE,P305_METRIC_MONTH:'
|| &A.METRIC_TYPE.,&A.MONTH.
|| ''', 890, 460);"style="text-decoration:underline;color:black; font-size: 90%">'
|| '<img src="#APP_IMAGES#notes.jpg">'
|| '</a>' END "Analysis"</font>
Edited by: Species 5618 on Apr 15, 2009 10:10 AM -
Create table script by passing value from table
I Have a procedure to check if the table exists, if yes drop and re-create else create table.
CREATE OR REPLACE
PROCEDURE test_proc authid current_user
AS
v_cnt NUMBER:=0;
BEGIN
SELECT COUNT(*)
INTO v_cnt
FROM all_tables
WHERE table_name='T1'
AND owner = 'WORKSPACE';
IF v_cnt = 1 THEN
EXECUTE immediate 'DROP TABLE WORKSPACE.T1';
END IF;
EXECUTE immediate 'CREATE TABLE WORKSPACE.T1
ITM_NBR NUMBER ,
LCT_NBR NUMBER
SELECT COUNT(*)
INTO v_cnt
FROM all_tables
WHERE table_name='T2'
AND owner = 'WORKSPACE';
IF v_cnt = 1 THEN
EXECUTE immediate 'DROP TABLE WORKSPACE.T2';
END IF;
EXECUTE immediate 'CREATE TABLE WORKSPACE.T2
LCT_NBR NUMBER(5, 0) NOT NULL ,
PRY_CD NUMBER(5, 0) NOT NULL )';
END;
Requirement: Instead of passing the Owner,tablename & the create table scripts directlyin the query, it should be passed from a database table which will be in given format.
TableName Query Owner
T1 CREATE TABLE WORKSPACE.T1(ITM_NBR NUMBER, LCT_NBR NUMBER) WORKSPACE
T2 CREATE TABLE WORKSPACE.T2(LCT_NBR NUMBER(5, 0) NOT NULL ,PRY_CD NUMBER(5, 0) NOT NULL) WORKSPACEuser12276240 wrote:
Excuse all. The database columns are yet to be finalized and every time changes come in we are currently dropping and re-creating the tables which leads in changing the script, hence we are going in for this approach.
Moreover if i am going to have this script everytime i have to drop and re-create all the tables which can be elimated by this way.So why not have a SQL script as follows?
drop table emp purge;
create table emp(
create index .. on emp( .. );
..It drops the existing table (if exists). It then creates the table with constraints and indexes. This script is now the master definition of the table. You can slap a change log header to it. Any changes that needs the table to be redefined and recreated are done via this script. Which means it is also checked into the source code repository as it is part of the code of that system/application.
I would however remove the drop table from it in case some developer accidentally run it at the wrong time and trash the table.
The bottom line is that DDL code is part and parcel of the installation, configuration and setup code - and that this is as important as the source code. This code also needs to be "formalised" in proper scripts, checked into SVN/CVS/etc, and used to bootstrap the system (or parts of it), as and when needed. -
Passing value to bind variable of another table from one table
hi,
I have a multi select table. When one row is selected from this table (no button is clicked, only selection is done), an attribute from that selected row (say userid) should be passed to the bind variable of another table and the corresponding details of that particular userid should be displayed in the other table. When more than one row is selected, the other table should display no rows.
My main problem is what code has to be written to pass value to bind variable and where it should be written.
Please give me a detailed explaination as soon as possible.
Thank you.Sorry, didnot add this. The table is multi select table.
-
How do we pass values and Internal tables to Sub-routines
how do we pass values and Internal tables to Sub-routines
Hi,
You can use the USING..or TABLES..or Changing addition..
Check this example.
DATA: T_MARA TYPE STANDARD TABLE OF MARA.
PERFORM DISPLAY USING T_MARA.
FORM DISPLAY USING LT_MARA LIKE T_MARA.
DATA: WA TYPE MARA.
LOOP AT LT_MARA INTO WA.
WRITE: / WA-MATNR.
ENDLOOP.
ENDFORM.
Thanks
Naren -
How to call & pass values to custom page from seeded page table region
Hi All,
can anyone tell me how to call & pass values to custom page from seeded page table region(Attribute is not available in seeded page VO)
it is urgent. plssss
Regards,
purnaHi,
Yes, we do this by extending controller, but you can also try this without extending controller.
1. Create Submit Button on TableRN using personalization.
2. Set "Destination URI" property to like below
OA.jsp?page=/<yourname>/oracle/apps/ak/employee/webui/EmpDetailsPG&employeeNumber={@EmployeeId}&employeeName={@EmployeeName}&retainAM=Y&addBreadCrumb=Y
Give your custom page path instead of EmpDetailsPG.
EmployeeId and EmployeeName are VO attributes(Table Region)
If you dont have desired attribute in VO, then write logic in your custom page controller to get required value using parameters passed from URL path.
In this case, only personalization will do our job. Hope it helps.
Thanks,
Venkat Y. -
SELECTION TABLE PASSING VALUES
I want to pass multiple values with submit statuement. Here I m passing a selection table but I also want to pass one more value.
SUBMIT zxx_xxx USING SELECTION-SCREEN 0501
WITH S_CUST IN gt_customer_range
Is there anyother way to pass an addition value along with this selection tablehi,
u can use like this
First declare with range iof like this it_rangemtart LIKE RANGE OF mara-mtart,
Then pass the values as shown below
*Material number
IF FL_MATNR IS NOT INITIAL AND FL_MATNR1 IS INITIAL.
CLEAR : wa_matnr,
it_rangematnr.
wa_matnr-sign = 'I'.
wa_matnr-option = 'EQ'.
wa_matnr-low = fl_matnr.
APPEND wa_matnr TO it_rangematnr.
ELSEIF fl_matnr IS NOT INITIAL AND
fl_matnr1 IS NOT INITIAL.
CLEAR : wa_matnr,
it_rangematnr.
wa_matnr-sign = 'I'.
wa_matnr-option = 'BT'.
wa_matnr-low = fl_matnr.
wa_matnr-high = fl_matnr1.
APPEND wa_matnr TO it_rangematnr.
ENDIF.
*Material decription
CLEAR : wa_maktx,
it_rangematkx.
wa_maktx-sign = 'I'.
wa_maktx-low = fl_makt1.
wa_maktx-high = fl_makt2.
IF fl_makt1 IS NOT INITIAL
AND fl_makt2 IS NOT INITIAL.
wa_maktx-option = 'BT'.
APPEND wa_maktx TO it_rangematkx.
ELSEIF fl_makt1 IS NOT INITIAL
AND fl_makt2 IS INITIAL.
wa_maktx-option = 'EQ'.
APPEND wa_maktx TO it_rangematkx.
ENDIF.
SUBMIT zlabmaterial
WITH s_mtart IN it_rangemtart
WITH s_matkl IN it_rangematkl
WITH s_matnr IN it_rangematnr
WITH s_maktx IN it_rangematkx
WITH p_print EQ fl_out
WITH p_copie EQ fl_copy
AND RETURN. -
How to pass custom z table field values to smartform
hi i need to pass fields values from the table i created to already developed smartform..can anyone give me an example for this scenario
Hi,
You need to create an internal table in print program. Then fill the internal table using select statement. Now you need to declare One internal table in 'TABLES' tab of Form Interface in smartfrom.
e.g.:
IT_BKPF LIKE ZBKPF
Now call the smartform in print program & pass the internal table(declared & filled in print prog) to the smartform.
Ashven -
Script fails when passing values from pl/sql to unix variable
Script fails when passing values from pl/sql to unix variable
Dear All,
I am Automating STATSPACK reporting by modifying the sprepins.sql script.
Using DBMS_JOB I take the snap of the database and at the end of the day the cron job creates the statspack report and emails it to me.
I am storing the snapshot ids in the database and when running the report picking up the recent ids(begin snap and end snap).
From the sprepins.sql script
variable bid number;
variable eid number;
begin
select begin_snap into :bid from db_snap;
select end_snap into :eid from db_snap;
end;
This fails with the following error:
DB Name DB Id Instance Inst Num Release Cluster Host
RDMDEVL 3576140228 RDMDEVL 1 9.2.0.4.0 NO ibm-rdm
:ela := ;
ERROR at line 4:
ORA-06550: line 4, column 17:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
The symbol "null" was substituted for ";" to continue.
ORA-06550: line 6, column 16:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
( - + case mod new not null <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev su
But when I change the select statements below the report runs successfully.
variable bid number;
variable eid number;
begin
select '46' into :bid from db_snap;
select '47' into :eid from db_snap;
end;
Even changing the select statements to:
select TO_CHAR(begin_snap) into :bid from db_snap;
select TO_CHAR(end_snap) into :eid from db_snap;
Does not help.
Please Help.
TIA,
NischalHi,
could it be the begin_ and end_ Colums of your query?
Seems SQL*PLUS hs parsing problems?
try to fetch another column from that table
and see if the error raises again.
Karl -
How can I insert values from table object into a regular table
I have a table named "ITEM", an object "T_ITEM_OBJ", a table object "ITEM_TBL" and a stored procedure as below.
CREATE TABLE ITEM
ITEMID VARCHAR2(10) NOT NULL,
PRODUCTID VARCHAR2(10) NOT NULL,
LISTPRICE NUMBER(10,2),
UNITCOST NUMBER(10,2),
SUPPLIER INTEGER,
STATUS VARCHAR2(2),
ATTR1 VARCHAR2(80),
ATTR2 VARCHAR2(80),
ATTR3 VARCHAR2(80),
ATTR4 VARCHAR2(80),
ATTR5 VARCHAR2(80)
TYPE T_ITEM_OBJ AS OBJECT
ITEMID VARCHAR2(10),
PRODUCTID VARCHAR2(10),
LISTPRICE NUMBER(10,2),
UNITCOST NUMBER(10,2),
SUPPLIER INTEGER,
STATUS VARCHAR2(2),
ATTR1 VARCHAR2(80),
ATTR2 VARCHAR2(80),
ATTR3 VARCHAR2(80),
ATTR4 VARCHAR2(80),
ATTR5 VARCHAR2(80)
TYPE ITEM_TBL AS TABLE OF T_ITEM_OBJ;
PROCEDURE InsertItemByObj(p_item_tbl IN ITEM_TBL, p_Count OUT PLS_INTEGER);
When I pass values from my java code through JDBC to this store procedure, how can I insert values from the "p_item_tbl" table object into ITEM table?
In the stored procedure, I wrote the code as below but it doesn't work at all even I can see values if I use something like p_item_tbl(1).itemid. How can I fix the problem?
INSERT INTO ITEM
ITEMID,
PRODUCTID,
LISTPRICE,
UNITCOST,
STATUS,
SUPPLIER,
ATTR1
) SELECT ITEMID, PRODUCTID, LISTPRICE,
UNITCOST, STATUS, SUPPLIER, ATTR1
FROM TABLE( CAST(p_item_tbl AS ITEM_TBL) ) it
WHERE it.ITEMID != NULL;
COMMIT;
Also, how can I count the number of objects in the table object p_item_tbl? and how can I use whole-loop or for-loop to retrieve values from the table object?
Thanks.Sigh. I answered this in your other How can I convert table object into table record format?.
Please do not open multiple threads. It just confuses people and makes the trreads hard to follow. Also, please remember we are not Oracle employees, we are all volunteers here. We answer questions if we can, when we can. There is no SLA so please be patient.
Thank you for your future co-operation.
Cheers, APC
Maybe you are looking for
-
PDF App works fine on Acrobat 7 but gives compilation Errors in Livecycle
Hello, I have a PDF application that has been working fine in Acrobat 7 for years (for a Fortune 50 company). We had to upgrade our environments to Acrobat 8/9 and the same app either HANGS or Shuts Down when opened in Acrobat 8/9 (Reader and Profess
-
MISSING MSVCR80.DLL AFTER ATTEMPTING TO UPDATE ITUNES
I just recently saw an update to iTunes available so I go through the install. It gets almost done and then gives me an error message that it can't install and to try manually installing from the Tools menu in iTunes. Great. Go to open iTunes and can
-
Referring to problem in: http://discussions.apple.com/thread.jspa?messageID=6520703 After update 8.01 opening files does work here also, but I still can't open .exs files in exs24! If I want to load files they are grey and can't be selected. Can some
-
'Administration item could not be processed' error in Sales Contract
Hello, When I try to create a sales contract in CRM 5.0, I get the following error message: Administration item could not be processed 46760D4DB17003F4E10000000A350350 Message no. CRM_ORDERADM_I001 Does anybody know how to solve this? Thanks, Jeroen
-
Ntoskrnl.ExiAcquireFastMutex could not be locat
I installed the X-FI Extreme Music board and drivers and all went fine. I even went online and verified the drivers were up to date (by the Device Manager Update Driver utility) When I installed the software that came with the sound card (the Sound B