6 Replies Latest reply on Jan 22, 2009 5:51 PM by Niels LM.

    Requisition Import Program

      Hi All,

      I have a problem with the requisition import program.

      I need to create around 20 requisitions using this program. I have populated all the required information in the interface table po_requisitions_interface_all.

      When I run the Import program only 16 requisitions are getting created and there are no error records left in the interface table.

      When I checked in the front end 5 requisitions clubbed into 1 and got created. For all these 5 requisitions preparer_id is same.

      Can anyone help me how to seperate them into individual requisitions.

        • 1. Re: Requisition Import Program
          One idea is to allocate the requisition number for set of rows or each row you wanted the the requisition created for. Inherently Req import will group by the parameter options you have populated. You can use this sample code to achieve what you are looking for. After this you can run the req import and you should see the requisitions split.

          l_segment1 VARCHAR (100);

          CURSOR req_number_cur
          SELECT TO_CHAR (current_max_unique_identifier + 1)
          FROM po_unique_identifier_control
          WHERE table_name = 'PO_REQUISITION_HEADERS'
          FOR UPDATE OF current_max_unique_identifier;
          fnd_client_info.set_org_context (&your_org_id);
          mo_global.set_policy_context ('S', &your_org_id);

          OPEN req_number_cur;

          FETCH req_number_cur
          INTO l_segment1;

          IF req_number_cur%NOTFOUND
          --do something
          END IF;

          CLOSE req_number_cur;

          UPDATE po_unique_identifier_control
          SET current_max_unique_identifier = current_max_unique_identifier + 1
          WHERE CURRENT OF req_number_cur;

          UPDATE po_requisitions_interface
          SET req_number_segment1 = l_segment1
          WHERE interface_source_code = '&your_source_code' AND interface_source_line_id = '&your_unique_identifier_for_req';
          --(your can use anything here that makes it unique);


          • 2. Re: Requisition Import Program
            Hi Jana,

            Go to Setups in Purchasing Responsibility.

            Go Under Organizations Menu and in Defaults Tab Choose ALL for Field Requisition Import Group-By.

            Then Test and let us know if it works or not.

            All is the option not to group the requisitions and it should create seperate requisitions.

            • 3. Re: Requisition Import Program
              Just wanted to clarify. Here is the text from help:

              <--start quote
              Use the Group By feature to determine how requisition lines are grouped on the requisitions you create. The default in this field is set in the Purchasing Options window. Choose one of the following options:

              All: Group all requisition lines on one requisition

              Buyer: Group requisition lines for each buyer name on a separate requisition

              Category: Group requisition lines for each purchasing category on a separate requisition

              Item: Group requisition lines for each item on a separate requisition

              Location: Group requisition lines for each location on a separate requisition

              Supplier: Group requisition lines for each supplier name on a separate requisition
              -- end quote>

              All creates one requisition for all lines not one per line.

              • 4. Re: Requisition Import Program

                Oops... then i might have overlooked on that. Will see that again.

                Thanks for the update. There was one more option of NULL can we select that one.... Will try to check from my end and will update.

                • 5. Re: Requisition Import Program
                  dear Nagamohan,

                  can i create my own 'Group By' feature in oracle requisition import, like Group By 'Order Number'...

                  • 6. Re: Requisition Import Program
                    Niels LM.
                    Importing Reqs through the interface groups according to the following logic:
                    It first assigns values to REQUISITION_LINE_ID and REQ_DISTRIBUTION_ID;
                    the function then groups Requisitions based on the REQ_NUMBER_SEGMENT1 column.

                    All requisitions with the same NOT NULL REQ_NUMBER_SEGMENT1 are assigned the same REQUISITION_HEADER_ID.

                    The function then groups Requisitions based on the GROUP_CODE column. All requisitions with the same value in the GROUP_CODE column are assigned the same REQUISITION_HEADER_ID.

                    It then groups based on the GROUP_BY parameter, which takes on the value of DEFAULT_GROUP_BY if not provided. GROUP_BY could be one of the following: BUYER, CATEGORY, ITEM, VENDOR, LOCATION or ALL.

                    So if you would like to use your own logic then populate the GROUP_CODE column with the same value for those lines you wish to group together. I have used this some time ago to make sure that requisitions generated for different PJM projects were actually grouped together on the same Req header by Project number and not all pjm sumbers in the same req.

                    /Niels LM