Email usings ALE AUD

Hi All,
         Can we send email using ALE Audit?
Regards,
XIer

Hi,
To implement the scenario, cosider two seperate scenario's involved in it.
First Scenario would be posting the Idocs in R/3 system. It is the simple File to IDOC scenario.
Second scenario would be sending the acknowledgement using Mail adapter. It would be simple IDOC to File scenario.
So, second scenario comes into our scope.
In IR of this scenario,during message mapping,Source message would be ALEAUD Idoc (which would be used as Extenal definition as the occurance of it would be 0...Unbounded). The Target structure would depend on the type of message to be send as Email.
In mapping, collect all the status of Idoc field in a context and count them as how many are successful(status==53) and how many are unsuccessful(status!=53).
In ID, the sender would be the R/3 system using ALEAUD as an interface and Receiver would be your target system, in which Mail adapter will be used in Communication channel.
For other settings and runtime behaviour , plz refer to the preivous reply of mine, to your question.
For any further queries revert to me!!!!!!
CHEERS,
Rahul

Similar Messages

  • ALEAUD not coming to SAP from XI & u0093Acknowledgment not possible" in idx5

    Hi All,
    I am trying to configure ALEAUD in SAP->XI->JDBC scenario for Idoc acknowledgment.
    I did following config in SAP
    WE21 create port for XI
    WE20 create Partner type XIDLOGSYS1 ‘LS’ , Inbound parameter ALEAUD.
    In XI I delete all entries from IDXNOALE table.
    But still I am not receiving any ALEAUD in D02 when, any IDOC posted from SAP to XI.
    In SXMB_MONI I am able to see Ack status “Acknowledgment not possible”
    Please guide how to get ALE AUD in SAP from XI.
    Regards

    Before I ask my questions, please note I do have a copy of the "How To Handle Acknowledgements for IDoc" How To Guide. I just need some clarification from the group.
    Here are my questions:
    1. XI will not send a positve acknowledgement/status to let the sender system know it made it to XI ok, correct?
    2. The only status that XI itself will initiate will be if there is a techncial issue with XI, correct? (Granted the Receiver system could send a positive or negative status back to Sender System) I just want to make sure that XI will not send a status back to Sender System that equates to "Triggering EDI subsystem OK" (or something like that)
    3. How does the status of an idoc get set to 12 from 03? Does that mean that I always have the program RBDMOIND configured when I am interfacing to XI in order to force the status from 03 to 12?
    4. As a norm, are those who are using XI seeing a 12 status on the Sender System IDoc Status?
    5. If a techical issue error occurs in XI, what specific error status will be sent back to the Sender System?(if at all) I am looking for an example status number of what to expect.
    6. If we are doing SAP R/3 to a partners XI system directly and that partner does not have RBDSTATE configured on their SAP R/3 environment and there is nothing else on their XI system for ALEAUD processing, I am out of luck in determining if the IDoc actually made it to their XI system, correct?
    7. The Configure Scenario 2 in the document How To Handle Acknowledgements for IDoc" How To Guide should allow us to determine "did the Idoc get to that Server" correct?
    Thanks for any feedback on this,
    Ian

  • How to fail a Output in a PO

    Hi,
    We have a requirement where we need to fail a output  when the medium is email and ale. This will trigger email to the buyer.
    In order to give users for testing we need the setting which will fail the output.
    Any information on this is highly appreciated.
    Regards,
    Deb

    hi
    you have to check the status of the output and get the buyer User ID from the purchase order table and the user ID should have maintained with email address. then code the message to be sent as email for the failture notification

  • ALE - DEBMAS06  customer email

    Hi all,
    I'm trying to create a customer via ALE, using message type DEBMAS06. The problem is i cant seem to find the idoc segment and fields to maintain the customer email.... Can someone help me out on this?!
    Regards,
    PCastro.

    Hi..
    Pedro..
    It Seems there is no field available for EMAIL in Customer Master IDOC DEBMAS06 and the Table KNA1.
    So you can add this field in KNA1 using APPEND structure and
    Create the New segment with this field and
    Create an Extended idoc type with this new segment.
    <b>Reward if Helpful.
    </b>

  • Can i use two iphone 4's on my mac usings itunes account but also get different contacts and email accounts...help please

    Hi i two iphones one mine one my wifes.
    We have one mac laptop and one itunes account. is it possible to sync the two iphones on itunes but have two different contacts and email address.
    But i would also like my apps to work on her mobile as i do not want to pay for them twice..

    Yes. There is no device limit for the number of iPods, iPads, and iPhones that can be synced with the same iTunes library and iTunes account on the same computer. Each device can have its own sync preferences with iTunes on the same computer.
    If both iPhones are synced with the same Address Book under the same computer login account, then the contacts on each iPhone will be the same. With the Address Book on a Mac, you can sync select Address Book Groups only with an iPhone instead of the entire Address Book and all groups. You and/or your wife can create an Address Book Group or multiple Groups to be synced with each other's iPhone only. You can transfer the settings for one email account to one iPhone and the settings for another email account to the other iPhone.

  • Idoc/ALE error handling, send to external email

    Hi all,
    I'm developing an IDoc inbound interface for purchase order create using PORDCR1. For the error handling functionality, I need to send an external email describing all of the validation error happened in user-exit EXIT_SAPFKCIM_002. Please kindly tell me how to cater the functionality. I won't use workflow because the error handling can't describe all the error, it just displaying the first error encountered. I also don't want to create any custom object since message type PORDCR1 is available. I think creating a custom FM is a possible way, but if there is another way, please tell me how.
    Thanks,
    Teddy

    Hi Teddy,
    A custom FM is the easiest and simple way.There may be other ways.
    Regards,
    Atish

  • Email tones on E72 - anyway to have individual ale...

    Hi,
    Newbie here, just received my E72 as a company phone and am setting everything up.
    I have fiddled around and pretty much got everything working (push email etc), but I am really missing the option to have different tones for my personal and work emails. Is this possible?
    Cheers

    E72 has its new updated version of Nokia Messaging. In fact the site says so. It may be updated, but it doesn't work as well at all.
    Firstly this problem with all non-hotmail/gmail accounts not working, then it used to give you the number of emails unread from the Email screen, it doesn't do that anymore.
    And also, whereas on the home screen before, you could have 1 primary address, and all others were under "other email accounts" so you could see if you had any unread mail. Now you have one primary and one secondary emails on the home screen, so any other emails that come in apart from that you won't see, not on the home screen and not on the main email screen either as you can't find unread mail on that screen! Sometimes you feel: if it ain't broke , please don't fix it!
    Is there someone that can please help me with all this??
    Message Edited by AmitSK7777 on 18-Nov-2009 01:53 PM

  • Customer not getting displayed in PDF when sales order is received in email

    Hi,
    We are using a Z smartform for printing order acknowledgement for sales order.When printing the same on paper or in print preview, the output is correctly displayed. However, when automatic pdf is received in email, customer field is missing.
    Any suggestion why this could be?
    Below are the configurations in nace transaction for this output type:
    Output Type     YA02   
    Application        V1     
    Medium               Short text                        Program                         Form Routine      Form            Smartform
    1     Print output                           /SMB40/RVADOR01     ENTRY                          Y_ORDER_ACK_NEW
    2     Fax                           RVADOR01                          ENTRY     RVORDER01
    6     EDI                           RSNASTED                          EDI_PROCESSING                    
    8     Special function     /SMB40/RVADOR01          ENTRY                          Y_ORDER_ACK_NEW
    A     Distribution (ALE)     RSNASTED                         ALE_PROCESSING                    
    TIA
    Vartika

    Hi Vartika
    Take help of ABAP developer to debug smartform. when Smartform converts data into PDF may be customer number is missing.
    Regards
    Nagendra

  • My printer will print if I email it to printer but I can't directly print as my ipad cannot find the air printer???

    My ipad is not able to find my printer the message- no airprint printer can be found is displayed, but I am able to email to my printer from my ipad and successfully print??? I want to be ale to print a picture directly. How do I get my ipad to find my printer?

    It must be a Firefox problem, since it works perfectly in Chrome.

  • Hi. How can I delete my icloud account on my iPhone? I don't have that email address I was using anymore. I tried deleting it but it is asking for the password and I don't remember it.

    Hi, How can I delete my icloud account on my iphone? I don't have that email address I was using before anymore and I already tried deleting the account but it is asking for the password and I don't remember it.

    Hi ale.vica,
    You need to go to Manage your Apple ID, https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/, and sign in with your current Apple ID and password and do the following:
    1.     Edit your current Apple ID and change it back to the ID which is displaying for your iCloud account. You do not need to verify it - this is only a temporary change
    2.     Go into Settings>iCloud on your device and delete the iCloud account. Use your current password when your are prompted for a password
    3.     Once the old iCloud account is deleted, go back into Manage your Apple ID and change your ID back to the current one
    4.     Go back to Settings>iCloud and sign on with your current ID and password
    That should take care of your issue!
    Cheers,
    GB

  • How to configure Email output in SD

    Dear friends Pls sent me details of how to configure email output in SD module.
    <REMOVED>
    Thanks & Regards,
    <REMOVED>

    Hi
    Idoc Def :Standard SAP format for electronic data interchange between systems (Intermediate Document). Different message types (such as delivery confirmations or purchase orders) normally represent different specific formats, the IDoc types. However, multiple message types with related content can be assigned to one IDoc type: For example, the IDoc type ORDERS01 transfers the "logical" message types ORDERS (purchase order) and ORDRSP (order confirmation).
    Idocs are of two types basic type and the extension type .we need to configure the system settings for this process .
    IDOC (Intermediate Document) - A data holder.
    IDOC is divided in to three parts.
    Control Record
    Data Record
    Status Record
    Control record (Table: EDIDC):
    - Every IDOC has only one Control Record
    - Each Control Record contains header information like:
    o IDOC Number
    o Direction of IDOC: Inbound or Outbound
    o Date and Time of creation of IDOC
    o Date and time when the IDOC was last modified.
    o Message Type of IDOC
    o IDOC type and extension of IDOC
    o Sender and Receiver Partner
    Data record – (Table: EDID4):
    - Data Record contains Data to be processed.
    - Every IDOC has one data record with multiple segments in hierarchy.
    - Segments and Hierarchy of Segments are defined by IDOC Type and Extension.
    - IDOC created has to strictly follow the hierarchy; else IDOC fails with Syntax error.
    - Segments which are repetitive have qualifiers attached to it
    Status record – (Table: EDIDS):
    - Status Record describes the status of IDOC.
    - Each IDOC contains one status Record with multiple status information.
    - Status at each level is appended to IDOC. E.g. When IDOC is created in SAP, Status is “This IDoc has been generated through a test transaction”, When the IDOC is added to system it is “IDOC added”, “IDOC ready to be transferred to Application”……
    - Status should always be read bottom-up. Status at the top is the latest status.
    - Some Example of Status Records:
    o Inbound:
    § 53 - IDOC successfully posted
    § 51 – IDOC Failed
    § 64 - IDOC ready to be transferred to Application
    o
    Outbound:
    § 30 – IDOC ready for Dispatch
    § 03 – IDOC passed to port OK
    § 12 – IDOC Dispatched
    § 16 – Functional Acknowledgement Positive
    § 17 – functional Acknowledgement Negative
    IDoc Type: Defines the segments and hierarchy of segments
    o Transaction Code:
    § WE30 – To create, change or display the IDOC type and the extension.
    § WE31 – To create the Segment
    - IDOC type defines the segments to be used in the IDOC.
    - It also defines the hierarchy and syntax of the segments.
    - IDOC extension is nothing but to add segments to standard IDOC types.
    - Transaction WE31 allows you to create segments.
    - Program RSEIDOC3 documents the use of each IDOC type.
    Segments:
    Attributes of a Segment:
    - Mandatory Segment: If checked, this segment should always exist in the IDOC.
    - Minimum Number:
    - Maximum Number: Maximum number of times this segment can be repeated in IDOC. -
    Parent Segment: Parent of this segment
    - Hierarchy level: Level of hierarchy.
    Segment Definition (WE31):
    Messsage Type: Defines the type of data in the IDOC
    o Transaction Code:
    § WE81 – To create, change or display the Message type and the extension.
    § WE82 – Using this transaction you can link Message Type, IDOC Type, IDOC Extension and version.
    - Message type identifies the type of data IDOC holds. E.g. Orders (ORDERS), Delivery (DESADV), Invoice (INVOICE). It also defines what needs to be done with the data in the IDOC, in case of Inbound IDOC, and which data to be extracted in case of Outbound IDOC.
    - Message Type is linked to a process code, which in turn is linked to a Function Module. This function module extracts from or posts data to SAP depending on direction of IDOC.
    - Relation between Message Type, IDOC type and IDOC extension needs to define. Without this relation Message type or IDOC type cannot be used.
    Message Type Create, Change or Display (WE81):
    Setup link between Message Type, IDOC Type, IDOC Extension and Version (WE82)
    Process Code: Function Module is linked to a process code. This function module in executed for inbound or outbound IDOC.
    o Transaction Codes:
    § WE41 – Outbound Process Code
    § WE42 – Inbound Process Code
    - Process codes are linked to a Function Module.
    - Relationship is Message Type is linked to a Process Code which is linked to a Function Module.
    - In case if you are using a stand alone code to trigger an IDOC, you need not define a process code.
    RFC Destination: System definition of destination.
    o Transaction Code: SM59
    - RFC destination identifies the destination of IDOC.
    - In case of ALE:
    o In ALE the communication mode is IDOC to IDOC, hence the type used is R/3 Connections.
    o It is the destination SAP system which will receive the IDOC.
    o In RFC destination you define the destination SAP system details like System, Login and Password.
    Go thr below links:
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
    Sail

  • How to pass smtp_addr(email field) to cremas idoc while creation of vendor?

    Hi All,
    i am creating the vendors by IDOC by using CREMAS basic type CREMAS05.
    There is no email field in any of the idoc segments,as i need to pass the email address being mandatory,
    i created the Z segment and added the email field into it and then created the z extension and added this zsegment into the extension.
    Now how do i and where do i map this field so that email data is also passed while creating the vendor master.
    i have debugged the cremas Function Module IDOC_INPUT_CREDITOR and the data is getting passed segment wise,and for customer segement i.e for the zsegment there is a enhancement section where i need to pass this field,but i do not know how do i map this field and with what structure.
    Please let me know how do i handel this/or is there in other way to do it.
    Thanks.
    RJP.

    Hi,
    the email is part of the address data. It is therefore not belonging to the customer master data. So it is also not part of the DEBMAS idoctype.
    To distribute via ALE accurate customer address data, you need to distribute ADRMAS, ADR2MAS, ADR3MAS idoctypes too.
    See [note 384462|https://service.sap.com/sap/support/notes/384462] and [note 306275|https://service.sap.com/sap/support/notes/306275]
    BR
    Alain

  • Data transfer using ALE/IDOC into XML.

    Dear All,
    I have to transfer FI document data (FB01) from the sap system ,convert it into XML and dump it in 1 of the file servers.I want to do this using ALE/IDOC.Is it possible to do the same and how.Similarly i want to do the same for Vendor and Customer master i.e sending the data in XML format.
    Kindly Suggest how do i go about doin the same..Its very urgent.Please help.
    Thanks & Regards,
    Lailu Philip.

    In continuation:
    Example Purchasing & Selling scenario
    We will develop a custom IDoc to carry the billing number from the Service Receiver’s system to the Service Provider’s system. We will populate the IDoc in a user exit on the sending side and we will process the transaction on the receiving side using a custom function module and a BDC transaction call.
    No rule conversion, segment filtering or version conversion will be implemented in the model as described in Figure 1.
    Requirements
    • Working ALE environment - See ALE Basis Configuration Guide;
    • ALE scenario design together with the business requirement;
    • Development access; and
    • ALE configuration access.
    NOTES:
    1. All IMG references to transactions are located in the transaction SALE which is the ALE portion of the IMG
    2. This is one way of developing a scenario where no message control exists. If message control exist (EG. On purchase orders) then NAST can be used to call an outbound function module that would create the required IDocs.
    3. Extensive knowledge of IDocs and ALE basis configuration is required in order to understand this guide.
    2. OUTBOUND PROCESSING
    2.1. Create IDoc type (WE30) Client independent
    The IDoc type refers to the IDoc structure that you will require for your development. In our case the IDoc type is called ZINVRV01. This IDoc type will have 1 segment called Z1INVRV with 2 fields, LIFNR & XBLNR, in this segment. If you require many segments or nested segments then they are also created using the same procedure.
    We will create the IDoc of the following structure:
    ZINVRV01
    Purchasing and Selling - Invoice receipt reversal
    Z1INVRV P&S - Segment 1
    Segment fields
    LIFNR Vendor account number
    XBLNR Reference document number
    Figure 3: IDoc type ZINVRV01
    To create the IDoc type, follow these next few steps:
    • Enter transaction WE30 (ALE -> Extensions -> IDoc types -> Maintain IDoc type)
    • Type in ZINVRV01 and click on Basic IDoc type, click the Create icon
    • Click on Create new (we are creating an IDoc from scratch but you may want to copy another IDoc if it is similar to your requirements) and enter a description, and press enter
    • Click on ZINVRV01 and then on the Create icon
    • Enter Z1INVRV as the segment type (must start with Z1), check mandatory if the segment must exist (in this case check it), enter 1 in minimum number and 1 as maximum number. (Make the maximum number 9999999999 if there are going to be many of these segments in each IDoc. IE. When line items are passed via IDocs), click on Segment editor
    • Enter a description for your segment type and create
    • Enter a description for your segment, enter each field required in your IDoc, in our case type LIFNR across for Field name, DE structure and DE documentation, repeat for XBLNR and press enter to validate.
    • Save and generate, press back
    • To release the segment choose Goto, Release from the menu
    • Check the box on the line of your new segment
    • Save, back and enter
    • Your IDoc type structure should be displayed with your new segment
    • Save and back
    • To release the IDoc type choose Extras, Release type from the menu and Yes
    Your IDoc is now ready for use. If you need to add fields or segments to your IDoc type, you will need to cancel the release of the IDoc type as well as the segment release using a similar procedure followed above (except now you uncheck the release box for the segment and you choose cancel release for the IDoc type).
    2.2. Create message type (WE81) Client independent
    To create a new message type, follow these next few steps:
    • Enter transaction WE81 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Create logical message type)
    • Choose Create logical message type by double clicking on it
    • Click on change icon to enter change mode
    • Click on New entries to add a new type
    • Enter the required message type, in our case it is ZINVRV and an appropriate description
    • Save and exit.
    Your message type has now been created. The next step will be to link it to the IDoc.
    2.2.1. Link message to IDoc type (WE82 & BD69) Client independent
    To link the message type to the IDoc type follow these next few steps:
    • Enter transaction WE82 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> EDI: Message Types and Assignment to IDoc Types)
    • Click on change icon to enter change mode
    • Click on New entries to create the link
    • Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
    • Save and exit
    • Enter transaction BD69 (ALE -> Extensions -> IDoc types -> Maintain message type for intermed. Structure -> Assign message type to IDoc for ALE)
    • Click on change icon to enter change mode
    • Click on New entries to create the link
    • Enter the message type ZINVRV and the BasicIDoc type as ZINVRV01
    • Save and exit
    Your IDoc is now linked to your message type. We still need to link object types and add the message to the model before we can use the message.
    2.2.2. Maintain object type for message type (BD59) Client independent
    The ALE objects are used to create links between IDocs and applications objects, to control the serialisation, to filter messages in the customer model and to use listings.
    For our own message type and IDoc you must maintain object types for the links.
    If you want to check the serialisation for the message type, then you must maintain object types for the serialisation. If no serialisation object has been maintained for a given message type, then the serialisation will not be checked for this message type.
    To add an object type to our message type, follow these next few steps:
    • Enter transaction BD59 (ALE -> Extensions -> ALE object maintenance -> Maintain object types)
    • Type in your message type ZINVRV and press enter
    • Click on New entries
    • Enter your object type, LIFNR (We need to use the vendor as a filter object), the segment name where LIFNR resides, Z1INVRV, a number 1 for the sequence followed by the actual field name LIFNR
    • Save and exit.
    You have now created an object that we’ll use as a filter object in the customer model to direct the flow of messages to the various logical systems based on the vendors in the filter of the message type ZINVRV.
    We now need to add our new message type to the distribution model.
    2.3. Configuring the Distribution Model
    This task is performed on your ALE reference client.
    2.3.1. Manual Configuration (BD64) Client dependent
    To manually configure the customer distribution model, read the ALE configuration procedure, and follow these steps:
    • Perform the Maintain customer distribution model directly function. (ALE -> Distribution customer model -> Maintain customer distribution model directly)
    • Specify the customer model you want to maintain and the logical system that is to be the sender of the messages OR create a new model. (Create model ALE with logical system ALELS1C400)
    • Choose the receiving systems to which the sending system must forward message type ZINVRV to.
    • For each receiving logical system allocate the message type necessary for communication to the receiving systems as per ALE configuration procedure.
    • Create filter objects (in our case LIFNR as the object type with the associated vendor number, 0000018001 with leading zeros, in the object area) for the message types.
    • Save the entries.
    NOTES:
    You cannot maintain a message type between the same sender and receiver in more than one customer distribution model.
    Only the owner is authorised to modify the model.
    To change the owner of a model, choose the 'Maintain ownership of customer distribution model' function. Make sure that all changes will be distributed to all systems that know the corresponding model. To do so, you can use the correction and transport system.
    To transport the customer distribution model you should use the Distribute customer model function of the IMG as described below.
    2.3.2. Distribute customer model (BD71) Client dependent
    After the customer model has been created centrally, it must be distributed to the other remote systems. This entails first of all setting up the communication for the distributed systems and then sending the model.
    2.3.2.1. Distribute Model (BD71) Client dependent
    This task is performed on your ALE reference client. To distribute the customer distribution model, read the ALE configuration procedure and follow these steps:
    • Make the settings for the communication with the other decentral systems, you have not set them yet.
    • Define the RFC destination for R/3 connections whose names correspond to the name of the corresponding logical system.
    • Create the output partner profile.
    • Distribute the customer model
    • Specify the name of the customer model.
    • You must specify the target system to which you want to distribute the customer model.
    • You must repeat this function for every distributed logical system.
    2.3.2.2. Maintain sending system partner profile (WE20) Client dependent
    With this function, you define the partner profiles for all outbound and inbound messages on the basis of the customer distribution model.
    After you have defined and distributed the customer model, you will have to maintain the partner profiles locally. To do this read the ALE configuration procedure.
    • Enter the output mode (background, immediately) and the package size for outbound processing.
    Requirements
    • The customer model must be maintained.
    • RFC destinations must be maintained.
    • The customer model must be distributed.
    • To ensure that the appropriate persons in charge are informed if a processing error occurs, you must make settings in: Error processing Maintain organisational units.
    2.4. Populate & distribute IDoc using ABAP
    An IDoc consists of a control record with structure edidc and one or more data records with structure edidd. The control record contains the sender and recipient of the IDoc, as well as information on the type of message.
    To be able to pass an IDoc to the ALE layer, you must set up a field string with structure edidc and an internal table with structure edidd. They are used to call function module master_idoc_distribute, which performs the save to the database and triggers the dispatch if necessary.
    2.4.1. Example code
    The code displayed below does the following:
    • populates our IDoc segment Z1INVR with the 2 fields XBLNR and LIFNR, populates the segment name and appends this to an internal table used to store the IDoc data;
    • populates the control record info with the message type and IDoc type; and
    • calls the MASTER_IDOC_DISTRIBUTE function module which distributes the IDoc as configured in the customer distribution model.
    Data declaration statements
    DATA: C_INVREV_SEGNAME(7) TYPE C VALUE 'Z1INVRV',
    C_INVREV_MESTYPE(6) TYPE C VALUE 'ZINVRV',
    C_INVREV_IDOC_TYPE(8) TYPE C VALUE 'ZINVRV01',
    Z1INVRV LIKE Z1INVRV,
    C_INVREV_DOCTYPE LIKE BKPF-BLART VALUE 'YY',
    IDOC_CONTROL LIKE EDIDC,
    T_COMM_CONTROL LIKE EDIDC OCCURS 0 WITH HEADER LINE,
    IDOC_DATA LIKE EDIDD OCCURS 0 WITH HEADER LINE.
    Move the document header into a structure
    LOOP AT DOC_HEAD_TAB INTO DOC_HEAD.
    ENDLOOP.
    Move the document item data into a structure
    LOOP AT DOC_ITEM_TAB INTO DOC_ITEM WHERE NOT ( LIFNR IS INITIAL ).
    ENDLOOP.
    Populate the IDoc segment’s field with the required data
    CLEAR Z1INVRV.
    Z1INVRV-LIFNR = DOC_ITEM-LIFNR. “Store vendor number for filter
    Z1INVRV-XBLNR = DOC_HEAD-XBLNR. “Billing number
    IDOC_DATA-SEGNAM = C_INVREV_SEGNAME. “Segment name
    IDOC_DATA-SDATA = Z1INVRV. “Segment data
    APPEND IDOC_DATA. “Populate IDoc internal table
    Move the control data info required for the distribution
    IDOC_CONTROL-MESTYP = C_INVREV_MESTYPE.
    IDOC_CONTROL-DOCTYP = C_INVREV_IDOC_TYPE.
    Call the distribute function with the required parameters
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' IN UPDATE TASK
    EXPORTING
    MASTER_IDOC_CONTROL = IDOC_CONTROL
    TABLES
    COMMUNICATION_IDOC_CONTROL = T_COMM_CONTROL
    MASTER_IDOC_DATA = IDOC_DATA
    EXCEPTIONS
    ERROR_IN_IDOC_CONTROL = 1
    ERROR_WRITING_IDOC_STATUS = 2
    ERROR_IN_IDOC_DATA = 3
    SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
    OTHERS = 5.
    Figure 4: Outbound processing example code
    NOTE:
    For debugging purposes, use transaction WE05 (IDoc overview) to see check your IDoc status, or to see whether an IDoc was created/
    3. INBOUND PROCESSING
    3.1. Create Function Module
    This function module is called when a message type, of type ZINVRV, comes into the receiving system. This needs to be configured and is dealt with later in this section. The function module is passed the IDoc as a parameter.
    Example parameters
    Import parameters Reference field Opt Y/N
    INPUT_METHOD BDWFAP_PAR-INPUTMETHD N
    MASS_PROCESSING BDWFAP_PAR-MASS_PROC N
    Export Parameters Reference field Opt Y/N
    WORKFLOW_RESULT BDWFAP_PAR-RESULT N
    APPLICATION_VARIABLE BDWFAP_PAR-APPL_VAR N
    IN_UPDATE_TASK BDWFAP_PAR-UPDATETASK N
    CALL_TRANSACTION_DONE BDWFAP_PAR-CALLTRANS N
    Table Parameters Reference field Optional Y/N
    IDOC_CONTRL EDIDC
    IDOC_DATA EDIDD
    IDOC_STATUS BDIDOCSTAT
    RETURN_VARIABLES BDWFRETVAR
    SERIALIZATION_INFO BDI_SER
    Exceptions
    WRONG_FUNCTION_CALLED
    Example code
    The code displayed below does the following:
    • populates a BDC table with the IDoc info;
    • calls the transaction via a BDC call; and
    • updates the IDoc status according to the BDC error status.
    EXTRACT FROM: Z_IDOC_INPUT_ZINVRV
    Declaration of local variables
    DATA: C_SEGNAM(10) TYPE C VALUE 'Z1INVRV'.
    *-Loop through the IDOCs
    LOOP AT IDOC_CONTRL.
    *---Loop through the data for the IDOC
    LOOP AT IDOC_DATA WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
    CASE IDOC_DATA-SEGNAM.
    WHEN C_SEGNAM.
    Here we get the info from the idoc table
    IT_Z1INVRV = IDOC_DATA-SDATA.
    ENDCASE.
    PERFORM REV_INV.
    ENDLOOP.
    PERFORM UPDATE_IDOC_STATUS.
    ENDLOOP.
    FORM REV_INV "Reverse invoice form
    Local variables & constants
    DATA: C_TCODE LIKE BKPF-TCODE VALUE 'VF11'. "BDC transaction code
    Now we can build the bdc table to call the reversal transaction start of screen 109
    CLEAR BDC_TAB.
    BDC_TAB-PROGRAM = 'SAPMV60A'.
    BDC_TAB-DYNPRO = '109'.
    BDC_TAB-DYNBEGIN = 'X'.
    APPEND BDC_TAB.
    Document number
    CLEAR BDC_TAB.
    BDC_TAB-FNAM = 'KOMFK-VBELN(01)'.
    BDC_TAB-FVAL = IT_Z1INVRV-XBLNR. "Billing document number
    APPEND BDC_TAB.
    OK Code for screen 109
    CLEAR BDC_TAB.
    BDC_TAB-FNAM = 'BDC_OKCODE'.
    BDC_TAB-FVAL = 'SICH'.
    APPEND BDC_TAB.
    Now we can call transaction 'VF11' with the populated bdc table. The transaction is called inside the idoc-contrl loop, so a transaction will be called for every idoc (journal). the transaction is called in no-display mode ('N') because this code runs in background as it is called by ale. The update is specified to be synchronous ('S') because we have to wait for the result to update the idoc status correctly.
    CALL TRANSACTION C_TCODE USING BDC_TAB MODE 'N' UPDATE 'S'.
    Store the return code for use in another form (status update)
    RETURN_CODE = SY-SUBRC.
    Here we check the return code, if there was an error, we put the transaction in a bdc session for the user to review and correct.
    IF SY-SUBRC NE 0.
    CALL FUNCTION 'BDC_OPEN_GROUP'
    EXPORTING
    CLIENT = SY-MANDT
    GROUP = 'ZINVRV'
    USER = C_ALE_USER
    KEEP = 'X'.
    CALL FUNCTION 'BDC_INSERT'
    EXPORTING
    TCODE = C_TCODE
    TABLES
    DYNPROTAB = BDC_TAB.
    CALL FUNCTION 'BDC_CLOSE_GROUP'
    EXCEPTIONS
    NOT_OPEN = 1
    QUEUE_ERROR = 2
    OTHERS = 3.
    ELSE. "No problems
    C_EXISTS = 'N'.
    Select from the billing document table to get sales doc number
    SELECT * FROM VBRP WHERE VBELN = IT_Z1INVRV-XBLNR.
    Select from the sales document table to get user status number
    SELECT SINGLE * FROM VBAP WHERE VBELN = VBRP-AUBEL AND
    POSNR = VBRP-AUPOS.
    Select from the status table to change the user status to pending
    SELECT * FROM JEST WHERE OBJNR = VBAP-OBJNR AND
    STAT LIKE C_USER_STATUS.
    IF JEST-STAT = C_US_PENDING. "User status is pending
    JEST-INACT = C_UNCHECKED. "Make pending the active status
    UPDATE JEST.
    C_EXISTS = 'Y'. "I.E. An entry is already in table
    ELSEIF JEST-INACT = C_UNCHECKED AND JEST-STAT NE C_US_PENDING.
    JEST-INACT = C_CHECKED. "Make everything else inactive
    UPDATE JEST.
    ENDIF.
    ENDSELECT.
    IF C_EXISTS = 'N'. "I.E. Pending has never been a status before
    JEST-OBJNR = VBAP-OBJNR.
    JEST-STAT = C_US_PENDING.
    JEST-INACT = C_UNCHECKED. "Make pending the active status
    INSERT JEST.
    ENDIF.
    ENDSELECT. "Select from VBRP (Billing document table)
    ENDIF.
    ENDFORM. " REV_INV
    FORM UPDATE_IDOC_STATUS.
    Now we check the CALL TRANSACTION return code and set IDOC status
    CLEAR IDOC_STATUS.
    IF RETURN_CODE = 0.
    WORKFLOW_RESULT = '0'.
    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
    IDOC_STATUS-STATUS = '53'.
    IDOC_STATUS-UNAME = SY-UNAME.
    IDOC_STATUS-REPID = SY-REPID.
    IDOC_STATUS-MSGTY = SY-MSGTY.
    IDOC_STATUS-MSGID = SY-MSGID.
    IDOC_STATUS-MSGNO = SY-MSGNO.
    IDOC_STATUS-MSGV1 = SY-MSGV1.
    IDOC_STATUS-MSGV2 = SY-MSGV2.
    IDOC_STATUS-MSGV3 = SY-MSGV3.
    IDOC_STATUS-MSGV4 = SY-MSGV4.
    RETURN_VARIABLES-WF_PARAM = 'Processed_IDOCs'.
    RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
    APPEND RETURN_VARIABLES.
    ELSE.
    WORKFLOW_RESULT = '99999'.
    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
    IDOC_STATUS-STATUS = '51'.
    IDOC_STATUS-UNAME = SY-UNAME.
    IDOC_STATUS-REPID = SY-REPID.
    IDOC_STATUS-MSGTY = SY-MSGTY.
    IDOC_STATUS-MSGID = SY-MSGID.
    IDOC_STATUS-MSGNO = SY-MSGNO.
    IDOC_STATUS-MSGV1 = SY-MSGV1.
    IDOC_STATUS-MSGV2 = SY-MSGV2.
    IDOC_STATUS-MSGV3 = SY-MSGV3.
    IDOC_STATUS-MSGV4 = SY-MSGV4.
    RETURN_VARIABLES-WF_PARAM = 'ERROR_IDOCS'.
    RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
    APPEND RETURN_VARIABLES.
    ENDIF.
    APPEND IDOC_STATUS.
    ENDFORM. " UPDATE_IDOC_STATUS
    Figure 5: Inbound processing example code
    3.1.1. Debugging inbound FM
    Use transaction WE19 to test inbound function module in debugging mode. Also use WE05 to view the IDocs and their statuses.
    3.2. Maintain ALE attributes
    The inbound function module needs to be linked to the message type and the message type needs to be linked to the appropriate inbound process code at the partner profile level before the scenario is enabled. These steps are described below in detail.
    3.2.1. Link Message Type to Function Module (WE57) Client independent
    To link a message (ZINVRV) type to a function module (Z_IDOC_INPUT_ZINVRV) follow these steps:
    • Enter transaction WE57 (ALE -> Extensions -> Inbound -> Allocate function module to logical message)
    • Select an entry (EG. IDOC_INPUT_ORDERS) and copy
    • Type in module name Z_IDOC_INPUT_ZINVRV
    • Type in basic IDoc type as ZINVRV01
    • Type in message type as ZINVRV
    • Type object type as IDOCINVOIC (Invoice document) - Used for workflow
    • Direction should be set to 2 for inbound
    • Enter and save
    3.2.2. Define FM settings (BD51) Client independent
    • Enter transaction BD51 (ALE -> Extensions -> Inbound -> Define settings for input modules)
    • Click on New entries
    • Type in the name of the new function module Z_IDOC_INPUT_ZINVRV
    • Enter 0 for mass processing in the output column
    • Save and Exit
    3.2.3. Maintain process codes (WE42) Client dependent
    A process code needs to be maintained on each client. It then needs to be linked to the message via the partner profiles on each client. This allows the various clients to use a unique function module for the same message type.
    To maintain the process code follow these steps:
    • Log on to the appropriate receiving system client
    • Execute WE42 (ALE -> Extensions -> Inbound -> Maintaining process codes inbound)
    • Choose Inbound with ALE service
    • Choose Processing with function module
    • Click on Processing with function module and choose create icon
    • Click on New Entries
    • Type in process code ZINR and give it a description and save
    • Now you are asked to Please maintain codes added in ALE entry methods, enter and choose Z_IDOC_INPUT_FIRVSL and copy it. You should choose a FM similar to your one.
    • Enter your process code ZINR
    • Enter your function module Z_IDOC_INPUT_ZINVRV
    NOTE: The next 6 steps are used in workflow error handling.
    • Enter IDPKFIDCMT in object type
    • Enter MASSINPUTFINISHED in End event
    • Enter IDOCINVOIC in IDoc object type
    • Enter INPUTERROROCCURREDFI in IDoc start event
    • Enter INPUTFINISHEDFI in IDoc End event
    • Enter IDOCINVOIC in Application object type
    You will need to determine the task associated with object IDOCINVOIC, and then assign the appropriate position to it. This position will then receive the application error messages via workflow.
    To set up the workflow area please consult the Workflow config guide.
    3.3. Create inbound partner profile
    For each message type you need to maintain the inbound partner profiles.
    3.3.1. Maintain receiving system partner profile (WE20) Client dependent
    To maintain inbound partner profiles read the document ALE configuration procedure:
    • Add the message type ZINVRV with process code ZINR.
    • Enter the output mode (background, immediately) for inbound processing and NO message code.
    • Enter the position S and choose the ALE administrator 50000085. This position will then receive all the technical ALE errors via workflow.
    3.4. Test
    Once the inbound function module has been debugged the scenario should be ready to test in its entirety. If problems occur, read through the relevant areas of this document to check your configuration or code.
    Hope this will help you,
    If you  want me to explain more, you can give me your email id.
    Reward with points incase you are satisfied.
    Regards,
    Sushama

  • Generation Partner Profiles from ALE Distribution Model

    Hi ABAP/EDI experts,
    I am a trainee. I am getting training from Pvt consultancy. I am working on SAP Demo systems.
    I am trying t generate an IDoc using ALE method.
    IN SALE window, I created two logical systems,ZVK_SS_800 and ZVK_SS_820. I assigned them to two clients 800 and 820 respectively.
    In SM59 i created an RFC connection ZVK_RFC004 of type 3. Here I gave the client Number as 820. ( I'm not sure what to give)
    In BD64, I created an ALE Model and added the message type MATMAS with Sending and Receiving Logical systems.
    From the Environment drop down menu , selected generate partner profiles and executed with defaults checked. ( Transfer IDocs Immediatley and Trigger Immediately).
    I got the following log.
    Log For Partner Profile Generation:
    Partner:
    In Green Color
    Partner ZVK_SS_800 as partner has been Created ( Sending System)
    Partner ZVK_SS_820 as partner has been Created (Receiving System)
    Port:
    In Red Color
    Port Cloud not be Created
    RFC destination ZVK_SS_820 not specified for system ZVK_SS_820
    Enter the RFC destination and Restart the generation.
    Please help me to fix this probelm.
    Any kind of Help will be surely rewarded.
    Thanks,

    From SM59, you can Test your RFC Connections between Clients.  I would do this from Client 800 and test the Connection to Client 820.   If that checks okay, I would then try SM59 on Client 820.   Check the RFC Connection from Client 820 to Client 800.   Be sure you have your Logical Systems defined on Both Clients.   You can also double click on your Error Message to see if there is a Long Text Available that might give you further information as what needs to be corrected.   I am not an Expert in this area, but have setup several ALE Models for my Variant Configuration without any problems.  If you could include your EMail Address on your Business Card I could EMail you my instructions.   Your Basis person may also be able to help you based upon your Error Message.

  • ALE distribution model - one message type to more than one recipient

    Hello colleagues,
    currently I'm working on an integration project between one SAP system and an e-shop system. The communication is established through IDOCs ( both inbound and outbound ). There is another system ( POS ) which is already integrated
    with SAP via IDOCs also.
       Now I'm facing the following problem regarding distribution of transactional IDOCs ( orders, deliveries, etc. ): when assigning one message type ( for example DESADV - Delivery: Shipping notification ) to more than one external system in ALE distribution model I receive a message alerting that one message type can be send to only one recipient.
    The distribution model is as follows:
    Model Views
       SAP to POS
          SAPDEV ( the SAP system )
             POS ( the external POS system )
                DESADV
       SAP to E-SHOP
          SAPDEV ( the SAP system )
             E-SHOP ( the external e-shop system )
                DESADV
       Well, the system message is clear and I did the obvious: create a complete copy to the original message type and than assign it to the E-SHOP system ( the original message type is already used in integration between SAP and POS ).
    As you can see I have found a workaround already but I think that it comes natural to SAP to communicate with other systems and to exchange same kind of documents to those systems and I can't believe that there isn't a standard solution for situation like this.
    FYI I'm working on SAP ECC 6.0
    Thanks in advance.
    Wish you nice day and successful week ,
    Vladimir

    I believe when ePrint server has received the email, it made the necessary settings and configured the job for printing and then it went for "Reply All" option. So here it cannot send the print job to your personal email ID and the error came up.
    The only option I can think of is add the printer email ID to your email contact list and give it a name like MyPrinter so you can remember easily , just like email contacts are added in Outlook.
    Mark this post as answered so that others can find it useful.
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Please mark the post that solves your problem as "Accepted Solution"

Maybe you are looking for