How to retrieve line Item values from an object using groovy
def RevenueObject = nvl(ChildRevenue,0);
println('revenueItems==='+revenueItems.size());
while(RevenueObject.hasNext())
def revenueLine = RevenueObject.next();
revenueLine.setAttribute('Test_c', 'Hello');
} Groovy Scripting
Error : Getting null value for Revenue object
Exception in expression "OpportunityEO" trigger "getRevenueItems" : groovy.lang.MissingMethodException : No signature of method: oracle.jbo.server.ViewRowSetIteratorImpl.size() is applicable for argument types: () values: [] Possible solutions: is(java.lang.Object), find(), use([Ljava.lang.Object;), with(groovy.lang.Closure), sleep(long), find(groovy.lang.Closure)
at "OpportunityEO" trigger "getRevenueItems" line 7
No signature of method: oracle.jbo.server.ViewRowSetIteratorImpl.size() is applicable for argument types: () values: [] Possible solutions: is(java.lang.Object), find(), use([Ljava.lang.Object;), with(groovy.lang.Closure), sleep(long), find(groovy.lang.Closure)
Depending on the message the line number might be in one of the fields:
MESSAGE_V1
MESSAGE_V2
MESSAGE_V3
MESSAGE_V4
Although if the message simply is not meant to include the line number, it won't be there. That's the way it is. If there is a user exit available, you may add your custom messages with the line number. In some user exits (in sales order for sure) there is a special variable (flag), which is set when the BAPI runs the transaction.
Similar Messages
-
How to retrieve the item text from VL03 transaction .
How to retrieve the item text from VL03 transaction .
The requirement is like this, the item text thus retrieved should be printed in the script under the item.Jagadieshwar,
Use <b>READ_TEXT</b> function module to get the proper item text of Delivery.
<b>ID</b>: Probably you want 0002 (Item Note), but it depends which text you want Item Note, Material Sales Text ,etc..
<b>NAME</b>: CONCATENATE Delivery Doc. Number + Delivery Item Number (e.g. 0080001729000010)
<b>OBJECT</b>: VBBP
<b>
LANGUAGE</b>: sy-langu or whatever you want. -
From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?
Hi,
Use NVL or COALESCE:
NVL (col_a, col_b)
Returns col_a if col_a is not NULL; otherwise, it returns col_b.
Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
How to pass line item values in the table paramer of FM
Hi all,
When i will give the import of the FM as VBELN"sales order number.
I want to display all the line items for "PO Quantity in the out put of the FM.
For this i thnk i have to pass the line item values in the table parameter of the FM.
Can any body please tell me how to pass the values for the line items in the table parameter fo teh FM.
Please give a example.
ThanksSub pLoopThroughPivotFields()
Dim oItem As Excel.PivotItem
Dim oField As Excel.PivotField
Set oField = ThisWorkbook.Worksheets("Sheet1").PivotTables("Pivot Table name").PivotFields("field name")
For Each oItem In oField.PivotItems
oField.CurrentPage = oItem.Name
'Put your copy code here
DoEvents
Next oItem
End Sub
Felipe Costa Gualberto - http://www.ambienteoffice.com.br -
How to retrieve the max value from a cursor in procedure
Hi,
In a procedure, I defined a cursor:
cursor c_emp is select empno, ename, salary from emp where ename like 'J%';
but in the body part, I need to retrieve the max(salary) from the cursor.
could you please tell me how I can get the max value from the cursor in the procedure.
Thanks,
PaulHere is one sample but you should just get the max directly. Using bulk processing should be a last resort.
DECLARE
CURSOR c1 IS (SELECT * FROM emp where sal is not null);
TYPE typ_tbl IS TABLE OF c1%rowtype;
v typ_tbl;
max_sal number;
BEGIN
OPEN c1;
max_sal := -9999999999999;
LOOP --Loop added
FETCH c1 BULK COLLECT INTO v LIMIT 3; -- process 3 records at a time
-- process the records
DBMS_OUTPUT.PUT_LINE('Processing ' || v.COUNT || ' records.');
FOR i IN v.first..v.last LOOP
if v(i).sal > max_sal then
max_sal := v(i).sal;
end if;
DBMS_OUTPUT.PUT_LINE(v(i).empno);
END LOOP;
EXIT WHEN c1%NOTFOUND;
END LOOP;
DBMS_OUTPUT.PUT_LINE('Max salary was: ' || max_sal);
END;
Processing 3 records.
7369
7499
7521
Processing 3 records.
7566
7654
7698
Processing 3 records.
7782
7788
7839
Processing 3 records.
7844
7876
7900
Processing 2 records.
7902
7934
Max salary was: 5000 -
How to Retrieve the Selected Values from selectOrderShuttle using ADF 11g
Hi Every One,
Does anyone has idea how to retrieve the selected Items using shuttle and Order of the items using 'SelectOrderShuttle' component ?
Thanksshuttle's valuechangeevent would fire when you shuttle items back and forth.
public void selectOrderShuttle1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
if (list != null){
for (int i=0; i<list.size(); i++) {
int l = list.size()-1;
val = list.get(l).toString(); //returns , delimited string
if (val != null){
val = val.replaceAll("[\\[\\]]", "");
StringTokenizer st = new StringTokenizer (val, ",");
int nto = st.countTokens ();
for (int j = 0; j < nto; j++)
String token = st.nextToken ();
.......... -
How to retrieve query string value from the URL in my portlet
Hi,
When user clicks on "Advance Search", i am redirecting to page in the community. At the same i am adding some more values to the query string (to the URL).
My URL will look like this.
http://ctp-mc0149/portal/server.pt?space=CommunityPage&parentname=CommunityPage&parentid=0&in_hi_userid=200&cached=true&control=SetCommunity&PageID=202&CommunityID=200&searchType=2
Now in one of my portlet in that page, i want to retrieve the query string values from the URL.
Please help me regarding this.
Thanks in advance.
Thanks,
sreekanth.Hi,
Look at the following threads,
For programmatically getting the iview properties,
Programmatically getting iView Properties
Also,
Get Properties of IView Programmatically
Permanent change of iView property programmatically
Hope these threads help u.
Regards
Srinivasan T -
How to read selected item value from DropDownList?
Hi,
The DropDownList component has a selectedItem property that is supposed to return a ListBase.
But what I want is just the "String" that is supposed to be the selected Item in the DropDownList.
How can I read this value?
thanks
-MalenaThank, yes, I realized that right after I posted my question -:)
I casted the selectedItem property to String and voila.
Best
-Malena -
How to retrieving attributes old values from a OBJECT_CHANGED event
Hi,
I have installed Sun ONE Directory Server 5.2. I have registared Event Listener which implements both name space change and object change interfaces. After chaning some attribute value, i am able to get the new values of attributes using getNewBinging method. But when i call getOldBinding to get attributes, it is returning null. Can any one help me how to get the old values. This is very much urgent and we are trying to write custom connectors to synchronize the data in Sun ONE directory server with other directory servers like Oracle Internet Directory.
I am new to Java and JNDI.
It would be great help if any one can light me in this regard. Thanks in advance.
Thanks & Regards
SreedharI have been also working for the same issue. getOldBinding() does not return old attributes in case of ObjectChanged event. So far I did not find any solution. Does anyone know any solution?
-
How to retrieve a property value from an iview in the back-end?
Hi,
I am looking for a back-end function module or any other way to retrieve the property value of an iview in the portal.
Is this possible?
thanks,
Bert CarynHi,
Look at the following threads,
For programmatically getting the iview properties,
Programmatically getting iView Properties
Also,
Get Properties of IView Programmatically
Permanent change of iView property programmatically
Hope these threads help u.
Regards
Srinivasan T -
How to trap null return values from getters when using Method.invoke()?
Hi,
I am using Method.invoke() to access getters in an Object. I need to know which getters return a value and which return null. However, irrespective of the actual return value, I am always getting non-null return value when using Method.invoke().
Unfortunately, the API documentation of Method.invoke() does not specify how it treats null return values.
Can someone help?
ThanksWhat do you get as a result?I think I know what the problem is.
I tested this using following and it worked fine:
public class TestMethodInvoke {
public String getName() {
return null;
public static void main(String args[]) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
Object o = new TestMethodInvoke();
Class cls = o.getClass();
Method m = cls.getMethod("getName", (Class[]) null);
Object result = m.invoke(o, (Object[])null);
if (result == null) {
System.err.println("OK: Return value was null as expected");
else {
System.err.println("FAILED: Return value was NOT null as expected");
However, when I use the same technique with an EJB 3.0 Entity class, the null return value is not returned. Instead, I get a String() object. Clearly, the problem is the the EJB 3.0 implementation (Glassfish/Toplink) which is manipulating the getters.
Regards
Dibyendu -
How to access attribute value from another VO using groovy?
Hello, I am using JDeveloper 11.1.2.3.0
I read a lot of information about this but still I am missing something. I am trying to set the value of a bind variable through Groovy expression in my VO. I want this Bind variable
to have the value from an attribute from another VO. I tried ''adf.object.MyAppModuleImpl.findViewObject('Users1').currentRow.Iduser''
I am getting "oracle.jbo.expr.JISyntaxError: Variable MyAppModuleImpl not recognized". I tried with 'MyAppModule' only but the result is the same.
Can anyone help please?
ThanksCheck out http://www.oracle.com/technetwork/developer-tools/adf/learnmore/august2011-otn-harvest-457288.pdf Page 18 'Optimized Groovy data access to view objects'
Timo -
One line item missing from PO created using Shopping cart
Hello Team, we have raised a shopping cart with 6 line items, having the same vendor and account assignment details. Once the shopping cart was approved the PO was created but the 3rd line item was missing in the PO. When we checked in BBP_PD, the 3rd line item is still showing as item in transfer process. Can anyone please throw some light to this issue. All the line items were approved.
Thanks.
RichaHi Richa,
Is there any error in RZ20 for that shopping cart?
Best Regards,
Bharathi -
How to retrieve a string value from a PHP function call
Should this string be the return value of the PHP function?
Or should it be embedded in the response HTML? Any examples?This is what I got so far:
footer.mxml in Flex Builder 3:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="ts_request()">
<mx:Script>
<![CDATA[
public function ts_request():void {
timestampRequest.send();
]]>
</mx:Script>
<mx:Canvas width="836" height="36"
backgroundColor="#05075C">
<mx:Label id="timestamp"
text="{timestampRequest.lastResult.timestamp}" color="#FEFEFE"
height="20" y="10" textAlign="left" width="221" x="10"/>
</mx:Canvas>
<mx:HTTPService id="timestampRequest" url="
http://www.ABC.com/timestamp.php"
useProxy="false" method="POST" />
</mx:Application>
Here is the timestamp.php on the www.ABC.com web server. I
have tested the php by directly access it with
"www.ABC.com/timestamp.php" and it shows the timestamp correctly:
<?php
putenv($timezone);
$Return = "<timestamp>".date("m/d/Y H:i:s", time())."
CST"."</timestamp>";
print($Return);
?>
When I run footer.mxml in Flex 3 Builder, I got an error:
This file cannot be launched.
Where did I do wrong? -
How to retrieve all the data from a BLOB using view-generated accessor
I am using JDeveveloper 10g v. 10.1.3 and am storing an image in a database as a blob object and need to retrieve all of the data to get the entire image and store it in an ImageIcon. The code I have works partially in that it retrieves the correct data, but only gets a piece of it, leaving me with a partial image.
AppModuleImpl am;
ImageVwViewImpl vo;
am = (AppModuleImpl)panelBinding.getDataControl().getDataProvider();
vo = (ImageVwViewImpl)am.findViewObject("ImageVwView");
ImageVwViewRowImpl ivo = (ImageVwViewRowImpl)vo.getCurrentRow();
ImageIcon icon = new ImageIcon(ivo.getImage().getBytes(1, (int)ivo.getImage().getBufferSize()));
jULabel1.setIcon(icon);I either need to know how to use a stream to get the data out (from BlobDomain method getBinaryStream()), or how to get the other chunks of data separately.
edit: I know the problem is that getBufferSize() returns an int which is too small to hold all the data, but need to know what to use instead. Thanks!This is the code I'm using now. Same problem :(
AppModuleImpl am;
ImageVwViewImpl vo;
am = (AppModuleImpl)panelBinding.getDataControl().getDataProvider();
vo = (ImageVwViewImpl)am.findViewObject("ImageVwView");
ImageVwViewRowImpl ivo = (ImageVwViewRowImpl)vo.getCurrentRow();
ImageIcon icon = new ImageIcon(ivo.getImage().toByteArray());
jULabel1.setIcon(icon);
Maybe you are looking for
-
hi out there. I can no longer enlarge or stretch any objects or words that I choose with the selection tool. its like I hit a button and turned off something. please help. jeff
-
Bypass "Claim" action on a Human Task
We are going to start user testing of our first BPEL process. The human tasks are set up to have a single approver, but they are assigned to a group of users. The users want to know if there is a way to by-pass having to claim the task, so that just
-
Hi Gurus, i had created the report for the HR in SQ01 there they asked me to display the personal area in the header dynamically which they select in the screen .. Can any of u give some solution for it thanks in advance from abeehs
-
Hello, When I debug an ABAP program, is there any way to display a list of names of all the program's internal tables? (global and local) Thx. Andy
-
Spreadsheet can't be opened from iCloud
It will not open on any of my devices (iPhone, iMac, MacBook Pro, or iPad). I have the latest OS and iWorks installed on all devices. Seemed to start with a conflict message stating that the file hadn't been sync'd on another device. I made a sele