Attachments to a Purchase Requisition - oracle-sqldeveloper

I need to download attachments for over 300 purchase requisitions in the Oracle e-Business suite. Instead of opening the requisitions one-by-one and then going to the "Manage Attachments" section, I would like to do this through a query, where I would enter the PR numbers and then get the attachments. Does anybody know if this would be possible through a query in SQL developer (or Ms Access)? If yes, which tables should I consider to design the query?
Thank you in advance for any help you might be able to give me.

You can use this SQL https://www.enginatics.com/reports/fnd-attached-documents/ as a basis and add a restriction to the req headers you need to see like this
fad.entity_name='REQ_HEADERS' and
fad.pk1_value in (select to_char(prha.requisition_header_id) from po_requisition_headers_all prha where ...) and
note that the to_char() is required to use the fnd_attached_documents_n1 index as fad.pk1_value is varchar2 whereas prha.requisition_header_id is a number

These are stored in the FND_DOCUMENTS and information about which application entity / key it is attached to is in FND_ATTACHED_DOCUMENTS - this blog article does a good job of describing the tables involved.

Related

Verify Data INSERT INTO QUERY

Using postgresql-14 with pgadmin4
The task is vague but requests that I insert the data into a new table and then verify the data. I want to believe there is some "standard" or process to verify that the data was moved correctly and is intact, is there such a thing? I'm not sure how to "show" that the data is verified as correct in the new table.
For this insert:
INSERT INTO car_detail(id, make, model, price, year)
SELECT dealership_stock.id AS id,
manufacturers.make AS make,
models.model_name AS model,
price_sheet.price AS price,
model_years.year AS year,
FROM dealership_stock
INNER JOIN.... etc.
TIA - it seems like a simple and logical task, but I am baffled on how to execute and prove it.
Dai and Bjarni were correct - verification isn't required in the code. The requirement was implying that the dataset would be viewed and confirmed that the data was present in the new table. And here I had hoped to learn of some fancy new command to verify data and instead am taking Belayer's comment to heart that I need to keep asking questions until I understand the requirements! Thanks everyone!

Unable to search for Orders/Customers in oracle commerce (ATG) - CSC 11.1

I am trying to perform order and profile search operations on CSC, but they return no results.
I the components /atg/commerce/textsearch/OrderOutputConfig/ and /atg/userprofiling/textsearch/ProfileOutputConfig/ and I found them indexing perfectly in the tables SRCH_ORDER_TOKENS and SRCH_PROFILE_TOKENS respectively.
After enabling loggingDebug in both components I found that the search query has additional condition seems that it's related to multisite pfrmZeroRealmsAccessible, however I found that all tokens stored in DB for orders and customers have this value pfrmdft. Below is the query extracted from logs:
[++SQLQuery++]
SELECT t1.id
FROM srch_order_tokens t1
WHERE CONTAINS(t1.tokens,?,0) > 0
-- Parameters --
p[1] = {pd: tokens} pflnAhmad% AND pfrmZeroRealmsAccessible% (java.lang.String)
[--SQLQuery--]
Note: My application has only one single site (not multisite) however I found some configuration files created by CIM related to multisite which I can't remove.
Please help me answering the following question:
Is this issue really related to multisite configuration and how can I fix this problem in orders and customers search?
In Oracle commerce 11.1 how can I disable working with multisite?
Thanks
If you have not configured multi site then you need change the property "siteAccessControlOn" to false in the below component
/atg/commerce/custsvc/environment/CSREnvironmentTools/
for more details you can get back to the below oracle docs link
http://docs.oracle.com/cd/E52191_01/Service.11-1/ATGCommerceServiceCenterInstall/html/s1203controllingsiteaccess01.html

How to use the current visitor's account in SSAS query? [MOSS + PPS + SSAS]

I'm using MOSS2010 + Performance Point + Analysis services. Here's the questions:
How to get the current visitor's account in PPS report?
How to use the current visitor's account in SSAS query?
This post may help: http://blogs.msdn.com/b/performancepoint/archive/2010/03/25/passing-filter-values-on-the-url-to-performancepoint-services-web-parts.aspx
Another option is to configure your PerformanePoint 2010 data source to use Per-User Identity.
Then access the UserName MDX function:
WITH MEMBER Measures.x AS UserName
SELECT Measures.x ON COLUMNS
FROM [Adventure Works]
References:
http://blogs.msdn.com/b/performancepoint/archive/2010/01/05/new-authentication-options-for-data-sources.aspx
As far as I know, you can only customize scorecards with the custom scorecards transformations. The reports cannot be customized.
You can perform 4 types of scorecards transformation : PerUser, PreQuery, PostQuery and PreRender. From there, it's C#, so do whatever you like.
To create a Scorecard transformation, you will need to inherit from IGridViewTransform. You will need to include references to Microsoft.PerformancePoint.Scorecards.Client and Microsoft.SharePoint.
See the following link for a tutorial on how to achieve this : http://msdn.microsoft.com/en-us/library/ff606776.aspx
For your information, since there's not much documentation on the subject, I found that it is a good idea to XML Serialize your "viewData" object to take a closer look at what's inside and understand the general feel of it. The "Cells" objects are pretty strange, starting from the end of the scorecard and getting backward.
Good luck!

