Oracle Trading Community Architecture (TCA)

Oracle Trading Community Architecture (TCA) is a data model that allows you to manage complex information about the parties, or customers, who belong to your commercial community, including organizations, locations, and the network of hierarchical relationships among them using the TCA registry.

TCA registry is the single source of trading community information for Oracle E-Business Suite applications which provide user interfaces, batch data entry functionality, and other features to view, create, and update Registry information.

TCA key entities:

Parties: Parties are the entities of type person/organization that enter into a business relationship

Party Sites: Addresses of the parties

Customers: Parties with whom you have a selling relationship

Customer Accounts: The business relationships between you and your customers

Customer Account Sites: Address of the party used in the case of customer accounts

Locations: Geo-spatial points, usually defined by an address

Contacts: People who have a contact or employment relationship with an organization or person

TCA ER-Diagram:

Related posts:

Debugging Shipping API’s:

Debugging Shipping API:

In some cases the API’s may not be successful might be because of setup issues or code issues.
In such cases calling the shipping debugger package(WHS_DEBUG_SV) in the wrapper file will result in the creation of a detailed debug log file based on the various debug profiles setup for shipping module .
The steps given below will show the step by step approach to generate debug log file during the call to Shipping Public API’s.

Add the following lines into the Wrapper file before making a call to the shipping:

PgSQL

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

DECLARE

--DEBUG Messages required Parameters

vFileNameVARCHAR2(4000);

vReturnStatusVARCHAR2(100);

vMsgDataVARCHAR2(32767);

vMsgCountNUMBER;

-- Handle exceptions

vApiErrorExceptionEXCEPTION;

BEGIN

-- Initialize return status

x_return_status:=WSH_UTIL_CORE.G_RET_STS_SUCCESS;

/*

Add below code to to call the default shipping wrapper

*/

fnd_profile.put('WSH_DEBUG_MODULE','%');

fnd_profile.put('WSH_DEBUG_LEVEL',WSH_DEBUG_SV.C_STMT_LEVEL);

WSH_DEBUG_SV.START_DEBUGGER(vFileName,

vReturnStatus,

vMsgData,

vMsgCount

);

Sample API Code with Debug ON:

PgSQL

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

DECLARE

--Standard Parameters.

p_api_versionNUMBER;

p_init_msg_listVARCHAR2(30);

p_commitVARCHAR2(30);

--Parameters for WSH_DELIVERIES_PUB.Delivery_Action.

p_action_codeVARCHAR2(15);

p_delivery_idNUMBER;

p_delivery_nameVARCHAR2(30);

p_asg_trip_idNUMBER;

p_asg_trip_nameVARCHAR2(30);

p_asg_pickup_stop_idNUMBER;

p_asg_pickup_loc_idNUMBER;

p_asg_pickup_loc_codeVARCHAR2(30);

p_asg_pickup_arr_dateDATE;

p_asg_pickup_dep_dateDATE;

p_asg_dropoff_stop_idNUMBER;

p_asg_dropoff_loc_idNUMBER;

p_asg_dropoff_loc_codeVARCHAR2(30);

p_asg_dropoff_arr_dateDATE;

p_asg_dropoff_dep_dateDATE;

p_sc_action_flagVARCHAR2(10);

p_sc_close_trip_flagVARCHAR2(10);

p_sc_create_bol_flagVARCHAR2(10);

p_sc_stage_del_flagVARCHAR2(10);

p_sc_trip_ship_methodVARCHAR2(30);

p_sc_actual_dep_dateVARCHAR2(30);

p_sc_report_set_idNUMBER;

p_sc_report_set_nameVARCHAR2(60);

p_wv_override_flagVARCHAR2(10);

p_sc_defer_interface_flagVARCHAR2(1);

x_trip_idVARCHAR2(30);

x_trip_nameVARCHAR2(30);

--out parameters

x_return_statusVARCHAR2(10);

x_msg_countNUMBER;

