0% found this document useful (0 votes)
317 views

Create Reservation - API

This document contains a procedure that creates a reservation by calling the create_reservation procedure, passing in reservation details like the sales order ID, item ID, quantity, and organization. It then outputs the status, message count, reservation ID, and reserved quantity. Any error messages are also output.

Uploaded by

Manish Sharma
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
317 views

Create Reservation - API

This document contains a procedure that creates a reservation by calling the create_reservation procedure, passing in reservation details like the sales order ID, item ID, quantity, and organization. It then outputs the status, message count, reservation ID, and reserved quantity. Any error messages are also output.

Uploaded by

Manish Sharma
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

create_reservation(p_sales_order_id number,p_line_id number p_rsv inv_reservation_global.mtl_reservation_rec_type; p_dummy_sn inv_reservation_global.serial_number_tbl_type; x_msg_count NUMBER; x_msg_data VARCHAR2(240); x_rsv_id NUMBER; x_dummy_sn inv_reservation_global.

serial_number_tbl_type; x_status VARCHAR2(1); x_qty NUMBER; BEGIN p_rsv.requirement_date := Sysdate; p_rsv.organization_id := 5343; --mtl_parameters.organization id p_rsv.inventory_item_id := 949729;--mtl_system_items.Inventory_item _id; p_rsv.demand_source_type_id := inv_reservation_global.g_source_type_oe; -- which is 2 p_rsv.demand_source_name := NULL; p_rsv.demand_source_header_id := 1334166 ; --mtl_sales_orders.sales_order _id p_rsv.demand_source_line_id := 4912468 ; -- oe_order_lines.line_id p_rsv.primary_uom_code := 'EA'; p_rsv.primary_uom_id := NULL; p_rsv.reservation_uom_code := 'EA'; p_rsv.reservation_uom_id := NULL; p_rsv.reservation_quantity := 10; p_rsv.primary_reservation_quantity := 10; p_rsv.supply_source_type_id := inv_reservation_global.g_source_type_inv ; inv_reservation_pub.create_reservation ( p_api_version_number => 1.0 , x_return_status => x_status , x_msg_count => x_msg_count , x_msg_data => x_msg_data , p_rsv_rec => p_rsv , p_serial_number => p_dummy_sn , x_serial_number => x_dummy_sn , x_quantity_reserved => x_qty , x_reservation_id => x_rsv_id ); dbms_output.put_line('Return status = '||x_status); dbms_output.put_line('msg count = '||to_char(x_msg_count)); dbms_output.put_line('msg data = '||x_msg_data); dbms_output.put_line('Quantity reserved = '||to_char(x_qty)); dbms_output.put_line('Reservation id = '||to_char(x_rsv_id)); IF x_msg_count >=1 THEN FOR I IN 1..x_msg_count LOOP dbms_output.put_line(I||'. '||SUBSTR(FND_MSG_PUB.Get(p_encoded => FND_API .G_FALSE ),1, 255)); fnd_file.put_line(fnd_file.log,I||'. '||SUBSTR(FND_MSG_PUB.Get(p_encoded => FND_API.G_FALSE ),1, 255)); END LOOP; END IF; COMMIT; END; /

You might also like