54: /* Select the segment number, table name and constant to get the account */
55:
56: CURSOR c1 IS
57: SELECT segment, table_name, constant
58: FROM ra_account_default_segments
59: WHERE gl_default_id = X_gl_default_id;
60:
61: BEGIN
62: X_first_time := TRUE;
61: BEGIN
62: X_first_time := TRUE;
63: x_dyn_insert := 'N';
64:
65: /* Get the id to access RA_ACCOUNT_DEFAULT_SEGMENTS table */
66:
67: SELECT gl_default_id
68: INTO X_gl_default_id
69: FROM ra_account_defaults
72: /* Get number of segments to the transaction type */
73:
74: SELECT count(*)
75: INTO X_counter
76: FROM ra_account_default_segments
77: WHERE gl_default_id = X_gl_default_id;
78:
79: /* Get the account id to the Revene and Receivables tables
80: RA_CUST_TRX_TYPES e RA_SALESREPS AR_MEMO_LINES*/