Skip to main content

Hi everybody!

 

I have a event action that automatic approved purchase requisition line . My problem is when I execute SQL statement in PLSQL it works perfectly but when I tried to execute it on IFS it doesnt work.

The problem is here;


ifsapp.PURCH_REQ_APPROVAL_API.Get_Pos_Code( '&OLD:REQUISITION_NO','1')=ifsapp.COMPANY_PERS_ASSIGN_API.Get_Pos_Code_Employee('#DEFAULT_COMPANY#',employee_code_)

 

ifsapp.COMPANY_PERS_ASSIGN_API.Get_Pos_Code_Employee('#DEFAULT_COMPANY#',employee_code_) this statement returns null on IFS. But it is not null. I get a result from plsql. What can be the problem? Does anyone have a idea?

 

ifsapp.PURCH_REQ_APPROVAL_API.Get_Pos_Code( '&OLD:REQUISITION_NO','1') and this statement returns position code with a period ‘.’ but it does not have period.

 

I find Employee_code_  like that

cursor get_emp is
select a.emp_no from COMPANY_PERSON_ALL a where a.employee_status='*' and a.person_id='&OLD:REQUISITIONER_CODE';
    
BEGIN

open get_emp;
fetch get_emp into employee_code_;
close get_emp;

The main reason is I cant get requisitioner Code from IFS It returns Null but ı dont know why.


Hi @Amy 

My guess is that the code is not executing as the user you think it is; and #DEFAULT_COMPANY# is not behaving as expected.

Try adding this line of code

error_sys.record_General('Test','Def Company is < #DEFAULT_COMPANY# >');

You should get an error when you trigger the event; see if it tells you what value of Default company is being returned.