How to send different message types to different partners in purchase orde?

Hi Folks,
I have been searching the forum for my question and have not found a solution yet. Maybe there is one out there that can give the solution.
The situation is as follows.
PO is created and output is determined for the Vendor and medium is correctly set to 5 (External Message, PDF).
The requirement is the be able to either manualle add a partner and enter a email address or get it via automatically determination from buyer (Pur.Grp.)
I have made a new Message type as a copy of neu and only allowed partner BU (Buyer). However that does not seem to work
Anyone out there that could help?
Thanks in advance,
Thomas

Hi Craig,
In the print program we call the form z_get_mail_address
    when '5'.
      data:  lvs_comm_type     type   ad_comm,
             lvs_comm_values   type   szadr_comm_values.
  ... use stratagy to get communication type
enhancement-section lmedruckf1o_01 spots es_saplmedruck .
      call function 'ADDR_GET_NEXT_COMM_TYPE'
        exporting
          strategy           = nast-tcode
          address_number     = lfa1-adrnr
        importing
          comm_type          = lvs_comm_type
          comm_values        = lvs_comm_values
        exceptions
          address_not_exist  = 1
          person_not_exist   = 2
          no_comm_type_found = 3
          internal_error     = 4
          parameter_error    = 5
          others             = 6.
end-enhancement-section.
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
*Begin 27-09-2011
      perform z_get_mail_address changing lvs_comm_type lvs_comm_values.
End 27-09-2011 xkgu
convert communication data
      move-corresponding nast to intnast.
      move sy-repid           to xprogramm.
      call function 'CONVERT_COMM_TYPE_DATA'
        exporting
          pi_comm_type              = lvs_comm_type
          pi_comm_values            = lvs_comm_values
          pi_country                = lfa1-land1
          pi_repid                  = xprogramm
          pi_snast                  = intnast
        importing
          pe_itcpo               
we added the following code:
form z_get_mail_address changing lvs_comm_type type ad_comm lvs_comm_values type szadr_comm_values.
  data: c_recipient(2) type c value $R
        c_buyer(2)      type c value 'ZC',
        l_mail              like lvs_comm_values-adsmtp-smtp_addr.
  tables: pa0105.
    case nast-parvw.
      when c_indkoeber.
Get mail address in infotype PA0150 subtype 0009.
nast-parnr must be personal number from HR.
        select single * from pa0105 where
              pernr = nast-parnr
          and subty = '0010'
          and begda <= nast-erdat
          and endda >= nast-erdat.
        if sy-subrc = 0.
          l_mail = pa0105-usrid_long.
          perform z_get_mail using l_mail. " some logic here
          lvs_comm_values-adsmtp-smtp_addr = l_mail.
          translate l_mail to upper case.
          lvs_comm_values-adsmtp-smtp_srch  = l_mail.
          lvs_comm_values-adsmtp-consnumber = '001'.
          lvs_comm_values-adsmtp-flgdefault = 'X'.
          lvs_comm_values-adsmtp-home_flag  = 'X'.
          lvs_comm_type = 'INT'.
        endif.
      when c_recipient
Get mail address in PO item (EKPO-AFNAM)
        l_mail = ekpo-afnam.
        perform z_get_mail changing l_mail.
        lvs_comm_values-adsmtp-smtp_addr = l_mail.
        translate l_mail to upper case.
        lvs_comm_values-adsmtp-smtp_srch  = l_mail.
        lvs_comm_values-adsmtp-consnumber = '001'.
        lvs_comm_values-adsmtp-flgdefault = 'X'.
        lvs_comm_values-adsmtp-home_flag  = 'X'.
        lvs_comm_type = 'INT'.
    endcase.
endform.                    " Z_GET_MAIL_ADDRESS

