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: 

Unable to fetch sy-uname details from FM: CREATE_SENDER_OBJECT_PPF

sandeep_reddy24
Participant
0 Kudos

Hi,

I have a program to send email via Tcode VF31,but for some users getting error message as:

Recipient does not exist in the address management

Message no. SO601

Diagnosis A recipient name was entered (possibly with *) which was not found in the address management.

Procedure Check whether the recipient name has been spelled correctly.

configuration is as per the note: 2994323.

Kindly help me how to overcome this issue.

9 REPLIES 9

VXLozano
Active Contributor

Did you debug the program? What does your code look like? How it calls the function/class that sends the message?

We cannot (kindly or not) help you to overcome this issue, because we have not enough information about it.

sandeep_reddy24
Participant
0 Kudos

Hi vicen.lozano,

Here is my code where it is failing. Sy-subrc = 1 and the message "Recipient does not exist in the address management".

p_mail_sen_obj type swotobjid.  
call function 'CREATE_SENDER_OBJECT_PPF'
    exporting
      ip_sender      = sy-uname
    importing
      ep_sender_id   = p_mail_sen_obj
    exceptions
      invalid_sender = 1
      others         = 2.
  if sy-subrc <> 0.
    message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.

0 Kudos

Don't use the "Your Answer" field to provide more information. Instead comment on your original question. As the Answer edit box says:

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.

0 Kudos

Hi Sandip,

It seems the user has not any address data maintained for the user. You can check USR21 table if ADRNR populated there.

Kuntal

0 Kudos

Hi Kunal,

I can see the email id in SU01D and USR21, ADR6 tables with PERSNUMBER and ADDRNUMBER in both the systems.

VXLozano
Active Contributor

The code where it is failing. Sy-subrc = 1 and the message "Recipient does not exist in the address management".

call function'CREATE_SENDER_OBJECT_PPF'
  exporting
    ip_sender      = sy-uname
  importing
    ep_sender_id   = p_mail_sen_obj
  exceptions
    invalid_sender = 1
    others         = 2.
ifsy-subrc <>0.
  message id sy-msgid type sy-msgty number sy-msgno
    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.

The message it's pretty clear. Did you checked the user email? Go to SU01D in the system that returns it, take a look at the user for which the code "fails" (it does not, it's working properly), and look for his email address. I bet you will find it does have no email address.

0 Kudos

Hi vicen.lozano,

I am trying to execute the program in Development and production systems, in Dev user details are fetching but in Prod, its failing.

I have checked the SU01D both the systems the email id's are maintained, also i can see the email id in USR21, ADR6 tables with PERSNUMBER and ADDRNUMBER in both the systems.

VXLozano
Active Contributor
0 Kudos

Two options (I can think about):

  • you are checking the wrong user (remember: sy-uname is the user who is executing the program in foreground, or the user assigned as that in background job)
  • the URL address assigned to the user is wrong (has a wrong format)

Try to debug the whole thing, put a break-point in the function, and a watch-point in sy-subrc. There you'll be able to see which user id is really been passed to the program, and with the wp you'll be able to get the IF (probably) that raised the "exception"

sandeep_reddy24
Participant
0 Kudos

I have solved myself, resolution: Authorization issue found in the program: SAPFS003 while debugging.

Form: FILL_SAP_AUTHORITIES_IN.