9 Replies Latest reply on Apr 5, 2013 11:34 AM by User297968

    Single concurrent program for multiple operating units

    997631
      HI

      I am working on XML/BI publisher to generate AR invoice reports.
      We have single rdf report using which rtf templates are generated.
      There are 10 operating units (10 ORG_ID's) and 10 rtf templates, one for each operating unit. There are 4 different responsibilities for each ORG_ID

      Eg: ORG_ID's = 11, 12, 13, 14..........etc
      Eg: Responsibility = xx, yy, zz...........etc

      I want to register a single concurrent program. When a user submits a request from "XX" responsibility, then the template associated with that org_id should be generated. Whichever responsibility the user is accessing from, that particular template must be shown as output.

      How can i register one concurrent program for multiple operating units.



      Thanks!

      Edited by: 994628 on Mar 18, 2013 4:39 PM

      Edited by: 994628 on Mar 18, 2013 4:42 PM
        • 1. Re: Single concurrent program for multiple operating units
          appsfh
          Hi,

          To my knowledge 1 concurrent program can have only one report. (If you found any solution please share it :))

          I used to overcome these type of requirements by developing one report and one template using parameters & change the layout dynamically using if/else conditions in the template.
          I think you can bring all the AR Invoice requirements in one report.


          Thanks
          • 2. Re: Single concurrent program for multiple operating units
            997631
            Thanks for the reply.

            There are 10 templates which already have conditional formatting in them. I dont think bringing all requiremnets to one report would work because there are certain place holders for some of the reports.

            Is there any way to do it in rdf report like adding before/after report triggers.


            Thanks!
            • 3. Re: Single concurrent program for multiple operating units
              appsfh
              There are 10 templates which already have conditional formatting in them. I dont think bringing all requiremnets to one report would work because there are certain place holders for some of the reports.
              Is there any way to do it in rdf report like adding before/after report triggers.
              Why don't you use if/else condition to return the values in place holders?
              eg:
              ---
              function CF_DFF_headerFormula return Char is
              vc_header varchar2(100);
              begin
              if :PRM1 = 'XXX' then
                   :CP_DFF_1 := 'X';
                   :CP_DFF_2 := 'XX';
                   :CP_DFF_3 := 'XXX';
              elsif :PRM2 = 'YYY' then      
                   :CP_DFF_1 := 'Y';
                   :CP_DFF_2 := 'YY';
                   :CP_DFF_3 := 'YYY';
              else
                   :CP_DFF_1 := NULL;
                   :CP_DFF_2 := NULL;
                   :CP_DFF_3 := NULL;
              end if;
              return(vc_header);
              end;
              ---

              Thanks
              1 person found this helpful
              • 4. Re: Single concurrent program for multiple operating units
                AlexAnd
                >
                There are 10 operating units (10 ORG_ID's) and 10 rtf templates, one for each operating unit. There are 4 different responsibilities for each ORG_ID

                Eg: ORG_ID's = 11, 12, 13, 14..........etc
                Eg: Responsibility = xx, yy, zz...........etc

                I want to register a single concurrent program. When a user submits a request from "XX" responsibility, then the template associated with that org_id should be generated. Whichever responsibility the user is accessing from, that particular template must be shown as output.
                >
                interesting case for 10 OE set 10 template
                what is purpose? for each OE different requirements for layout?

                BTW

                if each Responsibility associated with one org_id then
                - you can get current org_id when you run concurrent program
                - create main template (will be #11) with condition like
                <?choose:?>
                <?when: ORG_ID=11?>
                <?import:xdo://FND.XX11_SUB.en.00/?> 
                <?call:TEMPLATE11?>
                <?end when?>
                <?when: ORG_ID=12?>
                <?import:xdo://FND.XX12_SUB.en.00/?> 
                <?call:TEMPLATE12?>
                <?end when?>
                ...
                <?otherwise:?>
                <?import:xdo://FND.XX21_SUB.en.00/?> 
                <?call:TEMPLATE21?>
                <?end otherwise?>
                <?end choose?>
                so based on org_id will be import of needed subtemplate

                - re-register your "10 rtf templates" as subtemplates




                another way is substitution of template for concurrent then it running
                in before_report trigger set needed template
                l_conc_request_id := fnd_global.conc_request_id;
                 
                    if ORG_ID = 11 then
                      UPDATE fnd_conc_pp_actions t
                         SET t.argument2 = 'XX11'
                       where t.concurrent_request_id = l_conc_request_id
                         and t.action_type = 6;
                .....
                  if ORG_ID = 21 then
                      UPDATE fnd_conc_pp_actions t
                         SET t.argument2 = 'XX21'
                       where t.concurrent_request_id = l_conc_request_id
                         and t.action_type = 6;
                1 person found this helpful
                • 5. Re: Single concurrent program for multiple operating units
                  997631
                  Hey thanks for your suggestion. I created sub templates, now how do i call subtemplates to main template?
                  • 6. Re: Single concurrent program for multiple operating units
                    997631
                    I created main template as follows

                    Eg:
                    <?import:xdoxsl:///Users/xxxxx/Desktop/Test_subtemplate/test1.rtf?>
                    <?call-template:ABC?>

                    <?call-template:DEF?>
                    ............

                    How do i run it?
                    • 7. Re: Single concurrent program for multiple operating units
                      AlexAnd
                      plz see
                      http://ashokkumartj.blogspot.ru/2011/01/calling-subtemplate-from-main-template.html
                      http://bipconsulting.blogspot.ru/2009/11/common-header-and-footer-style-with-sub.html
                      http://www.adivaconsulting.com/adiva-blog/item/36-working-with-rtf-sub-templates.html
                      • 8. Re: Single concurrent program for multiple operating units
                        AlexAnd
                        plz see
                        http://ashokkumartj.blogspot.ru/2011/01/calling-subtemplate-from-main-template.html
                        http://bipconsulting.blogspot.ru/2009/11/common-header-and-footer-style-with-sub.html
                        http://www.adivaconsulting.com/adiva-blog/item/36-working-with-rtf-sub-templates.html
                        1 person found this helpful
                        • 9. Re: Single concurrent program for multiple operating units
                          User297968
                          Why not put a pl/sql wrapper around it - you could then use the standard concurrent program submit api to run the actually report - the pl/sql concurrent program would have logic to determine the template - which could take the form on a profile option or lookup.