Trying to auto generate an assignment set using an API

Hello guys, I have several games of transfer for employees based on their job. Unfortunately, there are many of them and payroll officer think it's too much work to generate transfer games before each pay run. I came up with a way to run the formula by using the oracle APIs, but I get an error message. Can someone help me understand this?
The message says:


Set serveroutput on
ORA-20001: data not found ASG_JOB at line 6 of the STNL_JUNIOR_STAFF

Cause: A SQL SELECT statement, obtained from the dictionary of the application, returned no rows during execution.

Action: Please consult with your local technical support representative.



Here's the quick formula STNL_JUNIOR_STAFF


by default ASG_JOB is 'null '.


IF ASG_JOB = "auxiliary"
THEN INCLUDE_FLAG = 'Y '.
ELSE INCLUDE_FLAG = ' don't


RETURN INCLUDE_FLAG


Here is the code I use:

declare
cursor c_set is
Select * from hr_assignment_sets
where - assignment_set_name like '% _JUNIOR_STAFF % '.
assignment_set_name = "STNL_JUNIOR_STAFF";
v_set c_set % ROWTYPE;
v_formula_name varchar2 (5000);
-the effective_date for the formula
date of v_effective_date;
-context values
date of v_date_earned;
v_job_name varchar2 (500);
-entry and exit forms
v_inputs ff_exec.inputs_t;
v_outputs ff_exec.outputs_t;
Start
dbms_output. Enable (null);
-context of the audit date
Select v_date_earned (last_day (sysdate)-5)
Double;
-Open assignment set cursor
Open c_set;
loop
extract the c_set in v_set;
When the output c_set % NOTFOUND;
-get the formula name, and date of entry in
Select formula_name, effective_start_date
in v_formula_name, v_effective_date
from ff_formulas_f where formula_id = v_set.formula_id;
-get assignments by current payroll deductions
declare
TYPE AssignmentCursorType IS REF CURSOR;
c_ass AssignmentCursorType;
v_ass PER_ALL_ASSIGNMENTS_F % ROWTYPE;
sql_stmt VARCHAR2 (5000);
sql_condition VARCHAR2 (500): = ' and pj.job_name! = "junior officer"';
Start
If v_set.assignment_set_name not like '% NON_JUNIOR_STAFF %' then
sql_condition: = ' and pj.name = "junior officer"';
end if;
sql_stmt: = 'select pf.* from per_all_assignments_f pf, per_jobs pj.
|| 'where sysdate between pf.effective_start_date and pf.effective_end_date'.
"and pj.job_id = pf.job_id and pf.payroll_id =: p_payroll_id' |" sql_condition;
Open the c_ass for sql_stmt using v_set.payroll_id;
loop
extraction of c_ass in v_ass;
When the output c_ass % NOTFOUND;
-get the name of the job
Select hr_general.decode_job (v_ass.job_id) v_job_name
Double;
-initialization formula
ff_exec.init_formula (v_set.formula_id, v_effective_date, v_inputs, v_outputs);
-loop and set the context
for the NTC in v_inputs.first... loop of v_inputs. Last
If v_inputs (cnt) .name = "ASSIGNMENT_ID" then
v_inputs (cnt) .value: = v_ass.assignment_id;
end if;
If v_inputs (cnt) .name = "DATE_EARNED" then
v_inputs (cnt) .value: = v_date_earned;
end if;
If v_inputs (cnt) .name = "ASG_JOB" then
v_inputs (cnt) .value: = v_job_name;
end if;
end loop;
-then run the formula
ff_exec.run_formula (v_inputs, v_outputs);
end loop;
close c_ass;
end;
end loop;
close c_set;
exception
while others then
dbms_output.put_line (SQLERRM);
end;

Absolutely, if the new emp assignment at the time gained is and meets the criteria of employment as at date - earned, he or she will be included! The rule is evaluated at the time of execution of the process that uses the rule.

Clive

Tags: Oracle Applications

