2011 Jun 07 2:17 PM
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.
2011 Jun 07 3:50 PM
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
2011 Jun 07 3:56 PM
I've already done that you suggested, but the issue of the fixed width columns remains.
2011 Jun 08 12:36 AM
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.