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

Using SO_NEW_DOCUMENT_ATT_SEND_API1 to send .xls attachment.

Former Member
0 Likes
793

Hi,

I'm using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send xls attachements.

All works fine, the only issue is that in the requirements the attachemnt should have fixed width columns.

I think that is not possible, everyone have done that?

If not there an alternative to the SO_NEW_DOCUMENT_ATT_SEND_API1?

Thanks for answers.

Hi,

I'm using the FM SO_NEW_DOCUMENT_ATT_SEND_API1 to send xls attachements.

All works fine, the only issue is that in the requirements the attachemnt should have fixed width columns.

I think that is not possible, everyone have done that?

If not there an alternative to the SO_NEW_DOCUMENT_ATT_SEND_API1?

Thanks for answers.

3 REPLIES 3
Read only

Former Member
0 Likes
650

Hello,

You can have the fixed width of the colums in excel (No additional spaces in the column) is you use, the seperator between the fields.

For eg : If you are displaying 3 fields in the excel file, say MATNR, WERKS and QUANTITY.

Then you need to


Concatenate  matnr
                      werks
                      quantity
into                ls_contents_bin-line
separated by lc_tab.

append ls_contents_bin to lt_contents_bin.

Here lc_tab is the tab seperator to be declared as follows : -

CONSTANTS : lc_tab TYPE char01 VALUE cl_abap_char_utilities=>horizontal_tab.

The internal table lt_contents_bin is then passed to the table parameters contents_bin of the FM SO_NEW_DOCUMENT_ATT_SEND_API1.

Thanks.

Regards,

Rinkesh Doshi

Read only

0 Likes
650

I've already done that you suggested, but the issue of the fixed width columns remains.

Read only

0 Likes
650

Why do you need fixed width if you're exporting to XLS? Tab separator will work perfectly as explained above.

It doesn't make much sense, given that in XLS you'll end up having columns. Besides, I think the same XLS format will condense your lines anyway.

Cheers.