Question

RMB for API Call on Navigator

  • 11 February 2020
  • 3 replies
  • 292 views

Userlevel 5
Badge +10

Hi,

 

Does anyone know in APPS9 if you can add an option to the navigator which would perform an API call when a dialog box appears.

 

I am looking at a quicker way - for me - to reopen a work order so looking to make thew recreate_work_order call from Historic Work Order which is a RMB on the table.

 

Many thanks,

 

Matthew


3 replies

Userlevel 6
Badge +18

I’m not sure about a Navigator item but you could definitely create custom RMB item to run an action type of PL SQL block. 

Here’s a fragment of one that we built to cancel certain shop orders to give you a feel for the structure for code:

DECLARE
  CURSOR c1 IS
    SELECT ORDER_NO, RELEASE_NO, SEQUENCE_NO, TRANSACTION_ID, TRANSACTION_CODE, OPERATION_NO, LABOR_CLASS_NO, DATE_APPLIED, IFSAPP.SHOP_ORD_API.Is_Closed(ORDER_NO, RELEASE_NO, SEQUENCE_NO) ClosedStatus  from IFSAPP.OPERATION_HISTORY where TRANSACTION_CODE LIKE 'LABOR%' and (REVERSED_FLAG_DB='N' or REVERSED_FLAG_DB=NULL) and REVERSED_FLAG='Not Reversed' and EMPNO is NULL and DATE_APPLIED > '01-JAN-18' ;
BEGIN 
    FOR ToCancel in c1 LOOP
        IF ToCancel.ClosedStatus='FALSE' THEN
                    BEGIN
              -- Confirm Shop Order is open before closing
              IF IFSAPP.SHOP_ORD_API.Is_Closed(ToCancel.ORDER_NO, ToCancel.RELEASE_NO, ToCancel.SEQUENCE_NO)='FALSE' THEN
                BEGIN
                  IFSAPP.SHOP_ORD_API.CLOSE_AFTER_REOPEN(ToCancel.ORDER_NO, ToCancel.RELEASE_NO, ToCancel.SEQUENCE_NO);
                  commit;
                    EXCEPTION WHEN IFSAPP.Error_SYS.Err_Security_Checkpoint THEN 
                      raise; 
                END;
              END IF;
          END IF;
    END LOOP;
END;

 

 

In this example SHOP_ORD_API.CLOSE_AFTER_REOPEN is the API and method being called for the action with parameters, with SHOP_ORD_API.Is_Closed also being called for an “IF” status check before running.

Nick

Badge +2

Maybe a quick report - ‘select <api - with &params> from dual’ which can be added to Navigator?

 

Matt

Userlevel 4
Badge +8

If the information you are passing is available in the screen from which you are making the call, a Custom Menu with action type PL/SQL Block should suffice.

The Custom Menu from Historic Work Order would need to look something like this

 

PL/SQL Block:

begin

  ifsapp.historical_separate_api.Recreate_Work_Order(wo_no_ =>&WO_NO);

end;

 

 

Reply