x_msg_dataVARCHAR2(2000);

x_msg_detailsVARCHAR2(3000);

x_msg_summaryVARCHAR2(3000);

--DEBUG Messages required Parameters

vFileNameVARCHAR2(4000);

vReturnStatusVARCHAR2(100);

vMsgDataVARCHAR2(32767);

vMsgCountNUMBER;

-- Handle exceptions

vApiErrorExceptionEXCEPTION;

BEGIN

-- Initialize return status

x_return_status:=WSH_UTIL_CORE.G_RET_STS_SUCCESS;

/*

Add below code to to call the default shipping wrapper

*/

fnd_profile.put('WSH_DEBUG_MODULE','%');

fnd_profile.put('WSH_DEBUG_LEVEL',WSH_DEBUG_SV.C_STMT_LEVEL);

WSH_DEBUG_SV.START_DEBUGGER(vFileName,

vReturnStatus,

vMsgData,

vMsgCount

);

-- Call this procedure to initialize applications parameters

FND_GLOBAL.APPS_INITIALIZE(

user_id=>1318

,resp_id=>21623

,resp_appl_id=>660);

-- Values for Ship Confirming the delivery

p_action_code:='CONFIRM';-- The action code for ship confirm

p_delivery_id:=41012;-- The delivery that needs to be confirmed

p_sc_action_flag:='S';-- Ship entered quantity.

p_sc_close_trip_flag:='Y';-- Close the trip after ship confirm

p_sc_trip_ship_method:='DHL';-- The ship method code

p_sc_defer_interface_flag:='N';

-- Call to WSH_DELIVERIES_PUB.Delivery_Action.

WSH_DELIVERIES_PUB.Delivery_Action(

p_api_version_number=>1.0,

p_init_msg_list=>p_init_msg_list,

x_return_status=>x_return_status,

x_msg_count=>x_msg_count,

x_msg_data=>x_msg_data,

p_action_code=>p_action_code,

p_delivery_id=>p_delivery_id,

p_delivery_name=>p_delivery_name,

p_asg_trip_id=>p_asg_trip_id,

p_asg_trip_name=>p_asg_trip_name,

p_asg_pickup_stop_id=>p_asg_pickup_stop_id,

p_asg_pickup_loc_id=>p_asg_pickup_loc_id,

p_asg_pickup_loc_code=>p_asg_pickup_loc_code,

p_asg_pickup_arr_date=>p_asg_pickup_arr_date,

p_asg_pickup_dep_date=>p_asg_pickup_dep_date,

p_asg_dropoff_stop_id=>p_asg_dropoff_stop_id,

p_asg_dropoff_loc_id=>p_asg_dropoff_loc_id,

p_asg_dropoff_loc_code=>p_asg_dropoff_loc_code,

p_asg_dropoff_arr_date=>p_asg_dropoff_arr_date,

p_asg_dropoff_dep_date=>p_asg_dropoff_dep_date,

p_sc_action_flag=>p_sc_action_flag,

p_sc_close_trip_flag=>p_sc_close_trip_flag,

p_sc_create_bol_flag=>p_sc_create_bol_flag,

p_sc_stage_del_flag=>p_sc_stage_del_flag,

p_sc_trip_ship_method=>p_sc_trip_ship_method,

p_sc_actual_dep_date=>p_sc_actual_dep_date,

p_sc_report_set_id=>p_sc_report_set_id,

p_sc_report_set_name=>p_sc_report_set_name,

p_wv_override_flag=>p_wv_override_flag,

p_sc_defer_interface_flag=>p_sc_defer_interface_flag,

x_trip_id=>x_trip_id,

x_trip_name=>x_trip_name);

IF(x_return_status<>WSH_UTIL_CORE.G_RET_STS_SUCCESS)

THEN

RAISEvApiErrorException;

ELSE

dbms_output.put_line('The confirm action on the delivery '||p_delivery_id||' is successful');