Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to achieve oracle ebs purchase order closure by PL/SQL

2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Today, I will talk to you about how PL/SQL realizes the closure of oracle ebs purchase orders. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

In response to customer requirements, you need to write a script to batch close purchase orders of Bonus Item type, and search for some methods on metalink, but all of them fail to test. It turns out that the code needs to be generated into a concurrent program. The following is the code that tested successfully.

1. First create a stored procedure, and then call PO_ACTIONS.CLOSE_PO in the stored procedure

two。 Register a concurrent program of stored procedure type

3. Test the results in application.

CREATE OR REPLACE PROCEDURE xx_po_close

(

Err_buff OUT VARCHAR2

Retcode OUT NUMBER

P_reason_desc VARCHAR2

P_po_from VARCHAR2

P_po_to VARCHAR2)

AS

L_return_code VARCHAR2 (2000)

L_result BOOLEAN

CURSOR PO_CLOSE_CUR

IS

SELECT poh.segment1

Poll.po_header_id

Poll.po_line_id

Poll.line_location_id

FROM po_line_locations_all poll

Po_headers_all poh

Po_lines_all pol

WHERE poll.po_header_id = poh.po_header_id

AND poll.po_line_id = pol.po_line_id

AND pol.po_header_id = poh.po_header_id

AND upper (poh.authorization_status) = 'APPROVED'

AND UPPER (poll.closed_code) = 'CLOSED FOR RECEIVING'

AND (pol.unit_price = 0 or poh.quantity_billed-poh.quantity > = 0)

AND poh.segment1 between p_po_from and p_po_to

BEGIN

FOR PO_CLOSE_REC IN PO_CLOSE_CUR

LOOP

L_result: = po_actions.close_po (

P_docid = > PO_CLOSE_REC.po_header_id

P_doctyp = > 'PO'

P_docsubtyp = > 'STANDARD'

P_lineid = > PO_CLOSE_REC.po_line_id

P_shipid = > PO_CLOSE_REC.line_location_id

P_action = > 'CLOSE'

P_reason = > p_reason_desc

P_calling_mode = > 'PO'

P_conc_flag = >'N'

P_return_code = > l_return_code

P_auto_close = >'N'

P_action_date = > SYSDATE

P_origin_doc_id = > NULL)

IF l_result THEN

FND_FILE.PUT_LINE (FND_FILE.OUTPUT,PO_CLOSE_REC.segment1 | |'is Closed. ')

ELSE

FND_FILE.PUT_LINE (FND_FILE.OUTPUT,PO_CLOSE_REC.segment1 | |'is not Closed. ')

END IF

END LOOP

END

After reading the above, do you have any further understanding of how PL/SQL can close oracle ebs purchase orders? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report