Skip to Main Content

E-Business Suite

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

using API wsh_trip_stops_pub.create_update_stop create stop returns an error

Sun XiaopengJul 14 2020

code:

DECLARE

  p_stop_info                    WSH_TRIP_STOPS_PUB.TRIP_STOP_PUB_REC_TYPE;

  p_api_version_number           NUMBER;

  p_init_msg_list                VARCHAR2(20) := FND_API.G_TRUE;

  p_action_code                  VARCHAR2(20);

  p_trip_id                      wsh_trips.trip_id%TYPE;

  p_trip_name                    VARCHAR2(50);

  p_stop_location_id             NUMBER;

  p_stop_location_code           VARCHAR2(60);

  p_planned_dep_date             DATE;

  x_return_status                VARCHAR2(2000);

  x_msg_count                    NUMBER;

  x_msg_data                     VARCHAR2(2000);

  x_stop_id                      NUMBER;

BEGIN

  p_api_version_number                 :=    '1.0';

  p_action_code                        :=    'CREATE';

  p_trip_id                            :=    78423;

  p_trip_name                          :=    'demo2';

  p_planned_dep_date                   :=    SYSDATE+1;

  p_stop_info.trip_id                  :=    78423;

  p_stop_info.stop_location_id         :=    1264;

  p_stop_info.planned_arrival_date     :=    SYSDATE+1;

  p_stop_info.planned_departure_date   :=    SYSDATE+1;

  p_stop_info.weight_uom_code          :=    'M3';

  p_stop_info.volume_uom_code          :=    'T';

 

 

  wsh_trip_stops_pub.create_update_stop

  (

     p_stop_info      =>  p_stop_info

    ,p_api_version_number     =>  p_api_version_number

    ,p_init_msg_list          =>  p_init_msg_list

    ,p_action_code            =>  p_action_code

    ,p_trip_id                =>  p_trip_id

    ,p_trip_name              =>  p_trip_name

    ,p_stop_location_id       =>  p_stop_location_id

    ,p_stop_location_code     =>  p_stop_location_code

    ,p_planned_dep_date       =>  p_planned_dep_date

    ,x_return_status          =>  x_return_status

    ,x_msg_count              =>  x_msg_count

    ,x_msg_data               =>  x_msg_data

    ,x_stop_id                =>  x_stop_id

  );

 

  dbms_output.put_line('Return Status = '||x_return_status);

  dbms_output.put_line('Trip Id       = '||TO_CHAR(p_trip_id));

  dbms_output.put_line('Stop ID       = '||TO_CHAR(x_stop_id));

  dbms_output.put_line('Msg Count     = '||TO_CHAR(x_msg_count));

  dbms_output.put_line(SUBSTR('x_msg_data = '||x_msg_data,1,255));

  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));

    END LOOP;

  END IF;

END;

output:

Return Status = E

Trip Id       = 78423

Stop ID       =

Msg Count     = 1

x_msg_data = WSH

any one know this issue?

Comments
Post Details
Added on Jul 14 2020
0 comments
214 views