Skip to Content
0
Former Member
Jan 07, 2008 at 07:47 AM

LITERAL EXTENDING INTO NEXT LINE :(

17 Views

Hi friends,

Here's a simple code I wrote.

The problem is , I get an error message saying the " literal extending into next line not allowed";

when I am giving the path for my file which is on the desktop.

Here's the code......

REPORT ZFUNCMOD .

PARAMETERS:

P_FILE LIKE RLGRAP-FILENAME DEFAULT 'C:\Documents and

Settings\Administrator\Desktop\TEST.xls'. " -> as u can see ,

"it has extended into the next line.i have tried to adjust ...but 😔

DATA: T100 TYPE STANDARD TABLE OF T001 WITH DEFAULT KEY.

SELECT * FROM T001 INTO TABLE T100.

CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'

EXPORTING

  • I_FIELD_SEPERATOR =

  • I_LINE_HEADER =

I_FILENAME = P_FILE

  • I_APPL_KEEP = ' '

TABLES

I_TAB_SAP_DATA = T100

  • CHANGING

  • I_TAB_CONVERTED_DATA =

  • EXCEPTIONS

  • CONVERSION_FAILED = 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.

please let me know how to adjust that..

I TRIED THE FOLLOWING;AVOIDED GIVING THE DEFAULT FILENAME PATH AND IT DID WORK....

REPORT ZFUNCMOD.

PARAMETERS:

P_FILE LIKE RLGRAP-FILENAME. " DEFAULT 'C:\Documents and

"Settings\Administrator\Desktop\TEST.xls'.

at selection-screen on value-request for P_FILE.

CALL FUNCTION 'WS_FILENAME_GET'

EXPORTING

  • DEF_FILENAME = ' '

  • DEF_PATH = ' '

MASK = ',.,..'

  • MODE = ' '

  • TITLE = ' '

IMPORTING

FILENAME = P_FILE

  • RC =

  • EXCEPTIONS

  • INV_WINSYS = 1

  • NO_BATCH = 2

  • SELECTION_CANCEL = 3

  • SELECTION_ERROR = 4

  • OTHERS = 5

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

DATA: T100 TYPE STANDARD TABLE OF T001 WITH DEFAULT KEY.

SELECT * FROM T001 INTO TABLE T100.

CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'

EXPORTING

  • I_FIELD_SEPERATOR =

  • I_LINE_HEADER =

I_FILENAME = P_FILE

  • I_APPL_KEEP = ' '

TABLES

I_TAB_SAP_DATA = T100

  • CHANGING

  • I_TAB_CONVERTED_DATA =

  • EXCEPTIONS

  • CONVERSION_FAILED = 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.

Thanking you all in advance,

Hari Kiran.