Error log table and output type
Hi All,
While creating an invoice(while saving billing document) is it poosible to capture the error in a log in table?
And how is this error log table related to the output type?
Thanks
You seem to be confusing saving of the billing document with creation of the output. These are two independent updates (LUWs). A document may be saved without any output.
If there are any errors in the billing document creation, the document just won't be created. Such errors should be captured in the log of the Blling Due list, if it's been run properly.
To update the processing log for the output, use FM NAST_PROTOCOL_UPDATE.
Similar Messages
-
I am supposed to insert the records that are not uploaded to the main table into a error log table and email the users about the error records that was not inserted into the table. How am is supposed to do it ?
I have few more questions.
What is the best way to upload the data from a file .
1, I got to either do the batch processing or
2, I got to browse and uplaod the file thru the APEX application and
and insert the records.
I want to know about which tutorial could be the best to read to do the
about 2 methods and how do i create and insert records into the error log
table and send the user with the CSv or txt file that contains the error records in both the methods ?
Will following the below method be the right way for 2nd method ?
http://oraexplorer.blogspot.com/2007/11/apex-to-upload-text-file-and-write-into.htmlOk,
I am trying to insert the records to an existing table from CSV file.
I am using the below post to do so..
Re: File Browse, File Upload
I get some errors executing the htmldb tools package.
Error at line 27: PLS-00103: Encountered the symbol "/"
create or replace PACKAGE htmldb_tools
AS
-- Utility functions --{{{
PROCEDURE parse_textarea ( --{{{
-- Parse a HTML textarea element into the specified HTML DB collection
-- The c001 element from the collection is used
-- The parser splits the text into tokens delimited by newlines, spaces
-- and commas
p_textarea IN VARCHAR2,
p_collection_name IN VARCHAR2
PROCEDURE parse_file( --{{{
-- Generic procedure to parse an uploaded CSV file into the
-- specified collection. The first line in the file is expected
-- to contain the column headings, these are set in session state
-- for the specified headings item.
p_file_name IN VARCHAR2,
p_collection_name IN VARCHAR2,
p_headings_item IN VARCHAR2,
p_columns_item IN VARCHAR2,
p_ddl_item IN VARCHAR2,
p_table_name IN VARCHAR2 DEFAULT NULL
END htmldb_tools;
create or replace PACKAGE BODY htmldb_tools
AS
TYPE varchar2_t IS TABLE OF VARCHAR2(32767) INDEX BY binary_integer;
-- Private functions --{{{
PROCEDURE delete_collection ( --{{{
-- Delete the collection if it exists
p_collection_name IN VARCHAR2
IS
BEGIN
IF (htmldb_collection.collection_exists(p_collection_name))
THEN
htmldb_collection.delete_collection(p_collection_name);
END IF;
END delete_collection; --}}}
PROCEDURE csv_to_array ( --{{{
-- Utility to take a CSV string, parse it into a PL/SQL table
-- Note that it takes care of some elements optionally enclosed
-- by double-quotes.
p_csv_string IN VARCHAR2,
p_array OUT wwv_flow_global.vc_arr2,
p_separator IN VARCHAR2 := ','
IS
l_start_separator PLS_INTEGER := 0;
l_stop_separator PLS_INTEGER := 0;
l_length PLS_INTEGER := 0;
l_idx BINARY_INTEGER := 0;
l_quote_enclosed BOOLEAN := FALSE;
l_offset PLS_INTEGER := 1;
BEGIN
l_length := NVL(LENGTH(p_csv_string),0);
IF (l_length <= 0)
THEN
RETURN;
END IF;
LOOP
l_idx := l_idx + 1;
l_quote_enclosed := FALSE;
IF SUBSTR(p_csv_string, l_start_separator + 1, 1) = '"'
THEN
l_quote_enclosed := TRUE;
l_offset := 2;
l_stop_separator := INSTR(p_csv_string, '"', l_start_separator + l_offset, 1);
ELSE
l_offset := 1;
l_stop_separator := INSTR(p_csv_string, p_separator, l_start_separator + l_offset, 1);
END IF;
IF l_stop_separator = 0
THEN
l_stop_separator := l_length + 1;
END IF;
p_array(l_idx) := (SUBSTR(p_csv_string, l_start_separator + l_offset,(l_stop_separator - l_start_separator - l_offset)));
EXIT WHEN l_stop_separator >= l_length;
IF l_quote_enclosed
THEN
l_stop_separator := l_stop_separator + 1;
END IF;
l_start_separator := l_stop_separator;
END LOOP;
END csv_to_array; --}}}
PROCEDURE get_records(p_blob IN blob,p_records OUT varchar2_t) --{{{
IS
l_record_separator VARCHAR2(2) := chr(13)||chr(10);
l_last INTEGER;
l_current INTEGER;
BEGIN
-- Sigh, stupid DOS/Unix newline stuff. If HTMLDB has generated the file,
-- it will be a Unix text file. If user has manually created the file, it
-- will have DOS newlines.
-- If the file has a DOS newline (cr+lf), use that
-- If the file does not have a DOS newline, use a Unix newline (lf)
IF (NVL(dbms_lob.instr(p_blob,utl_raw.cast_to_raw(l_record_separator),1,1),0)=0)
THEN
l_record_separator := chr(10);
END IF;
l_last := 1;
LOOP
l_current := dbms_lob.instr( p_blob, utl_raw.cast_to_raw(l_record_separator), l_last, 1 );
EXIT WHEN (nvl(l_current,0) = 0);
p_records(p_records.count+1) := utl_raw.cast_to_varchar2(dbms_lob.substr(p_blob,l_current-l_last,l_last));
l_last := l_current+length(l_record_separator);
END LOOP;
END get_records; --}}}
-- Utility functions --{{{
PROCEDURE parse_textarea ( --{{{
p_textarea IN VARCHAR2,
p_collection_name IN VARCHAR2
IS
l_index INTEGER;
l_string VARCHAR2(32767) := TRANSLATE(p_textarea,chr(10)||chr(13)||' ,','@@@@');
l_element VARCHAR2(100);
BEGIN
l_string := l_string||'@';
htmldb_collection.create_or_truncate_collection(p_collection_name);
LOOP
l_index := instr(l_string,'@');
EXIT WHEN NVL(l_index,0)=0;
l_element := substr(l_string,1,l_index-1);
IF (trim(l_element) IS NOT NULL)
THEN
htmldb_collection.add_member(p_collection_name,l_element);
END IF;
l_string := substr(l_string,l_index+1);
END LOOP;
END parse_textarea; --}}}
PROCEDURE parse_file( --{{{
p_file_name IN VARCHAR2,
p_collection_name IN VARCHAR2,
p_headings_item IN VARCHAR2,
p_columns_item IN VARCHAR2,
p_ddl_item IN VARCHAR2,
p_table_name IN VARCHAR2 DEFAULT NULL
IS
l_blob blob;
l_records varchar2_t;
l_record wwv_flow_global.vc_arr2;
l_datatypes wwv_flow_global.vc_arr2;
l_headings VARCHAR2(4000);
l_columns VARCHAR2(4000);
l_seq_id NUMBER;
l_num_columns INTEGER;
l_ddl VARCHAR2(4000);
BEGIN
IF (p_table_name is not null)
THEN
BEGIN
execute immediate 'drop table '||p_table_name;
EXCEPTION
WHEN OTHERS THEN NULL;
END;
l_ddl := 'create table '||p_table_name||' '||v(p_ddl_item);
htmldb_util.set_session_state('P149_DEBUG',l_ddl);
execute immediate l_ddl;
l_ddl := 'insert into '||p_table_name||' '||
'select '||v(p_columns_item)||' '||
'from htmldb_collections '||
'where seq_id > 1 and collection_name='''||p_collection_name||'''';
htmldb_util.set_session_state('P149_DEBUG',v('P149_DEBUG')||'/'||l_ddl);
execute immediate l_ddl;
RETURN;
END IF;
BEGIN
select blob_content into l_blob from wwv_flow_files
where name=p_file_name;
EXCEPTION
WHEN NO_DATA_FOUND THEN
raise_application_error(-20000,'File not found, id='||p_file_name);
END;
get_records(l_blob,l_records);
IF (l_records.count < 3)
THEN
raise_application_error(-20000,'File must have at least 3 ROWS, id='||p_file_name);
END IF;
-- Initialize collection
htmldb_collection.create_or_truncate_collection(p_collection_name);
-- Get column headings and datatypes
csv_to_array(l_records(1),l_record);
csv_to_array(l_records(2),l_datatypes);
l_num_columns := l_record.count;
if (l_num_columns > 50) then
raise_application_error(-20000,'Max. of 50 columns allowed, id='||p_file_name);
end if;
-- Get column headings and names
FOR i IN 1..l_record.count
LOOP
l_headings := l_headings||':'||l_record(i);
l_columns := l_columns||',c'||lpad(i,3,'0');
END LOOP;
l_headings := ltrim(l_headings,':');
l_columns := ltrim(l_columns,',');
htmldb_util.set_session_state(p_headings_item,l_headings);
htmldb_util.set_session_state(p_columns_item,l_columns);
-- Get datatypes
FOR i IN 1..l_record.count
LOOP
l_ddl := l_ddl||','||l_record(i)||' '||l_datatypes(i);
END LOOP;
l_ddl := '('||ltrim(l_ddl,',')||')';
htmldb_util.set_session_state(p_ddl_item,l_ddl);
-- Save data into specified collection
FOR i IN 2..l_records.count
LOOP
csv_to_array(l_records(i),l_record);
l_seq_id := htmldb_collection.add_member(p_collection_name,'dummy');
FOR i IN 1..l_record.count
LOOP
htmldb_collection.update_member_attribute(
p_collection_name=> p_collection_name,
p_seq => l_seq_id,
p_attr_number => i,
p_attr_value => l_record(i)
END LOOP;
END LOOP;
DELETE FROM wwv_flow_files WHERE name=p_file_name;
END;
BEGIN
NULL;
END;
/ -
How to add an error message to an Output Type.
Hello SAPients,
Using a User Exit I'm modifying the segments of an outbound IDoc. When certain conditions apply I trigger an exception
RAISE DATA_NOT_RELEVANT_FOR_SENDING.
It's ok because the IDoc is not generated and the Output Type is set to "Incorrectly Processed" status.
But, when the user clicks the "Processing Log" button there is no informatio of the error occurred. How can I add an error message to the Processing Log of the Output Type?
Thanks in advance for your kind help.Hi,
Try this statement..
MESSAGE ID sy-msgid << Your msg class
TYPE sy-msgty << Your message type
NUMBER sy-msgno << Your msg no.
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 << Other info
RAISING data_not_relevant_for_sending.
Regards,
Joy. -
Hi,
In Oracle 10g , maybe in older version too, there is the capability to create an error log table using the dbms_errlog package and create_error_log procedure...
For exaample:
exec dbms_errlog.create_error_log('EMP','EMP_ERROR')
How to find afterwards that the table EMP has a related table EMP_ERROR where errors during the inserts/updates on table EMP are registered...?????
Of course the column names in EMP_ERROR table are the same as in EMP .... but it's time consuming method to search like this way...!!!!!
SQL> exec dbms_errlog.create_error_log('EMP','EMP_ERROR');
PL/SQL procedure successfully completed
SQL> DESC EMP_ERROR;
Name Type Nullable Default Comments
ORA_ERR_NUMBER$ NUMBER Y
ORA_ERR_MESG$ VARCHAR2(2000) Y
ORA_ERR_ROWID$ UROWID(4000) Y
ORA_ERR_OPTYP$ VARCHAR2(2) Y
ORA_ERR_TAG$ VARCHAR2(2000) Y
EMPNO VARCHAR2(4000) Y
ENAME VARCHAR2(4000) Y
JOB VARCHAR2(4000) Y
MGR VARCHAR2(4000) Y
HIREDATE VARCHAR2(4000) Y
SAL VARCHAR2(4000) Y
COMM VARCHAR2(4000) Y
DEPTNO VARCHAR2(4000) Y
SQL> DESC EMP;
Name Type Nullable Default Comments
EMPNO NUMBER(4)
ENAME VARCHAR2(10) Y
JOB VARCHAR2(9) Y
MGR NUMBER(4) Y
HIREDATE DATE Y
SAL NUMBER(7,2) Y
COMM NUMBER(7,2) Y
DEPTNO NUMBER(2) Y Thanks...
Simexec dbms_errlog.create_error_log('EMP','EMP_ERROR')
How to find afterwards that the table EMP has a related table EMP_ERROR
System@Elic10> create table bla_bla (i int);
Table created.
System@Elic10> exec dbms_errlog.create_error_log('BLA_BLA', 'BLA_BLA_ERRS')
PL/SQL procedure successfully completed.
System@Elic10> select * from user_tab_comments where table_name = 'BLA_BLA_ERRS';
TABLE_NAME TABLE_TYPE COMMENTS
BLA_BLA_ERRS TABLE DML Error Logging table for "BLA_BLA" -
DML Error logging table in Set base mode
Hi all,
In ETL data errors can be handled thru error logging table. Like this example given in the document-
INSERT /*+ APPEND PARALLEL */
INTO sales SELECT product_id, customer_id, TRUNC(sales_date), 3,
promotion_id, quantity, amount
FROM sales_activity_direct
LOG ERRORS INTO sales_activity_errors('load_20040802')
REJECT LIMIT UNLIMITED
In this example bulk loading is possible even in the presence of errors. The data errors will go in table 'Sales_activity_errors'.
I want to generate this kind of coding in OWB in set base mode. For that i have to create a error logging table in target schema. How can I reference this table in a mapping? can it be done by shadow table? It's a very important feature in ETL for bulk loading. Is it available in OWB in set based mode?
Guyzz please check this out and help me..
Regards,
SumantaHi,
I am not sure if the DML error logging method is avaliable to be used in OWB 10g R2. You can use the data rule method. Create the data rules on the target table. Deploy it from OWB. Create your mappings and then execute them. Two insert statements will be generated. One for loading the target table for loading records where no rules are violated. The other for loading the <target table>_ERR for loading records where one or more error rules are violated.
Both these statements do a bulk loading. So your purpose will be solved.
Again you can use the splitter method that has already been mentioned.
Regards
-AP -
DML Error Logging Tables?
How can I use DML Error Logging Tables with OWB10gR2 (in tab-definition and mappings)?
btw: what really is a shadow-table?Hi,
What you can do to solve this is to add a Pre-mapping to your mapping which calls a procedure that alters the constraint on the target table in which you use the "EXCEPTIONS INTO <error_table> " clause.
like:
PROCEDURE "ENABLE_CONSTR_WITH_EXCEPTIONS"("P_TABLE" IN VARCHAR2, "P_CONSTRAINT" IN VARCHAR2) IS
v_table varchar2(30) := p_table;
v_constraint varchar2(30) := p_constraint;
v_command varchar2(200);
e_CannotValidate exception;
PRAGMA EXCEPTION_INIT(e_CannotValidate, -2437);
-- main body
BEGIN
/* Enable Constraint and write error into exception table */
BEGIN
v_command := 'ALTER TABLE ' || v_table || ' ENABLE CONSTRAINT '|| v_constraint ||' EXCEPTIONS INTO exceptions';
execute immediate (v_command);
commit;
END;
EXCEPTION
WHEN e_CannotValidate THEN
-- In my case when Unique Constraints are violated I will delete the duplicates.
DELETE_DUPLICATES(v_table, v_constraint);
WHEN OTHERS THEN
NULL; -- enter any exception code here
END;
-- End of ENABLE_CONSTR_WITH_EXCEPTIONS;Greetz,
Ilona Tielke -
Error log table how to track the run details
Hi ,
I am using the log errors concept in oracle and recording the errors.
My table is employees and I used the
be low script to create the error log tables.
BEGIN
DBMS_ERRLOG.create_error_log (dml_table_name => 'employees');
END;
It has created a table called err$_employees;
I have run the procedure and the procedure has inserted some records into the table for unique constraint error .
but when i rerun the same job , again it has inserted the same records whcih has created a proble now .
How will i figure out that which records are from the first runa dn which are from the second run?
Also i want to fail my job based on entried in the error log table i created.
Is it possible to track whats records belong to what instance in error log table.
hope i am clear abt the requirement i'm looking for ?
thanks
sriIf you look at the documentation you will see you can tag records that are inserted in the error log table e.g.
insert into employees
select ...
from ...
where ...
log errors into err$_employees('My Run Identifier')
You need to construct the string used as a tag so you can identify your individual runs. -
Dear All
Pl help me.
I have a very peculiar situation.
For a particular order type, the billing document printout should show the discount for that order type only when the discount is manually entered during sales order creation. A condition type has already been created in the pricing procedure for the order typr for manual entry. But the problem is with the printing of invoice. At present the discount does not appear on the print preview of the billing document and the billing document has its own output type. where should i validate for that output type. In which standard table can i get the relation between a sales document or a billing document and output type.Hi,
Just check in copy controls VTFA, select Source and Target Document Type, click on item (LHS of screen), choose relevant item category and see in "Pricing type" what you have assigned. Whwenver prices are redetermined, manaul conditions entered in previous document will not taken back. So choose "Copy manual pricing...." option in this.
Hope I've understood your question and duly answered it.
Reward points, if so
Regards
SD -
Pass these documents a object ID, application and output type..plz help
Hi frnds,
To select all the billing documents from from the document flow table i have
this peice of code----
SELECT VBELN FROM VBFA INTO CORRESPONDING FIELDS OF TABLE IT_VBFA
FOR ALL ENTRIES IN ITAB_VBAK WHERE VBELN = ITAB_VBAK-VBELN
AND VBTYP_N = 'C' OR VBTYP_N = 'G'.
i want to ---Pad two zerou2019s before the document and pass these documents a object ID,
application and output type.
Get the object ID, processing status for each billing document number and
display in the pop up window for the user.
i hope to use in NAST TABLE.
how to code this...
thnx
daniel
<LOCKED BY MODERATOR - URGENT, PLEASE HELP OR SIMILAR ARE FORBIDDEN>
Edited by: Alvaro Tejada Galindo on Aug 18, 2008 1:14 PMUse
declare the field b_vbeln of length u want adding length for 2 '0' also.
ex:- Vbeln length = 10
b_vbeln type i length 12.
b_vbeln = vbeln.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = b_vbeln
IMPORTING
OUTPUT = b_vbeln.
U will get b_vbeln with 2 '0' or always the value be of 12 length. -
How to know the printprogram and output type for perticular standard script
how to know the print program and output type for perticular standard script and wt the proceure we will fallow to modifie the standard script..if possible u have any sample code plz share with me.....
Hi Phani,
To know the print program and output type for a standard script we have a table called TNAPR. So just you go to SE11 and provide the table name as TNAPR and choose display option.Then go with display entries option and in selection screen you have to provide the form name for whic you want to know the print program and output type.
To modify a standard script first of all you have to copy the standard form for which you need modifications into Zform. Once you done this you can modify the layout set as per your requirement.Then what ever the modifications you have done in layout set for that you need to populate the data.For this you also need to do some modifications to the print program.so you have to options like directly you can modify the print program as per your requirement and other one is you can create a subroutine and do coding in that subroutine. Then you need call this subroutine in the Script Form.like this you can do modifications to the standard script........................... Reward me if its helpful..........
Thanks & Regards.
Laxman.P
B'lore. -
Printing messages in Log File and Output File using Dbms_output.put_line
Hi,
I have a requirement of printing messages in log file and output file using dbms_output.put_line instead of fnd_file.put_line API.
Please let me know how can I achieve this.
I tried using a function to print messages and calling that function in my main package where ever there is fnd_file.put_line. But this approach is not required by the business.
So let me know how I can achieve this functionality.
Regards
SandyWhat is the requirement that doesn't allow you using fnd_file.put_line?
Please see the following links.
https://forums.oracle.com/forums/search.jspa?threadID=&q=Dbms_output.put_line+AND+Log+AND+messages&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
https://forums.oracle.com/forums/search.jspa?threadID=&q=%22dbms_output.put_line+%22+AND+concurrent&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
Output determination and output type?
hi all,
wat is meant by output determination and output type?how and y we use it?
regards,
keerthiHi Keerthi,
Output determination is used in message control. You can read more about it here:
http://help.sap.com/saphelp_nw04/helpdata/en/c8/19878343b111d1896f0000e8322d00/frameset.htm
to configure it please use transaction: NACE
best,
Wojciech
<i>please reward points for helpfull answer</i> -
SQL PLUS log input and output to file
What is the way to log every activity in sqlplus, input and output to a file (interactively).
I managed to do it using rlwrap and tee but the only problem is, it is displaying the password and logging it into file as well :D. I can remove it from the logfile but am unable to prevent from showing the password.
I hope many might have wanted to do this, and some might have been succeeded. Please share your ideas!N:\tools>sqlplus siva
SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 19 03:12:04 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password: password
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining optionsThe password is displayed on screen and it is in the log file as well.
Here is the some environmental setup;
I've installed cygwin with rlwrap package
I've renamed the original sqlplus.exe to _sqlplus.exe
I've placed mysqlplus.bat and sqlplus.bat in N:\tools and this location includes in the pathwhere sqlplus.bat contains
@echo off
rlwrap -a"Enter" mysqlplus.bat %*perhaps this is more related to linux commands but I want to log input and output of sqlplus!
:) -
Data types used in a sub VI - selecting the correct input and output types?
data types used in a sub VI - selecting the correct input and output types?
I can never work out how to choose an input or output format for Subvi's.
I want to create a SubVI for the code in red. I needs an VI Server Reference compatible input and an output that goes to a waveform.
Thanks in advance.
Attachments:
data types.PNG 11 KBGerdW,
I realise now I have taken us in the wrong direction. apologies for that.
History, this is not my code and I do not own the process and NOT my preferred method of using it. I was looking for a simple way to make subtle changes.
What we do - We use these programs to collect data from typically 6 pressures and 6 temperature probes and capture RS232 / USB VISA strings from sensors.
So every few weeks / months or up to a year we rearrange each sensor location to suit the new process. I did not write the code. I cannot change the procedure too much without resistance.
So headers in the CSV file have the DaqMX string passed through the code. Great.
Other data to the CSV file comes from calculations or extracted from the VISA string. Hence why we have headers with "Untitled 1 ()". These values also go to a History Chart.
So I was looking for a simple way to read the the local variable label as it is always linked to the front page indicator. People can cope with editing the indicator label, save the VI and hit run.
TL;DR - GerdW is now a psychologist.
Attachments:
data to csv and history chart.png 1043 KB -
Standard smartform for application V5-Groups. and Output type LL00.
Hi,
I want the name of standard smartform for application V5-Groups. and Output type LL00.
I need to print Ship to party address of Multiple Deliveries.
Can anyone tell me the standard form name and Print program name.
Regards,
RajenderHi Lavanya,
SD_LOADING_LIST is a script.
Can you please provide me with a standard smartform as we need to develop this in smartform only.
Thanks,
Rajender.
Maybe you are looking for
-
Not recognized by windows- very slow to charge
The other day my iphone 4 all the sudden couldnt connect to the computer via usb. - the closest thing to recognition it in "device manager" it thinks its an mass storage device with no found driver -I have tried varous cords and docks, but the batter
-
I bought convert PDF a few weeks ago and about 90% of the time I try to convert a PDF, no matter what the file is, an error message comes up and it does not covert for me. What is the problem here?
-
Hello Everyone! I'm in need of some help. My iphone's battery is draining amazingly fast and i'm trying to disable all the useless features, one of them being Airdrop. When I tap on it from the control center and then on "off" it does nothing, aidrop
-
Migrate Collections from CS6/Windows XP to CC/Windows 7
Hi, How do I migrate Collections from CS6 in Windows XP to CC on Windows 7? I found the path in XP, C:\Documents and Settings\User\Application Data\Adobe\Bridge CS6\Collections, but where do I move them to in Windows 7? Thanks in advance! Steve
-
Performance Issues - Stupid Question!?!
Below are the specs on my Mac Book. My question is regarding the speed of our Mac. When initially booting up the Mac to use it it can take anywhere from 60 to 95 seconds. When logging on to the internet Safari can take 30 to 45 seconds to completely