Skip to main content
Question

How to disable Purchase Order - print Order work copy?


Forum|alt.badge.img+6

Hi Community,

 

I need to disable this standard menu ‘Print Order Work Copy’… when status is ‘Planned’.

Is there any way to do that?

or any other alternate solutions are also appreciated, just simply not allow users to use ‘print order work copy’ when status is ‘Planned’.

Best Regards,

Hari

5 replies

asahin
Do Gooder (Customer)
Forum|alt.badge.img+4
  • Do Gooder (Customer)
  • 21 replies
  • June 13, 2024
Hello,Here's how you can do it.In the procedure running under Print Order Work Copy (you can find the relevant procedure by tracing) error_sys.System_General('You cannot perform this operation when the status is planned');

asahin
Do Gooder (Customer)
Forum|alt.badge.img+4
  • Do Gooder (Customer)
  • 21 replies
  • June 13, 2024

.


Forum|alt.badge.img+6
  • Author
  • Sidekick (Customer)
  • 30 replies
  • June 13, 2024
asahin wrote:
Hello,Here's how you can do it.In the procedure running under Print Order Work Copy (you can find the relevant procedure by tracing) error_sys.System_General('You cannot perform this operation when the status is planned');

Hi Asahin, Thank you for response.

Could you please explain this a bit.

 

Best Regards,

Hari


asahin
Do Gooder (Customer)
Forum|alt.badge.img+4
  • Do Gooder (Customer)
  • 21 replies
  • June 13, 2024
Now it's like this:When you run the report with Print Order Work Copy, you must write the code block that will give an error when the status is planned in a suitable place in the RPi package that generates the report (you can also open it in PLSQL). That's how I solve things like this. You can also find the RPi that generates the report when you debug it while performing an operation on the relevant screen.I hope I helped.

Forum|alt.badge.img+10
  • Hero (Customer)
  • 75 replies
  • June 13, 2024

@Harikrishnangr, You can hide the print option conditionally in Aurena otherwise you can run error_sys.System_General in a custom event action when someone tries to create the report.

 

Example:

Action Type: Execute Online SQL

DECLARE 

Lcount NUMBER;

PRAGMA AUTONOMOUS_TRANSACTION;

BEGIN

SELECT
Count(column1) into Lcount
FROM
IFSAPP.PURCHASE_ORDER
WHERE
Source_ref1= '&OLD:ORDER_NO'
AND Source_Ref2 = '&OLD:LINE_NO'
AND Source_Ref3 = '&OLD:RELEASE_NO'
AND Objstate =  'Planned';


IF LCOUNT > 0
THEN 
IFSAPP.ERROR_SYS.RECORD_GENERAL('Purchase_Order','Canot Print PO in Planned Status');
END IF;
END;


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings