Skip to Content

Customer address details

Hello,

I have a requirement to have report of Partners E-mail id based on customer master.

In KNVP table i can get list of partner functions maintained to customer master.

I can pass the customer number in KNA1 table and address number,based on it ,i can get get E-mail id from ADR6 table.

How to get E-mail id for KNVP-PERNR.

Thanks,

MP

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 15, 2020 at 04:10 PM

    Hello Pradeep Mani

    PERNR is associated with a contact person at the customer end. It's advisable to use API as opposed to directly reaching into the DB table.

    Try this code,

    lt_contactaddr will return the email address of the contact.

        DATA:
          lt_range        TYPE TABLE OF          bapicustomer_idrange,
          ls_range        TYPE                   bapicustomer_idrange,
          lt_contactaddr  TYPE STANDARD TABLE OF bapicontact_addressdata.
          ls_range-low    = gv_customer.
          ls_range-high   = space.
          ls_range-sign   = 'I'.
          ls_range-option = 'EQ'.
          APPEND ls_range TO lt_range.
    
    *     get contact persons of customer
          CALL FUNCTION 'BAPI_CUSTOMER_GETCONTACTLIST'
            TABLES
              customerrange      = lt_range
              contactaddressdata = lt_contactaddr.
    Add a comment
    10|10000 characters needed characters exceeded

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.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.