How to query over a child field with WebServices (QueyPage)?
Hi,
I am using Account WS 1.0, and I would like to do a query to retrieve all assets in a specif account with one filter in the Account element and other filter in the Asset element. For the first one, I haven't problems, but with the second I can't do the query with a filter (it has the particularity to be a numeric field).
This is my source code:
listAssetAccountQuery[0] = new Account();
listAssetAccountQuery[0].setAccountId("");
listAssetAccountQuery[0].setId_Client("='"+idAccount+"'");
assetAccount[0] = new Asset();
assetAccount[0].setAssetId("");
assetAccount[0].setProduct("");
assetAccount[0].setNCodeProd("= "+idProd); <---- Here it is the problem. If I try with assetAccount[0].setNCodeProd(""); I have results.
// The error is: javax.xml.rpc.soap.SOAPFaultException: Text unexpected: ='200200'(SBL-EAI-13010)
listAssetAccountQuery[0].setListOfAsset(assetAccount);
AccountWS_AccountQueryPage_Output resultQuery = myPort.accountQueryPage(null, "true", null, "100", listAssetAccountQuery, "false", "0");
How can I do the filter for NCodeProd¿? I have tested too with:
assetAccount[0].setNCodeProd("='"+idProd"'");
But the issue is the same.
I am not sure if it is correct this association to do a query between a parent and child object. Is this correct?
Thank you in advance and regards.
Hi,
By default the criteria between the parent and child is "or" ed. The query you have specified is
account.Id_Client='idAccount' or account.asset.NCodeProd='idProd'
if you are looking for an "AND" operation then set the "UseChildAnd" parameter to true. This API should be avialable in your XXXWS_XXXQueryPage_Input object.
Also, only a subset of child fields are filterable. Look at the web Services user guide to make sure the NCodeProd field of Asset is filterable.
hope this helps.
Cheers,
Edited by: 789631 on Oct 28, 2010 10:38 AM
Similar Messages
-
How to create Using Formatted Text Field with multiple Sliders?
Hi i found the Java Sun tutorial at http://java.sun.com/docs/books/tutorial/uiswing/components/slider.html very useful, and it tells how to create one Formatted Text Field with a Slider - however i need to create Formatted Text Field for multiple Sliders in one GUI, how do i do this?
my code now is as follows, and the way it is now is scroll first slider is okay but scrolling second slider also changes value of text field of first slider! homework due tomorrow, please kindly help!
// constructor
label1 = new JLabel( "Individuals" );
scroller1 = new JSlider( SwingConstants.HORIZONTAL, 0, 100, 10 );
scroller1.setMajorTickSpacing( 10 );
scroller1.setMinorTickSpacing( 1 );
scroller1.setPaintTicks( true );
scroller1.setPaintLabels( true );
scroller1.addChangeListener(this);
java.text.NumberFormat numberFormat = java.text.NumberFormat.getIntegerInstance();
NumberFormatter formatter = new NumberFormatter(numberFormat);
formatter.setMinimum(new Integer(0));
formatter.setMaximum(new Integer(100));
textField1 = new JFormattedTextField(formatter);
textField1.setValue(new Integer(10)); //FPS_INIT
textField1.setColumns(1); //get some space
textField1.addPropertyChangeListener(this);
//React when the user presses Enter.
textField1.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "check");
textField1.getActionMap().put("check", new AbstractAction() {
public void actionPerformed(ActionEvent e) {
if (!textField1.isEditValid()) { //The text is invalid.
Toolkit.getDefaultToolkit().beep();
textField1.selectAll();
} else try { //The text is valid,
textField1.commitEdit(); //so use it.
} catch (java.text.ParseException exc) { }
label2 = new JLabel( "Precision" );
scroller2 = new JSlider( SwingConstants.HORIZONTAL, 0, 100, 8 );
scroller2.setMajorTickSpacing( 10 );
scroller2.setMinorTickSpacing( 1 );
scroller2.setPaintTicks( true );
scroller2.setPaintLabels( true );
scroller2.addChangeListener(this);
textField2 = new JFormattedTextField(formatter);
textField2.setValue(new Integer(10)); //FPS_INIT
textField2.setColumns(1); //get some space
textField2.addPropertyChangeListener(this);
//React when the user presses Enter.
textField2.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "check");
textField2.getActionMap().put("check", new AbstractAction() {
public void actionPerformed(ActionEvent e) {
if (!textField2.isEditValid()) { //The text is invalid.
Toolkit.getDefaultToolkit().beep();
textField2.selectAll();
} else try { //The text is valid,
textField2.commitEdit(); //so use it.
} catch (java.text.ParseException exc) { }
// State Changed
public void stateChanged(ChangeEvent e) {
JSlider source = (JSlider)e.getSource();
int fps = (int)source.getValue();
if (!source.getValueIsAdjusting()) { //done adjusting
if(source==scroller1) {
System.out.println("source ==scoller1\n");
textField1.setValue(new Integer(fps)); //update ftf value
else if(source==scroller2) {
System.out.println("source ==scoller2\n");
textField2.setValue(new Integer(fps)); //update ftf value
} else { //value is adjusting; just set the text
if(source==scroller1) textField1.setText(String.valueOf(fps));
else if(source==scroller2) textField2.setText(String.valueOf(fps));
// Property Change
public void propertyChange(PropertyChangeEvent e) {
if ("value".equals(e.getPropertyName())) {
Number value = (Number)e.getNewValue();
if (scroller1 != null && value != null) {
scroller1.setValue(value.intValue());
else if (scroller2 != null && value != null) {
scroller2.setValue(value.intValue());
// ACTION PERFORMED
public void actionPerformed(ActionEvent event) {
if (!textField1.isEditValid()) { //The text is invalid.
Toolkit.getDefaultToolkit().beep();
textField1.selectAll();
} else try { //The text is valid,
textField1.commitEdit(); //so use it.
} catch (java.text.ParseException exc) { }
if (!textField2.isEditValid()) { //The text is invalid.
Toolkit.getDefaultToolkit().beep();
textField2.selectAll();
} else try { //The text is valid,
textField2.commitEdit(); //so use it.
} catch (java.text.ParseException exc) { }
...if :p3_note_id is null
then
insert into notes (project_id, note, notes_month, notes_year) So, p3_note_id is NULL.
Another option is that you have a trigger on table NOTES that generates a new note_id even for an update. -
How to make a list item field with DATE data type?
I have a column with DATE data type. Using forms 6i I want to generate a poplist list item field with this column while the value of the elements in the list to will be day names like SATURDAY,SUNDAY,MONDAY. if we change the data type from date to char, it will work properly but now with DATE data type behind it, it gives the following error message
"FRM-32082: Invalid value for given item type.
List WEEKREST
Item: WEEKREST
Block: EMPRESTS
Form: MODULE3
FRM-30085: Unable to adjust form for output."
Using forms 6i how to make a list item field with DATE data type which can hold day names?Set your date column as a hidden (non-displayed) field. Create your list item with the varchar2 day names. Create the list item as a non-base-table field that accepts the text values of day names. On that field, create a when-validate-item trigger that translates the text into a real date, which it then uses to set the value of the actual base-table item.
-
I have just owned a macbook pro and trying to learn things since i have all along used windows laptop. My first question is : when there are two files i am working together, one above the other on screen, how you switch over between the two with key ?
Hi...
Mac OS X keyboard shortcuts
Control-F4
Move focus to the active (or next) window
Shift-Control-F4
Move focus to the previously active window
By the way... since you are new to Mac, click a clear space on your Desktop. You should see "Finder" top left corner of the screen in the menu bar.
Click Help then click Help Center
As an example type in keyboard shortcuts
You can use the Help menu for almost any application on your Mac.
Apple - Find Out How - Mac Basics
For held switching from PC to Mac > Apple - Support - Switch 101 -
How to insert record in child table with foreign key
Hi,
I am using Jdeveloper 11.1.2.0. I have two master table one child table.
How to insert and update a record in child table with foreign key ?
I have created VO based on three EO(one eo is updatable other two eo are references) by using joined query.
Thanks in Advance
Edited by: 890233 on Dec 24, 2011 10:40 PM... And here is the example to insert using sequenceimpl by getting the primary key of the master record and insert master and detail together.
Re: Unable to insert a new row with a sequence generated column id
-Arun -
How to check/count whether child records with specific type exist?
Hi
We need to create a BIP report based on data from Siebel.
In Siebel we have two entities:
Entity <Mandate> = Parent Business Componet
Entity <Attachment> = Child Business Component
(An attachment has a specific type attribute (e.g. “contract”, “appendix” and lot of others…)
Relationship between Mandate and Attachments is 1-m.
We need to create a BIP report which displays all Mandates records which do not have at least two Attachments child records (there must be one attachment child record with type=”contract’ and another with type “appendix”). How can we check in BIP whether these child records with a specific Attachment type exist? And if not, display the Mandate in a list....
Many thanks
AlenThanks for your help
Well I'm not sure about the syatax I have to use in order to filter on the field *<GAMDocumentType>*
The structure of the xml we use is as follows:
<ListOfBipJbAmlMandateAttachmentReport>
<JbAmlMandate>
<ListOfJbAmlAttachment>
<JbAmlAttachment>
<AccntFileName>DocumentPage_713328</AccntFileName>
<GAMDocumentType>*contract</GAMDocumentType>
<MandateId>1-4C79B</MandateId>
<Status>Active</Status>
</JbAmlAttachment>
I tried <?for-each:JbAmlMandate[count(./JbAmlAttachment[GAMDocumentType='contract']) > 1 and count(./Attachment[type='appendix']) > 1]?>
But this returns nothing.
Many thanks for your help
Saggittarius -
How to roll over deposit at notice with zero interest rate ?
Hello All,
There is a requirement from client that they want to roll over deposit at notice with zero interest rate (Tcode TM14).
However when we enter zero in interest percentage rate field, system still ask us to enter the interest rate (Error message number T4034) being a mandatory field.
Following are additional details:
Product Type = 52B
Transactn Type = 100
Condition Type = 1200
Activity = 801
Do you know how to roll over a deposit at notice with zero interest rate in TM14?
Is it possible to create new condition type which will allow zero interest for a deposit at notice at the time of roll over?
Thanks,
VaishaliI am not able to check it, but my thoughts are - mandatory field status is a problem.
It is possible to enter zero interest condition - just enter new condition starting from new date and leave percentage field empty or enter zero value ( zero value = empty field). But the problem is that percentage field is mandatory as you mentioned.
Possible solution: switch off mandatory status and create implementation of BADI to check if field is filled (for example Check entry of deal's data.) and if not - issue an error that there will be zero condition. -
How to compare table's date field with dropdown year field
Hi All,
I have one requirement to display the selected rows from a database table based on the selection of drop down.
Here, I have one dropdown of year(like 2009,2010,....) and I have one database table which contains one field with "DATE".
Now, I want to compare table's DATE field with my dropdown field.
Problem is that table's DATE field is of type "DATS" and dropdown is of type INTEGER(or) STRING ...
How to compare this fields?
Can any one please give me solution for this...!
Thanks in Advance!Hi sreelakshmi.B,
try the following:
DATA lt_dats TYPE TABLE OF dats.
DATA l_dat_i TYPE i.
DATA l_dat_c_4(4) TYPE c.
DATA l_dat_c_12(12) TYPE c.
DATA l_dats_from TYPE dats.
DATA l_dats_to TYPE dats.
*Move Date from Integer to Char
l_dat_c_4 = l_dat_i = 2005.
*Create Date From use in WHERE-Clause
CONCATENATE '01.01.' l_dat_c_4 INTO l_dat_c_12.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = l_dat_c_12
IMPORTING
date_internal = l_dats_from
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
*Create Date To use in WHERE-Clause
CONCATENATE '31.12.' l_dat_c_4 INTO l_dat_c_12.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = l_dat_c_12
IMPORTING
date_internal = l_dats_to
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
* Select records in range
SELECT *
FROM [DBTAB]
INTO TABLE [ITAB]
WHERE [DATE] BETWEEN l_dats_from
AND l_dats_to.
Regards
REA -
How to populate a hidden form field with a value passed from another page
I'm using PHP/MySQL and DW CS4.
I am trying to obtain the external key for a table, and include it as a hidden field in a form for a second table.
The user selects a "need" from a list and is taken to a new page which displays the need selected in the prior page and a form the user can fill out with details of his offer, there should also be a hidden field in this form that contains the index to the needs table, this hidden field holds the external key. Most of the code is working, except for populating the hidden field with the external key. I have proven(by printing it to the screen) that I have obtained the external key and stored it in a variable ($saveNeedId) . What I'm unable to do is assign this variable to the hidden field in the form I'm about to store in a table. Sometimes I get zero and sometimes I get the index to the first need in the table. This ought to be simple but I can't get it to work, I must be missing something obvious - still very new to PHP.
Here's the code that sets up the variable and prints it to the screen for test purposes
$saveNeedId = "-1";
if (isset($_GET['needId'])) {
$saveNeedId = $_GET['needId'];
print $saveNeedId;
Here's the code that sets up the hidden fields in the form, the one I'm trying to set up is the first one, needId
<input type="hidden" name="needId" value="<?php echo $row_rsNeedsUnmet['needId']; ?>" />
<input type="hidden" name="offerId" value="" />
<input type="hidden" name="MM_insert" value="form1" />
The page where the user sees the list of needs is here www.hollisterairshow.com/weneed.php
I'd really appreciate sone help with this, I've tried all combinations of double quotes, percent signs and nothing works...sigh.
TonyHere's the code that sets up the variable and prints it to the screen for test purposes
$saveNeedId = "-1";
if (isset($_GET['needId'])) {
$saveNeedId = $_GET['needId'];
print $saveNeedId;
Here's the code that sets up the hidden fields in the form, the one I'm trying to set up is the first one, needId
<input type="hidden" name="needId" value="<?php echo $row_rsNeedsUnmet['needId']; ?>" />
<input type="hidden" name="offerId" value="" />
<input type="hidden" name="MM_insert" value="form1" />
<input type="hidden" name="needId" value="<?php echo $_GET['needId']; ?>" />
I looked at your page. It looks like you figured it out. -
How delete one product of a opportunity with WebService?
Hi
I know to insert a new product in a opportunity with webservice (with ListOfProducts of opportunity.wsdl) but, how i can delete one product of a opportunity?
Thanks,
IvanThis is my code:
crm.oportunidad.Opportunity oportunidad = new crm.oportunidad.Opportunity();
OpportunityWS_OpportunityDeleteChild_Input qbe = new OpportunityWS_OpportunityDeleteChild_Input();
OpportunityWS_OpportunityDeleteChild_Output qRet;
qbe.ListOfOpportunity = new Opportunity1[1];
qbe.ListOfOpportunity[0] = new Opportunity1();
qbe.ListOfOpportunity[0].ListOfProduct = new crm.oportunidad.Product[1];
qbe.ListOfOpportunity[0].ListOfProduct[0] = new crm.oportunidad.Product();
qbe.ListOfOpportunity[0].ListOfProduct[0].ProductId = psProductoID;
oportunidad.Url = string.Format(surl, getInstancia(),sSessionID);
oportunidad.CookieContainer = GetCookieContainer();
qRet = oportunidad.OpportunityDeleteChild(qbe);
And this is the error:
No se puede utilizar una clave de usuario para la instancia de componente de integración 'Opportunity_Product'.(SBL-EAI-04397)
When i try to add products i have the same error code
Any idea? -
How to populate dynamic internal table fields with data??
Hi Folks,
How to assign a particular internal table field to a dynamically assigned internal table?
I have an excel sheet, and i upload the excel sheet data into an internal IT_EXLOAD table using FM ALSM_EXCEL_TO_INTERNAL_TABLE
Now i created a dynamic internal table which has the same column as in my DB table.
I have to fill the dynamically created Internal table with the IT_EXLOAD data dynamically.
Suppose in future if i add some field in DB table and for that field if i add some column in excel sheet there is no need to change in the program.
Looking for reply...
Best Regards,
Sayakhi,
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = p_path
i_begin_col = '1'
i_begin_row = '2'
i_end_col = '2'
i_end_row = '1000'
TABLES
intern = intern
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
*declare intern_tmp as internal table tb_data in wich you want the data
*and declare a field symbol <fs_123>
LOOP AT intern.
ASSIGN COMPONENT intern-col OF STRUCTURE
intern_tmp TO <fs_123>.
IF NOT <fs_123> IS ASSIGNED.
CLEAR intern.
CLEAR intern_tmp.
CONTINUE.
ENDIF.
<fs_123> = intern-value.
AT END OF row.
CLEAR tb_data.
MOVE-CORRESPONDING: intern_tmp TO tb_data.
APPEND tb_data.
CLEAR intern_tmp.
ENDAT.
CLEAR intern.
ENDLOOP.
**paste this code and you can see the data in ur tables dynamically.
Thanks
Nitin Sachdeva -
Display a generated query in a text field with values
Hello, I generate a query based on pl/sql. This works fine, but how can I display the query with the values from an item?
i.e. in my query i have select * from a_table where name = :p1_name
if i want to display the query in the correct way " select * from a_table where name = 'JOHN'.
When i try this i only display select * from a_table where name = :p1_name, not the value i have applied to the item.
Hope someone can help..htp.p('select * from a_table where name = ' || :P1_ENAME);
Scott -
How to query user across multiple forest with AD powershell
Hi Guys
Our situation like this , we have two forest ,let say forestA.com and forestB.com, and they are many subdomian in forest A.
I'd like to write a script to the AD object information via get-adobject -identify xxxx
My accont belongs to forestA.com , and the computer i logged on belongs to forestB.com ,A & B have forest trust.
Now the problem is if the object i quried belngs to forestB.com ,the Get-ADObject works fine ,however if the object belongs to forestA.com ,i got the error "Get-ADObject: Cannot find a object with identify: 'xxxx' under: 'DC=forestB,DC=com'.
So how can i have a script than can query user in both forestPrepared this some time ago for a PowerShell Chalk & Talk. Just change the forest names and credentials. Each Active Directory cmdlet you are calling works on the current drive. So to switch between the forests you need just change the drive / location.
This is also quite nice for migration scenarios.
$forests = @{
'forest1.net' = (New-Object pscredential('forest1\Administrator', ('Password1' | ConvertTo-SecureString -AsPlainText -Force)))
'forest2.net' = (New-Object pscredential('forest2\Administrator', ('Password2' | ConvertTo-SecureString -AsPlainText -Force)))
'forest3.net' = (New-Object pscredential('forest3\Administrator', ('Password3' | ConvertTo-SecureString -AsPlainText -Force)))
'a.forest1.net' = (New-Object pscredential('a\Administrator', ('Password1' | ConvertTo-SecureString -AsPlainText -Force)))
'b.forest1.net' = (New-Object pscredential('b\Administrator', ('Password1' | ConvertTo-SecureString -AsPlainText -Force)))
Import-Module -Name ActiveDirectory
$drives = $forests.Keys | ForEach-Object {
$forestShortName = ($_ -split '\.')[0]
$forestDN = (Get-ADRootDSE -Server $forestShortName).defaultNamingContext
New-PSDrive -Name $forestShortName -Root $forestDN -PSProvider ActiveDirectory -Credential $forests.$_ -Server $forestShortName
$result = $drives | ForEach-Object {
Set-Location -Path "$($_):"
Get-ADUser -Identity administrator
$drives | Remove-PSDrive -Force
$result
-Raimund -
How to query a DHCP option field?
I am able to successfully define various DHCP Option codes for use with Apple's DHCP server and indeed I am the person who wrote a GUI utility to make it much easier to generate the data values needed to do this. The following is a typical example of what you need to (manually) add to /etc/bootpd.plist
<key>dhcpoption66</key>
<data>
CgBklg==
</data>
I am also able to query specific DHCP option codes (as provided by Apple's DHCP server as above) using IPNetMonitorX from Sustainable Softworks. However it should I believe be possible to do the same tests via the command line in Terminal using the ipconfig getoption command, please see the "man ipconfig" page.
While as an example "ipconfig getoption en0 router" works fine, I cannot seem to get the right syntax for querying a specific DHCP option code, despite the man page suggesting this should be possible. Unfortunately like nearly all man pages, the information is very skimpy and the examples practically non-existant.
Could anyone reply with the correct syntax to query as an example DHCP option code 66?
I suppose (gasp!) Apple could have a bug in ipconfig preventing the ability to query option codes. (Shock, horror!)MrHoffman wrote:
When in doubt, use the source.
The DHCP [client.c source code|http://www.opensource.apple.com/source/bootp/bootp-198.2/ipconfig.tproj/client.c] might be interesting here.
The core of the option-related code looks to be over in the [dhcp_options.c source code|http://www.opensource.apple.com/source/bootp/bootp-198.2/bootplib/dhcp_options.c ?txt] and what looks to be the option tag table mapping is over in the [gendhcp_parsetable.h source code|http://www.opensource.apple.com/source/bootp/bootp-198.2/bootplib/gendhcp_parsetable.h].
A quick read of the source files and particularly the routines command_info and Sgetoption and the tag table implies that the +ipconfig getoption en0 66+ command might work. Or maybe +ipconfig getoption en0 tftpservername+ will work.
When I test this syntax, I get +ipconfiggetoption failed, (os/kern) failure+ and which obviously doesn't bode well for this syntax, but then I likely don't have any of the related stuff enabled on this test network. (And I'm only very quickly reading the C code here...)
I have not found and viewed the source but I had tried that exact syntax (as per your example) and got the exact same error hence my comment that maybe (gasp!) there is a bug here.
I have submitted a bugreporter entry and will have to wait and see if Apple reply.
Thanks for the apparent confirmation. -
How do you clear an InputText field with a button click
I am trying to create a calculator and I want to be able to use a "Clear" button that will reset all the values entered in several InputText fields and the total which is a label. I can update and clear a label using the UpdateContext
function, but this isn't working for an InputText field. Can someone provide an example on how to clear one InputText field?Hello,
To do this you need to do the following
Add an "Input Text", select the inputText and click Express view (bottom right).
Set the default value to
textboxvalue
without any quotes
On the behaviour / OnVisible of screen you put the inputText on set for example the following
UpdateContext({textboxvalue: "Enter text here"})
You can now add several buttons on the screen that do something
UpdateContext({textboxvalue: ""})
or
UpdateContext({textboxvalue: "Enter Text here"})
Or you could chain it with another OnSelect that is going on on the screen and reset your textbox. You can then also add the value the user has entered in a collection too (see bottom example)
Navigate(Screen2, ScreenTransition!Fade);UpdateContext({textboxvalue: "Enter Text here"})
Collect(inputcollection,{userinput: InputText1!Text});Navigate(Screen2, ScreenTransition!Fade);UpdateContext({textboxvalue: "Enter Text here"})
I believe this should point you in the right direction
Regards
StonyArc
Maybe you are looking for
-
Check out problem with InCopy / Alfresco
I use the following components: InCopy CS5 7.0.3 Drive 2.1.0.204 Alfresco 3.4.0 (d 3370) Before I can start editing the text in InCopy, a dialog comes up and I have to check out the content (Don't know the exact words of the dialog, because i only ha
-
My adapter got frayed a bit on the cord from the power box to my laptop. I now have a slight grounding problem. My laptop is a Satellite S875D-S7239. The part numbers listed in my owners manual gives me 2 choices for my model. PA3714U-1ACA Toshiba 65
-
I was having a problem where iTunes would not quit and stay quit. Even Force quit would only work for a second or two, then iTunes would restart. I tried several suggestions here, but none of them worked. Instead when I googled "iTunes won't quit" I
-
New iPhone User... Does AT&T offer insurance plan??
Just changed my carrier to freaken AT&T and was wondering if they have an insurance plan? Do you know how much it is? At verizon i think it was like 7 bucks a month.
-
Java.rmi.NoSuchObjectException with custom InputStream/OutputStream
I'm experiencing a strange problem here...and have spent the night digging for an answer, but I don't see any... I am using a custom client/server socket factory, which works great until I return my custom In/Out streams from the custom Socket. I can