on 03-15-2017 8:22 AM
Hi,
Error 😞 Dependent object not found: SqlScript; SYSTEM.workshop.exercises.g001::PurchaseOrder.Header: symbol not found)
I just started working on SAP HANA Web-based Development Workbench.
My requirement is, We have two table:
1.workshop.exercises.g001::PurchaseOrder.Header
2.workshop.exercises.g001::PurchaseOrder.Item
I have created the Association between these two tables working file.
Now I am trying to insert the records by creating .xsprocedure file as below .
POCEDURE "schema"."workshop.exercises.g001::pocreate" ( in row "schema"."workshop.exercises.g001::PurchaseOrder.Header", in row1 "schema"."workshop.exercises.g001::PurchaseOrder.Item", OUT error "schema"."workshop.exercises.g001::PurchaseOrder.tt_error" )
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
--DEFAULT SCHEMA <default_schema_name>
-- READS SQL DATA AS
AS
BEGIN
/*************************************
Write your procedure logic
*************************************/
declare lv_PURCHASEORDERID NVARCHAR;
select PURCHASEORDERID into lv_PURCHASEORDERID from:row;
if :lv_PURCHASEORDERID = ' ' then
else
insert into "workshop.exercises.g001::PurchaseOrder.Header" values("workshop.exercises.g001::PurchaseOrder.Header".NEXTVAL, '0300000003',' ',' ',' ',' ',' ','0200000000','EUR ','234.45','8764.12','234.56','A','B','C','D','E'); Insert into "workshop.exercises.g001::PurchaseOrder.Item" values ("workshop.exercises.g001::PurchaseOrder.Item".CURVAL,'000010',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '); end if; END
Here I am getting the errors (Dependent object not found: SqlScript; SYSTEM.workshop.exercises.g001::PurchaseOrder.Header: symbol not found) and not able to correct ,not sure what is the issue.
Could you help me on this and if possible can you share any examples where we can insert/update/Delete the records from .xsprocedure file.
Thanks,
I assume the issue is coming from the sequence you are trying to use and which is probably not existing.
As your table is used using the synonym "workshop.exercises.g001::PurchaseOrder.Header", you cannot have a sequence with the same/synonym name.
So the question is, how your sequence is named or did you assume, that NEXTVAL, CURVAL can be applied to any key column (which is not the case)?
The same is valid for the Item table as well.
Best Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please check this values ("workshop.exercises.g001::PurchaseOrder.Header". as here you need to mention sequence that should be in .hbdsequence file.
For example you can create new file workshop.exercises.g001::PurchaseOrderId.hbdsequence and in this you can provide the max and min value like,
schema= "<your schema name>";
start_with= ;
maxvalue= 0599999999;
nomaxvalue=false;
minvalue= 1;
nominvalue=true;
cycles= false;
depends_on_table= "<your table name>";
Try this.
Regards,
Anurag Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.