This content has been marked as final. Show 6 replies
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);
SELECT TO_CHAR (current_max_unique_identifier + 1)
WHERE table_name = 'PO_REQUISITION_HEADERS'
FOR UPDATE OF current_max_unique_identifier;
mo_global.set_policy_context ('S', &your_org_id);
SET current_max_unique_identifier = current_max_unique_identifier + 1
WHERE CURRENT OF req_number_cur;
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);
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.
Just wanted to clarify. Here is the text from help:
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.
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.
can i create my own 'Group By' feature in oracle requisition import, like Group By 'Order Number'...
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.