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

Text format problem when sending mails

Former Member
0 Likes
761

Hi all,

I am using the FM SO_DOCUMENT_SEND_API1 to send mail in text format, but the problem now is iam getting the space between each characters and also for each lines the alignment differs. can any one tel me how to solve this issue ?

D o c u m e n t N o L o g D e s c r i p t i o n

4 5 0 0 0 0 1 4 1 0 PO d o n e f o r G o o d s r e c e i p t o f P O 4 5 0 0 0 0 1 4 1 0

4 5 0 0 0 0 1 4 1 1 PO d o n e f o r G o o d s r e c e i p t o f I n t e r C o P O 4 5 0 0 0 0 1 4 1 1

4 5 0 0 0 0 1 4 1 2 PO d o n e f o r G o o d s r e c e i p t o f I n t e r C o P O 4 5 0 0 0 0 1 4 1 2 .

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
723

Hi Siva,

please search , i hope u might get this long time back....

nyways i hope this helps.

Regards,

Aby

6 REPLIES 6
Read only

Former Member
0 Likes
723

check this thread..

Read only

Former Member
0 Likes
723

Hi Siva,

Seems problem with the types.Define following paramaters as shown below.

DATA: DOCDATA LIKE SODOCCHGI1 OCCURS 0,

  • OBJPACK LIKE SOPCKLSTI1 OCCURS 0,

OBJHEAD LIKE SOLISTI1 OCCURS 0,

L_OBJTXT1 TYPE SOLISTI1,

RECLIST TYPE SOMLRECI1,

DOC_CHNG TYPE SODOCCHGI1,

OBJPACK TYPE SOPCKLSTI1.

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

DOCUMENT_DATA = DOC_CHNG

PUT_IN_OUTBOX = 'X'

COMMIT_WORK = 'X'

  • IMPORTING

  • SENT_TO_ALL =

  • NEW_OBJECT_ID =

TABLES

PACKING_LIST = L_OBJPACK

OBJECT_HEADER = L_OBJHEAD

  • CONTENTS_BIN =

CONTENTS_TXT = L_OBJTXT

  • CONTENTS_HEX =

  • OBJECT_PARA =

  • OBJECT_PARB =

RECEIVERS = L_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

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Regards,

Ravinder

Read only

Former Member
0 Likes
723

Hi

Can you tel me how to use html tags in FM SO_DOCUMENT_SEND_API1.

Read only

0 Likes
723

Search for HTML tags...you'll find some articles, logs or forum postings on how to do.

Read only

Former Member
0 Likes
723

Dear Siva,

Try to use the following sample codes for line alignment.

DATA:C_TAB TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,

C_RET TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF.

CONCATENATE 'Maintenance plan' 'Maintenance item description' 'Equipment'

INTO IT_ATTACH1 SEPARATED BY C_TAB.

CONCATENATE C_RET IT_ATTACH1 INTO IT_ATTACH1.

APPEND IT_ATTACH1.

LOOP AT ITAB2.

CONCATENATE ITAB1-WARPL ITAB1-EQUNR ITAB1-EQKTX INTO IT_ATTACH1 SEPARATED BY C_TAB.

CONCATENATE C_RET IT_ATTACH21 INTO IT_ATTACH1.

APPEND IT_ATTACH12.

ENDLOOP.

Thanks & Regards,

Sakthivel.VT

Read only

Former Member
0 Likes
724

Hi Siva,

please search , i hope u might get this long time back....

nyways i hope this helps.

Regards,

Aby