Oracel Apps

Open Oracle Concurrent Program Output Directly on WEB browser through Oracle Forms

–Add library on form

FNDCONC.pll

 

— Create CP

CREATE OR REPLACE PROCEDURE XXX_CALL_CP(errbuf out varchar2,retcode out varchar2)

is

begin

FND_FILE.PUT_LINE(FND_FILE.OUTPUT,’ASASASSASASAS ASASASASASASAS test’);

end;

 

— Create Procedure on form and call it on when-button-pressed

PROCEDURE CALL_CP IS

vlrequestid NUMBER := 0;

vlrphase VARCHAR2 (30);

vlrstatus VARCHAR2 (30);

vldphase VARCHAR2 (30);

vldstatus VARCHAR2 (30);

vlmessage VARCHAR2 (30);

vlwaitstatus BOOLEAN;

l_PICKING_RULE_ID NUMBER;

 

l_user_id NUMBER := -1;

l_resp_id NUMBER := -1;

l_application_id NUMBER := -1;

 

l_req_id NUMBER;

l_request_completed BOOLEAN := FALSE;

 

l_req_phase VARCHAR2(20);

l_req_status VARCHAR2(1000);

l_req_dev_phase VARCHAR2(1000);

l_req_dev_status VARCHAR2(1000);

l_req_message VARCHAR2(1000);

 

l_x varchar2(1);

l_y varchar2(1);

l_z varchar2(1);

l_a varchar2(1);

l_b varchar2(1);

 

L_PICK_RELEASE VARCHAR2(1);

 

BEGIN

l_user_id := fnd_global.user_id;

l_application_id := fnd_global.resp_appl_id;

l_resp_id := fnd_global.resp_id;

fnd_global.apps_initialize(l_user_id, l_resp_id, l_application_id);

 

l_req_id := fnd_request.submit_request (‘XXX’,

‘XXX_CALL_CP’,

NULL,

SYSDATE,

FALSE);

 

:System.Message_Level := ’25’;

commit;

l_request_completed := fnd_concurrent.wait_for_request(request_id =>

l_req_id

,INTERVAL => 1

,phase => l_req_phase

,status => l_req_status

,dev_phase => l_req_dev_phase

,dev_status => l_req_dev_status

,MESSAGE => l_req_message);

 

:System.Message_Level := ’25’;

COMMIT;

editor_pkg.report(l_req_id, ‘Y’);

 

END CALL_CP;

 

 

— WHEN-BUTTON-PRESSED

CALL_CP;

Advertisements

Standard API of Rice Components

1. FND_PROGRAM.EXECUTABLE();

2. FND_PROGRAM.DELETE_EXECUTABLE();

3. FND_PROGRAM.REGISTER();

4. FND_PROGRAM.DELETE_PROGRAM();

5. FND_PROGRAM.PARAMETER();

6. FND_PROGRAM.DELETE_PARAMETER();

7. FND_PROGRAM.INCOMPATIBILITY();

 

8. FND_PROGRAM.DELETE_INCOMPATIBILITY();

9. FND_PROGRAM.REQUEST_GROUP();

10. FND_PROGRAM.DELETE_GROUP();

11. FND_PROGRAM.ADD_TO_GROUP();

12. FND_PROGRAM.REMOVE_FROM_GROUP();

13. FND_REQUEST.SUBMIT_REQUEST();

14. FND_CONCURRENT.WAIT_FOR_REQUEST();

15. FND_PROFILE.VALUE();

16. FND_PROFILE.SAVE();

17. FND_PROFILE.GET();

18. FND_MESSAGE.SET_NAME();

19. FND_MESSAGE.CLEAR();

20. FND_MESSAGE.GET();

21. FND_MESSAGE.SET_TOKEN();

22. FND_MESSAGE.RAISE_ERROR();

23. FND_MESSAGE.GET_STRING();

24. FND_MESSAGE.SET_NAME();

25. FND_MESSAGE.PUT();

26. FND_GLOBAL.APPS_INITIALIZE()

27. FND_GLOBAL.LOGIN_ID();

28. FND_GLOBAL.APPLICATION_ID();

29. FND_GLOBAL.USER_ID();

30. FND_GLOBAL.ORG_ID();

31. FND_GLOBAL.CONC_PROGRAM_ID();

32. FND_GLOBAL.CONC_REQUEST_ID();

33. FND_USER_PKG.CREATEUSER();

34. FND_USER_PKG.UPDATEUSER();

35. FND_USER_PKG.DISABLEUSER();

How many execution methods in Executable?

Ques:- How many execution methods in Executable?

Ans:- There are 12 execution methods in executable.

1.  Host

2.  PL/SQL Stored procedure

3.  Oracle Reports

4.  SQL *Loader

5.  SQL *Plus

6.  Java Stored Procedure

7.  Java Concurrent Program

8.  Immediate

9.  Multi Language Function

10. Spawned

11.  Request Set Stage Function

12.  Perl  Concurrent Program

How to Create a Concurrent Program in Oracle Apps.

Now I discuss with you How to Create a Concurrent Program in Oracle Apps.

We Create a concurrent program which execution method is PL/SQL Stored Procedure.

