Skip to main content

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

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');

.


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


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.

@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;


Reply