How can I show the details related to the submitted report in the output xml?

475 Views Asked by At

I am creating a report which should contain the Report Name, request id of the report, operating unit as well as date and time of the report submitted. I am not sure how to do that. Basically I need information related to the report on Oracle EBS to be displayed in the output xml.

1

There are 1 best solutions below

1
On

Operating Unit: Use a hidden parameter on your concurrent request definition or just select it in your data definition.

These can be used in select statements. You can either get, or derive, what you need to from these.

fnd_profile.value('PROFILEOPTION')
fnd_profile.value('MFG_ORGANIZATION_ID')
fnd_profile.value('ORG_ID') --Operating Unit
fnd_profile.value('LOGIN_ID')
fnd_profile.value('USER_ID')
fnd_profile.value('USERNAME')
fnd_profile.value('CONCURRENT_REQUEST_ID')
fnd_profile.value('GL_SET_OF_BKS_ID')
fnd_profile.value('SO_ORGANIZATION_ID')
fnd_profile.value('APPL_SHRT_NAME')
fnd_profile.value('RESP_NAME')
fnd_profile.value('RESP_ID')
fnd_profile.value('PER_BUSINESS_GROUP_ID')
fnd_profile.value('GL_SET_OF_BKS_ID')
fnd_profile.value('CURRENT_ORG_CONTEXT')

Something like this:

<dataQuery>
    <sqlStatement name="Q_GENERAL_INFO">
      <![CDATA[
        SELECT  USERENV('LANG') language_code, 
                sysdate print_date,
                fnd_profile.value('USERNAME') username
                FROM    dual
              ]]></sqlStatement>
</dataQuery>

Then you can make a section in your XML to select them into the XML.

 <dataStructure>
    <group name="General_Info" source="Q_GENERAL_INFO">
      <element name="Language_Code" value="language_code"></element>
      <element name="Print_Date" value="print_date"></element>
      <element name="Username" value="username"></element>
    </group>
 </dataStructure>