Skip to main content

On the Inventory Part In Stock screen there is a RMB > Print Barcode Labels, on running DEBUG found that this makes the following call:

 

BEGIN 
:p0 := &AO.Inventory_Part_Barcode_API.Check_Inv_Part_Barcode_Exist(:p1 , :p2 , :p3 , :p4 , :p5 , :p6 , :p7 , :p8 ); 
EXCEPTION 
WHEN &AO.Error_SYS.Err_Security_Checkpoint THEN 
raise; 
WHEN OTHERS THEN 
rollback; 
raise; 
END;

On viewing the function I can see the values expected

 

 

How would I make this a RMB on the Receive Shop Order > Inventory Receipt tab?

 

I tried PL/SQL and updated the :p1 to :p8 with the fields that the package calls: 

e.g.  Check_Inv_Part_Barcode_Exist(contract, part_no, configuration_id, lot_batch_no, serial_no, eng_chg_level, waiv_dev_rej_no, activity_seq)

 

BEGIN 
Inventory_Part_Barcode_API.Check_Inv_Part_Barcode_Exist
(contract, part_no, configuration_id, lot_batch_no, serial_no, eng_chg_level, waiv_dev_rej_no, activity_seq);
EXCEPTION 

WHEN Error_SYS.Err_Security_Checkpoint 
THEN 
raise;

WHEN OTHERS THEN 
rollback; 
raise; 
END;

 

Please advise.

 

That’s a function that needs to return a result.

EXCEPTION WHEN OTHERS RAISE is not a best practice. It can hide the line that’s really causing the problem.

 

 

DECLARE

   inv_part_barcode_exist_ VARCHAR2(5);

BEGIN

   inv_part_barcode_exist_ := &AO.inventory_part_barcode_api.check_inv_part_barcode_exist(

      contract_         => &CONTRACT,

      part_no_          => &PART_NO,

      configuration_id_ => &CONFIGURATION_ID,

      lot_batch_no_     => &LOT_BATCH_NO,

      serial_no_        => &SERIAL_NO,

      eng_chg_level_    => &ENG_CHG_LEVEL,

      waiv_dev_rej_no_  => &WAIV_DEV_REJ_NO,

      activity_seq_     => &ACTIVITY_SEQ);

   IF inv_part_barcode_exist_ != 'TRUE' THEN

      &AO.error_sys.record_general('InventoryPartInStock', 'NOBARCODE: The Barcode does not exist.');

   END IF;

END;


Reply