Skip to main content

Hi All,

 

I’m having trouble trying to insert new records into Non-Inventory Sales part , i’m getting the following error…

 

 Error] Execution (1: 1): ORA-20110: SalesPart.VAT_MANDATORY: A Tax Code or a Tax Class is mandatory with Tax Regime VAT or Mixed.
ORA-06512: at "IFSAPP.ERROR_SYS", line 1017
ORA-06512: at "IFSAPP.ERROR_SYS", line 92
ORA-06512: at "IFSAPP.SALES_PART_API", line 8384
ORA-06512: at "IFSAPP.SALES_PART_API", line 8403
ORA-06512: at "IFSAPP.SALES_PART_API", line 7415
ORA-06512: at "IFSAPP.SALES_PART_API", line 7604
ORA-06512: at "IFSAPP.SALES_PART_API", line 2352
ORA-06512: at "IFSAPP.SALES_PART_API", line 2363
ORA-06512: at line 44
ORA-06512: at line 44
 

I’ve added a part manually into the front end populating the following fields: Sales Part Number, Part Description In Use, Site, Sales U/M, Price U/M, Sales Price Grp, Sales Group, Price & Price Incl Tax.

 

So I created a procedure to insert into those fields, it advised other fields in Sales Part such as ‘Taxable’, were mandatory so I added this in, however, I’m unsure how to progress on the error above.

 

Here is my Procedure:

 

DECLARE

CURSOR c1 IS
SELECT 
    SALES_PART_NUMBER,
    'S3KHO' AS CONTRACT,
    PART_DESCRIPTION_IN_USE,
    SALES_U_M,
    PRICE_U_M,
    SALES_PRICE_GRP,
    SALES_GRP,
    PRICE,
    PRICE_INCL__TAX,
    1 AS TAX_CLASS_ID,
    SOURCING_OPTION
FROM 
    ZZ_NON_INV_SALES_PART;
    
  action_       varchar2(100) := 'CHECK';
  info_         varchar2(1000);
  objid_        varchar2(1000);
  objversion_   varchar2(1000);
  attr_         varchar2(1000);    
    
BEGIN

    for rowa in c1 loop

    client_sys.clear_attr(attr_);
    client_sys.add_to_attr('CATALOG_NO',rowa.SALES_PART_NUMBER,attr_);
    client_sys.add_to_attr('CATALOG_DESC',rowa.PART_DESCRIPTION_IN_USE,attr_);
    client_sys.add_to_attr('CATALOG_TYPE','Non inventory part',attr_);
    client_sys.add_to_attr('LIST_PRICE','0',attr_);
    client_sys.add_to_attr('TAXABLE','Use sales tax',attr_);
    client_sys.add_to_attr('SALES_UNIT_MEAS',rowa.SALES_U_M,attr_);
    client_sys.add_to_attr('PRICE_UNIT_MEAS',rowa.PRICE_U_M,attr_);
    client_sys.add_to_attr('SALES_PRICE_GROUP_ID',rowa.SALES_PRICE_GRP,attr_);
    client_sys.add_to_attr('CATALOG_GROUP',rowa.SALES_GRP,attr_);
    client_sys.add_to_attr('CONTRACT', rowa.CONTRACT,attr_);

    SALES_PART_API.NEW__(info_,
                        objid_,
                        objversion_,
                        attr_,
                        action_);

    if action_ = 'DO'
    then
      commit;
    end if;
  end loop; 
END;

which version


Client version: 9.0.58.0

Server version: 6.69.21.0


Hi All,

Just wanted to say I’ve resolved this, I needed to populate FEE_CODE Column so added that to my procedure, and it’s completed.

Kind Regards,


Reply