About Me

Dubai, United Arab Emirates
My name is Muhammad Faizan Karim and my aim is to spread the knowledge to everyone who want to learn oracle HRMS. I will try to write the video blogs for beginners so they can understand e-business suits from HRMS perspective, and if you have any difficulty in oracle applications HRMS , please feel free to contact with me at this email : faizan.kareem.ocp@gmail.com
Powered by Blogger.
Thursday, August 20, 2015

How to use same data definition/template for multiple concurrent programs?


Scenario:
Consider for example that there are two different concurrent programs (because they have different set of parameters) and both wants to use the same data definition (xml file) and Template (RTF layout)
Problem:
Both concurrent programs need to use same data definition (the same data template xml file) and same RTF layout template. However when registering data definition in the E-Biz, the data definition code must match shortname of concurrent program, hence there is a need to create two data definitions (for the same data template xml file) .  Again, because the layout template is attached with data definition,  the Templates also needs  to duplicated
In summary:  Physically there is only one xml data template file and only one RTF file, however to meet the the above requirement we need to create duplicate Data Definitions and Template registrations attaching the same xml and rtf files in both.
The problem is maintenance. In future any change in the xml/rtf needs to be uploaded against all the definitons and problem becomes more severe if you have more number of concurrents sharing the single  xml/rtf files.
Solution
It is very simple;  we create only one CP with executable XDODTEXE and all other concurrent programs will use a PL/SQL procedure as executale (instead of XDODTEXE) and submit the first CP by passing necessary parameters.
  1. Create first concurrent program (for e.g. XXFIRSTCP)  with executable XDODTEXE
  2. Create Data definition XXFIRSTCP and attach the xml data template file
  3. Create Layout template XXFIRSTCP_RTF and attach the related RTF layout template file.  So far it is all normal that we do to create an XMLPublisher based report
  4. Create a custom package and procedure as a concurrent executable and it should submit XXFIRSTCP using  FND_REQUEST.SUBMIT_REQUEST and create executable in ebiz (for e.g. XXFIRSTCPEXE)
  5. Create all other concurrent programs (for e.g. XXSECONDCP, XXTHIRDCP …) that you need using executable created above (XXFIRSTCPEXE)
Now when you submit any of the concurrent program internally it will always use only one Data Definition / Template.

NOTE:  The user will have to check the output of internally submitted concurrent and not the one he/she submits.  To overcome this problem you can also copy the output to user submited concurrent