Create Address for Bank Branch API in Oracle Apps R12

DECLARE
p_location_rec    HZ_LOCATION_V2PUB.LOCATION_REC_TYPE;
x_location_id      NUMBER;
x_return_status VARCHAR2(2000);
x_msg_count       NUMBER;
x_msg_data         VARCHAR2(2000);

BEGIN
p_location_rec.country                      := ‘US’;
p_location_rec.address1                    := ‘Shareoracleapps’;
p_location_rec.city                              := ‘san Mateo’;
p_location_rec.postal_code               := ‘94401’;
p_location_rec.state                            := ‘CA’;
p_location_rec.created_by_module := ‘BO_API’;

HZ_LOCATION_V2PUB.CREATE_LOCATION
( — Input data elements
p_init_msg_list   => FND_API.G_TRUE,
p_location_rec   => p_location_rec,
— Output data elements
x_location_id     => x_location_id,
x_return_status => x_return_status,
x_msg_count      => x_msg_count,
x_msg_data        => x_msg_data
);

IF (x_return_status = fnd_api.g_ret_sts_success)
THEN
COMMIT;

dbms_output.put_line (‘Creation of Location is Successful ‘);
dbms_output.put_line (‘Location Id: ‘|| x_location_id);
ELSE
DBMS_OUTPUT.put_line (‘Creation of Location failed:’||x_msg_data);
ROLLBACK;

FOR i IN 1 .. x_msg_count
LOOP
x_msg_data := oe_msg_pub.get
( p_msg_index => i,
p_encoded => ‘F’
);

dbms_output.put_line ( i || ‘) ‘ || x_msg_data);
END LOOP;
END IF;

EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
dbms_output.put_line(SQLERRM);
END;
/

SHOW ERR;

Leave a Reply

Your email address will not be published. Required fields are marked *