Tuesday, September 18, 2012

FND: Create and Validate ICX Session Ticket

Following plsql block will create icx session ticket based on logged in user and his responsibility. If there is an existing session ticket, we can validate using API used in the block.

DECLARE
  l_user_name   VARCHAR2(50) := 'PANKAJ_MANDALIYA';
  l_resp_name  VARCHAR2(100) := 'Oracle Configurator Developer';
  l_user_id    NUMBER;
  l_resp_id    NUMBER;
  l_appl_id    NUMBER;
  l_icx_ticket  VARCHAR2(50);
  l_session_id VARCHAR2(50);
  l_result     VARCHAR2(50);
BEGIN
  SELECT fnd.user_id
  INTO l_user_id
  FROM fnd_user fnd
  WHERE fnd.user_name = l_user_name;
  
  SELECT DISTINCT fresp.responsibility_id,
    fresp.application_id
  INTO l_resp_id,
    l_appl_id
  FROM fnd_responsibility_tl fresp
  WHERE fresp.responsibility_name = l_resp_name;
  
  dbms_output.put_line('user_id = ' || l_user_id || ', resp_id = ' || l_resp_id || ', appl_id = ' || l_appl_id);
  
  fnd_global.apps_initialize(l_user_id,l_resp_id,l_appl_id);
  
  l_icx_ticket:=cz_cf_api.icx_session_ticket;
  dbms_output.put_line('ICX Ticket = ' || l_icx_ticket);
  
  l_session_id := fnd_session_utilities.XSID_to_SessionID(l_icx_ticket);
  dbms_output.put_line('Session Id = ' || l_session_id);
  
  l_result := fnd_session_management.check_session (p_session_id => l_session_id, p_resp_id => l_resp_id, p_app_resp_id => l_appl_id, p_tickle => 'N');
  dbms_output.put_line('Session validation result = ' || l_result);
END;

7 comments:

  1. I really like examining and also following ones write-up when i locate them incredibly beneficial and also fascinating.
    That write-up is usually just as beneficial along with fascinating.Verification and Validation both are independent type of testing. Obviously,
    If we look both of these activities as a whole, we can also call it testing.


    <a href="http://softwarevalidation.skyrock.com/3242076685-software-validation.html
    >software validation</a>

    ReplyDelete
  2. There are a lot dissertation internet websites via the web as soon as you look for not surprisingly listed as part of your article. girnar ropeway online ticket booking

    ReplyDelete
  3. To determine this issue, larger part of airports all throughout the planet are giving Wi-Fi office. cheap motel in brisbane

    ReplyDelete
  4. The measure of tickets sold on week by week premise are 255,000, which compares out to almost 13 million sold each year, which is an immense number of tickets - build event seating chart software

    ReplyDelete
  5. Many different types of printers are available for you to choose to rent. You could easily find a laser printer to rent and bring home for awhile. renting impresoras alicante

    ReplyDelete
  6. Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share. that content

    ReplyDelete
  7. Ordinary comes to visit and listed below are one way to thanks for your time for one's exertion, which inturn means that So i'm seeing this website every single day, hunting for unique, important tips. A number of, many thanks! Packers and Movers Hyderabad to Ranchi

    ReplyDelete