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

Help in Function module

Former Member
0 Likes
704

Hi All,

I want to add FILE NAME option in import parametsr in function module. I want to download the RFC FM interface Output in excel format.

Please give any sample programs.

regards,

Ajay reddy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
570

use function module to download file in XLS format..

<b>SAP_CONVERT_TO_XLS_FORMAT</b>

Reward points if useful

Regards

Prax

5 REPLIES 5
Read only

Former Member
0 Likes
570

Add this import paramter to your function module.

FILENAME LIKE RLGRAP-FILENAME

Thanks

Mahesh

Read only

Former Member
0 Likes
570

to download to excel format. use FM <b>gui_download</b>

regards,

srinivas

<b>*reward for useful answers*</b>

Read only

Former Member
0 Likes
571

use function module to download file in XLS format..

<b>SAP_CONVERT_TO_XLS_FORMAT</b>

Reward points if useful

Regards

Prax

Read only

0 Likes
570

Please give me any sample programs.

regards,

AJAy reddy

Read only

0 Likes
570

PROGRAM ZSV_TEST.

Data : IT type table of kna1 initial size 0.

Select * from kna1 into table IT up to 10 rows.

CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'

EXPORTING

  • I_FIELD_SEPERATOR =

I_LINE_HEADER = 'X'

I_FILENAME = 'C:\TEST.XLS'

I_APPL_KEEP = 'X'

TABLES

I_TAB_SAP_DATA = IT

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

The Headings wont be downloaded. if needed then declare a internal table with character fields append the titles and then the values and call this function.

Reward if it helpful

Thanks & Regards

Senthilvel Murugesan