Step 1:- First we create a stored procedure in database.

Ex:-

CREATE OR REPLACE PROCEDURE XXC_HELLO_PROC

(

ERRBUFF OUT VARCHAR2

, RETCODE OUT VARCHAR2

)

IS

BEGIN

FND_FILE.PUT_LINE(FND_FILE.OUTPUT,’HELLO ORACLE’);

END XXC_HELLO_PROC;

ERRBUFF and RETCODE are the mendetory parameter.

Compile that procedure in database.

Step 2:- Now we create login Oracle Apps.

Step 3:- Select the Application Developer Responsibility.

Step 4:- Open the Executable Form

Navigation :- Application Developer Responsibility -> Concurrent -> Executable

Step 5:-

a)  Give the name of Executable(Which is Display for User).

b)  Give the short name of Executable(for Back end).

c)  Chose Application Name in which we want to register these Executable(we select “Work in Process”).

d)  Give Description(Its is not mandatory field).

e)  Chose Execution method Name from LOV. (we select  PL/SQL Stored Procedure)

f)  Give the procedure name in Execution File Name field.

g) Save it.

Step 6:- Open the Concurrent Program Form

 

Navigation :- Application Developer Responsibility -> Concurrent -> Program

Step 7:-

a) Give the Concurrent Program Name(Which is Display for User).

b) Give the short name of Program(for Back end).

c) Chose Execution method Name from LOV. (we select “Work in Process”)

d) Give the Executable Short name in Executable name,which is created in above step.

e) Save it.

Step 8:- Go to System Administrator Responsibility

Navigation :- System Administrator Responsibility -> Security -> Responsibility -> Request

Step 9:- Attach those Concurrent program in your request group.

a) In name field give the concurrent program name and save it.

Step 10:- Select our responsibility which is assign on our user.

Step 11:- Now we submit our Concurrent program.

 

Click on View from menu bar then click on request.

Click on Submit a New Request button,select Single Request then press Ok button.

Give Concurrent program Name, press Submit Button.Press No and find.

Now we see our concurrent program in SRS window.

Step 12:- See Output

Click on View output button and see Output “HELLO ORACLE”.

Launch Workflow from OAF Page

Step 1:- Create a workspace and Project.

Workspace

Name:- Launch_WorkflowWorkspace.jws

Project

Name:- Launch _WorkflowProject

Package:- XXC05.oracle.apps.wip. Launch_Workflow

Step 2:- Create a Application Module (AM)

Name:- Launch_WorkflowAM

Package:- XXC05.oracle.apps.wip. Launch_Workflow.server

Step 3:- Create a New Page

Name:- Launch_WorkflowPG

Package:- XXC05.oracle.apps.wip. Launch_Workflow.webui

Step 4:- Select region1 and set the following properties:

                ID:-  PageLayoutRN

Region Style:- pageLayout

Window Title:- Launch Workflow Window

Title:- Launch Workflow Title

AM Defination:- XXC05.oracle.apps.wip. Launch_Workflow.server. Launch_WorkflowAM

Step 5:- Add new Region in PageLayoutRN

ID:- MainRN

Region Style:- messageComponentLayout

Step 6:- Create other Region into MainRN(messageLayout)

ID:- ButtonLayout

Step 7:- Create new item into ButtonLayout

ID:- Launch_Workflow_OAF

Region Style:- SubmitButton

Attribute Set:- /oracle/apps/fnd/attributesets/Buttons/Go

Prompt:- Launch Workflow

Step 8:- Create a CO

Name:- Launch_WorkflowCO

Package:- XXC05.oracle.apps.wip. Launch_Workflow.webui

Step 9:- Write That code in Launch_WorkflowCO ( ProcessFormRequest)

if (pageContext.getParameter(“Launch_Workflow_OAF “) != null)

{

LaunchWorkFlow(pageContext);

}

———————————————————————————————————

public void LaunchWorkFlow(OAPageContext pageContext)

{

String strWfItemType = “XC05_WF2”;     // Workflow item Name

String strWfProcess = “XXC05_PROC”;   // Workflow process Name

String strWfItemKey = “Practice-1”;      // Workflow Item Key value

OANavigation wfNavigation = new OANavigation();

// Create Workflow Process

wfNavigation.createProcess(pageContext, strWfItemType, strWfProcess, strWfItemKey);

// Start Workflow Process

wfNavigation.startProcess(pageContext, strWfItemType, strWfProcess, strWfItemKey);

}

Page is created. Now you run page…..

Get Oracle Workflow Action History Details

CREATE OR REPLACE FUNCTION APPS.XXXX_get_hist (
p_nid IN PLS_INTEGER,
p_disp_type IN VARCHAR2 DEFAULT wf_notification.doc_text
)
RETURN VARCHAR2
AS
v_hist VARCHAR2 (32767);
BEGIN
wf_notification.getcomments2
(p_nid => 157531211,
p_display_type => NVL
(p_disp_type,
wf_notification.doc_text
),
p_hide_reassign => ‘Y’,
p_hide_requestinfo => ‘Y’,
p_action_history => v_hist
);
RETURN v_hist;
END XXXX_get_hist;
/