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

SAP Mail

Former Member
0 Likes
920

Hi Friends,

I have problem in send content via SAP mail.Can u provide me a best way to send content inside the body follwing format eg

No Quan

1 10

I need tabspace between two values.

Thanks,

Deesanth.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
897

hi,

please use function module and for better understanding of parameters go through DOCUMENTATION.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA                    = wa_doc_data
       PUT_IN_OUTBOX                     =  X
      TABLES
        PACKING_LIST                     = it_objpack
*       OBJECT_HEADER                    =
        CONTENTS_BIN                     = it_objbin
        CONTENTS_TXT                     = it_objtxt
        RECEIVERS                        = it_reclist
     EXCEPTIONS
       TOO_MANY_RECEIVERS               = 1
       DOCUMENT_NOT_SENT                = 2
       DOCUMENT_TYPE_NOT_EXIST          = 3
       OPERATION_NO_AUTHORIZATION       = 4
       PARAMETER_ERROR                  = 5
       X_ERROR                          = 6
       ENQUEUE_ERROR                    = 7
       OTHERS                           = 8

regards

rahul

Edited by: RAHUL SHARMA on Feb 3, 2009 11:12 AM

4 REPLIES 4
Read only

Former Member
0 Likes
897

objtxt = ' Open changes for MBOM can not migrated, because MBOM migration covers currently only MBOMu2019s with an valid production date at 01.01. '.

append objtxt.

call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'

exporting

document_data = doc_chng

put_in_outbox = 'X'

commit_work = 'X'

tables

packing_list = objpack

object_header = objhead

contents_bin = objbin

contents_txt = objtxt

receivers = reclist

exceptions

too_many_receivers = 1

document_not_sent = 2

operation_no_authorization = 4

others = 99.

Read only

Former Member
0 Likes
898

hi,

please use function module and for better understanding of parameters go through DOCUMENTATION.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA                    = wa_doc_data
       PUT_IN_OUTBOX                     =  X
      TABLES
        PACKING_LIST                     = it_objpack
*       OBJECT_HEADER                    =
        CONTENTS_BIN                     = it_objbin
        CONTENTS_TXT                     = it_objtxt
        RECEIVERS                        = it_reclist
     EXCEPTIONS
       TOO_MANY_RECEIVERS               = 1
       DOCUMENT_NOT_SENT                = 2
       DOCUMENT_TYPE_NOT_EXIST          = 3
       OPERATION_NO_AUTHORIZATION       = 4
       PARAMETER_ERROR                  = 5
       X_ERROR                          = 6
       ENQUEUE_ERROR                    = 7
       OTHERS                           = 8

regards

rahul

Edited by: RAHUL SHARMA on Feb 3, 2009 11:12 AM

Read only

Former Member
0 Likes
897

Hi,

search in SE38 for BCS_EXAMPLE_*.

There are a lot of good and simple examples.

Regards, Dieter

Read only

Former Member
0 Likes
897

Hi Deesanth,

DATA: doc_chng LIKE sodocchgi1 OCCURS 0 WITH HEADER LINE,

objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,

objhead LIKE solisti1 OCCURS 0 WITH HEADER LINE,

recv LIKE somlreci1 OCCURS 0 WITH HEADER LINE.

DATA: text1(100).

WRITE: 'No ' left-JUSTIFIED TO text1+0(9),

'Quan' right-JUSTIFIED TO text1+10(17).

objtxt = text1.

APPEND objtxt.

CLEAR: text1,objtxt.

WRITE: '1 ' left-JUSTIFIED TO text1+0(9),

'10' right-JUSTIFIED TO text1+10(17).

objtxt = text1.

APPEND objtxt.

CLEAR: text1,objtxt.

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

document_data = doc_chng

document_type = 'RAW'

  • PUT_IN_OUTBOX = ' '

commit_work = 'X'

  • IMPORTING

  • SENT_TO_ALL =

  • NEW_OBJECT_ID =

TABLES

object_header = objhead[]

object_content = objtxt[]

  • CONTENTS_HEX =

  • OBJECT_PARA =

  • OBJECT_PARB =

receivers = recv

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

document_type_not_exist = 3

operation_no_authorization = 4

parameter_error = 5

x_error = 6

enqueue_error = 7

OTHERS = 8.

Regards,

Madhu