How can I handle REP-0108 error
I have a column in my database that contains the name of an image file. I created a field on the report for this column, with the 'Read from File' set to Yes and the format set to 'image'. The problem is, that the database contains file names that point to images that have been removed and when I run the report, I get a REP-0108 error which stops the run. Is there a way to handle the 'file missing' error and have the report run to completion?
I have a column in my database that contains the name of an image file. I created a field on the report for this column, with the 'Read from File' set to Yes and the format set to 'image'. The problem is, that the database contains file names that point to images that have been removed and when I run the report, I get a REP-0108 error which stops the run. Is there a way to handle the 'file missing' error and have the report run to completion?
Hi,
This error isn't just caused by a lack of memory, it can also be caused by fragmentation of the shared pool. It quite often shows up in applications where developers don't use bind variables and issue a large number of very similar but distinct queries, especially in long running processes. In this case you can try regularly flushing the shared pool or beating the developers about the head every time you see them not using bind variables.
Andre
Similar Messages
-
How can I handle ora 04031 error ?
Hi there,
I got ora 04031 error message.
so I increased shared memory size.
After that I got again ora 04031.
How can I fix this error? Pls give me a talk.
Thanks.Hi,
This error isn't just caused by a lack of memory, it can also be caused by fragmentation of the shared pool. It quite often shows up in applications where developers don't use bind variables and issue a large number of very similar but distinct queries, especially in long running processes. In this case you can try regularly flushing the shared pool or beating the developers about the head every time you see them not using bind variables.
Andre -
How can I handle runtime errors in Java
Please some one tell me what are runtime errors and How can I handle them using java code
This is important
Thanks in Advance
Chowdary AKThe java equivalent of function pointers is the one-instance class, as used to pass handlers to swing components, for example. Often an anonymous class is used.
Put your function signature in an interface, and pass an object that implements that interface:
public Class1 {
public interface CallBack {
void myMethod(String arg1);
CallBack callb;
public Class1(CallBack callb) {
this.callb = callb;
callb.myMethod("A string");
class2 {
first = new Class1(new Class1.CallBack() {
public void myMethod(String arg1) {
... do something ... -
In call transaction how can we handle error records.
hai..tellme how can we handle error records in call transaction..we can get error records into one flatfile ok...then we have to execute the same bdc program with dat flat file (error records) once again...is it wright ..
Hi,
check this program u will get idea
seee this prog. its will help u .
copy and run this prog.
TYPES : BEGIN OF t_disp ,
vendorno(9),
compcc(13),
purchorg(14),
accgroup(15),
title(7),
name(5),
country(8),
ordcurr(14),
END OF t_disp.
TYPES : BEGIN OF t_err,
msgtyp LIKE bdcmsgcoll-msgtyp,
l_mstring(250),
END OF t_err.
DATA: i_disp TYPE STANDARD TABLE OF t_disp,
wa_disp TYPE t_disp,
i_err TYPE STANDARD TABLE OF t_err,
wa_err TYPE t_err.
data definition
Batchinputdata of single transaction
DATA: bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
messages of call transaction
DATA: messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.
error session opened (' ' or 'X')
DATA: e_group_opened.
message texts
TABLES: t100.
PARAMETER : p_file1 LIKE ibipparms-path,
p_cmode LIKE ctu_params-dismode DEFAULT 'N'.
"A: show all dynpros
"E: show dynpro on error only
"N: do not display dynpro
*selction screen.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file1.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file1.
AT SELECTION-SCREEN ON p_file1.
IF p_file1 IS INITIAL.
MESSAGE 'FILE IS NOT FOUND' TYPE 'E'.
ENDIF.
START-OF-SELECTION.
PERFORM f_disp_file1.
END-OF-SELECTION.
PERFORM f_disp_errs.
*& Form F_DISP_FILE1
text
--> p1 text
<-- p2 text
FORM f_disp_file1 .
DATA: l_filename1 TYPE string.
MOVE p_file1 TO l_filename1.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = l_filename1
filetype = 'ASC'
has_field_separator = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
data_tab = i_disp
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*? prepare BDC data
DELETE i_disp INDEX 1.
LOOP AT i_disp INTO wa_disp .
PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02K-LIFNR'
wa_disp-vendorno.
'ztest_1'.
PERFORM bdc_field USING 'RF02K-BUKRS'
wa_disp-compcc.
'0001'.
PERFORM bdc_field USING 'RF02K-EKORG'
wa_disp-purchorg.
'0001'.
PERFORM bdc_field USING 'RF02K-KTOKK'
wa_disp-accgroup.
'0001'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-SPRAS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_field USING 'LFA1-ANRED'
wa_disp-title.
'Mr.'.
PERFORM bdc_field USING 'LFA1-NAME1'
wa_disp-name.
'test name'.
PERFORM bdc_field USING 'LFA1-SORTL'
'TEST NAME'.
PERFORM bdc_field USING 'LFA1-LAND1'
wa_disp-country.
'in'.
PERFORM bdc_field USING 'LFA1-SPRAS'
'en'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFBK-BANKS(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0210'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-AKONT'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0215'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB1-ZTERM'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0220'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFB5-MAHNA'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0310'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFM1-WAERS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=UPDA'.
PERFORM bdc_field USING 'LFM1-WAERS'
wa_disp-ordcurr.
'inr'.
PERFORM bdc_transaction USING 'XK01'.
WRITE:/ WA_DISP-VendorNo,
WA_DISP-COMPCC,
WA_DISP-PURCHORG,
WA_DISP-ACCGROUP,
WA_DISP-title,
WA_DISP-name,
WA_DISP-country,
WA_DISP-ORDCURR.
CLEAR: wa_disp.
REFRESH bdcdata.
ENDLOOP.
ENDFORM. " F_DISP_FILE1
Start new screen *
FORM bdc_dynpro USING program dynpro.
CLEAR bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
APPEND bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
IF FVAL NODATA.
CLEAR bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
APPEND bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
*& Form bdc_transaction
text
-->P_0322 text
FORM bdc_transaction USING tcode.
DATA: l_mstring(480),
l_subrc LIKE sy-subrc.
REFRESH messtab.
CALL TRANSACTION tcode USING bdcdata
MODE p_cmode
UPDATE 'L'
MESSAGES INTO messtab.
l_subrc = sy-subrc.
IF SMALLLOG 'X'.
WRITE: / 'CALL_TRANSACTION',
TCODE,
'returncode:'(I05),
L_SUBRC,
'RECORD:',
SY-INDEX.
LOOP AT messtab.
SELECT SINGLE * FROM t100 WHERE sprsl = messtab-msgspra
AND arbgb = messtab-msgid
AND msgnr = messtab-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH messtab-msgv1 INTO l_mstring.
REPLACE '&2' WITH messtab-msgv2 INTO l_mstring.
REPLACE '&3' WITH messtab-msgv3 INTO l_mstring.
REPLACE '&4' WITH messtab-msgv4 INTO l_mstring.
ELSE.
REPLACE '&' WITH messtab-msgv1 INTO l_mstring.
REPLACE '&' WITH messtab-msgv2 INTO l_mstring.
REPLACE '&' WITH messtab-msgv3 INTO l_mstring.
REPLACE '&' WITH messtab-msgv4 INTO l_mstring.
ENDIF.
CONDENSE l_mstring.
WRITE: / messtab-msgtyp, l_mstring(250).
*? Send this errors to err internal table
wa_err-msgtyp = messtab-msgtyp.
wa_err-l_mstring = l_mstring.
APPEND wa_err TO i_err.
ELSE.
WRITE: / messtab.
ENDIF.
CLEAR: messtab, wa_err.
ENDLOOP.
SKIP.
ENDIF.
ENDFORM. " bdc_transaction
*& Form f_disp_errs
text
--> p1 text
<-- p2 text
FORM f_disp_errs .
SORT i_err BY msgtyp.
LOOP AT i_err INTO wa_err.
AT FIRST.
WRITE : / text-002.
ULINE.
ENDAT.
AT NEW msgtyp.
IF wa_err-msgtyp = 'S'.
WRITE : / text-003.
ULINE.
ELSEIF wa_err-msgtyp = 'E'.
WRITE : / text-001.
ULINE.
ENDIF.
ENDAT.
WRITE : / wa_err-msgtyp, wa_err-l_mstring.
CLEAR wa_err.
ENDLOOP.
ENDFORM. " f_disp_errs
Regards -
Errors in flat file records? how can i handle them?
Hi All,
I am new for BDC. I am uploading customer(XD01) records using BDC caltransaction method.my problem is when i am running the program, some times my program is not updating the records because of my flat file errors. after i correcting the error records and if i run the same program already updated records not processing. my program not running. what i need to do? how can i handle the flat file for reprocessing the error records?
i have around 50,000 records in my flat file.your program accepts a flat file say the structure of it is structure_load and you create another structure similar to structure_load and name it structure_error.
loop at itab_load.
call transactions...
if success..
commit work and wait X sec.
else.
move-corresponding field to structure_error
append structure_error.
endif.
endloop.
write the file stru_error to PC or app server and make the changes to the data and use the str_error as input to your code again.. -
How can i handle error in my apex form
Hi experts,
I have designed a form where i record values.I have a create button and when i press it without entering any values i have the following error. How can i handle tat error so that if i dont enter any values i have an error message being displaying prompting the user to enter values
ORA-01400: cannot insert NULL into ("LOTTO_BI"."HOURLY_SALES"."ACT_AMT")
Error Unable to process row of table HOURLY_SALES.As far as I understand your problem you just have to add a validation to your page processing.
In the third step when creating a validation you can choose "Item not null". -
Can any one tell me How can I handle internal error in smartforn
Hi,
How can I handle internal error in smartforn, what type of problem can be.
Regards
chandraLook at [SAP Smart Forms (BC-SRV-SCR)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf]
Runtime Errors
Each Smart Form can trigger a number of exceptions during its execution. To limit this number of exceptions, you can bundle the occurring errors in error classes and store them in an error log in the composer. For each error, you store an internal error number and (if possible) a message from table T100 (work area, message number, message text and parameters) in addition to the error class. To each error class, you assign an exception, which means that if the recognized error teminates the form processing, the system triggers exactly this exception. When an exception occurs, the caller of the Smart Form can use predefined function modules to read the error log and then decide which reaction is appropriate in the respective error context.
Possible exceptions for the generated function module are:
- FORMATTING_ERROR
- INTERNAL_ ERROR
- SEND_ERROR
- USER_CANCELED
In addition, you can define your own exceptions.
If an error (or a warning) occurs, the system internally fills an error table. The application can now read this table as soon as the function module for the form is processed to the end. To read the table that contains all errors and warnings that occurred, call function module SSF_READ_ERRORS. The table has structure SSFERROR. The fields in the table are the number of the document within the job, the form name, an error number, a message class, a message type, a message number and four additional message variables. If processing is terminated, the application can dynamically display a message. The error numbers are defined in the include SSF_ERROR.
If you want to trigger your own exception in the free coding of the Smart Form, you can use one of the following methods:
- Use the macro user_exception <exception>, which triggers the exception <exception> and fills the above tables. After the termination additional system variables for the error (symsgno, sy-msgtyp, and so on) do not contain the values required for your own exception.
- If you want to access the system variables sy-msgno, sy-msgtyp, and so on for your exception directly, proceed as follows: Call function module SSF_MESSAGE and trigger your exception yourself using the RAISE statement.
The system field &SFSY-EXCEPTION& contains the name of the triggered exception.
Then debug your program.
Regards -
how can i handle that i can gibe the domainname with é - any code? or something else?
Could you please confirm the error message you are getting and whether it is while adding domain in File > Export as HTML or File > Upload to FTP host option or if there is a different location you are referring to?
I checked and both the Export and Upload to FTP options both accept the accented characters in domain name field.
Cheers,
Vikas -
How Can I report a Production Error
When I want to report a Production error in Support portal, I got a error like this
Currently you do not have authorization to use this function. To request the authorization, please contact one of the administrators at your company:
S0004554480 Bool
But I am Bool actually, it's myself. how can I handle it? Does any know it?
Any response is appreciated.Hi,
As per your query you are not authorised user to log a compliant on SAP Workplace. Please contact your old SAP Basis person who is working earlier you. If you are not getting any support form him then sand a latter to SAP through your Director or CEO who is responsible person. Then sap will enquiry over the phone and ask some hardware information to you, if you fullfil then the will assign the password or create new user for you.
Anil -
How can we handle multiple applications in session method
how can we handle multiple applications in .. session method.
can any body reply me.
thanksHari,
hi Check out this sample code to use session method
REPORT ztest_report
NO STANDARD PAGE HEADING
LINE-SIZE 255
MESSAGE-ID ZRASH.
Internal Table Declarations *
*--Internal Table for Data Uploading.
DATA : BEGIN OF IT_FFCUST OCCURS 0,
KUNNR(10),
BUKRS(4),
KTOKD(4),
ANRED(15),
NAME1(35),
SORTL(10),
STRAS(35),
ORT01(35),
PSTLZ(10),
LAND1(3),
SPRAS(2),
AKONT(10),
END OF IT_FFCUST.
*--Internal Table to Store Error Records.
DATA : BEGIN OF IT_ERRCUST OCCURS 0,
KUNNR(10),
EMSG(255),
END OF IT_ERRCUST.
*--Internal Table to Store Successful Records.
DATA : BEGIN OF IT_SUCCUST OCCURS 0,
KUNNR(10),
SMSG(255),
END OF IT_SUCCUST.
*--Internal Table for Storing the BDC data.
DATA : IT_CUSTBDC LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
*--Internal Table for storing the messages.
DATA : IT_CUSTMSG LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA : V_FLAG1(1) VALUE ' ',
"Flag used for opening session.
V_TLINES LIKE SY-TABIX,
"For storing total records processed.
V_ELINES LIKE SY-TABIX,
"For storing the no of error records.
V_SLINES LIKE SY-TABIX.
"For storing the no of success records.
Selection screen *
SELECTION-SCREEN BEGIN OF BLOCK B1.
PARAMETERS : V_FNAME LIKE RLGRAP-FILENAME,
V_SESNAM LIKE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK B1.
Start-of-selection *
START-OF-SELECTION.
*-- Form to upload flatfile data into the internal table.
PERFORM FORM_UPLOADFF.
TOP-OF-PAGE *
TOP-OF-PAGE.
WRITE:/ 'Details of the error and success records for the transaction'
ULINE.
SKIP.
End of Selection *
END-OF-SELECTION.
*-- Form to Generate a BDC from the Uploaded Internal table
PERFORM FORM_BDCGENERATE.
*--To write the totals and the session name.
PERFORM FORM_WRITEOP.
*& Form form_uploadff
Form to upload flatfile data into the internal table.
FORM FORM_UPLOADFF .
*--Variable to change the type of the parameter file name.
DATA : LV_FILE TYPE STRING.
LV_FILE = V_FNAME.
*--Function to upload the flat file to the internal table.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = LV_FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = IT_FFCUST
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF SY-SUBRC = 0.
*--Deleting the headings from the internal table.
DELETE IT_FFCUST INDEX 1.
*--Getting the total number of records uploaded.
DESCRIBE TABLE IT_FFCUST LINES V_TLINES.
ENDIF.
ENDFORM. " form_uploadff
*& Form Form_bdcgenerate
Form to Generate a BDC from the Uploaded Internal table
FORM FORM_BDCGENERATE .
*--Generating the BDC table for the fields of the internal table.
LOOP AT IT_FFCUST.
PERFORM POPULATEBDC USING :
'X' 'SAPMF02D' '0105',
' ' 'BDC_OKCODE' '/00' ,
' ' 'RF02D-KUNNR' IT_FFCUST-KUNNR,
' ' 'RF02D-BUKRS' IT_FFCUST-BUKRS,
' ' 'RF02D-KTOKD' IT_FFCUST-KTOKD,
'X' 'SAPMF02D' '0110' ,
' ' 'BDC_OKCODE' '/00',
' ' 'KNA1-ANRED' IT_FFCUST-ANRED,
' ' 'KNA1-NAME1' IT_FFCUST-NAME1,
' ' 'KNA1-SORTL' IT_FFCUST-SORTL,
' ' 'KNA1-STRAS' IT_FFCUST-STRAS,
' ' 'KNA1-ORT01' IT_FFCUST-ORT01,
' ' 'KNA1-PSTLZ' IT_FFCUST-PSTLZ,
' ' 'KNA1-LAND1' IT_FFCUST-LAND1,
' ' 'KNA1-SPRAS' IT_FFCUST-SPRAS,
'X' 'SAPMFO2D' '0120',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0125',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0130',
' ' 'BDC_OKCODE' '=ENTR',
'X' 'SAPMF02D' '0340',
' ' 'BDC_OKCODE' '=ENTR',
'X' 'SAPMF02D' '0360',
' ' 'BDC_OKCODE' '=ENTR',
'X' 'SAPMF02D' '0210',
' ' 'KNB1-AKONT' IT_FFCUST-AKONT,
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0215',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0220',
' ' 'BDC_OKCODE' '/00',
'X' 'SAPMF02D' '0230',
' ' 'BDC_OKCODE' '=UPDA'.
*--Calling the transaction 'fd01'.
CALL TRANSACTION 'FD01' USING IT_CUSTBDC MODE 'N' UPDATE 'S'
MESSAGES INTO IT_CUSTMSG.
IF SY-SUBRC <> 0.
*--Populating the error records internal table.
IT_ERRCUST-KUNNR = IT_FFCUST-KUNNR.
APPEND IT_ERRCUST.
CLEAR IT_ERRCUST.
*--Opening a session if there is an error record.
IF V_FLAG1 = ' '.
PERFORM FORM_OPENSESSION.
V_FLAG1 = 'X'.
ENDIF.
*--Inserting the error records into already open session.
IF V_FLAG1 = 'X'.
PERFORM FORM_INSERT.
ENDIF.
*--Populating the Success records internal table.
ELSE.
IT_SUCCUST-KUNNR = IT_FFCUST-KUNNR.
APPEND IT_SUCCUST.
CLEAR IT_SUCCUST.
ENDIF.
*--Displaying the messages.
IF NOT IT_CUSTMSG[] IS INITIAL.
PERFORM FORM_FORMATMSG.
ENDIF.
*--Clearing the message and bdc tables.
CLEAR : IT_CUSTBDC[],IT_CUSTMSG[].
ENDLOOP.
*--Getting the total no of error records.
DESCRIBE TABLE IT_ERRCUST LINES V_ELINES.
*--Getting the total no of successful records.
DESCRIBE TABLE IT_SUCCUST LINES V_SLINES.
*--Closing the session only if it is open.
IF V_FLAG1 = 'X'.
PERFORM FORM_CLOSESESS.
ENDIF.
ENDFORM. " Form_bdcgenerate
*& Form populatebdc
FOrm to Populate the BDC table.
FORM POPULATEBDC USING VALUE(P_0178)
VALUE(P_0179)
VALUE(P_0180).
IF P_0178 = 'X'.
IT_CUSTBDC-PROGRAM = P_0179.
IT_CUSTBDC-DYNPRO = P_0180.
IT_CUSTBDC-DYNBEGIN = 'X'.
ELSE.
IT_CUSTBDC-FNAM = P_0179.
IT_CUSTBDC-FVAL = P_0180.
ENDIF.
APPEND IT_CUSTBDC.
CLEAR IT_CUSTBDC.
ENDFORM. " populatebdc
*& Form FORM_OPENSESSION
Form to Open a session.
FORM FORM_OPENSESSION .
*--Variable to convert the given session name into reqd type.
DATA : LV_SESNAM(12).
LV_SESNAM = V_SESNAM.
*--Opening a session.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
GROUP = LV_SESNAM
HOLDDATE = '20040805'
KEEP = 'X'
USER = SY-UNAME
PROG = SY-CPROG
IMPORTING
QID =
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11
IF SY-SUBRC <> 0.
WRITE :/ 'Session not open'.
ENDIF.
ENDFORM. " FORM_OPENSESSION
*& Form FORM_INSERT
fORM TO INSERT ERROR RECOED INTO A SESSION.
FORM FORM_INSERT .
*--Inserting the record into session.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'FD01'
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
DYNPROTAB = IT_CUSTBDC
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7
IF SY-SUBRC <> 0.
WRITE :/ 'Unable to insert the record'.
ENDIF.
ENDFORM. " FORM_INSERT
*& Form FORM_CLOSESESS
Form to Close the Open Session.
FORM FORM_CLOSESESS .
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
ENDIF.
ENDFORM. " FORM_CLOSESESS
*& Form FORM_FORMATMSG
Form to format messages.
FORM FORM_FORMATMSG .
*--Var to store the formatted msg.
DATA : LV_MSG(255).
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = SY-MSGID
LANG = SY-LANGU
NO = SY-MSGNO
V1 = SY-MSGV1
V2 = SY-MSGV2
V3 = SY-MSGV3
V4 = SY-MSGV4
IMPORTING
MSG = LV_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2.
IF SY-SUBRC = 0.
WRITE :/ LV_MSG.
ENDIF.
ULINE.
ENDFORM. " FORM_FORMATMSG
*& Form form_writeop
To write the totals and the session name.
FORM FORM_WRITEOP .
WRITE :/ 'Total Records Uploaded :',V_TLINES,
/ 'No of Error Records :',V_ELINES,
/ 'No of Success Records :',V_SLINES,
/ 'Name of the Session :',V_SESNAM.
ULINE.
ENDFORM. " form_writeop
Don't forget to reward if useful.. -
How can I handle exception? - to give user more friendly notification
Hi!
User gets an error:
'Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001: ORA-20001: Current version of data in database has changed since user initiated update process. current checksum =...'
How can I handle this exception (when two users want to modify the same set of data at the same time)? I would like to hide the above error message and give user more friendly notification.
Thanks in advance,
TomThanks Vikas for your answer.
These workarounds are really creative and I want to use one of them. BUT my problem is to 'catch' the exception/error when two users want to modify the same set of data at the same time.
Those solutions which we can read about in this link you gave me describe handling exceptions in pl/sql processes. How can I catch the error I am talking about in pl/sql code?
Code would be like this:
DECLARE
two_users EXCEPTION;
BEGIN
IF --catch the error
THEN RAISE two_users;
END IF;
EXCEPTION WHEN two_users
THEN :HIDDEN_ITEM := 'Error Message';
END;
What should I put in a place where there is '--catch the error' ??
Thanks in advance,
Tom -
How can i handle BLOB data.
Thank you for the input, but it wasn't so usefull. I found a soluten to get the get a blob from the database.
<snip>
MimeBodyPart mbp = new MimeBodyPart();
// Create the Multipart to be added the parts to
Multipart mp = new MimeMultipart();
while( rs.next()) {
BLOB Attachment = rs.getBLOB("att");
String FileName = rs.getString("nam");
String FileType = rs.getString("ext");
// Create and fill the second message part (Attachements)
MimeBodyPart mbp1 = new MimeBodyPart();
String type = (FileType != null ? FileType : dftMime);
String fileName = (FileName != null ? FileName : dftName);
mbp1.setDisposition(Part.ATTACHMENT);
mbp1.setFileName(fileName);
mbp1.setDataHandler(new
DataHandler(new BLOBDataSource(Attachment, type)));
mbp1.setHeader( "Content-Transfer-Encoding", "base64" );
mp.addBodyPart(mbp1);
Now i get the following stacktrace:
A send error is occured. Exit program.null
javax.mail.internet.ParseException
at javax.mail.internet.ContentType.<init>(ContentType.java:89)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1249)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1001)
at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:333)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1255)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2012)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1980)
at javax.mail.Transport.send(Transport.java:97)
at miag.app.mail.SendMail.send(SendMail.java:150)
at miag.app.mail.SendMail.main(SendMail.java:37)
The email will not be sent.
Thank you
Rene -
How can we handle browser settings while dealing with the security ?
Hi ,
how can we handle browser settings while dealing with the security ?When we configured security in web.xml , during the first request the container is asking for the authentication credentials once they are provided it go's on. but when the user gives a fresh request from the second window within the same browser that time it is not asking for authentication. How can we overcome this.Is there anything to do with server configurations?
How can we make the container no to keep the things or act like session?Ya... I am taking a small example need not happen always but a kind of possibility i am thinking off.
once the user sign out and just left without closing the browser and a friend (suppose not a good friend ... just kidding...) of that user may open the same jsp or file .This time the security is breached. If that feature or property exists....
I know what you might say ... the user will log-out before leaving where a programer might invalidate the session at the time of log out.
Consider the case of a bad Programing or just a programer might forget to invalidate,At that time as a application administrator how can he solve that issue.
Thanks.......
Edited by: user8483670 on Jun 6, 2011 1:08 AM
Edited by: user8483670 on Jun 6, 2011 1:09 AM -
How can i set a global error page for all error cod
how can i set a global error page for all error code?
i don't want to leave a long list in the web.xml file.could any one help me?
thanksIf u have a common Error JSP named as ErrorPage.jsp
You need to have the following piece of code in the JSP as :
<%@ page isErrorPage ="true"%>
This makes it as the Common Error Page for the Application. Now all you need to do is from other JSP's throw the Exception to teh container. The container will redirect to this Page and process accordingly.
Thanks and regards,
Pazhanikanthan. P -
How can I fix a time error on my MacBook?
How can I fix a time error on my MacBook?
If, after checking the settings in Sys Pref> Date/Time nothing really changes
you could see if a reset of the NVRAM could help.
Read carefully & when using the keyboard sequence, let the computer
start tone sound three times, to be sure the reset has really occurred.
•About NVRAM & PRAM:
http://support.apple.com/kb/HT1379
Does the time gain by itself? Is the Time Server set to automatically
keep the computer time corrected when you are online? You may
also try the manual settings, if the computer had not been used in
some time, because if the battery gets too low, the capacitor in a
portable computer can also lose power, & NVRAM - PRAM chip
settings could be lost. However by then, Date can also be wrong.
Was there anything else going on that may have affected this?
Sometimes odd items are related to something else.
Good luck & happy computing!
Maybe you are looking for
-
Hi. When I boot to Boot Camp with the latest Apple Windows Support drivers can't see my USB Flash Drive, DVD and OS X volumes but not my USB external drive that has an MBR partition scheme (using iPartition from GUID) and in there it has different vo
-
Good Afternoon, I have installed/uninstalled arch about ten times in hopes of learning it and have learned quite a lot. And have tried over these past few weeks to avoid the forums as I enjoy the self-satisfaction of that golden google found soluti
-
Making new oracle 10g cluster in redhat enterprise linux
Hy All i have installed redhat enterprise server in 2 systems and both are attached with SANE network storage. i want to configure oracle 10 g clustering with this setup. should i have to configure clustering in linux only or there is a feature of cl
-
Can anyone please help with "EXC_BAD_ACCESS" error on start up of MS Outlook
I use MS Office 2011 After my update on my Mac OS 10.8.4 yesterday I my Microsoft Outlook and Power Point crashes on start up and no one seem to have any idea what I can do. I have followed every recommendations on the web and cant get it going again
-
Incompatible display driver in Premiere Elements 9
I purchased a new computer six months ago, a Toshiba Satellite C660-1LD, and installed Premiere Elements 9 on it almost immediately. However, for six months, I have been unable to work out how to even start a new project, and only now do I have the t