Tuesday, 7 July 2015

How to call a report from custom form in oracle apps EBS R12

How to run or call a report from custom form in oracle apps?
Step 1:
Create a Report in Report Builder 
(SELECT * FROM EMP E WHERE E.EMPNO = NVL (:P_EMP,EMPNO))
Then set the
BEFORE REPORT TRIGGER : SRW.USER_EXIT('FND SRWINIT');


AFTER REPORT TRIGGER : SRW.USER_EXIT('FND SRWEXIT');


Then set the
User Parameter
Click on Add and set the User Parameter Name as “ P_CONC_REQUEST_ID ” and one Parameter is created by my Query “ P_EMP”
Then create the layout

Then Register the RDF in oracle apps. As out put  type as PDF with parameter  “ P_EMP” only.


Step 2:
Create a FORM in form builder  using TEMPLATE.fmb for oracle apps like that
Rt. Click on the “Report ” Button then Write the Query

DECLARE
   ln_request_id     NUMBER; 
BEGIN
                ln_request_id := APPS.FND_REQUEST.SUBMIT_REQUEST
                                                               ('XXKCT',                                  -- Application Short Name
                                                                 'RDF_TO_XML_DAN',           -- program short name
                                                                 'RDF_TO_XML_DAN',           -- description   
                                                                  sysdate,                                 -- start time
                                                                  FALSE,                                    -- sub request
                                                                  :EMP.EMPNO);                    -- User Parameter used in Report.

   COMMIT;

   IF ln_request_id = 0
   THEN
      message ('Concurrent request failed to submit');
   END IF;
END;
 
 






















Then Register the FORM in Oracle apps.

Then open the form

Then CTRL + F11 for fetch the data.

Then click on the Report Button for respective EMPNO .
Then go to VIEW à Request

Then click on the FIND button


Then click on the View Output to see the report.

No comments:

Post a Comment

How to change Employee Number Generation from Manual to Automatic in Oracle HRMS (When attempting to apply for a job in iRecruitment)

When attempting to apply for a job in iRecruitment, the following error occurs: ERROR: You must enter an Application Number. Solution: How t...