Capture the error in PCR
PCR
When I try to capture error with FM BALW_BAPIRETURN_GET1 in add_values FM and check...
it is working fine..
But when I create a Custom FM inside CHECK FM....the same Error capturing Fm is not working
is there ane other way to capture error...
or Y is it happening lke tat??
I have found the Solution
Similar Messages
-
HI All Capturing the error records in an internal table
Hi All,
I am retrieving the data from application server .
My requirement is to :
Check if the Measurement Point Id provided in the file is a valid one or not. Query the table EUITRANS by passing the Measurement point Id in the EXT_UI field. If the query is successful, then proceed to next step. If not, log it in the error log with error message DM-001 and proceed with the next Measurement point id.
so i nee the code for capturing the error log with error message.
pls provide me ASAP.
Thanks&Regards,
BharatHi,
if you like do display all messages online have a look at FM:
'MESSAGES_INITIALIZE'
'MESSAGE_STORE'
'MESSAGES_SHOW'
If you want to write application log look at function group SBAL modules BAL_LOG*. There is also a good documentation in SAPDOCU..
Kind regards,
HP -
How to capture the error messages from incorrect session?
Hi SDNs.,
i am using BDC Session method to update transaction FB01. So my job runs daily. here i want to capture the error messages and i want to send it to mail. Can i capture the unprocessed records???
i think FM <b>SO_NEW_DOCUMENT_ATT_SEND_API1</b> used for sending mail? but how to capture mes or records?
or Is there any other way to Do it???
Thankning you.,
RamHi Ramakrishna,
Once you create the session, Process the session using
the report RSBDCSUB using submit statement.
It would list out the erroneous records.
Hence, while submitting, just say submit RSBDCSUB in background and export output list to memory.,
Then you can retrieve the list from memory using the FM LIST_FROM_MEMORY into the internal table and finally send the email by the fm you have already mentioned.
Regards,
Ravi -
The SDM interface runs in batch. A pop up message will not be useful.
If errors occur, they can NOT be re-sent manually the next day after the data issue is corrected. The extract needs to be changed to automatically try to resend those that are captured in the ERROR table and include them in the next day. The sales for those items will fall in the current day, but that is okay.If you are going to post your spec, then you might as well post all of it...
-
Capturing the error messages generated by ALV Grid
Hi,
I have a ALV Grid, and a field date of DATS type.
If i enter wrong date a message pops up with invalid date entry.
How can i capture this error message in ALV Grid.Hi,
Instead of displaying the error message directly, capture the message into a string variable and display it along with the grid display.
Thanks,
Sri. -
How to capture the errors, while processing the transformations
Hi,
i need to capture all errors, this includes invalid SQL text, short dumps related to SQL exaction etc.., while processing transformation.
I need to write code to fill error handling structures like(monitor table).
It sholud dynamically update the all errors to Monitor table, while processing the Transforamtions.
Please advice how to do this.
Thanks & Regards
MRKHi Rajani,
the code goes some this like this
RESULT = SOURCE_FIELDS-TXTMD5.
TRANSLATE RESULT TO UPPER CASE .
CONDENSE RESULT NO-GAPS .
READ TABLE I_SECTOR INTO I_SECTOR WITH KEY
PRODUCT = SOURCE_FIELDS-/BIC/Z_IPROD
ISTATATTR = RESULT .
IF SY-SUBRC NE 0 .
MONITOR_REC-MSGID = 'ZMESSAGE'.
MONITOR_REC-MSGTY = 'E'.
MONITOR_REC-MSGNO = '001'.
MONITOR_REC-MSGV1 = 'ERROR, SECTOR'.
MONITOR_REC-MSGV2 = SOURCE_FIELDS-TXTMD5 .
MONITOR_REC-MSGV3 = SOURCE_FIELDS-/BIC/Z_IPROD.
APPEND MONITOR_REC TO MONITOR.
RAISE EXCEPTION TYPE CX_RSROUT_ABORT.
ENDIF.
for this you need to create message class called ZMESSAGE in SE91 tcode
Hope this helps
PV -
Logic to capture the Error records
Hi All ,
I have one scenario like this ,one report program runs in R/3 system to fetch some data from BW system .
It uses Remote FM to do this .
The problem is the FM has got error table with error msgs , if there is any problem in fetching the data in R/3 system.
But when program is excuted it fails after returning to R/3 system with error msg in WHEN OTHERS and stops there itself
Instead it should proceed with other program codes and then
finally output the error records .There is already subroutine in the program to display the erros records in last. How do i do it programatically
CALL FUNCTION 'ZC_BW_FIREFIGHT' DESTINATION p_r3rfc
EXPORTING
mrp_planning_scenario = p_mrppln
error_indicator = p_info
IMPORTING
r3client = w_r3client
r3instance = w_r3instance
TABLES
materials = t_bwmat
plants = s_plant
firefighting = t_firefight1
error_msgs = t_r3_errors
EXCEPTIONS
no_material_data_found = 1
no_storage_loc_data = 2
proc_complete_no_rcds_found = 3
OTHERS = 4.
CASE sy-subrc.
WHEN 0.
PERFORM f4020_confirm_fm_executed.
WHEN 1.
MESSAGE e999 WITH
'R3: No material data found for materials/plants.'(049).
WHEN 2.
MESSAGE e999 WITH
'R3: No storage location data for materials/plants.'(050).
WHEN 3.
MESSAGE e999 WITH
'R3: ZC_BWFIREFIGHT processed, but no data found.'(051).
WHEN OTHERS.
MESSAGE e999 WITH
'R3: ZC_BWFIREFIGHT FM call to R3 failed'(052).
ENDCASE.
ENDIF .
ENDFORM. " f4010_call_zc_bwfirefight
<REMOVED BY MODERATOR>
Kumaran.C
Edited by: Alvaro Tejada Galindo on Feb 25, 2008 2:46 PMTry with the following method
DATA : bapireturn TYPE TABLE OF bapireturn WITH HEADER LINE.
CASE sy-subrc.
WHEN 0.
PERFORM f4020_confirm_fm_executed.
WHEN 1.
CALL FUNCTION 'BALW_BAPIRETURN_GET'
EXPORTING
type = 'E'
cl = <msgclass>
number = '049'
par1 = 'R3: No material data found for materials/plants.'
IMPORTING
bapireturn = bapireturn
EXCEPTIONS
only_2_char_for_message_id = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
APPEND bapireturn.
CLEAR bapireturn.
ENDIF.
WHEN 2.
" Do Simillarly
WHEN 3.
" Do Simillarly
WHEN OTHERS.
" Do Simillarly
ENDCASE. -
To capture the error after processing LOGON function
Dear friends
I want to capture the exception after the execution of the LOGON function. Scenario i need to capture is when the user account been locked, password expired and password will expire in N days.
I made the user account locked and password expired through backend.
In the when-button-pressed trigger I make a call to the procedure where the Logon function is coded
Function P_CONNECT (io_message IN OUT varchar2)
Account_locked EXCEPTION;
Password_expired EXCEPTION;
Password_will_expire EXCEPTION;
PRAGMA Exception_Init (Account_locked, -28000);
PRAGMA Exception_Init (Password_expired, -28001);
PRAGMA Exception_Init (Password_will_expire, -28002);
begin
begin
Logon( L_username,
L_string,
FALSE);
exception
when Account_locked then
io_message := 'acc_loc';
return FALSE;
end;
if form_success then
/* code with certain activities*/
end if
end;
During the execution of this procedure, i tried to capture the account_locked for example. I couldnt.
Then I created on_error trigger at the form level. I couldnt able to capture as well.
Also I need the form errorcode (FRM 4....) equvalent to -28000. -28001, -28002.
Or any other suggestions are welcome
Thanks
SadaHi,
I got struck with the similar case. i.e.., if the user enters the login details incorrectly or login details are not provided then I've used exec_sql package. This package is been used to check whether a connection can be established or not. If the connection cannot be established then I'll pop up a message saying that the login details are incorrect.
Though my case is different than that of yours, but i think that this will give u some idea to kick start to your solution.
Regards,
Alok Dubey -
BPM - Send Step to HTTP - How to capture the error?
Hi gurus,
I have a BPM with a Send Step that connects to an http server. I need the following:
- If the HTTP returns code 200, end the BPM
- If the HTTP returns another code, wait 5 minutos and try the send step again.
I've made a LOOP with a flag. Inside the LOOP I have a BLOCK with an exception branch.
In the send step I put in the field "system error" to go to the exception branch and in the exception branch i'm setting my flag to do the loop one more time.
My problem is that the Send Step is not triggering the exception branch! The http returns 405 or 504 and it continues like everything is okey.
Can you help with this?
Thanks in advance !
MD.Hi Ramakrishna,
Once you create the session, Process the session using
the report RSBDCSUB using submit statement.
It would list out the erroneous records.
Hence, while submitting, just say submit RSBDCSUB in background and export output list to memory.,
Then you can retrieve the list from memory using the FM LIST_FROM_MEMORY into the internal table and finally send the email by the fm you have already mentioned.
Regards,
Ravi -
How to capture Field validation errors in the Error table in ODI 11g
Hello,
We are using ODI 11g (11.1.1.5) and the scenario is to read the data from a flat file (.txt) and do a bulk insert into MS SQL Server database table.
We need to capture the error records (if the source field size is greater than the target column size) into the error table. However the interface errors out at step "Loading - SrcSet0 - Load data (BULK INSERT)" with error message "SQLServer JDBC Driver][SQLServer]Bulk load data conversion error (truncation) for row 33, column 6" but these errors are not being inserted into the error table.
Is there a way to capture these errors in the error table? Below is the KM details.
LKM: LKM File to MSSQL (BULK)
CKM: CKM SQL
IKM: IKM MSSQL Incremental Update
FLOW_CONTROL is set to true for the IKM.
Thanks,
KrishnaHello,
I had the same problem with ODI when I was trying BULK INSERT of the txt file into MS SQL. Check the cell(s) in your source file (txt) - it looks like the value in hte cell has hiding symbols: when pressing F2 tryng edit the value in the cell the coursor appared far to the right from the right end of the value. So, try to use backspace to delete the hiding symbols and verify the above. If avasrything is OK, then modify your txt file. Let me know if it works.
BTW , I've created procedure inside the MS SQL 2008R2, which BULK INSERTed records into temporary (#...) table and immediatelly, without any verification all the records were inserted into the final table in the DWH here is the statement:
if object_id('TEMPDB..#<table>','U') is not null drop table #<table>
CREATE TABLE [dbo].[#<table>]
[1] [varchar] (50) NULL,
[2] [varchar] (100) NULL,
[3] [varchar] (100) NULL,
[4] [varchar] (100) NULL,
[5] [varchar] (100) NULL,
[6] [varchar] (100) NULL,
[7] [varchar] (100) NULL,
[8] [varchar] (100) NULL,
[9] [varchar] (100) NULL,
[10] [varchar] (100) NULL,
[11] [varchar] (100) NULL
) ON [PRIMARY]
bulk INSERT #<table> FROM 'N:\<table>.txt'
with
(FIRSTROW=2,KEEPNULLS,CODEPAGE=1252,FIELDTERMINATOR='\t'
INSERT
INTO <table>
SELECT
* FROM #<table>
and it works! Let me also know if you find any other way around.
regards
Anatoli -
Capturing the communication channel monitoring error into an alert.
Hi,
The following is my scenario:
File adapter polls using file content conversion,if the source file is not in a proper format the file wont be picked up and communication channel will show error in channel monitoring.
I have to configure an alert for the same.
Can i capture the error message shown in communication channel monitoring and raise alert?
Many Thanks,
Pritishrefer todays thread on the same issue;
FILE ADAPTER ISSUE -
Capturing the details of data in which error occured during uploading
Hi, anyone tell me how to Capturing the details of data in which error occured during uploading the file using BDC in backgroung mode. Please do the needful
Thanks & Regards.
Aniruddhahi,
This declaration is used to capture the error msg. V is the std table that captures that.i have given a sample code with this..pls chk it out..
data: err type standard table of bdcmsgcoll with header line.
SAmple code:
report z_aru_bdc_new4
no standard page heading line-size 255.
include bdcrecx1.
Generated data section with specific formatting - DO NOT CHANGE ***
parameters: p_file like rlgrap-filename obligatory.
data: err type standard table of bdcmsgcoll with header line.
data: mess(200) type c.
data: begin of it_err occurs 0,
msg(200) type c,
end of it_err.
data: begin of record occurs 0,
data element:
viewname_001(030),
data element: VIM_LTD_NO
ltd_dta_no_002(001),
data element: ZEMPID3
zempid3_003(004),
data element: ZENAME3
zename3_008(040),
data element: ZEDEPID
zedepid_009(004),
data element:
zsalkey_010(005),
data element:
salary_011(013),
data element: ZENAME3
ZENAME3_008(040),
data element: ZEDEPID
ZEDEPID_009(004),
data element:
ZSALKEY_010(005),
data element:
SALARY_011(013),
end of record.
End generated data section ***
start-of-selection.
at selection-screen on value-request for p_file.
call function 'WS_FILENAME_GET'
exporting
DEF_FILENAME = ' '
DEF_PATH = ' '
mask = '.,..'
mode = 'O' " O -- open, S -- Save.
title = 'OPEN'
importing
filename = p_file
RC =
exceptions
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
others = 5.
start-of-selection.
call function 'UPLOAD'
exporting
CODEPAGE = ' '
filename = p_file
filetype = 'DAT'
ITEM = ' '
FILEMASK_MASK = ' '
FILEMASK_TEXT = ' '
FILETYPE_NO_CHANGE = ' '
FILEMASK_ALL = ' '
FILETYPE_NO_SHOW = ' '
LINE_EXIT = ' '
USER_FORM = ' '
USER_PROG = ' '
SILENT = 'S'
IMPORTING
FILESIZE =
CANCEL =
ACT_FILENAME =
ACT_FILETYPE =
tables
data_tab = record
exceptions
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
others = 7
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
*perform open_dataset using dataset.
*perform open_group.
delete record index 1.
loop at record.
*read dataset dataset into record.
*if sy-subrc <> 0. exit. endif.
perform bdc_dynpro using 'SAPMSVMA' '0100'.
perform bdc_field using 'BDC_CURSOR'
'VIEWNAME'.
perform bdc_field using 'BDC_OKCODE'
'=UPD'.
perform bdc_field using 'VIEWNAME'
record-viewname_001.
perform bdc_field using 'VIMDYNFLDS-LTD_DTA_NO'
record-ltd_dta_no_002.
perform bdc_dynpro using 'SAPLZSHAP' '0001'.
perform bdc_field using 'BDC_CURSOR'
'ZEMPTAB1-ZEMPID3(01)'.
perform bdc_field using 'BDC_OKCODE'
'=NEWL'.
perform bdc_dynpro using 'SAPLZSHAP' '0002'.
perform bdc_field using 'BDC_CURSOR'
'ZEMPTAB1-SALARY'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'ZEMPTAB1-ZEMPID3'
record-zempid3_003.
perform bdc_field using 'ZEMPTAB1-ZENAME3'
record-zename3_008.
perform bdc_field using 'ZEMPTAB1-ZEDEPID'
record-zedepid_009.
perform bdc_field using 'ZEMPTAB1-ZSALKEY'
record-zsalkey_010.
perform bdc_field using 'ZEMPTAB1-SALARY'
record-salary_011.
perform bdc_dynpro using 'SAPLZSHAP' '0002'.
perform bdc_field using 'BDC_CURSOR'
'ZEMPTAB1-ZENAME3'.
perform bdc_field using 'BDC_OKCODE'
'=UEBE'.
perform bdc_field using 'ZEMPTAB1-ZENAME3'
record-zename3_008.
perform bdc_field using 'ZEMPTAB1-ZEDEPID'
record-zedepid_009.
perform bdc_field using 'ZEMPTAB1-ZSALKEY'
record-zsalkey_010.
perform bdc_field using 'ZEMPTAB1-SALARY'
record-salary_011.
perform bdc_dynpro using 'SAPLZSHAP' '0001'.
perform bdc_field using 'BDC_CURSOR'
'ZEMPTAB1-ZEMPID3(01)'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_dynpro using 'SAPLZSHAP' '0001'.
perform bdc_field using 'BDC_CURSOR'
'ZEMPTAB1-ZEMPID3(01)'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_dynpro using 'SAPMSVMA' '0100'.
perform bdc_field using 'BDC_OKCODE'
'/EBACK'.
perform bdc_field using 'BDC_CURSOR'
'VIEWNAME'.
perform bdc_transaction using 'SM30'.
*enddo.
*perform close_group.
*perform close_dataset using dataset.
endloop.
loop at it_err.
write : / it_err-msg.
endloop.
form error.
call function 'FORMAT_MESSAGE'
exporting
id = sy-msgid
lang = '-D'
no = sy-msgno
v1 = sy-msgv1
v2 = sy-msgv2
v3 = sy-msgv3
v4 = sy-msgv4
importing
msg = mess
exceptions
not_found = 1
others = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
it_err-msg = mess.
append it_err.
clear it_err.
endform.
If it is session method u can find the session in SM35 from where u can get the error log.
Hope this helps u,
Regards,
Arunsri -
Write the Error log from background Job to the Spool request
Hi ,
I have a situation where in i need to capture the error log of a Z program which runs as a background job and write that log into the spool request. My Z program calls runs RSEINB00 program using the SUBMIT statement. When this Job fails the error log can be seen in SM37. But i need this error log to be sent in to a spool.
I can read the error log using the BP_JOBLOG_READ FM and can also create a spool using the RSPO_SPOOL_OPEN FM.
The problem is, when the Submit statement executes, due to internal valdation in the RSEINB00 program the program terminates. Due to this it is not able to perform the SY-SUBRC Check and thus doesn't read the log.
Can anybody suggest me how to overcome this problem. I am attaching the code for your refernece.
SUBMIT RSEINB00
USING SELECTION-SET 'TEST2'
TO SAP-SPOOL
LIST NAME 'LOCL'
IMMEDIATELY space
KEEP IN SPOOL 'X'
AND RETURN.
<b>If sy-subrc <> 0.</b>
CALL FUNCTION 'BP_JOBLOG_READ'
EXPORTING
CLIENT = SY-MANDT
JOBCOUNT = i_tbtco-jobcount
JOBLOG = i_tbtco-joblog
JOBNAME = i_tbtco-jobname
TABLES
JOBLOGTBL = l_joblog
IF SY-SUBRC <> 0.
else.
message i002 with l_joblog-msgv1.
ENDIF.
<b>
ENDIF.</b>
Rgds,
Kewal
P.S. : any other approach to solve this problem will be appreciated too and the points will be rewarded suitably.If I select a job in SM37 and I click on "spool" I get a list with separate spool entries for each of the steps, e. g.
Programmname/Kommand Programmtyp Spoolliste
Z_MM_STAT_UPDATE_WERK ABAP 1707445
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_WERK ABAP 1707459
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_MARA ABAP 1721423
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_WERK ABAP 1721437
Z_MM_STAT_UPDATE_MARA ABAP 1721446
Z_MM_STAT_UPDATE_WERK ABAP 1721447
Z_MM_STAT_UPDATE_VKORG ABAP 1721471
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_VKORG ABAP 1721521
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_VKORG ABAP 1721816
It's in German but I'm sure you get the idea. For each Z_MM_STAT_UPDATE and variant I have a separate spool list that I can display.
Markus -
Capture an error while creating a purchase requisition (BAPI_PR_CREATE)
Hi All,
I am using FM BAPI_PR_CREATE to create purchase requesition, Now my problem is that i have various items for single material now i wan to capture the error if any item has ?
Please let me know how to do so?
Thanks & Regards,
Ruchi TiwariHi,
To get the error messages after the BAPI_PR_CREATE is called,
loop at the return table which will contain the system messages and call the following FM
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = LS_MESSAGES-MSGID
LANG = '-D'
NO = LS_MESSAGES-MSGNR
V1 = LS_MESSAGES-MSGV1
V2 = LS_MESSAGES-MSGV2
V3 = LS_MESSAGES-MSGV3
V4 = LS_MESSAGES-MSGV4
IMPORTING
MSG = LV_MESSAGE
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to populate the Error stack during error records in field level routine
hi,
I am capturing the error records in Field level routine in transformation. now i want these records to reflect in error stack.
i am using 'Append monitor-rec to MONITOR' at the moment but i cant see any records in error stack.
but when i am using the same statement in start routine i am getting records in error stack.
can anyone please help as to how can i populate error stack through field level routine?Hi,
Try to do it in the end routine instead of the field routine.
It should work.
Regards,
Joe
Maybe you are looking for
-
How to disable click for open a app mobile? i have picture.
how to disable click for open a app mobile? How i do? why adobe captivate need to click for open app. i need to open auto. thank you
-
How do I fix this - my 24 inch imac indicates its screen is 16.5 inch
My 24 inch iMac began displaying everything much bigger than normal today. The system preferences display resolution is set to 1280 x 800 which is normal, but in Displays under the About this Mac it says the display is 16.5 inches. What happened? An
-
I have windows xp profesional and from some week is it impossible to connect my nokia to pc. I tried to install several type of pc suite but i always get that there isn't any type of possible choice of connection (no USB, NO Bluetooth, NO irda). I t
-
SMART PLAYLISTS: ORGANIZING BY DATE ADDED & KEEPING ALBUM TRKS IN ORD
Dear Knowledgeable Users of iPod: I would like to create a Smart Playlist that will do the 2 following things when I listen to music in my iPod: 1) Play albums in the order of date added (I solved this one) 2) Play the songs in the order they come on
-
Java install on mavericks crashes MacBook Pro
After installing java to try to fix adobe in design crashing now my MacBook Pro won't start. Gives me grey screen with Apple logo while trying to boot. Then Apple disappears. Help.