Application Development 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: 

Issue in Excel Attachment Extension SO_DOCUMENT_SEND_API1

former_member198402
Participant
0 Kudos

Dear Team,

I am facing on unique Issue,When i am using FM:SO_DOCUMENT_SEND_API1,Mail is getting trigger properly with attachment but extension file is changed to some other format.please find attached herewith attachment.

When I see in SOST it is showing in excel format but in mail it is showing without extension.

Please find code piece of code for excel attachment.

OBJPACK-DOC_TYPE   = 'XLS'.

  OBJPACK-OBJ_NAME   = 'Permit Exception List'.

Regards,
Santosh

1 ACCEPTED SOLUTION

former_member182040
Active Contributor
0 Kudos

You can use FM SO_NEW_DOCUMENT_ATT_SEND_API1

5 REPLIES 5

former_member182040
Active Contributor
0 Kudos

You can use FM SO_NEW_DOCUMENT_ATT_SEND_API1

former_member196651
Contributor
0 Kudos

Hi Santhosh,

Have you passed the document size correctly? I had used as follows:

CLEAR WA_PACKING_LIST.

WA_PACKING_LIST-TRANSF_BIN   = 'X'.

WA_PACKING_LIST-HEAD_START  = 0.

WA_PACKING_LIST-HEAD_NUM     = 1.

WA_PACKING_LIST-BODY_START  = 1.

DESCRIBE TABLE GT_ATTACH LINES WA_PACKING_LIST-BODY_NUM.

WA_PACKING_LIST-DOC_TYPE      = 'XLS'.

WA_PACKING_LIST-OBJ_DESCR    = ' '.

WA_PACKING_LIST-OBJ_NAME      = 'AAA'.

WA_PACKING_LIST-DOC_SIZE        = WA_PACKING_LIST-BODY_NUM * 255.

APPEND WA_PACKING_LIST TO LT_PACKING_LIST.

Try this way.

Regards,

Abijith

rosenberg_eitan
Active Contributor
0 Kudos

Hi,

Please see if you can use cl_bcs (SO_DOCUMENT_SEND_API1 is older than me..... )

Is the file a real XLS file or text file ?

If it is CSV (Create the file using the rules http://en.wikipedia.org/wiki/Comma-separated_values ) just use extension csv .


If it is tab seperator it is type txt .

Excel know how to deal with those.

sample code to use cl_bcs: see Y_R_EITAN_TEST_10_04.txt

Regards.

former_member198402
Participant
0 Kudos

Dear Team,

First of all many thanks for the Quickie!

Instead of passing , OBJPACK-OBJ_NAME   = 'Permit Exception List'(Note:in SOST it is showing excel like icon.), if i pass

OBJPACK-OBJ_NAME   = 'Permit Exception List.XLS' It is working perfectly.

I am not getting why i need to pass obj_name with extension where as i am already passing

OBJPACK-DOC_TYPE   = 'XLS'.

Regards,
Santosh

0 Kudos

Hi,

Odd...

I have another test program for cl_bcs I do not supply in the "attachment subject" the suffix .

Regards.