Hi,
I have item master table where rate(selling rate) is defined. However, this rate will get automatically when item is select on Sales items. Now issue is that for example , if select laptop then system will automatically get rate at sales table.
Now if i override rate then system will get old rate on query. Second, thing in order to cater above case that if i apply condition rate bring if rate is change that it will be working fine but one more issue in this is that if change item and rate is already exist then system doesn’t’ bring rate on change itme. item : Laptop, Rate : 50000
Create table Items (item_id number, Item_name varchar2(30), Rate number(8,4))
Create table Sales (invoice_id number, item_id number, rate number, qty number )
Do you mean, If the rate gets updated in the items table, then it should be updated into the sales table? If yes, you should create a database trigger on the items table on the update event to update the sales table rate column.
If my understanding is wrong, then please explain what exactly your requirement. Point straight to the problem.
When I select item (DA) on sales then system get rate automatically from item setup. For example laptop item defined rated 50000, but when changed to 60000. However, after saving this record and then see it again system show the old rate where in database it’s 60k.
In this regards, I have applied condition through DA at item that if rate is null then system get rate from item master table then above my issue get resolved
Now if saved laptop item based on that system get rate automatically which is 50k. Now replace item “laptop” with “mouse” then system don’t get rate just because already mentioned DA that rate will be fetched when rate is null, so how can I solve this issue
your question is not explain well but what i get is.
you need create DA on item_code and set value then sql query
select rate from item where item_code=:P2_ITEM_CODE
item to submit and effected item rate
you will get what you want
if this not your requirement please explain