Pipeline withdrawals
Hello
Can anybody explain step by step process for Pipeline materials.
I have read that Pipeline materials dont have stock and they are not procured also.But then how does the stock is increased,how is the Vendor paid and all the process happens?
Suppose if I procure Gas from Electricity Board and wants to have it as Pipeline then how will the settings done in the system?
Can any body explain the entire Process in detail?
Regards
Vaibhav Mahajan
Hi
Thanks but I have read this information many times even in SAP help.
My question is if we are not able to procure the material and store it how would you issue the goods to the cost center.To issue goods you need stock.How to increase that stock.
Regards
Vaibhav Mahajan
Similar Messages
-
Consignment settlement and a vendor paper invoice
All,
Is anyone aware of a SAP solution that allows a supplier to send an invoice for consignment materials?
If there is no known SAP standard solution, has anyone developed a customized process that would integrate the two?
Regards,
SandraYou do not expect an invoice from the vendor for goods withdrawals from consignment stocks or a pipeline. Instead you settle posted withdrawals and return deliveries yourself and send the vendor a statement of the settlement. You can perform this settlement periodically in the background. The following documents can be involved:
Invoices
Credit memos
Consignment settlement is connected to message determination. As a result, you can define a form in Customizing. A message record is created during each settlement. This message record completes the form. Depending on the system settings, you can send this form to the vendor immediately on posting or at a later time.
If you want to change document header data for consignment settlements, use the Business Add-In MRM_MRKO_HDAT_MODIFY. For more information, see the documentation for the Business Add-In.
Canceling Consignment Documents
Cancel the documents in Inventory Management and start consignment settlement. The system generates a credit memo for the returned document. If the consignment prices have changed since the original goods receipt, post the credit memo in Financial Accounting. Clear the invoice and the credit memo in Financial Accounting.
Constraints
Consignment and pipeline settlement is not connected to the purchasing information system, because the purchase order history is not updated during consignment settlements.
You cannot make any net postings during consignment settlement. This means that you cannot calculate any cash discounts. To take cash discounts into account, you must include these in the consignment price. This ensures that the cash discount is implicitly posted during the goods withdrawal and settlement.
You cannot settle delivery costs.
To process consignment and pipeline withdrawals, choose Logistics Invoice Verification ® Automatic Settlement ® Consignment and Pipeline Settlement.
The selection screen Settle Consignment/Pipeline Withdrawals appears.
Narrow down the selection by:
Company code
Vendor
Plant
Material
Document date
Posting date
Material document
In the Selection frame, select the withdrawals that you want to take into account during processing.
Only consignment materials
Only pipeline materials
Consignment and pipeline materials
In the Processing frame, you can select whether you want to process withdrawals or return deliveries: -
How does Info Record tie in the procurement cycle, or how does it integrates with the purchase cycle
Thanks
GangaHi,
Purchasing Info Records serves as a source of information for Purchasing. The purchasing info record (also referred to in abbreviated form as the "info record") contains information on a specific material and a vendor supplying the material. For example, the vendor's current pricing is stored in the info record.
The info record allows buyers to quickly determine:
Which materials have been previously offered or supplied by a specific vendor
Which vendors have offered or supplied a specific material structure.
Content of an Info Record:
The info record contains:
Data such as prices and conditions that you can store for the relevant purchasing organization or plant.
The number of the last purchase order.
Tolerance limits for overdeliveries and underdeliveries.
The planned delivery time (lead time required by the vendor to deliver the material).
Vendor evaluation data.
An indicator showing whether the vendor counts as the regular vendor for the material.
The vendor sub-range to which the material belongs.
The availability period during which the vendor can supply the material.
The info record contains quotation and ordering data. The data in the info record (prices for example) is also used as default data for purchase orders.
For instance, you can store the current and future quotation conditions (discounts, fixed costs etc.) in the info record, in order to be able to copy them into Pos. You can also maintain the vendoru2019s conditions directly in the info record.
Organizational Levels:
An info record can apply to the following organizational levels:
Purchasing organization
Plant
Procurement Types in Info Records:
Standard
A standard info record contains information for standard purchase orders. The info records can be created for materials and services with and without master records.
Subcontracting
A subcontractor info record contains ordering information for subcontract orders. For example, if you subcontract the assembly of a component, the subcontractor info record would include the vendor's (subcontractoru2019s) price for assembling the component.
Pipeline
A pipeline info record contains information on a vendoru2019s commodity that is supplied through a pipeline or pipes (for example, oil or water) or by similar means (for example, electricity through the mains). The info record contains the vendoru2019s price for the consumption of such commodities by the buyer ("pipeline withdrawals"). You can store withdrawal/usage prices for different validity periods.
Consignment
A consignment info record contains information on a material that vendors keep available at their own cost on the ordereru2019s premises. The info record contains the vendoru2019s price for withdrawals by the orderer from consignment stock. As in the case of the pipeline info record, you can store prices for different validity periods.
Order Price History
The purchase order price history logs the various prices charged for a material by a vendor.
Texts in the Info Record
The info record contains the following text types:
Info record memo
An internal note or comment that is adopted in the PO item. The info record memo is not printed out.
PO text in info record
This text serves to describe the order item and corresponds to the PO text in the material master record. It is adopted in the PO item and included in the printout.
Short text
For material that has a material master record, the short text (short description) is adopted directly from the material master record in the PO or the outline purchase agreement.
PO Text in Info Record Versus PO Text in Material Master Record
For an info record linked to a material master record, you can specify for each purchasing organization whether:
Only the info record PO text is to be displayed and printed in purchasing documents (To do so, set the indicator No m. text in the purchasing organization data of the info record)
or
Both the info record PO text and the material master record PO text are to be displayed and printed in purchasing documents
Both texts are displayed and printed if the indicator No m. text is not set.
Reward if useful.
Regards,
Komal -
Hi Experts,
In our business scenerio we are generating some PM work orders.We have maintain info record to pick up price in field price (field name PREIS in operation --->external tab. ) .In some of the cases user have manually created purchase orders against some earlier work orders with info update tick on due to which those records got updated and can be seen in ME1L.
While generating work orders upon entering info record number in some cases rate is correctly picked up from info record but in some cases it is picked up from purchase order price.
Following points have checked.
1.order type ,cstg variant plan and cstg variant actl in control tab are same in both the cases.
2.Tried to change info record / purchase order but in one case rate is always picked up from info record and other from purchase order details.
3.Condition / access sequence is also same in both cases.
We got feedback that in OKP6 valuation variant customizing is defined to take the "price from purchase order".In OKP6 valuation variant is 007-In external processing tab sequence is i ) price fromm operation ii) net purchase order price.In drop down their are 7 options
My queries are
1.what should be sequence to have price from info record in all the cases.
2.What is meaning of those options.say price from operation,net quotation price. ( we are not entering any quotation)
3.Could not get option of info record in those options.
4.What would be implications if we change the sequence.
Thanks & Regards
VinayHello,
Please check While creating the Info record via ME13 , which Info category is used?
If-->
Standard-->If this indicator is set, the data from the info record (e.g. conditions, texts etc.) is only adopted in standard POs.
Subcontracting-->If this indicator has been set, the data from the info record (e.g. conditions, texts, etc.) is only adopted in subcontract orders.
Pipeline-->Specifies that the info record is used specifically for pipeline withdrawals.
Consignment-->If you set this indicator, the data of the info record ( conditions, texts etc.) is only adopted for the purpose of procuring consignment materials.
Above settings play Important role in Adopting the Data at Purchasing level.
Regards,
Rakesh -
What is a inforecord? why do we need to maintain that?
Hello,
what is a inforecord? why do we need to maintain that?
is it automatically created or manual?
Thanks,Info Record is used for storing the purchasing information about a vendor and a material as the master data at purchasing organization and plant level.
Info Record consists of information that cannot be captured at the general vendor or material master level. Info record allows buyers to quickly recognize which materials a specific vendor can supplier, and which vendors can supply a specified material.
Info records are divided into General level and Purchasing Organization level.
General level:
Vendor Data u2013 e.g. vendor material number
Origin data u2013 e.g. country of origin
Order unit u2013 However, the variable order unit should be activated if there is different purchasing order unit with base unit of measure.
General level Info Record text
Purchasing org level
Control data - planned delivery lead time, standard order quantity, minimum order quantity, shipping instruction, delivery tolerance
Condition data - price conditions, price UOM, scales etc
Last Purchase Order Number and date
Purchasing level Info record text
Prerequisite master data of setting up info record
For info record of inventory item, a material master record and vendor master must exist in the system.
It is also possible to create info record of non-inventory item, material group and sort string key are required, and this kind of info record is used in external processing, where info record number will be linked with a production order.
Info record Category
- Standard: Specifies that the info record is used in connection with standard purchase order.
- Subcontracting: Specifies that the info record is used in connection with subcontract order (item category L). The price should be the value added price which does not include the component value. Consignment: Specific that the info record is used in connection with consignment order (Item category K)
- Pipeline: Specifies that the info record is used specifically for pipeline withdrawals.
Key fields of Info Record
u2022 Planned Delivery time u2013 This is calendar day including transit lead time. Note: For Info record of STO, the PDT is transit lead time only.
u2022 Standard QTY u2013 Standard Purchase Order QTY
u2022 Minimum QTY u2013 Supplieru2019s minimum sales QTY
u2022 Shipping instruction u2013 ship mode of this material from this vendor
u2022 Confirmation Control key u2013 Indicate if a confirmation (AB) and shipping notification (LA) is expected.
u2022 Delivery Tolerance u2013 can be set with certain % to close PO short and allow over deliveries.
u2022 Purchase Order Text u2013 will be copied over to purchasing document as Info record PO text
u2022 Tax Code u2013 please do not enter tax code of affiliate info records, otherwise, it will cause error in invoice posting.
Prashant -
Dear Gurus,
I am using pipeliene material as the component in semifinished assy. When I run the costing for the semifinished assy ity is giving error ""No price could be determined for material/batch XXXXXXXXXXXXXX/ plantXXXX
Message no. CK465""
The material type for pipeline item in PIPE.
What should be the item category for the PIPE materil in BOM of Semifinished product.
How the consumption for the PIPE material will update during the backflush.
Thanks and regards
MurugesanDear,
If you go to OMS2 select the materail type PIPE you will found it is not value and quantity updating.
You can enter a pipeline withdrawal for an order or for a cost center. Pipeline withdrawals differ from other goods movements in that they are entered with the special stock indicator P.
The withdrawal is valuated at the price defined in the pipeline info record.
Please refer this link
http://help.sap.com/erp2005_ehp_04/helpdata/EN/ea/e9b1f04c7211d189520000e829fbbd/frameset.htm
Regards,
R.Brahmankar -
Pipe line material not inventorized
Hi,
While running pipeline scenario , when i did GI with Mvt 201 P...System allowed me to do this transaction...
As i do not have any stock for this Material "X" (Material type as PIPE). Then how did system allowed me to issue this material...
I know PIPELINE materials are not inventorized, but my question is WHY system did not asked that stock is not maintained for this material.
There should be some logic behind that?
UtsaHi Utsav,
Read documentation available on sap help website for clarifications.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
http://help.sap.com/saphelp_erp60_sp/helpdata/en/4d/4b9036dfe4b703e10000009b38f889/frameset.htm
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Pipeline Handling
Use
A pipeline material is a material that flows directly into the production process from a pipeline (for example, oil), from a pipe (for example, tap water), or from another similar source (for example, electricity).
A material from the pipeline is always available; i.e. it can be withdrawn from the pipeline at any time and in any quantity.
Depending on the system configuration, a material can be withdrawn only from the pipeline or, in addition to the pipeline, normal stocks of the material can also be managed.
Materials with Material Type PIPE
Pipeline handling is mandatory for materials with material type PIPE; i.e. only withdrawals from the pipeline can be posted for these materials.
These materials have the following characteristics:
They are neither procured nor planned. They can be withdrawn from the pipeline at any time and in any quantity.
They are not stored or kept in stock. No physical inventory is taken.
Pipeline movements are mandatory in all valuation areas; i.e. no other goods movements may be posted.
Other Material Types
For each material type, you can specify in the valuation area whether pipeline movements are:
Mandatory
Allowed
If pipeline movements are not mandatory but allowed, the material can be kept in stock and both pipeline and other movements can be posted.
A material of this type can be withdrawn from your companyu2019s own stock, from consignment stock, or from the pipeline.
Activities
Pipeline Withdrawal
You can enter a pipeline withdrawal for an order or for a cost center. Pipeline withdrawals differ from other goods movements in that they are entered with the special stock indicator P.
The withdrawal is valuated at the price defined in the pipeline info record.
A withdrawal from the pipeline results in the following updates in the system:
The pipeline withdrawal results in a vendor liability that must be settled periodically in a similar way to the management of consignment stocks. In the standard system the same account is used for both pipeline and consignment liabilities, but a different pipeline liabilities account can be defined in Customizing.
A consumption history is kept.
The pipeline withdrawal has no effect on existing warehouse stock or on the availability of the material.
Posting Goods Issue from the Pipeline
A withdrawal from the pipeline is posted as follows:
From the Inventory Management menu, choose Goods movement ® Goods issue.
Maintain the data on the initial screen. Choose Movement type ® Consumption ® To cost center (or To order, To network, All account assignments) ® From pipeline (Movement types : 201 P, 261 P, 281 P, or 291 P)
On the collective entry screen, enter the account assignment. Enter the items.
You do not have to enter the vendor as this will be found automatically by the system.
If more than one vendor is possible, a pop-up window appears with a list of pipeline vendors, from which you can select the vendor you require.
Post the goods movement.
Updates
A withdrawal from the pipeline results in the following updates in the system:
The pipeline withdrawal results in a vendor liability that must be settled periodically in a similar way to the management of consignment stocks.
A consumption history is kept.
The pipeline withdrawal has no effect on existing warehouse stock or on the availability of the material.
http://help.sap.com/saphelp_erp60_sp/helpdata/en/4d/4b9036dfe4b703e10000009b38f889/frameset.htm
regards,
Uzair
Edited by: Mohd Uzair Hussain on Jun 22, 2009 11:01 AM
Edited by: Mohd Uzair Hussain on Jun 22, 2009 11:02 AM -
Pipeline Materials: Purchase Price Variances
Hi,
Can anybody please guide me on how to handle Purchase Price Variances of Pipeline Materials. As pipeline materials doesn't have any POs and invoices, how is it possible to post the PPV so that the variances are recorded in material ledger.
Best Regards,
Ganesh PerumallaHi,
I could see from SAP Notes and Help the following:
If the consignment prices have changed since the original goods receipt, post the credit memo in Financial Accounting. Clear the invoice and the credit memo in Financial Accounting.
But the above Credit memo doesn't update the Material Ledger.
SAP Notes advices to use the function modules FU EXIT_RMVKON00_001, FU EXIT_RMVKON00_002 and FU EXIT_RMVKON00_003.
If somebody already worked on this scenario, could you please provide any details.
Best Regards,
Ganesh Perumalla
<u><b>FU EXIT_RMVKON00_001</b></u>
Text
Customer Exit: Consignment Settlement - Change Invoice Data
Functionality
Report RMVKON00 (Settle Consignment/Pipeline Liabilities) calls this customer-specific function module.
Report RMVKON00 calculates the invoice data from the withdrawals to be settled and calls the interface to Financial Accounting (function module AC_DOCUMENT_CREATE). Before calling the function module, you can change the following data:
Document header (internal table T_BKPF), contains only one line
Document items (internal table T_BSEG), the first line contains the vendor line item, the following lines contain the invoice items
The following information is available:
The company code (I_BUKRS) and the vendor (I_LIFNR), for which you are creating the document.
Parameters
I_BUKRS
I_LIFNR
T_BKPF
T_BSEG
T_BSET
T_RKWA
Exceptions
ERROR
Function Group
XM08
<u><b>FU EXIT_RMVKON00_002</b>____________________________________________________</u>
Text
Customer Exit: Consignment Settlement - Fill RKWA at Goods Withdrawal
Functionality
Report RMVKON00 (Settle Consignment/Pipeline Liabilities) calls this customer-specific function module and fills structure CI_RKWA.
In report RMVKON00, database table RKWA is changed at settlement. In table RKWA, structure CI_RKWA exists as an include that can incorporate customer-specific fields. The system can fill structure CI_RKWA at goods withdrawal or at settlement. The system uses this function module to fill structure CI_RKWA at the time of settlement.
The RKWA entry for the withdrawal (parameter I_RKWA) is available for filling structure CI_RKWA.
For technical reasons, it is not possible to return structure CI_RKWA, instead, the whole of table RKWA is returned using the parameter E_RKWA. However,changes to table RKWA that are not part of structure CI_RKWA, are ignored by report RMVKON00.
Notes
The system only adopts structure CI_RKWA if the value 'X' is passed on at parameter E_CHECK.
Parameters
I_RKWA
E_RKWA
E_CHECK
Exceptions
ERROR
Function Group
XM08 -
MRKO: pipeline and consignment liabilities settlement
Dear MM experts,
Please explain me what is the use of MRKO transaction, normally for all po's through MIRO we will do the invoice verification but in consignment order and pipeline what is the process to pay the vendor??
thanks in advance,
Kind regards,
Govardhan,V.Hi
Consignment Material is stored at your company premises but belongs to a vendor. The vendor supplies these goods so that they are available to you at any time, but does not initially invoice you for the goods. Only when you have withdrawn stock does payment become due for the quantities used.
Removing material from consignment stores or transferring material to your companys own stock results in liabilities towards the vendor. You should settle these liabilities at regular intervals.Consignment materials are settled without the vendor issuing an invoice, as the vendor company is unable to track withdrawals directly. The vendor can only manage its consignment stock by taking deliveries and payments into account.
U will settle the vendor for pipeline and consignment using MRKO transaction.
MRKO : http://help.sap.com/saphelp_47x200/helpdata/en/56/222138c2ebcc46e10000009b38f842/content.htm
http://help.sap.com/saphelp_47x200/helpdata/en/33/222138c2ebcc46e10000009b38f842/frameset.htm
http://help.sap.com/saphelp_47x200/helpdata/en/71/042d385ab91065e10000009b38f842/content.htm
https://warranty.rotax.com/sap/its/mimes/system/99/en/info/docu_general.html
Hope this will helps u
Ravi -
Clob datatype with pipelined table function.
hi
i made two functions one of them which use varchar2 data type with pipelined and
another with clob data type with pipelined.
i am giving parameters to both of them first varch2 with pipelined is working fine.
but another is not.
and i made diff type for both of them.
like clob object type for second.
and varchar2 type for first.
my first function is like
TYPE "CSVOBJECTFORMAT" AS OBJECT ( "S" VARCHAR2(500));
TYPE "CSVTABLETYPE" AS TABLE OF CSVOBJECTFORMAT;
CREATE OR REPLACE FUNCTION "FN_PARSECSVSTRING" (p_list
VARCHAR2, p_delim VARCHAR2:=' ') RETURN CsvTableType PIPELINED
IS
l_idx PLS_INTEGER;
l_list VARCHAR2(32767) := p_list;
l_value VARCHAR2(32767);
BEGIN
LOOP
l_idx := INSTR(l_list, p_delim);
IF l_idx > 0 THEN
PIPE ROW(CsvObjectFormat(SUBSTR(l_list, 1, l_idx-1)));
l_list := SUBSTR(l_list, l_idx+LENGTH(p_delim));
ELSE
PIPE ROW(CsvObjectFormat(l_list));
EXIT;
END IF;
END LOOP;
RETURN;
END fn_ParseCSVString;
and out put for this function is like
which is correct.
SQL> SELECT s FROM TABLE( CAST( fn_ParseCSVString('+588675,1~#588675^1^99^~2~16~115~99~SP5601~~~~~0~~', '~') as CsvTableType)) ;
S
+588675,1
#588675^1^99^
2
16
115
99
SP5601
S
0
14 rows selected.
SQL>
my second function is like
TYPE "CSVOBJECTFORMAT1" AS OBJECT ( "S" clob);
TYPE "CSVTABLETYPE1" AS TABLE OF CSVOBJECTFORMAT1;
CREATE OR REPLACE FUNCTION "FN_PARSECSVSTRING1" (p_list
clob, p_delim VARCHAR2:=' ') RETURN CsvTableType1 PIPELINED
IS
l_idx PLS_INTEGER;
l_list clob := p_list;
l_value VARCHAR2(32767);
BEGIN
dbms_output.put_line('hello');
LOOP
l_idx := INSTR(l_list, p_delim);
IF l_idx > 0 THEN
PIPE ROW(CsvObjectFormat1(substr(l_list, 1, l_idx-1)));
l_list := dbms_lob.substr(l_list, l_idx+LENGTH(p_delim));
ELSE
PIPE ROW(CsvObjectFormat1(l_list));
exit;
END IF;
END LOOP;
RETURN;
END fn_ParseCSVString1;
SQL> SELECT s FROM TABLE( CAST( fn_ParseCSVString1('+588675,1~#588675^1^99^~2~16~115~99~SP5601~~~~~0~~', '~') as CsvTableType1)) ;
S
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
+588675,1
and it goes on until i use ctrl+C to break it.
actually i want to make a function which can accept large values so i am trying to change first function.thanksRTFM DBMS_LOB.SUBSTR. Unlike built-in function SUBSTR, second parameter in DBMS_LOB.SUBSTR is length, not position. Also, PL/SQL fully supports CLOBs, so there is no need to use DBMS_LOB:
SQL> CREATE OR REPLACE
2 FUNCTION FN_PARSECSVSTRING1(p_list clob,
3 p_delim VARCHAR2:=' '
4 )
5 RETURN CsvTableType1
6 PIPELINED
7 IS
8 l_pos PLS_INTEGER := 1;
9 l_idx PLS_INTEGER;
10 l_value clob;
11 BEGIN
12 LOOP
13 l_idx := INSTR(p_list, p_delim,l_pos);
14 IF l_idx > 0
15 THEN
16 PIPE ROW(CsvObjectFormat1(substr(p_list,l_pos,l_idx-l_pos)));
17 l_pos := l_idx+LENGTH(p_delim);
18 ELSE
19 PIPE ROW(CsvObjectFormat1(substr(p_list,l_pos)));
20 RETURN;
21 END IF;
22 END LOOP;
23 RETURN;
24 END fn_ParseCSVString1;
25 /
Function created.
SQL> SELECT rownum,s FROM TABLE( CAST( fn_ParseCSVString1('+588675,1~#588675^1^99^~2~16~115~99~SP5
601~~~~~0~~', '~') as CsvTableType1)) ;
ROWNUM S
1 +588675,1
2 #588675^1^99^
3 2
4 16
5 115
6 99
7 SP5601
8
9
10
11
ROWNUM S
12 0
13
14
14 rows selected.
SQL> SY. -
Performance issues with pipelined table functions
I am testing pipelined table functions to be able to re-use the <font face="courier">base_query</font> function. Contrary to my understanding, the <font face="courier">with_pipeline</font> procedure runs 6 time slower than the legacy <font face="courier">no_pipeline</font> procedure. Am I missing something? The <font face="courier">processor</font> function is from [url http://www.oracle-developer.net/display.php?id=429]improving performance with pipelined table functions .
Edit: The underlying query returns 500,000 rows in about 3 minutes. So there are are no performance issues with the query itself.
Many thanks in advance.
CREATE OR REPLACE PACKAGE pipeline_example
IS
TYPE resultset_typ IS REF CURSOR;
TYPE row_typ IS RECORD (colC VARCHAR2(200), colD VARCHAR2(200), colE VARCHAR2(200));
TYPE table_typ IS TABLE OF row_typ;
FUNCTION base_query (argA IN VARCHAR2, argB IN VARCHAR2)
RETURN resultset_typ;
c_default_limit CONSTANT PLS_INTEGER := 100;
FUNCTION processor (
p_source_data IN resultset_typ,
p_limit_size IN PLS_INTEGER DEFAULT c_default_limit)
RETURN table_typ
PIPELINED
PARALLEL_ENABLE(PARTITION p_source_data BY ANY);
PROCEDURE with_pipeline (argA IN VARCHAR2,
argB IN VARCHAR2,
o_resultset OUT resultset_typ);
PROCEDURE no_pipeline (argA IN VARCHAR2,
argB IN VARCHAR2,
o_resultset OUT resultset_typ);
END pipeline_example;
CREATE OR REPLACE PACKAGE BODY pipeline_example
IS
FUNCTION base_query (argA IN VARCHAR2, argB IN VARCHAR2)
RETURN resultset_typ
IS
o_resultset resultset_typ;
BEGIN
OPEN o_resultset FOR
SELECT colC, colD, colE
FROM some_table
WHERE colA = ArgA AND colB = argB;
RETURN o_resultset;
END base_query;
FUNCTION processor (
p_source_data IN resultset_typ,
p_limit_size IN PLS_INTEGER DEFAULT c_default_limit)
RETURN table_typ
PIPELINED
PARALLEL_ENABLE(PARTITION p_source_data BY ANY)
IS
aa_source_data table_typ;-- := table_typ ();
BEGIN
LOOP
FETCH p_source_data
BULK COLLECT INTO aa_source_data
LIMIT p_limit_size;
EXIT WHEN aa_source_data.COUNT = 0;
/* Process the batch of (p_limit_size) records... */
FOR i IN 1 .. aa_source_data.COUNT
LOOP
PIPE ROW (aa_source_data (i));
END LOOP;
END LOOP;
CLOSE p_source_data;
RETURN;
END processor;
PROCEDURE with_pipeline (argA IN VARCHAR2,
argB IN VARCHAR2,
o_resultset OUT resultset_typ)
IS
BEGIN
OPEN o_resultset FOR
SELECT /*+ PARALLEL(t, 5) */ colC,
SUM (CASE WHEN colD > colE AND colE != '0' THEN colD / ColE END)de,
SUM (CASE WHEN colE > colD AND colD != '0' THEN colE / ColD END)ed,
SUM (CASE WHEN colD = colE AND colD != '0' THEN '1' END) de_one,
SUM (CASE WHEN colD = '0' OR colE = '0' THEN '0' END) de_zero
FROM TABLE (processor (base_query (argA, argB),100)) t
GROUP BY colC
ORDER BY colC
END with_pipeline;
PROCEDURE no_pipeline (argA IN VARCHAR2,
argB IN VARCHAR2,
o_resultset OUT resultset_typ)
IS
BEGIN
OPEN o_resultset FOR
SELECT colC,
SUM (CASE WHEN colD > colE AND colE != '0' THEN colD / ColE END)de,
SUM (CASE WHEN colE > colD AND colD != '0' THEN colE / ColD END)ed,
SUM (CASE WHEN colD = colE AND colD != '0' THEN 1 END) de_one,
SUM (CASE WHEN colD = '0' OR colE = '0' THEN '0' END) de_zero
FROM (SELECT colC, colD, colE
FROM some_table
WHERE colA = ArgA AND colB = argB)
GROUP BY colC
ORDER BY colC;
END no_pipeline;
END pipeline_example;
ALTER PACKAGE pipeline_example COMPILE;Edited by: Earthlink on Nov 14, 2010 9:47 AM
Edited by: Earthlink on Nov 14, 2010 11:31 AM
Edited by: Earthlink on Nov 14, 2010 11:32 AM
Edited by: Earthlink on Nov 20, 2010 12:04 PM
Edited by: Earthlink on Nov 20, 2010 12:54 PMEarthlink wrote:
Contrary to my understanding, the <font face="courier">with_pipeline</font> procedure runs 6 time slower than the legacy <font face="courier">no_pipeline</font> procedure. Am I missing something? Well, we're missing a lot here.
Like:
- a database version
- how did you test
- what data do you have, how is it distributed, indexed
and so on.
If you want to find out what's going on then use a TRACE with wait events.
All nessecary steps are explained in these threads:
HOW TO: Post a SQL statement tuning request - template posting
http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
Another nice one is RUNSTATS:
http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551378329289980701 -
How to Passing clob to PL/SQL pipeline function
I have a PL/SQL stored function which takes clob as input parameter and sends the results in a pipe line.
create or replace function GetIds(p_list clob, p_del varchar2 := ',') return ideset_t pipelined is
I am using ojdbc14.jar (Oracle 10g driver) with oracle 9i (9.2.0.1.0).
I want to use the following SQL Query select * from table(GetIds(clob))
Now the question is how can I pass the clob from JDBC?
Here is my client code
PreparedStatement stmt = con.prepareStatement("SELECT COLUMN_VALUE FROM TABLE(GETIDS(?, ','))");
stmt.setCharacterStream(1, new StringReader(str), str.length());
stmt.executeQuery();
I get the following error when I try to run the program. The same thing works fine if the chracter lenght is less than some chaaracters.
java.sql.SQLException: ORA-01460: unimplemented or unreasonable conversion requested
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:420)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:896)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2960)
at Test.main(Test.java:42)
Exception in thread "main"
The setChracterStream works for any insert/update clob. Example when I tried the query (INSERT INTO CLOB_TEST VALUES(?)) setCharacterStream just works fine.
Please any one can help me how to solve this.
Thanks in advance.Hóla LuÃs,
when you pick the PL/SQL function body returning a boolean, it implicitly means that TRUE means OK, while FALSE means error, always.
In order to associate such error to a given form field, you have to go back to the page definiton / validations and specify the name of the item in the corresponding field.
When you first create the validation rule, this value is not present even if you ask for the error message inline with the field.
The error message text can be specified in the validation definition, if I am not wrong.
When you need to return special error messages, including dynamic content for instance, you can use the Function Returning Error Message type, which reports an error when the string returned by the function is not null. This comes in handy when you want to display an item's code, for example, rather than generic text.
Even in this case, you must go back to the validation and specify the name of the field if you want to see it inline.
Hope it helps,
Flavio -
Interactive Report using a View with a Pipelined Function
Hello fellow Apex people,
I'm Using Application Express 4.1.0.00.32
I've got an interactive report that references a view (STOCK) and a pipelined function
The basic query is listed below.
SELECT S.CHANGED_TIME "Changed Time"
, S.CHANGED_BY "Changed By"
, S.ID "Id"
, STKST_DESCRS.STOCK_STATUS_CODES "Stock Status Codes"
, STKST_DESCRS.STOCK_STATUS_DESCRS "Stock Status"
, S.ORIGINAL_CONTAINER "Original Container"
FROM STOCK S
, table(LWS_StkstStatus (S.ID)) STKST_DESCRS
ORDER BY S.CO_ID,
S.SEQUENCE_NUM;
When the page is first run all the data is displayed correctly,
If I define a filter, sort or a blank search the data from the pipelined function (STKST_DESCRS.) becomes null and isn't displayed.
Does anyone know what is happening?
Many ThanksI'm curious why you find this dangerous. I want a report that looks like this:
Opportunity X:
4 - 2-apr-2008 - Closed deal
3 - 1-mar-2008 - Called Joe again
2 - 12-feb-2008 - Called Joe
1 - 14-jan-2008 - Initial call with customer.
When you enter a new note, I want it to be numbered 5. The only problem I can imagine is someone deleting a note, which will almost never happen, and if it does, it just leaves a numbering gap. I don't see how using the function in a SELECT will accomplish this. -
Interactive report on view based on pipelined table function.
Hi,
I want to build an Interactive Report on a view.
The view definition contains a select on a pipelined table function. I use context functionality to pass paramaters to the pipelined table function.
A plain select * from #my_view# in SqlPlus results in 121 different rows.
However, If I base my Interactive report on this view, I get 15 repeated rows (all the same).
Is it possible to use pipelined table functionality on an Interactive report? I can't seem to get it working.
If I use the following approach (http://rakeshjsr.blogspot.nl/2010/10/oracle-apex-interactive-report-based-on.html) I do get results, but I can't use this solution for a reason that's not relevant.Hello,
Is it possible to use pipelined table functionality on an Interactive report? I can't seem to get it working. I have used it in one instance and it works fine. However I was passing the values to pipe-lined function directly.
IR Query..
SELECT * FROM TABLE(fn_pipeline(:P1_ITEM_NAME))Call pipe-lined function from IR query directly (instead of using view)
Try sending values to Pipe-lined function directly. In-case if the problem is with setting and getting values from the context?
Regards,
Hari -
How can I disable an pipeline without removing it
I would like to keep my pipeline disabled but I don't want to remove it or change the start date to year 3000. Is it possible?
Plus, can I clean a Dataset monitoring history if I want to or I have to recreate them if I want to see a new clean history?
Thank you,
~Alex Berenguer
Alex BerenguerHi Alex,
Take a look at PowerShell cmdlet Suspend-AzureDataFactoryPipeline and see if it suits your needs.
https://msdn.microsoft.com/en-us/library/azure/dn834939.aspx
Thanks, Jason
Didn't get enough help here? Submit a case with the Microsoft Customer Support teams for deeper investigation - Azure service support: https://manage.windowsazure.com/?getsupport=true For on Premise software support go here instead: http://support.microsoft.com/select/default.aspx?target=assistance
Maybe you are looking for
-
LaserJet 1020 won't print first document after powering up
My LaserJet 1020 won't print the first document it receives after powering-up. Print manager shows that the document is being sent, the printer makes noise like it's getting ready to print, but the document is never printed and I don't receive an err
-
Adobe Photoshop cs6 problem - it closes after ''move tool'' button
After I push Move Tool button I cannot use any of the buttons bellow in that tool bar, when I try any button after it on closes the program with windows error ''adobe photoshop cs6 has stopped working'' os: win 7 64bits. other adobe installed : adobe
-
I have a video that was taken on VHS and I want to convert it to .avi. Is there a way to do this with any of the utilities out there? I have Googled, but can't seem to get a clear answer. I have burned the video to DVD so I have that to work from. Th
-
Hi , I am trying to upload the new printer driver in SAP. I downloaded the new SAP printer driver and trying to load into SAP thru SPAD. when I am trying to import the driver its asking for Development Class. PLEASE let me know which Development clas
-
Differentiate between invoice and clearing document
the table BSID and BSAD contains the details of both invoice and clearing documents. How to differentiate betwee invoice and clearing document. i thought that all debit documents are invoices and credits are clearing documents. But its not working be