Lately, I been working on a piece that should populate "Additional Delivery Information" DFF for "local" context (88) and was surprised to see that attributes hadn't been updated.
Methodology: Custom mobile EBS form updates WSH_NEW_DELIVERIES table attributes - corresponding Oracle API is being called by MWA classes via JDBC connection.
Issue: After API call relevant attributes updated ONLY for Global Data Elements context.
Reference Field for this DFF is ORG_ID, so naturally, while calling this API to allocate Attributes 12 & 13, I would expect them to be saved within "local" Context 88.
x_delivery_info apps.wsh_deliveries_pub.Delivery_Pub_Rec_Type;
select tt.name into l_delivery_name
from wsh_new_deliveries tt
where tt.delivery_id = to_number(p_delivery_id);
x_delivery_info.attribute12 := VALUE1;
x_delivery_info.attribute13 := VALUE2;
x_delivery_info.delivery_id := to_number(p_delivery_id);
x_delivery_info.NAME := l_delivery_name;
x_delivery_info.last_update_date := SYSDATE;
x_delivery_info.last_updated_by := fnd_global.user_id;
apps.WSH_DELIVERIES_PUB.CREATE_UPDATE_DELIVERY(
p_api_version_number => 1.0,
p_init_msg_list => l_init_msg_list,
x_return_status => xx_return_status,
x_msg_count => xx_msg_count,
x_msg_data => xx_msg_data,
p_action_code => 'UPDATE',
p_delivery_info => x_delivery_info,
x_delivery_id => x_delivery_number,
x_name => x_delivery_name);
I been working with Oracles APIs for quite some time and kinda, got used to the fact that ATTRIBUTE_CATEGORY update is "built in" (I been told its mater of the setup though).
Anyway, in this particular case YOU MUST provide the value to the record to have it working correctly:
x_delivery_info.attribute_category := fnd_profile.value('ORG_ID');
Hopefully 2 minutes of reading save you some time.
Take care,
No comments:
Post a Comment