Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dump Error in report pgm

Former Member
0 Likes
846

Hi Friends,

im writting a report pgm to upload some data into ztable from sapia directory.

the code is given below...

SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-028.

PARAMETERS: p_file_p(30) DEFAULT '/sapia/iface/in/comm/sapfin/' LOWER CASE.

PARAMETERS: p_file_n(30) DEFAULT 'ac1018pl'.

SELECTION-SCREEN: END OF BLOCK b1.

SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE text-029.

PARAMETERS: p_file_1(30) DEFAULT '/sapia/iface/in/arch/sapfin/' LOWER CASE.

SELECTION-SCREEN: END OF BLOCK b3.

SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-030.

PARAMETERS: p_file_d(30) DEFAULT 'zace1018'.

SELECTION-SCREEN: END OF BLOCK b2.

CONCATENATE p_file_p p_file_n INTO v_infile.

TRANSLATE v_infile TO LOWER CASE.

OPEN DATASET v_infile FOR INPUT IN TEXT MODE ENCODING DEFAULT. " Opening the file/Checking for file existence

IF sy-subrc <> 0.

MESSAGE e012 WITH v_infile. " Error occured while opening the file <file name>

EXIT.

ELSE.

DO.

READ DATASET v_infile INTO wa_file. " Reading file contents

IF sy-subrc <> 0.

CLOSE DATASET v_infile.

IF n_counter = 0.

MESSAGE e013 WITH v_infile.

ENDIF.

EXIT.

ELSE.

APPEND wa_file TO it_file.

CLEAR wa_file.

n_counter = n_counter + 1.

ENDIF.

ENDDO.

ENDIF.

If i run this im getting dump error at run time as follows,

Runtime error : CONVT_CODEPAGE

Except :CX_SY_CONVERSION_CODEPAGE

Cause: Conversion is not possible. The data is read as far as possible. Text data where the conversion has failed is undefined (see also note below).

Plz sole the problem... i need it urgent... Helpful answers will be rewarded...

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
804

Try changing

OPEN DATASET v_infile FOR INPUT IN TEXT MODE ENCODING DEFAULT.

to be

open dataset v_infile for input in text mode encoding default ignoring conversion errors

Gareth.

Hi Friends,

im writting a report pgm to upload some data into ztable from sapia directory.

the code is given below...

SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-028.

PARAMETERS: p_file_p(30) DEFAULT '/sapia/iface/in/comm/sapfin/' LOWER CASE.

PARAMETERS: p_file_n(30) DEFAULT 'ac1018pl'.

SELECTION-SCREEN: END OF BLOCK b1.

SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE text-029.

PARAMETERS: p_file_1(30) DEFAULT '/sapia/iface/in/arch/sapfin/' LOWER CASE.

SELECTION-SCREEN: END OF BLOCK b3.

SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-030.

PARAMETERS: p_file_d(30) DEFAULT 'zace1018'.

SELECTION-SCREEN: END OF BLOCK b2.

CONCATENATE p_file_p p_file_n INTO v_infile.

TRANSLATE v_infile TO LOWER CASE.

OPEN DATASET v_infile FOR INPUT IN TEXT MODE ENCODING DEFAULT. " Opening the file/Checking for file existence

IF sy-subrc <> 0.

MESSAGE e012 WITH v_infile. " Error occured while opening the file <file name>

EXIT.

ELSE.

DO.

READ DATASET v_infile INTO wa_file. " Reading file contents

IF sy-subrc <> 0.

CLOSE DATASET v_infile.

IF n_counter = 0.

MESSAGE e013 WITH v_infile.

ENDIF.

EXIT.

ELSE.

APPEND wa_file TO it_file.

CLEAR wa_file.

n_counter = n_counter + 1.

ENDIF.

ENDDO.

ENDIF.

If i run this im getting dump error at run time as follows,

Runtime error : CONVT_CODEPAGE

Except :CX_SY_CONVERSION_CODEPAGE

Cause: Conversion is not possible. The data is read as far as possible. Text data where the conversion has failed is undefined (see also note below).

Plz sole the problem... i need it urgent... Helpful answers will be rewarded...

5 REPLIES 5
Read only

former_member404244
Active Contributor
0 Likes
804

Hi,

change the code and try..remove the lower case statement and also the translate statement.

SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-028.

PARAMETERS: p_file_p(30) DEFAULT '/sapia/iface/in/comm/sapfin/' .

PARAMETERS: p_file_n(30) DEFAULT 'ac1018pl'.

SELECTION-SCREEN: END OF BLOCK b1.

SELECTION-SCREEN: BEGIN OF BLOCK b3 WITH FRAME TITLE text-029.

PARAMETERS: p_file_1(30) DEFAULT '/sapia/iface/in/arch/sapfin/' .

SELECTION-SCREEN: END OF BLOCK b3.

SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-030.

PARAMETERS: p_file_d(30) DEFAULT 'zace1018'.

SELECTION-SCREEN: END OF BLOCK b2.

CONCATENATE p_file_p p_file_n INTO v_infile.

Regards,

Nagaraj

Read only

Former Member
0 Likes
805

Try changing

OPEN DATASET v_infile FOR INPUT IN TEXT MODE ENCODING DEFAULT.

to be

open dataset v_infile for input in text mode encoding default ignoring conversion errors

Gareth.

Read only

0 Likes
804

Hi Gareth,

ur answer was highly valuable to me.It had solved my problem.i hv rewarded u the maximum 10 points.... appart from this... My hearty wishes to u...

Read only

0 Likes
804

Hi,

Your welcome - and thanks for saying thanks

Gareth.

Read only

Former Member
0 Likes
804

Code seems to be ok. Check in debugging mode and confirm at what step the run time error occurs.

It seems the problem is somewhere else.