Similar Messages

  • How to assign different Message Type to different Doc. Types

    Hi,
    Can anyone tell me how can I assign different Message Type to different Doc. Types e.g. in ME21N. So that whenever the Doc Type is selected the respective Message Type is automatically assigned.
    Lucky

    hi there
    follow this path
    spro - materials management - purchasing - messages - output cntrol - message types - define message types for p/o
    then
    spro - materials management - purchasing - messages - output cntrol - message determination schemas - define message determination schemas for purchase order
    then
    go to
    mn04
    give doc type  - enter
    enter partner role & other parametrs

  • IDOC - IDOC scenario with different message types

    Dear Experts
    I will like to have your expert opinion in the following question:
    I have an IDOC -> IDOC scenario. Wherein at the destination system I have a message type which does not exist at the source system.
    Also the IDOC type at destination system does not exist at the source system.
    Let say, I will be creating custom message type at source system (Z****) and will also be creating the custom IDOC type (z****) with the same structure, definition as the destination.
    Now my question is, even if there will be different message types and different IDOC types but with the same structure (the segment level definition
    and field attribute remains the same at both the system). The difference lies with the names. And I have proper mapping though process code.
    Will I be able to receive the IDOC correctly at destination?
    Thanks & Best Regards

    Hi All
    I figured out the answer myself now.
    You got to have same name for message type. All of you said this and this is rite.
    Coming to IDOC type, I did not really got clear idea on this from this discussion.
    But after working on a scenario, I learnt that, you can have different names for IDOCs, but provided that, whichever IDOC type the source system is sending, the same type must exist in your destination as well. Otherwise, system wont process your IDOC. But from mapping point of view, its upto individual how do thay handle mapping inside inbound process code for different idoc types / strucutes.
    Lesson learnt by me, ideally try to keep same name for both logical message and idoc type at both source and destination. If possible try to keep the structure level also the same. This is my view, learnt it the hard way.
    Cheers
    Shane

  • Can we assign same  basic type to  different message type in ALE

    Hi Expert
       can we assign same idoc type to different message type?

    Hi,
    Yes you can assign the one idoc type to multiple message type. Message type nothing but it represents the kind of data we transfer.But idoc type is the format in which we transfer data. As an example in Messager types "ORDERS" and "ORDRSP"  both indicates the order related data, and in both case idoc type can be ORDERS01, ORDERS02.............
    Thanks,
    Asit Purbey.
    Edited by: Asit Purbey on Oct 12, 2009 3:07 PM

  • How to Customize Sending of Message Type ORDERS/ORDRSP?

    Hi Experts,
    After saving a ORDER in SAP I will that IDOC ORDERS01 will be send by Message Type ORDERS and a ORDER Confirmation by Message Type ORDRSP.
    How can i Customize that?
    Can somebody help me?
    Thanks,
    Frederic

    Hello Frederic,
    Create output type for both these and maintain the condition record to determine the partners and configure the partner profile for the partner with two outbound message types.
    Regards
    Farzan

  • Best Practices Question: How to send error message to SSHR web page.

    Best Practices Question: How to send error message to SSHR web page from custom PL\SQL procedure called by SSHR workflow.
    For the Manager Self-Service application we’ve copied various workflows which were modified to meet business needs. Part of this exercise was creating custom PL\SQL Package Procedures that would gather details on the WF using them on custom notification sent by the WF.
    What I’m looking for is if/when the PL\SQL procedure errors, how does one send an failure message back and display it on the SS Page?
    Writing information into a log or table at the database level works for trouble-shooting, but we’re looking for something that will provide the end-user with an intelligent message that the workflow has failed.
    Thanks ahead of time for your responses.
    Rich

    We have implemented the same kind of requirement long back.
    We have defined our PL/SQL procedures with two OUT parameters
    1) Result Type (S:Success, E:Error)
    2) Result Message
    In the PL/SQL procedure we always use below construct when we want to raise any message
    hr_utility.set_message(APPL_NO, 'FND_MESSAGE_NAME');
    hr_utility.raise_error;
    In Exception block we write below( in successful case we just set the p_result_flag := 'S';)
    EXCEPTION
    WHEN APP_EXCEPTION.APPLICATION_EXCEPTION THEN
    p_result_flag := 'E';
    p_result_message := hr_utility.get_message;
    WHEN OTHERS THEN
    p_result_flag := 'E';
    p_result_message := hr_utility.get_message;
    fnd_message.set_name('PER','FFU10_GENERAL_ORACLE_ERROR');
    fnd_message.set_token('2',substr(sqlerrm,1,200));
    fnd_msg_pub.add;
    p_result_message := fnd_msg_pub.get_detail;
    After executing the PL/SQL in java
    We have written some thing similar to
    orclStmt.execute();
    OAExceptionUtils.checkErrors (txn);
    String resultFlag = orclStmt.getString(provide the resultflag bind no);
    if ("E".equalsIgnoreCase(resultFlag)){
    String resultMessage = orclStmt.getString(provide the resultMessage bind no);
    orclStmt.close();
    throw new OAException(resultMessage, OAException.ERROR);
    It safely shows the message to the user with all the data in the page.
    We have been using this construct for a long time for all our projects. They are all working as expected.
    Regards,
    Peddi.

  • Different Transaction Types for Different Depreciation Areas

    Dear Friends,
    When I am viewing the asset explorer for the asset, it is oberved that for book derpreciation 01, the asset transaction type "acquisition value" is updated and am able to view the same.
    However when I am going through the tax depreciation area, the transaction type intercompany transfer" got updated and the acquisition values are not updated.
    I would like know the reason of how the system is going to update different transaction types in different depreciation areas since the postings only takes effect in book depreciation and same should be diplayed for tax depreciation.
    Thanks in advance!

    hi
    go to OAYA
    select        "Limit Transaction Types to Depreciation Areas"
    select the trnsaction type you using .
    select depreciation area specification
    and maintain entries for every dep area you want to maintain for transaction type.
    regards

  • Tutorial announcement :: How to send a message(s) with attachments ::

    How to send a message with attachments Using Adobe Dreamweaver CS3 and Developer Toolbox...
    - In this tutorial you will use Developer Toolbox features to build a simple contact us form with the advantage to upload file with your message and send this file via e-mail as an attachments.
    Using This application will allow to:
    * insert records into database and then send them via e-mail.
    * upload files to the server.
    * send message with uploaded files as attachments.
    This tutorial contains one part
    1. insert record, and then send it by email with (attachments).
    By following this tutorial section, you will create:
    * Page for inserting records.
    * Page for thank you when the message is sent.
    :: To View the tutorials ::
    :: Online Demo ::
    Brought t you by:
    www.developer-online.com

    Open the photo, assuming it is in Photos, and then in the lower left corner under the photo is a box with an up-pointing arrow.  Tap that box, and then the photo will have a blue circle with a checkmark in its lower right corner and the word Next at the upper right.  Tap Next, then choose how you want to send the photo, by text message, email, and so on.  Simply address the method you have chosen and put in any text you want to include.

  • How to send a message with a photo to a company?

    I AM S DISABLED SENIOR WITH SHORT-TERM MEMORY. PLEASE TELL ME HOW TO SEND A MESSAGE AND INCLUDE A PHOTO I HAVE ON MY i-PHONE 5S?
    THANK YOU IN ADVANCE FOR THE ASSISTANCE.
    FLIGHTLEADER-1

    Open the photo, assuming it is in Photos, and then in the lower left corner under the photo is a box with an up-pointing arrow.  Tap that box, and then the photo will have a blue circle with a checkmark in its lower right corner and the word Next at the upper right.  Tap Next, then choose how you want to send the photo, by text message, email, and so on.  Simply address the method you have chosen and put in any text you want to include.

  • How to send a message to a pager? URGENT

    Hi everybody
    I wanna know how to send a message (or a caller's number) to a pager from Form.

    Hi,
    if you can find a public Webservice on the Web that provides this functionality, you could use JDeveloper and the Forms Java Importer to call it from Forms.
    JDeveloper is helpful in creating the Java skeletton to communicate with the Webservice. As similar issue is covered in teh Forms9i demos by the example of a currency converter.
    Frank

  • How to send ALL message that is in Outbox without ...

    How to send ALL message that is in Outbox without doing it one by one sending?
    All status is either deferred, or failed. is there a way that can auto resend but not doing it one by one?
    I have hundred of message un-send and stuck in outbox.
    Please help.

    try select options then scroll down to mark mark all if this does not work you will either have to delete or resend,you can delete all messages via the same mark all option your best of to just remove,also keep your inbox to a minimum
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • How to send text messages using my Laptop

    How to send text messages written on my Laptop on my Curve8520 with Orange network?

    umm... you don't. SMS is a function of the BlackBerry, not your PC.
    There could a desktop software for SMS, but I don't know what it would be.
    **edit, well this looks like it would work.
    http://download.cnet.com/Desktop-SMS/3000-10440_4-​10340430.html
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How to use PO message type to output 'Form' as PDF file

    Dear experts,
      I am working for a topic of how to use PO message type to output 'Form' as 'PDF file', and save to external file system automatically.
      Any one familiar to this topic, please kindly give me some guide, thank you!
    Regards,
    Joyce

    Hi,
       Go through the program RSTXPDFT4 (Converting SAPscript (OTF) or ABAP List Spool Job to PDF), you will get some idea.  Using this program you can convert spool into PDF file.
    -Alpesh

  • HT3529 how to send group messages in ios 7.0.2

    please tell me how to send group messages in iphone 5 with ios7.0.2

    Oh yeah, now I remember that.
    But I also remember that you had to go all the way to the start of the message to gain access to the current contact information. Where as in iOS7 that button you mentioned is the contact information. Personally I perfer iOS7. I don't delete my messages, so this is better for me.
    However, it wouldn't be a bad idea to add an Edit button in that sub menu that shows up when you touch the upper right button. Currently there are opitions for "Phone", "FaceTime" and "Information" on the contact.
    KOT

  • How outbound idoc of message type WMMBXY is created? any program or FM name

    Hello Gurus,
    How outbound idoc of message type WMMBXY is created? any program or FM name??
    basic type : WMMBID01... i checked the idoc in my system, it does not have any process code....
    also, i checked the exit : EXIT_SAPLMBMB_001. It has some code but nothing to fill the segments...
    BR,
    Ks

    got the answer in : WMMBXY and WMMBID02

Maybe you are looking for

  • QT doesn't open all the way...can't see the video

    I get a the thing to open but not all the way as a video would with at least the opening frame. I get just a narrow box that look like an audio file.

  • Error while doing risk analysis for a user

    Hi , When i did risk analysis at user level for a particular user we are getting this error under level  ."Exception!!. No relavent language message available in database for :0292".I had reuploaded the the messages text file but still the error pers

  • Add to playlist from playlists?

    There used to be an option to add songs to playlists from existing playlists, I can't see any way to do this in iOS7? Has this feature been removed? I can only see the option to add from Artist, Songs, Albums, Composers.

  • Welcome vid?

    Hi all; Just began using my new MBP (upgrade from elderly TiBook; totally wonderful) and have a profoundly non-essential question. The first few times I started up the new Book it offered me the standard "welcome to your new Mac" video tour thing. I

  • V space & H space that were in Properties panel gone in CS6

    In CS5 the Vspace and H space fields where in the Properties panel... I have looked and looked and can't find them in CS6. Did they move them or do I have a jacked up Creative Cloud version of CS6? I'm also not using CS6 to upload content because it