Home » Applications » Oracle Fusion Apps & E-Business Suite » Create_update_trip API
Create_update_trip API [message #315720] Tue, 22 April 2008 09:48 Go to next message
shree_z
Messages: 75
Registered: February 2008
Member
I am trying to create a trip with the API, WSH_TRIPS_PUB.Create_update_trip.

Could anyone please help with a sample code on how to run this api to create a trip.

I have the manual for the shipping execution APIs, but if someone could guide me on how to pass all the parameters, I would be grateful..

Thanks in advance

[Updated on: Tue, 22 April 2008 09:53]

Report message to a moderator

Re: Create_update_trip API [message #315721 is a reply to message #315720] Tue, 22 April 2008 09:54 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Read & following posting guidelines in URL below
http://www.orafaq.com/forum/t/88153/0/

I have no idea what problem you need to be solved or how any independent observer would know when the problem has been solved.

Nothing you posted is any way related to Oracle!

Re: Create_update_trip API [message #315723 is a reply to message #315721] Tue, 22 April 2008 10:03 Go to previous messageGo to next message
shree_z
Messages: 75
Registered: February 2008
Member
Hi,

I am very sorry to have posted in the wrong forum.

As API's are generally Pl/sql procedures, I thought somebody could help.

Thank you
Re: Create_update_trip API [message #315735 is a reply to message #315720] Tue, 22 April 2008 10:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
What is a trip?

PL/SQL User's Guide and Reference
Application Developer's Guide - Fundamentals

Regards
Michel
Re: Create_update_trip API [message #315742 is a reply to message #315720] Tue, 22 April 2008 10:44 Go to previous messageGo to next message
scorpio_biker
Messages: 154
Registered: November 2005
Location: Kent, England
Senior Member
Have you tried this document
Oracle Order APIS

This tells you what parameters are needed and what type they are.
Re: Create_update_trip API [message #315751 is a reply to message #315735] Tue, 22 April 2008 10:55 Go to previous messageGo to next message
shree_z
Messages: 75
Registered: February 2008
Member
Hi Michel,

Thanks for the links.

In Oracle Apps Order Manangement, a Trip is a term that we come across when we deal with the delivery of Items.

For example, please consider a situation when we have a company manufacturing some kind of finished goods(FG). While the delivery of these FG, a truck starts from say, Boston and heads to say Newyork. The process when the truck starts from Boston to Newyork is referred as a trip. If the truck stops in between say Newjersey, that is referred to as 'Stop' in the trip.

Now the reason why I am using the API is to create trips and stops in our Oracle system inorder to capture the data while the delivery occurs physically, so that there is visibility of the whole process in our Oracle apps system.

There exists a standard API to do so .. WSH_TRIPS_PUB.Create_update_trip. I just want to run it using the correct parameters.

Thank you


Re: Create_update_trip API [message #315754 is a reply to message #315751] Tue, 22 April 2008 10:59 Go to previous messageGo to next message
shree_z
Messages: 75
Registered: February 2008
Member
Hi Scorpio,

I referred to the document. Thanks for the same.

But I just need to know how to run it in TOAD and also how to pass the p_trip_info parameter which is of type, record.

I would be grateful if there is any sample code used to run this API, showing how these parameters are passed.

Thanks

[Updated on: Tue, 22 April 2008 11:01]

Report message to a moderator

Re: Create_update_trip API [message #315770 is a reply to message #315754] Tue, 22 April 2008 14:01 Go to previous messageGo to next message
shree_z
Messages: 75
Registered: February 2008
Member
Can anyone please help me showing how to pass values to a record type parameter?

I have the following code

declare 
x_return_status varchar2 (1000);
x_msg_count number;
x_msg_data varchar2(1000);
p_trip_info WSH_TRIPS_PUB.trip_pub_rec_type;
x_trip_id number;
x_trip_name varchar2(1000);
begin
wsh_trips_pub.Create_Update_Trip
  ( 1.0
    ,' '
    ,x_return_status          
    ,x_msg_count              
    ,x_msg_data               
    ,'CREATE'
    ,p_trip_info
    ,'New_Trip'              
    ,x_trip_id               
    ,x_trip_name  ) ;
dbms_output.put_line ('Return_Status'||' '||x_return_status);
dbms_output.put_line ('Msg_Count'||' '||x_msg_count);
dbms_output.put_line ('Msg_Data'||' '||x_msg_data);
dbms_output.put_line ('trip_id'||' '||x_trip_id);
dbms_output.put_line ('trip_name'||' '||x_trip_name);
end;


here p_trip_info is of type record and is an IN OUT parameter.
How do I pass the values for the columns to this record type parameter?

Thanks in advance
Re: Create_update_trip API [message #560459 is a reply to message #315770] Fri, 13 July 2012 01:46 Go to previous messageGo to next message
sufyanelahi
Messages: 2
Registered: July 2012
Location: Pakistan
Junior Member
Hi,

For p_trip_info, pass only the attributes that need updating.
here's how you'd update an attribute in the record:
CREATE OR REPLACE PROCEDURE XXTEST_CR_UP_TRIP AS
/*
  P_API_VERSION_NUMBER  IN    NUMBER, 
  P_INIT_MSG_LIST  IN    VARCHAR2, 
  P_ACTION_CODE  IN    VARCHAR2, 
  P_TRIP_NAME  IN    VARCHAR2 := FND_API.G_MISS_CHAR, */
  
  P_TRIP_INFO  WSH_TRIPS_PUB.TRIP_PUB_REC_TYPE;
  
  X_RETURN_STATUS  VARCHAR2(200);
  X_MSG_COUNT     NUMBER; 
  X_MSG_DATA  VARCHAR2(2000);  
  X_TRIP_ID  NUMBER; 
  X_TRIP_NAME  VARCHAR2(200) ;

BEGIN

    P_TRIP_INFO.name := 22094;
    P_TRIP_INFO.seal_code := 'NOPE';

    WSH_TRIPS_PUB.CREATE_UPDATE_TRIP( 
      1.0, -- P_API_VERSION_NUMBER  IN    NUMBER, 
      '',--P_INIT_MSG_LIST  IN    VARCHAR2, 
      X_RETURN_STATUS,  --OUT    VARCHAR2, 
      X_MSG_COUNT,--  OUT    NUMBER, 
      X_MSG_DATA ,-- OUT    VARCHAR2, 
      'UPDATE', -- P_ACTION_CODE  IN    VARCHAR2, 
      P_TRIP_INFO  , --IN OUT    TRIP_PUB_REC_TYPE, 
      22094, --P_TRIP_NAME  IN    VARCHAR2 := FND_API.G_MISS_CHAR, 
      X_TRIP_ID, --X_TRIP_ID  OUT    NUMBER, 
      X_TRIP_NAME  -- X_TRIP_NAME  OUT    VARCHAR2 
    ); 
    
    DBMS_OUTPUT.PUT_LINE ('x_return_status : ' ||x_return_status) ; 
    DBMS_OUTPUT.PUT_LINE ('x_trip_id       : ' ||x_trip_id ) ; 
    DBMS_OUTPUT.PUT_LINE ('x_trip_name     : ' ||x_trip_name ) ; 
END ; 
Re: Create_update_trip API [message #560460 is a reply to message #560459] Fri, 13 July 2012 02:16 Go to previous messageGo to next message
John Watson
Messages: 8962
Registered: January 2010
Location: Global Village
Senior Member
Welcome to the forum.

That was a nice answer, and I hope you'll give more - there are not enough people here who understand EBS. But I guess you didn't notice that the topic is rather old!

Regards, John.
Re: Create_update_trip API [message #560461 is a reply to message #560460] Fri, 13 July 2012 02:57 Go to previous message
sufyanelahi
Messages: 2
Registered: July 2012
Location: Pakistan
Junior Member
Thanks John, Shree's code here helped me test this API quickly. Since I tested it, I thought I might update the thread to with a reply.
By the way Shree's last question is a simple pl/sql question, thats 'How to pass assign values to record type variable'.

Regards
Sufyan
Previous Topic: Oracle Fusion Applications Project Plan
Next Topic: Journal lines R12(developer)
Goto Forum:
  


Current Time: Mon Dec 23 04:37:56 CST 2024