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: 

We are using the SO_ATTACHMENT_INSERT_API1

Former Member
0 Kudos

Hi Guys

We are using FM  " SO_ATTACHMENT_INSERT_API1 " to attach the Excel document to send thru mail ., it is working fine in 4.7 environmnet . But in the upgraded version ECC 6.0 , the file contents reduced to half of the size when we checked in the mail attachment .

In debug mode if I double the filesize manually then it is working fine ..

For eg:  In 4.7 system , the file size is 10000 bytes and  ( is being calculated by system if we do not pass
, then it workds fine .)

            In ECC 6.0 , it sends the file thru mail but only half of the contents are available in the excel file .

Any clue how to resolve this without manul changes .

Responses are highly appreciated

Thanks

Satya

6 REPLIES 6

Former Member
0 Kudos

hello,

A simple solution would be keep the size as parameter on the seletion screen and use this in the FM when calling. This way you have control on the number.

You could also try the OOPS based mail sending functionality.

http://wiki.sdn.sap.com/wiki/display/Snippets/Sending+mail+with+attachment+using+Object+Oriented+App...

best regards,

swanand

0 Kudos

Hello

We are using the OOPs approach but in turn SAP is using the SO_ATTACHMENT_INSERT_API1 function module from add_attachmnet method .

The system is calculating the text file size and contents are delivered to the recipient only half of it .

For eg: If file contains 1000 lines then it is delivering only 500 lines as attachemnt.

any help would be appreciated

Thanks

Satya

0 Kudos

Hello Satish,

Can you please paste the code snippet for a better analysis for your problem?

Just out of curiosity, have you upgraded from an non-unicode 4.7 to unicode 6.0?

BR,

Suhas

0 Kudos

Hi Suhas

yes , upgraded from 4.7 non unicode to ECC 6.0 Unicode .

In ECC 6.0 Unicode environmnet , the problem lies .

System is calculating the document size and passing to the FM ,, it works fine in 4.7 ..,, in ECC 6.0 , it displays only half of the file contents .

When I double the doc_size ( multiplied by 2 ) then it is perfect .

Any input would be gr8

Thanks

Satya

former_member214878
Active Participant
0 Kudos

As Swanand is suggesting ..... I also suggest to use CL_BCS option. I think it works with all sizes and no need to worry about passing the file size in any case.

former_member576008
Active Participant
0 Kudos

Hi,

You can check this examples in your system.

BCS_EXAMPLE_1              BCS Use, Example 1
BCS_EXAMPLE_2              BCS Use, Example 2
BCS_EXAMPLE_3              BCS Use, Example 3
BCS_EXAMPLE_4              BCS Use, Example 1
BCS_EXAMPLE_5              BCS Use, Example 5 (Winword Attachment)
BCS_EXAMPLE_6              Send PDF Form by E-Mail
BCS_EXAMPLE_7              BCS: Send E-Mail with Self-Created Excel Attachment (Example)
BCS_EXAMPLE_8              Report BCS_EXAMPLE_8

Regards,

Nandha