coldfusion - bind a form to the database

I have a large table which inserts data into the database. The problem is when the user edits the table I have to:
run the query
use lots of lines like value="<cfoutput>getData.firstname#</cfoutput> in the input boxes.
Is there a way to bind the form input boxes to the database via a cfc or cfm file?
Many Thanks,
R
Query objects include the columnList, which is a comma-delimited list of returned columns.
If security and readability aren't an issue, you can always loop over this. However, it basically removes your opportunity to do things like locking certain columns, reduces your ability to do any validation, and means you either just label the form boxes with the column names or you find a way to store labels for each column.
You can then do an insert/update/whatever with them.
I don't recommend this, as it would be nearly impossible to secure, but it might get you where you are going.
If you are using CF 9 you can use the ORM (Object Relation Management) functionality (via CFCs)
as described in this online chapter
https://www.packtpub.com/sites/default/files/0249-chapter-4-ORM-Database-Interaction.pdf
(starting on page 6 of the pdf)
Take a look at <cfgrid>, it will be the easiest if you're editing table and it can fire 1 update per row.
For security against XSS, you should use <input value="#xmlFormat(getData.firstname)#">, minimize # of <cfoutput> tags. XmlFormat() not needed if you use <cfinput>.
If you are looking for an easy way to not have to specify all the column names in the insert query cfinsert will try to map all the form names you submit to the database column names.
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c78.html
This is indeed a very good question. I have no doubt that the answers given so far are helpful. I was faced with the same problem, only my table does not have that many fields though.
Per the docs EntityNew() the syntax shows that you can include the data when instantiating the object:
artistObj = entityNew("Artists",{FirstName="Tom",LastName="Ron"});
instead of having to instantiate and then add the data field by field. In my case all I had to do is:
artistObj = entityNew( "Artists", FORM );
EntitySave( artistObj );
ORMFlush();
NOTE
It does appear from your question that you may be running insert or update queries. When using ORM you do not need to do that. But I may be mistaken.

Microsoft Access ADP UPDATE Query does NOT update

I have a (very simple and standard) UPDATE statement which works fine either directly in Query Analyser, or executed as a stored procedure in Query Analyser.
UPDATE A
SET
A.field1 = B.col1
, A.field2 = B.col2
FROM
tblA AS A INNER JOIN tblB AS B
ON A.pk1 = B.pk1 AND A.pk2 = B.pk2
Problem is when i execute the same stored proc via microsoft ADP (by double-clicking on the sproc name or using the Run option), it says "query ran successfully but did not return records" AND does NOT update the records when i inspect the tables directly.
Before anyone even says "syntax of MS-Access is different than SQLServer T-SQL", remember that with ADP everything happens on the server and one is actually passing thru to T-SQL.
Any bright ideas from any ADP gurus out there?
Gotcha. Responding to my own question for the benefit of anyone else.
Tools / Options / Advanced / Client-Server Settings / Default max records is set at 10,000 (presumably this is the default). Change this to 0 for unlimited.
My table had 100,000+ rows and whatever set of 10,000 it was updating was difficult to find ( among a sea of 90,000+ un-updated rows ). Hence the update did not work fully as expected.
Try and see whether the query gets executed on the SQL Server using SQL profiler.
Also, I think you might need to close the linked table & re-open it to see the updated records.
Does that work?
Run the query with SQL PRofiler running. Before you start the trace add in all the error events. This will give you any errors that the SQL Server is generating that the Access ADP might not be showing correctly (or at all).
Feel free to post them here.
Just as a reference, here's a paper I wrote on Update Queries that discusses some of the issues associated with when the fail.
http://www.fmsinc.com/microsoftaccess/query/snytax/update-query.html
I seem to remember that I always got the "didn't return any rows" message and had to simply turn off the messaging. It's because it isn't returning any rows!
as for the other - sometimes there's a primary key issue. Does the table being updated have a primary key in SQLServer? If so, check the view of the table in Access - sometimes that link doesn't come through. It's been a while, so I could be wrong, but I think you may need to look at the design view of the table while in access and add the primary key there.
EDIT: Additional thought:
in your debugging, try throwing in print statements to see what the values of your inputs are. Is it actually picking up the data from the table as you expect when you execute from access?