15:
16:
17: procedure record_bad_query(x_statement in varchar2) is
18: remaining varchar2(2000) ;
19: leaving varchar2(500) ; -- must match length of WIP_INTERFACE_ERRORS.ERROR
20: begin
21: leaving := '' ;
22: remaining := x_statement ;
23:
30: leaving := substr(remaining,1,500) ;
31: remaining := substr(remaining,501) ;
32: end if ;
33:
34: insert into wip_interface_errors (
35: interface_id, error_type, creation_date, error
36: ) values (
37: -1, 1, sysdate, leaving
38: ) ;
108:
109: end if;
110:
111: -- Grab the message at the top of the Fnd_Message stack, truncating it
112: -- to 500 characters (the width of WIP_INTERFACE_ERRORS.ERROR) if necessary.
113: -- Store its text so that we can retrieve it with get_current_message().
114: wip_mass_load_utilities.set_current_message(substr(fnd_message.get,1,500)) ;
115:
116: /* Insert records into the Errors table if appropriate */
115:
116: /* Insert records into the Errors table if appropriate */
117:
118: x_statement := '
119: INSERT INTO WIP_INTERFACE_ERRORS (
120: INTERFACE_ID, ERROR_TYPE, ERROR,
121: LAST_UPDATE_DATE, LAST_UPDATED_BY, CREATION_DATE, CREATED_BY,
122: LAST_UPDATE_LOGIN
123: )