How to find CoA name and description


SELECT   ID_FLEX_NUM,
                 ID_FLEX_STRUCTURE_CODE,
                 ID_FLEX_STRUCTURE_NAME,
                 DESCRIPTION
  FROM   FND_ID_FLEX_STRUCTURES_VL
 WHERE   ID_FLEX_CODE = 'GL#' AND CREATED_BY <> 1;

How to find Natural Account Segment in a Query

SELECT   APPLICATION_COLUMN_NAME
  FROM   FND_SEGMENT_ATTRIBUTE_VALUES
 WHERE       APPLICATION_ID = 101
         AND ID_FLEX_CODE = 'GL#'
         AND SEGMENT_ATTRIBUTE_TYPE = 'GL_ACCOUNT'
         AND ATTRIBUTE_VALUE = 'Y'









 

How to find the Concurrent Program for which Responsibility to assign

---Responsibility find on a Concurrent Program

SELECT   f.application_short_name app_short_name,
         responsibility_name,
         responsibility_key,
         request_group_name,
         user_concurrent_program_name program_name
  FROM   fnd_request_groups a,
         fnd_request_group_units b,
         fnd_concurrent_programs_vl c,
         fnd_responsibility d,
         fnd_responsibility_tl e,
         fnd_application f
 WHERE       a.request_group_id = b.request_group_id
         AND b.request_unit_id = c.concurrent_program_id
         AND a.request_group_id = d.request_group_id
         AND d.responsibility_id = e.responsibility_id
         AND d.application_id = f.application_id
         AND user_concurrent_program_name =
               NVL (:REPORT_NAME, user_concurrent_program_name)

How to call Concurrent Request from an Oracle Reports

1. Define "User Parameters" of type number by the name:

    P_CONC_REQUEST_ID

 2. Add below script on Before-Report trigger:

    SRW.USER_EXIT('FND SRWINIT');

3. Create a script to call Concurrent program on report-trigger (e.g. AfterReport )


 l_request_id     NUMBER;
 l_layout_id      BOOLEAN;


    l_layout_id :=   
                    fnd_request.add_layout (template_appl_name   => 'XXILL',
                                  template_code        => 'XXCONA_PURCHASE_COND',
                                  template_language    => 'en',
                                  template_territory   => 'IN',
                                  output_format        => 'PDF'
                                  );

    l_request_id :=
          fnd_request.submit_request
                                   (application      => 'XXILL',
                                    program          => 'XXCONA_PURCHASE_COND',
                                    description      => NULL,
                                    start_time        => SYSDATE,
                                    sub_request     => FALSE,
                                    argument1        => :P_ORG_ID,
                                    argument2        => :PO_ORDER
                                   );
          Commit;

4. Add below script on After-Report Trigger

    SRW.USER_EXIT('FND SRWEXIT');