Tuesday, 17 December 2024

Query to find Responsibility for the Concurrent Program

 

/*Query to find the Concurrent Program attached to Responsibility*/

SELECT frt.responsibility_name,
       frg.request_group_name,
       frg.description
FROM   fnd_request_groups frg,
       fnd_request_group_units frgu,
       fnd_concurrent_programs fcp,
       fnd_concurrent_programs_tl fcpt,
       fnd_responsibility_tl frt,
       fnd_responsibility frs
WHERE  frgu.unit_application_id = fcp.application_id
       AND frgu.request_unit_id = fcp.concurrent_program_id
       AND frg.request_group_id = frgu.request_group_id
       AND frg.application_id = frgu.application_id
       AND fcpt.source_lang = Userenv('LANG')
       AND fcp.application_id = fcpt.application_id
       AND fcp.concurrent_program_id = fcpt.concurrent_program_id
       AND frs.application_id = frt.application_id
       AND frs.responsibility_id = frt.responsibility_id
       AND frt.source_lang = Userenv('LANG')
       AND frs.request_group_id = frg.request_group_id
       AND frs.application_id = frg.application_id
       --AND   fcp.concurrent_program_name = 
       AND fcpt.user_concurrent_program_name LIKE '--------------------'; 


Friday, 6 December 2024

API FOR TRANSFER TO MANUFACTURING IN ORACLE APPS R12

 /*API FOR TRANSFER TO MANUFACTURING IN ORACLE APPS R12*/

DECLARE
    l_inventory_item_id NUMBER := 11081350;
    l_org_id            NUMBER := 319;
    l_resp_id           NUMBER;
    l_appl_id           NUMBER;
BEGIN
    SELECT responsibility_id,
           application_id
    INTO   l_resp_id, l_appl_id
    FROM   fnd_responsibility
    WHERE  responsibility_key = '-------'; --'Transfer to Manufacturing';

    --initialize user session
    fnd_global.Apps_initialize(user_id=>fnd_global.user_id,resp_id=>l_resp_id,resp_appl_id=>l_appl_id);

    
eng_bom_rtg_transfer_pkg.Eng_bom_rtg_transfer 

    (x_org_id => l_org_id,
    x_eng_item_id => l_inventory_item_id, 
    x_mfg_item_id => l_inventory_item_id,
    x_transfer_option => 2, 
    x_designator_option => 1,
    x_alt_bom_designator => NULL,
    x_alt_rtg_designator => NULL, 
    x_effectivity_date => SYSDATE,
    x_last_login_id => -1, 
    x_bom_rev_starting => NULL,
    x_rtg_rev_starting => NULL,
    x_ecn_name => NULL, --'ABC.ABC_11377_121',
    x_item_code => 1, 
    x_bom_code => 1, 
    x_rtg_code => 1,
    x_mfg_description => NULL,
    x_segment1 => NULL, 
    x_segment2 => NULL, 
    x_segment3 => NULL,
    x_segment4 => NULL,
    x_segment5 => NULL, 
    x_segment6 => NULL, 
    x_segment7 => NULL,
    x_segment8 => NULL,
    x_segment9 => NULL, 
    x_segment10 => NULL, 
    x_segment11 => NULL,
    x_segment12 => NULL, 
    x_segment13 => NULL, 
    x_segment14 => NULL,
    x_segment15 => NULL, 
    x_segment16 => NULL, 
    x_segment17 => NULL,
    x_segment18 => NULL, 
    x_segment19 => NULL, 
    x_segment20 => NULL,
    x_implemented_only => 1, 
    x_unit_number => NULL, 
    x_commit => TRUE);
END;