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

Excel layout from ABAP

Former Member
2,718

Hello Experts,

I have a requirement where I have to design layout in excel from SAP. I have tried searching for options to design the layout in SAMRTFORM and then downloading to excel. But I could not get the output with exact layout as in SMARTFORM. Request your guidance as this is a bit urgent.

PS: I have tried downloading Spool job into excel using function module 'RSPO_DOWNLOAD_SPOOLJOB' but the entire layout is coming in single column which is not the requirement. The required layout should be spaced properly in different cells and the user should be able to edit the amounts in the excel.

Regards

Sivapriya.N

6 REPLIES 6
Read only

Tomas_Buryanek
Product and Topic Expert
Product and Topic Expert
2,357

Can you describe what do you mean with "Excel layout"?
Do you mean normal Excel sheet with some data in table and texts?

-- Tomas --
Read only

Sandra_Rossi
Active Contributor
2,357

It's generally a little bit too late when the data is stored in a spool file (it's like storing a table in an image, it's difficult to decode/OCR the table from the image). It's best to take the table contents before it's output to the spool file, when the program runs. If you're interested, can you explain the flow?

Read only

SachinArtani
Active Participant
0 Likes
2,357

If I am not wrong, the data in excel format (or Layout in your language) can be downloaded via ALV also. Why you are using Smartforms?

Read only

Former Member
2,357

@Tomas Buryanek, What I mean by Excel layout is that the format in Excel sheet looks exactly like the format in Smartform. With headings, logos and tables. The arrangement of data is no way different from Smart form. Hope I could clear your doubt.

@Sandra Rossi, Its not mandatory to get the data from Spool file only. But that was one of the clues I got when browsing other forums. I can take the data from SAP even before that also. There is no restriction in that .

@Sachin Artani. ALV has the layout like a report only. But my requirement is the content in Excel look like the one in Smartform (except that the background is excel) the user is still able to edit the table contents in the excel.

Read only

Sandra_Rossi
Active Contributor
2,357

Sivapriya Nandyala what transaction/report is it? If you can write a Z wrapper of it, you may intercept the ALV output into an internal table (CL_SALV_BS_RUNTIME_INFO), it has been discussed many times in the forum...

(PS: in SCN, no need to use @ actually my name was incorrectly typed and I was not informed; instead you may copy/paste my hyperlinked name)

Read only

DoanManhQuynh
Active Contributor
2,357

what you asked is download data to excel with pre-design template which I don't think it relate to SMARTFORM. There are some options I can propose:

1. Using SAP BDS technical where you create excel template and upload to SAP.

2. Save excel file as XML and use transformation ( can work with simple xls file, without image...)

3. Using OO XML or well-known abap2xlsx tool to create excel file in run time.