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

Database error - ADDR_PERS_COMP_COMM_GET

Former Member
0 Likes
1,879

Hi All,

I am trying to use the FM SO_NEW_DOCUMENT_ATT_SEND_API1 in order to be able to send an email with a text file as an attachment.

But when I try to ececute my report, I get an error stating - Database error for ADDR_PERS_COMP_COMM_GET, after which it exits the program.

I have tried searching for this error but could not get anything related to it.

I would like to know what this error is and why am I getting it. Also how can I resolve this error?

Please help.

Thanks & Regards,

Namrata

13 REPLIES 13
Read only

Former Member
0 Likes
1,481

namrta,

i think in your program ADDR_PERS_COMP_COMM_GET Fm getting called in some where.

problem is in this Fm not in SO_NEW_DOCUMENT_ATT_SEND_API1

just look at below how to use:

CALL FUNCTION 'ADDR_PERS_COMP_COMM_GET'
      EXPORTING
*       ADDRESS_HANDLE          = addr-addrhandle
        ADDRESS_NUMBER          = addr-addrnumber  "' '
*       DATE_FROM               = '00010101'
*       LANGUAGE                = SY-LANGU
*       PERSON_HANDLE           = ' '
        PERSON_NUMBER           = addr-persnumber  "' '
        table_type              = ttype
*     IMPORTING
*       RETURNCODE              =
      tables
        comm_table              = TTXTAB
*       ERROR_TABLE             =
      EXCEPTIONS
        PARAMETER_ERROR         = 1
        ADDRESS_NOT_EXIST       = 2
        PERSON_NOT_EXIST        = 3
        INTERNAL_ERROR          = 4
        OTHERS                  = 5.

please pass all mandatory fields.

Amit.

Read only

Former Member
0 Likes
1,481

Hi,

There are many sap notes avaialble for this error msg. Please check service.sap.com for relevant note.

Best regards,

Prashant

Read only

Former Member
0 Likes
1,481

have you filled SOMLRECI1 ??

otherwise look in st22 if there are dumps descriping more about this

kind regards

arthur de smidt

Read only

Former Member
0 Likes
1,481

Hi

try using following code

  • Add Packing List (attachment) for PDF...

DESCRIBE TABLE t_con_bin LINES h_tab_cntr.

READ TABLE t_con_bin INDEX h_tab_cntr.

h_doc_data-doc_size = h_doc_data-doc_size

+ ( ( h_tab_cntr - 1 )

  • 255 + STRLEN( t_con_bin ) ).

h_doc_data-obj_descr = mail_subject.

h_body_start = 1.

h_body_num = h_tab_cntr.

  • Write RAW data if that's what it is (adds to TEXT)...

IF h_real_type = 'RAW'.

DESCRIBE TABLE t_con_text LINES h_body_start.

h_body_start = h_body_start + 1.

h_transf_type = space. " Transfer type TEXT...

LOOP AT t_con_bin. " Zip thru TEXT stuff

t_con_text = t_con_bin. " set TEXT table header..

APPEND t_con_text. " add to what's there!

ENDLOOP.

CLEAR: t_con_bin. " clear BINARY header..

REFRESH: t_con_bin. " reset BINARY table...

ENDIF.

CLEAR t_pak_list.

IF h_transf_type = 'X'. " Binary=PDF/ALI?

t_pak_list-transf_bin = 'X'.

t_pak_list-head_start = 1.

t_pak_list-head_num = 0.

t_pak_list-body_start = 1.

t_pak_list-body_num = h_tab_cntr.

t_pak_list-doc_type = h_real_type.

t_pak_list-obj_name = 'ATTACHMENT'.

t_pak_list-obj_descr = 'Document'(001).

t_pak_list-doc_size = ( h_tab_cntr - 1 )

  • 255 + STRLEN( t_con_bin ).

ELSE.

DESCRIBE TABLE t_con_text LINES h_tab_cntr.

READ TABLE t_con_text INDEX h_tab_cntr.

t_pak_list-transf_bin = ' '. " Binary=RAW

t_pak_list-head_start = 1.

t_pak_list-head_num = 0.

t_pak_list-body_start = h_body_start.

t_pak_list-body_num = h_tab_cntr.

t_pak_list-doc_type = h_real_type.

t_pak_list-obj_name = 'ATTACHMENT'(002).

t_pak_list-obj_descr = 'Report'(003).

t_pak_list-doc_size = ( h_body_num - 1 )

  • 255 + STRLEN( t_con_text ).

ENDIF.

APPEND t_pak_list.

ENDIF.

  • Send the EMAIL out with SAP function...

CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'

EXPORTING

document_data = h_doc_data

put_in_outbox = 'X'

  • commit_work = 'X'

TABLES

packing_list = t_pak_list

contents_bin = t_con_bin

contents_txt = t_con_text

receivers = t_receivers

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 syst-subrc NE 0.

  • RAISE send_failed.

CALL FUNCTION 'NAST_PROTOCOL_UPDATE'

EXPORTING

msg_arbgb = '00'

msg_nr = '001'

msg_ty = 'E'

msg_v1 = 'O/P Could not be issued '(001)

msg_v2 = ' Due to No Mail ID'(002)

msg_v3 = syst-msgv3

msg_v4 = syst-msgv4

EXCEPTIONS

OTHERS = 1.

Regards.

Eshwar.

Read only

0 Likes
1,481

Hi All (Amit, Prashant, Arthur & Eshwar),

Thanks a lot for replying to my query! But my problem is still not solved.

While trying to send the mail with a text file attachment; the FM is sending the file, as sy-subrc = 0. But it actuallyu does not send it.

How to check where the mail is getting bloacked?

Please advise.

Thanks & Regards,

Namrata

Read only

0 Likes
1,481

Check in SOST if it's there .. If found try to send Manually ..

goto Utilities-->Start send Process give the address type ..

click on start ..

Read only

0 Likes
1,481

Hi Srinivas,

I checked SOST and the status message over there says:

'Document sent. Wait for communications service.'

It is also showing a warning signal (yellow triangle) against this entry in SOST transaction.

I tried sending it manually as you have told in your reply; but it is giving an error saying:

'Cannot process message, no route from SENDER to RECIPIENT ADDRESS. Document deleted from queue '.

Please tell me how to proceed with this further. How can I resolve this error? Where am I going wrong?

Thanks & Regards,

Namrata

Edited by: Namrata Khanna on Jul 28, 2008 2:59 PM

Read only

0 Likes
1,481

so you have to customize you're email services first . don't know if you are allowed to do it you're self.

look at SCOT where all services are defined

kind regards

arthur de smidt

Read only

0 Likes
1,481

Hi Arthur,

How to customize the email services? Is any configuration required?

Thanks & Regards,

Namrata

Edited by: Namrata Khanna on Jul 29, 2008 3:17 PM

Read only

0 Likes
1,481

Namrta,

see in SCOT is for internet service is enable with SMTP?

AMit.

Read only

0 Likes
1,481

Hi Amit,

So, what am I suppose to do to make it work?

I'm using this for the first time, so am not able to understand the whole thing properly.

Please help.

Thanks & Regards,

Namrata

Read only

Former Member
0 Likes
1,481

I was suppose to make the proper settings for the internet and also configure the recipient's email address.

Read only

0 Likes
1,481

Hello Namrata,

I am facing the same issue with the function module SO_SEND_DOCUMENT_API1.

Can you tell me how you fixed this issue?

Thanks,

Anil