Friday 3 January 2014

Launching a Concurrent with Form Personalization on EBS 11i

There are two methods when it comes to running a concurrent from a Form Personalization in Oracle. The thing you need to do in either case is create a menu option for the form in question. This is generally done on a WHEN-NEW-FORM-INSTANCE Trigger Event. If you already have an event like this then you can add it there. I personally like to group my customizations together so there is not much overlap. Whichever catches your fancy will work.



Setup the menu with the name:


You now have a menu item for the launching of the concurrent program. This is where the two methods separate and you may choose which ever is more appropriate to you.

Launch FNDRSRUN (Submit Request)
This will use the zoom feature of Oracle Form Personalization to open the Submit Request Form, and pass the parameters to it. This involves personalization in two forms. The sending form needs to call the Form Function and pass the parameters and the Submit Request form needs to receive and process those parameters.  First create a trigger even for the Menu that you created above. This will be done in both cases and you can also have all kinds of conditions attatched.

The action will use the Buildin type and will call the "Launch a Function" Builtin Type. The important thing to remember is that this is not a database function  but rather a form function. If you hit the LOV you will get all the available functions. Make sure the Function is available to the responsibility. Using "%FNDRSRUN%" in the find field will list all the functions related to the Submit Request form, you will need to do some digging to find the function related to your responsibility. I personally went to the menu attached to the responsibility and found the function associated with the Submit Request function




My main sticking point was finding the way how to send the parameters and here is the code I used in the parameter field

=select 'PROGRAM_APPL_SHORT_NAME="XXTPI" CONCURRENT_PROGRAM_NAME="XXQA_REJECTION_EMAIL"
CHAR1="'||${item.Q_RES.ITEM.value}
||'" CHAR2="'||${item.Q_RES.ORGANIZATION_ID.value}
||'" CHAR3="'||${item.Q_RES.COLLECTION_ID.value}
||'" CHAR4="'||${item.Q_RES.OCCURRENCE.value}
||'" CHAR5="'||${item.Q_RES.PLAN_ID.value}||'"'
from dual


There are notes out there on how to use NUM and DATE but I was able to get it working.
The next step is to go to the Submit Request form and create a personalization that will fill the parameters in the form.


This will now only fill out the parameters for the concurrent you want


The hard work is basically over and now just need to set the parameters in for the run. I used the following to set the field.


=${PARAMETER.CHAR1.VALUE}||':'||
${PARAMETER.CHAR2.VALUE}||':'||
${PARAMETER.CHAR3.VALUE}||':'||
${PARAMETER.CHAR4.VALUE}||':'||
${PARAMETER.CHAR5.VALUE}

The main reason I needed this method was that the user wanted to pass parameters to the concurrent. I will go through the other method in a followup post where you directly call a procedure and that will submit the concurrent. This is useful if the parameters being sent are not needed to change on the fly.

1 comment:

  1. Thank you so much for the post you do. I like your post and all you share with us is up to date and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job. Next Gen Vip

    ReplyDelete