Home » Developer & Programmer » Forms » trigger for partial received in goods received document. help
trigger for partial received in goods received document. help [message #215112] Fri, 19 January 2007 06:25 Go to next message
Smith_X
Messages: 56
Registered: January 2007
Member
Short version
Which PL/SQL trigger I should insert the code to handle the situation receive item more than one time.

Whole story
I have a PO (Purchase Order document) which it's a master-detail relationship. Next, I create a GR (Goods Received document) The detail of GR should stick with the inventory data in PO detail only. (I'm already finished up that part, it's a cursor loop thing...)

Anyway, now I have another problem. If user made a partial receive or supplier want to split the inventory.. Then, my GR document should be able to handle this situation. So, what I design in my mind is below,

PO detail have quantity column and quantity left column. Quantity column is the total quantity of one record in PO detail but the quantity left is just only the remain item. In this case, I can use the logic below to update the number of inventory that I have not received yet.

v_Purchase_Order_Detail.Quantity_Left = Purchase_Order_Detail.Quantity_Left + :Goods_Receive_Doc.Quantity

next, if the Quantity Left is equal to Quantity Column, I will have a code to change the status of this record from Normal to Completed. I think I have an option for user to set the records status to Completed even though the Quantity Left column is not reach zero due to sometime.. Supplier just stop sending the product Smile

Could anybody tell me which PL/SQL's trigger that I should put the above two codes, please??

one more question..
If the Goods Received Document populates the detail from Purchase Order Document, I want to have a trigger that will detect the status of Purchase Order Detail Item which have the status 'Completed' and then I will use set_item_property to disable quantity received text item. This procedure will ensure that user cannot enter then inventory received for the detail item that already "finish received" Is it ok to use a checkbox to control the detail block please?

--check box (checked value is 'can receive', uncheck value is 'completed or cannot received' )

--first, I need to select data to checkbox. the status locate on the different table. I use cursor and it's work fine!.

IF :RRI.STS_CHECKBOX = 'completed' THEN
SET_ITEM_PROPERTY(':RRI.RRIQTY',ENABLED,PROPERTY_FALSE);
END IF;


However, the above code is not work.. The text item :RRI.RRIQTY is still accessible. Could anybody point me out an example please?

[Updated on: Fri, 19 January 2007 08:45]

Report message to a moderator

Re: trigger for partial received in goods received document. help [message #215234 is a reply to message #215112] Sat, 20 January 2007 01:00 Go to previous messageGo to next message
sameer_am2002
Messages: 129
Registered: September 2002
Senior Member
Two ways you can handle the situation..First option write database trigger on GR Detail Tab for Insert , Update and Delete operations..Second option..Write trigger at GR Detail Block Level triggers should be Post-Insert , Post-Update , Post-Delete..Last Part For handling goods fully completed Write trigger of Post-Query at GR Detail Block ..use Set_Item_Instance_Property to handle.
Re: trigger for partial received in goods received document. help [message #215290 is a reply to message #215234] Sat, 20 January 2007 11:23 Go to previous messageGo to next message
Smith_X
Messages: 56
Registered: January 2007
Member
Thanks very much, sameer_am2002.

Actually, I'm not understand what your advice mean correctly but I will try to follow your advice at first. I will report you again when I have tried.

Regards,
Re: trigger for partial received in goods received document. help [message #215506 is a reply to message #215112] Mon, 22 January 2007 11:09 Go to previous messageGo to next message
Smith_X
Messages: 56
Registered: January 2007
Member
excuse me..
set_item_instance_property at detail level in post_query is not work.

any other suggestions are welcome.
Re: trigger for partial received in goods received document. help [message #215553 is a reply to message #215506] Mon, 22 January 2007 19:02 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search this forum for 'set_item_instance_property' and see how other people have got around this problem.

David
Re: trigger for partial received in goods received document. help [message #215727 is a reply to message #215112] Tue, 23 January 2007 12:29 Go to previous messageGo to next message
Smith_X
Messages: 56
Registered: January 2007
Member
:'(

I already did the search before I start the topic.. I cannot solve the problem by myself.

I try to put message(something) in post-query trigger but I do not get my message. maybe my case is different from the other T_T

anybody please suggest me some..
Re: trigger for partial received in goods received document. help [message #215786 is a reply to message #215727] Tue, 23 January 2007 22:13 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please post your code.

David
Re: trigger for partial received in goods received document. help [message #215928 is a reply to message #215112] Wed, 24 January 2007 05:45 Go to previous messageGo to next message
Smith_X
Messages: 56
Registered: January 2007
Member
These code are inserted in Post-Query Trigger
message (:POI.STS_CHECKBOX);
If :POI.STS_CHECKBOX in ('sts03') then
set_item_property(':POI.POIUP', ENABLED, PROPERTY_FALSE);
set_item_property(':POI.POIQTY', ENABLED, PROPERTY_FALSE);
end if;


I looking for a method to disable some records in detail (turbular) I try to use both set_item_property and set_item_instance_property and the result is same.

For the above code, I click LOV button but the message is not appear. it seems I do something wrong.. T_T
Re: trigger for partial received in goods received document. help [message #216083 is a reply to message #215928] Wed, 24 January 2007 23:22 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search this forum for 'set_item_property false' and you will see that there is no leading ':' on the item name. Also when displaying a message put a 'pause' after it so that you can step through them one at a time.

David
Previous Topic: Need Help Regarding Migration To Forms10g
Next Topic: duplicate validation in d2k
Goto Forum:
  


Current Time: Fri Dec 09 12:03:14 CST 2016

Total time taken to generate the page: 0.18868 seconds