Similar Questions

  • Trying to auto generate roles and privileges

    Hello all,.

    Oracle 11g v11.2.0.1.0 on Windows Server 2008 Enterprise

    I have a database with many schemas. One of the patterns is referred to as the CM_MASTER schema in that it was granted the following: s/n, create user, drop user, alter user, create any table, select any table and a few others, all with the clause "with admin option".

    We have developers who need to select only the access to tables and views non-maitre patterns. My plan was to create a unique ROLE for each schema, then grant select on each table and discovers in this scheme to this unique role. Then grant the role appropriate to every developer therefore giving them only read access.

    I can accomplish the above manually when you are logged in as the CM_MASTER schema.

    I am creating a procedure owned and run by the schema CM_MASTER which creates a new role and then give this role. The procedure accepts a parameter that contains the username of the target schema. The procedure is able to create the role (create a role scott_r) successfully.

    However, I get an error of insufficient privileges (see below), after that the role was created, trying to issue the command "grant select on scott.some_table to scott_r" via "immediate execution".

    Any ideas, what privilege (s) the user needs CM_MASTER to be able to issue the grant (s) for the role?

    Error message below:

    exec ('scott') gen_schema_role;
    Error report:
    ORA-01031: insufficient privileges
    ORA-06512: at "CM_MASTER. GEN_SCHEMA_ROLE', line 30
    ORA-06512: at line 1
    01031 00000 - "insufficient privileges".


    The procedure code is below:
    Utl_file.put_line commands have been added for debugging, but nothing came out.
    When the "immediate execution" lines are commented, the utl_file.put_line command output displays the correct SQL create and grant statements.

    create or replace
    procedure gen_schema_role (p_db_user in varchar)
    as
    v_role_name varchar2 (30);

    v_bat_out utl_file.file_type;

    cursor get_object_names is
    Select object_name dba_objects
    where owner = upper (p_db_user)
    and object_type in ('TABLE', 'SEE')
    and status = "VALID".
    and object_name not like "DR$ %.
    and object_name not like '% XT;

    Start

    v_bat_out: = utl_file.fopen ('SR_BACKUP', 'Create_Roles.sql', 'W');

    v_role_name: = substr (p_db_user, 1, 28). '_r';

    UTL_FILE.put_line (v_bat_out, ' ');
    UTL_FILE.put_line (v_bat_out, 'create role' | v_role_name);

    run immediately "create role" | " v_role_name; < <-this seems to work, the role is created

    for a get_object_names in
    loop
    UTL_FILE.put_line (v_bat_out,' grant select on ' | p_db_user |) '.' || a.object_name | « à » || v_role_name);

    run immediately ' grant select on "| p_db_user | '.' || a.object_name | « à » || v_role_name;
    end loop;

    UTL_FILE.fclose (v_bat_out);

    end gen_schema_role;



    Thank you
    Snyds

    Hello

    It seems that CM_MASTER needs to GRANT any OBJECT PRIVILEGE.

    And this should be given directly to him (not by the role DBA, which you shouldn't use anyway)

    My guess is, however, that this will not work unless scott has actually created his own one or more tables.

    Concerning
    Peter

  • Just DLd CD player. Now, nothing will be printed. I also get error app for Windows (0xc0000022) whenever I start CD player. I uodated download of the last update and tried an auto repair. Using Win 7 Pro 64 bit machine.

    Just DLd CD player. Now, nothing will be printed. I also get error app for Windows (0xc0000022) whenever I start CD player. I uodated download of the last update and tried an auto repair. Using Win 7 Pro 64 bit machine. I tried several printers and I can test printing from other applications such as Outlook and Wordpad.

    None of this has worked. I have to get rid of the error (0 x 000022) and he got good printing. I did clean the Adobe Reader DC machine, reinstalled drive XI 11.0.10 and in the preferences to disabled Adobe protected in Security (Enhanced) Mode and set "view documents I have PDF/A mode" forever in the Documents tab...

    It seems that each player version as it becomes more complex (with the "features enhanced security") gets more unstable.

    I'll try Adobe Reader DC when I eventually have to WIN 10 which is never if all goes well.

  • Hi I'm window7 user, I bought a creative cloud for students and teachers. but all the downloadable test app. That's why I tried 'buy now' button, "that assign the right to use" CC redownloading but "unlicensed" pop up. Help me.

    Hi I'm window7 user, I bought a creative cloud for students and teachers. but all the downloadable test app. That's why I tried 'buy now' button, "that assign the right to use" CC redownloading but "unlicensed" pop up. Help me.

    Hi decoen,.

    Your subscription is activate kindly try to disconnect from Creative Cloud app and reconnect.

    Please consult Creative Cloud applications unexpectedly back in the test mode. CCM, CS6

    Troubleshooting FAQ: What should I do if I have a subscription, but my application acts as if I had a trial?

    It could be useful!

    Rayyan

  • That means managers when setting using the workspace

    Hi Experts,

    My client is using bpm12c, they asked if the administrator sets the managers in the workspace-> administration-> organization unit-> managers (in the right-hand panel), does that mean actually, it auto generate relationship report for members of the org (and org subunit) unit?

    Best regards

    Good idea for the reporting of organizational unit, but there isn't.

    As you know, you can associate an OU with a process so that only individuals and groups within the organization or its hierarchy can work on tasks for this process.  I've never tried, but adding a handler to an OU that nobody (or group) can then have access to instances in the processes associated with the organization unit.

    Dan

  • Unable to switch to the privilege level using password set using ACS enable

    Hi all

    I am not able to not be able to visit the privilege level to help enable password set using ACS 1121 (5.4.0.46).

    Please find details of the ASA-

    ASA5580-20
    version of the software - 9.1

    LAB - FW / see the law # run | I have aaa
    GANYMEDE + Protocol Ganymede + AAA-server
    AAA-server GANYMEDE + (inside) host 192.168.x.x
    GANYMEDE + LOCAL console for AAA of http authentication
    Console telnet authentication GANYMEDE + LOCAL AAA
    AAA authentication enable console LOCAL + GANYMEDE
    authentication AAA ssh console GANYMEDE + LOCAL
    Console telnet accounting AAA GANYMEDE +.
    AAA accounting console GANYMEDE + ssh
    AAA accounting enable console GANYMEDE +.
    No vpn-addr-assign aaa

    I created the Shell profile so & given privilege 15 it.please find wink 1 similarly in word doc attached

    However, when I try to create the service profile I get the error message, please find snap 2 in word doc attached.

    Kindly share your expertise.

    Hello Dominic,.

    For authorization privileges to take effect, you must add the following command to your configuration on the ASA:

    AAA authorization exec-authentication server

    After adding it, the ASA will take into account the level of privilege that are sent by the ACS.

    Associated with the error you are getting on the graphical interface of the ACS, please make sure that you are using a browser supported for ACS 5.4 version based on the release notes:

    http://www.Cisco.com/c/en/us/TD/docs/net_mgmt/cisco_secure_access_contro...

    Note: Please mark it as answered as appropriate.

  • AWS auto-generated key pair

    Hello

    I have a question about the auto-generated key to connect to the instance of amazon.

    Once completed the provisioning, where can I find the key to the auto-generated pair?

    Thank you

    Configure your receipts so that the action of "Export certificate" is available for virtual machines. Once the machine is set up, you can export the key.

    Grant

  • Adding a Unique Auto generated a numeric field to a Document

    We plan to use Echosign to send order forms to the customers they sign at the end of the form. When the form is sent to the client, is there a way to add an auto generated numeric field (can be both numbers and letters) that is unique to each time? It must be unique so that there is no duplicate order number.

    It would work the same way for the transaction Echosign number, except that we can label the number that all we want. Even if we could change the field of Transaction number for him give a different label (order number) that would work as well. All thoughts

    Hi Jonathan,.

    services eSign form fields have a random number generator, then your unique reference number will have to come from somewhere else.

    Is it using eSign with integration of Api services any?

    Otherwise, you may use the transaction number stamp, even if you need to add text to the document along the lines

    your reference number is less than the transaction number.

  • Toshiba 32EL800A - message "Please re - set using the menu.

    Hello
    Got a Toshiba 32EL800A - and when I turn there is a telling message "Please re - set using the menu.

    When I try to tune, it cannot find all the channels.

    Sure that's not the antenna he worked 24 hours ago, and there is no weather conditions that would have affected the antenna.

    Any ideas?

    Thank you
    AJ

    Hello

    In my opinion, you need to reset the default settings and should start the search of channel once more.
    Make sure you use the right settings (digital or analog tuner)

  • ' The page you are trying to view cannot shown because it uses an invalid form or not support compression. ' This happens only in the Fire Fox browser.

    When I try to access sourcea.fr to check my account, after I get my ID and password a window opens with the message "the page you are trying to view cannot shown because it uses an invalid form or not support compression. '" This only happens in the Fire Fox browser.

    Hi BAMIRANGE,

    ·         You try to use Internet Explorer and check to see if you encounter the same problem?

    If the limited issue of Firefox then the number you posted would be better suited in the Forums of Mozilla Firefox. I would recommend posting your query using Mozilla's Firefox.

     

    Support for Mozilla Firefox

    http://support.Mozilla.org/en-us/KB

    Hope this information helps.

  • I get the following error when I am trying to connect to a network by using different credentials. 1219 system error has occurred.

    Multiple connections to a server or resource shared by the same user

    I get the following error when I am trying to connect to a network by using different credentials.

    1219 system error has occurred.

    Multiple connections to a server or a shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again...

    I don't want to use the IP address. and I don't want to delete all connections using the net use * / delete command.

    Kindly give me the solution as I am now frustrated with this issue.

    Kind regards

    Sajid

    Hello

    ·         Have you tried to access the files that were on Skydrive?

    ·         Did someone else uses your computer?

    From now on, I suggest you try the steps mentioned in the article below.

    Error message when you use user credentials to connect to a network from a Windows computer: "the specified network folder is currently mapped using a different username and password.

    http://support.Microsoft.com/kb/938120

    You can also ask your question in the forum of the Tech Net Windows Server using best.

    http://social.technet.Microsoft.com/forums/en/category/WindowsServer

    Hope this information is helpful and let me know if you need additional assistance.

  • When logging in to my email account, I get a red message that I tried to sign in too many times using an incorrect id or password

    After signing several times in & control my mail today, suddenly when signing once again, I get a red message that I tried to sign in too many times using an incorrect id or the password. WHAT? I have NOT changed or the other lately... and have certainly not today! I don't like having my daily work routine interrupted by this measure obviously fake message/security, when I don't do anything different from what I have already done many times today! Please correct this problem immediately... Without that I have to change anything or even interrupt my schedule. Thank you. By the way... I grow increasingly wary of any company of which the customer has as much bad contacting help with their product. And grow more and more suspicious with this incident. What is happening with your safety that I can't just leave my settings as is? Please take the time to look at this before decide me that your company's products just aren't worth the headache.

    Hello

    · What email client you use to access your emails?

    If you work on Hotmail or Windows Live then it would be better suited in the Windows Live forum. Please visit the link below to find a community that will provide the support you want. http://windowslivehelp.com/

    You can also access: Microsoft's strategy concerning lost or forgotten passwords: http://support.microsoft.com/kb/189126

  • I am trying to open my child hotmail account using my itouch. However get the message incorrect password.

    incorrect password using itouch error message

    I am trying to open my child hotmail account using my itouch.  However get the message incorrect password.  I double checked that I am entering the correct password, but always without success. The hotmail account is protected by using parental controls.

    Any help appreciated.

    Hi 5pesh,

    The question you posted would be better suited to Windows Live Solution Center. I suggest you to send your application in the Windows Live Solution Center for better support.

    http://www.windowslivehelp.com/product.aspx?ProductID=1

    Reference: http://www.windowslivehelp.com/

  • I'm trying to connect two monitors and one using the hdmi port and the other vga. How can I get the pc to recognize the two?

    Original title: multiple monitors

    I'm trying to connect two monitors and one using the hdmi port and the other vga. How can I get the pc to recognize the two?

    Hi David,

    Thanks for posting your query on the Microsoft Community.

    I suggest you refer to the Microsoft Help Articles below and try the steps mentioned.

    Check out the link:

    http://Windows.Microsoft.com/en-in/Windows-8/how-connect-multiple-monitors#1TC=T1

    You can also check:

    http://Windows.Microsoft.com/en-in/Windows-8/get-best-display-monitor

    Hope this information helps. Please let us know if you need any other help with Windows in the future. We will be happy to help you.

  • Auto generated issue of vanity

    Hi all

    I have a problem with vanity URL:

    First of all, I had created a model for an assettype and when I edited an asset, the URL has been generated correctly, so, I published the assets of the following environment...

    The problem came when I edited the published again active, it changes its vanity URL of self-generated NOT auto generated, so I lose the model id...

    Do you know what's happening?

    Thanks in advance!

    Hello Elena,

    When you publish an autogenerated asset with a vanity URL (for example with patter / ${name} .html), and then you change the asset (say that you change the name), the old URL becomes a manual URL and you get a new auto-generated URL.

    The old URL becomes manual so that you can decide whether to keep, delete or change to redirect to the new URL or elsewhere.

    If you change the asset and the new URL is the same, the old URL becomes even a manual URL, but the new auto-generated URL not created (because it already exists in the manual). It is the expected behavior.

    To retrieve the URL generated automatically, you can remove the manual URL and re-save the assets.

    Kind regards

    Stephan.

Maybe you are looking for