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: 

problem when adding an attachment to the mail in RFC

pradeep_grandhi
Active Participant
0 Kudos

Hi all,

I am creating a RFC which accepts 5 parameters to send a mail...

subject

body

sender email id (is always Gmail)

receiver email id (is always SAP user)

attachment ( is of table type which consists of a structure containing the attachment type, attachment name and content which is of type soli_tab)

when i pass these data the mail should sit in my SBWP inbox.

as the gmail attachment is in base64 data... i pass only base64 data as the content...

the problem is that i m able to read only 1 line of base64 data in the attachment... the other lines of base64 data is missing

please help me...

Edited by: pradeepwitu on Aug 20, 2011 1:18 PM

7 REPLIES 7

Clemenss
Active Contributor
0 Kudos

Hi pradeepwitu,

probably this is the result of your excellent

code

Instead of

code

you could try

code

Regards,

Clemens

0 Kudos

Hi Clemens Li ,

I did not get you... Would you be a bit clear in answering?

Clemenss
Active Contributor
0 Kudos

Hi pradeep,

sorry for not being too clear.

I tried to express that your result may be the consequence of your coding.

As you did not post any code (which should have been formatted as code), my suggestion is to exchange your code.

As your code still is a secret, I'm very sorry to being able to give further assistance.

Regards

Clemens

Former Member
0 Kudos

Hi

It should be better to use a TABLE parameter instead of a type table in the IMPORT parameter

Max

0 Kudos

my import parameter 'attachment' is of type ztable type.

the ztable type contains a zstructure as follows:

1. type char3 (attachment type)

2. filename char50 (attachment name)

3. attach type soli_tab (attachment content )

Edited by: pradeepwitu on Aug 21, 2011 9:01 AM

0 Kudos

Hi

Try to split those informations in only 1 big table having all 3 fields

type file, file name and data, so the structyre will be:

type type char3

filename type char50

attach_line type soli

I know the data like type and filename would be repeated for each line of the attachment, but perhaps you can decide an agreement in order to set them in the first line (of each attachment) only.

SAP recommends to use a TABLE paramenter because it's better to have a reference to a flat structure (your type table is a deep structure)

Max

pradeep_grandhi
Active Participant
0 Kudos

Solved