Solved

IFS Cloud 22R1 - Database Task - Validation method - BUG

  • 2 May 2022
  • 1 reply
  • 188 views

Userlevel 6
Badge +12

Database Task - Validation Method call was changed, method what works in EE, now does not work in Aurena/Cloud.

Problem is, that parameters of task are send separated.

So there is no way to check existence of object with complex primary key (Currency_Type_API.Exist(company_, currency_type_)).

 

Also required parameters is unable to check (but this could be done by task setup).

This should also complicate upgrade process from previous versions.

 

Method 1) from APP10

PROCEDURE Update_From_CNB_Val_(
message_ IN VARCHAR2)
IS
company_ company_tab.company%TYPE;
currency_type_ currency_type_tab.currency_type%TYPE;
BEGIN
Message_SYS.Get_Attribute(message_, 'COMPANY_' , company_);
Message_SYS.Get_Attribute(message_, 'CURRENCY_TYPE_' , currency_type_);

Company_API.Exist(company_);
Currency_Type_API.Exist(company_, currency_type_);
END Update_From_CNB_Val_;

Method 2) “Separated” calls method: 

PROCEDURE Update_From_CNB_Val_(
message_ IN VARCHAR2)
IS
company_ company_tab.company%TYPE;
currency_type_ currency_type_tab.currency_type%TYPE;
BEGIN
company_ := Message_SYS.Find_Attribute(
message_,
'COMPANY_',
company_);
currency_type_ := Message_SYS.Find_Attribute(
message_,
'CURRENCY_TYPE_',
currency_type_);

IF company_ IS NOT NULL THEN
Company_API.Exist(company_);
END IF;
IF currency_type_ IS NOT NULL THEN
Currency_Type_API.Exist(company_, currency_type_);
END IF;
END Update_From_CNB_Val_;

 

Method 1) 

 

Method 2)

 

And in standart method:

PROCEDURE Validate_Move_With_Trans_Task (
message_ IN VARCHAR2 )
IS
count_ NUMBER;
name_arr_ Message_SYS.name_table;
value_arr_ Message_SYS.line_table;
contract_ VARCHAR2(5);
to_location_ VARCHAR2(35);
move_reserv_option_db_ VARCHAR2(20);
BEGIN
General_SYS.Init_Method(Reserve_Shipment_API.lu_name_, 'Reserve_Shipment_API', 'Validate_Move_With_Trans_Task');
Message_SYS.Get_Attributes(message_, count_, name_arr_, value_arr_);

FOR n_ IN 1..count_ LOOP
IF (name_arr_(n_) = 'CONTRACT') THEN
contract_ := value_arr_(n_);
ELSIF (name_arr_(n_) = 'TO_LOCATION') THEN
to_location_ := value_arr_(n_);
END IF;
END LOOP;

IF (contract_ IS NOT NULL) THEN
User_Allowed_Site_API.Exist(Fnd_Session_API.Get_Fnd_User, contract_);
END IF;
-- refer Invent_Part_Quantity_Util_API.Validate_Move_Reservation
move_reserv_option_db_ := Site_Invent_Info_API.Get_Move_Reservation_Option_Db(contract_);
IF (move_reserv_option_db_ = Reservat_Adjustment_Option_API.DB_NOT_ALLOWED) THEN
Error_SYS.Record_General(lu_name_, 'MOVE_RES_NOT_ALLOW: It is not possible to move reserved stock.');
END IF;
IF (to_location_ IS NULL) THEN
Error_SYS.Record_General(lu_name_, 'TO_LOCATION_NULL: To Location must be entered');
END IF;
END Validate_Move_With_Trans_Task;

 

icon

Best answer by InfFilipV 19 May 2022, 11:40

View original

1 reply

Userlevel 6
Badge +12

Seems to be corrected in SU 22.1.2

 

Reply