ALE Configuration error

Hi,
I did the ALE configuration in sending and recieving system like creating LS,Assigning LS to Client,Model View For Message type,ports and partner profiles.
When i was trying to distribute the model view it is giving error:
RFC Destination not configured or partner profiles not generated.
I can remote logon from sender system to reciever system and vice versa.
The partner profiles are created for the  LS Sender and reciever.
So can any one help me on this issue.
Thank you.

Hi Mili,
You do not need to generate partner profile during the ditribution model view process (BD64). You can add manually the partner profile via WE20 for inbound and outbound parameters. As long as distriburon model has been setup and distribute, you can continue the next step for example generating IDoc and so on.
Sometimes, you may face an issue to generate partner profile from BD64 for some reason. I found by generating manually partner profile always quick, safe and stay away from any trouble shooting for an error.
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.

Similar Messages

  • ALE Configuration HCM - Program read table idoc_structure error

    Hello SCN community,
    I have small problem with ALE Configuration of HRMD_A message type. I created extension named 'ZRMD_A06'.
    When I'm trying to run t-code: bd21 (report RBDMIDOC)
    I'm getting following error message:
    At the beginning I thought there is problem with segment structure of Z1P2006 of extension 'ZRMD_A06'
    I compared segment Z1P2006 with structure 'P2006' in se11 - and it is the same.
    Next I checked the bd21 transaction in debug mode.
    I figured out that there is error in FM 'RH_MASTER_IDOC_DISTRIBUTE_HRMD' in include 'LRHALF10'.
    Could you please help me?

    Hello,
    Thank you all for your help.
    I'm writing this post to provide solution for others like me.
    To solve this problem you need to apply this sap note:
    HR-CA-ALE: Segment Z1Pnnnn prevents distribution
    for me:
    As of Release 4.6: In the customer enhancement RHALE001, fill the function exit EXIT_SAPLRHA0_004 with the line
                        F_idoc_control-cimtyp = 'ZRMD_AXX'.              
    steps:
    1. Go to SE37
    2. Enter EXIT_SAPLRHA0_004
    3. Double click on INCLUDE ZXHALU08 . (in my case)
    4. Add to the code this line: F_idoc_control-cimtyp = 'ZRMD_A06'.  (ZRMD_A06 - because I called so my custom extension)
    5. and have a nice day because you solved this problem!

  • Got error in ALE configuration

    hello experts
                  I configured a ALE.when i tried for connection test its giving the below error.i checked all the information given in the ALE configuration is correct.but got the below error every time.
    connection to host timed out / CPI-C.
    ERROR                connection to host timed out / CPI-C.
    LOCATION             SAP-Gateway on host DETAIL               NiPConnect
    COMPONENT            NI (network interface)
    COUNTER              2701
    MODULE               nixxi.c
    LINE                 805
    RETURN CODE          -12
    SUBRC                    0
    RELEASE              620
    TIME                 Thu Mar 23 12:42:38 2006
    VERSION              36
    can anybody resolve it out.
    Thanks in advance........
    Regards
    Ravinder

    Hi Ravindra,
    This is a network connectivity issue.
    Please make sure that the ip address of the target system is correctly maintained in SM59 and that the Connection type is R3.
    When you say that you tried a connection test, you mean through SM59 right ?
    Regards,
    Urmila

  • ALE Configurations?

    Hi All,
    Currently i'm working on the following requirements. we are using TIBCO system as a middleware tool and it will ceate an IDOC which needs to be directed to R/3 system.  As we have already imported the IDOC to the TIBCO system and then it will fetch the data from non-SAP system and creates the IDOC and sends it to R/3 system? I've done the following ALE configurations but got the error message as 56..."Partner profile is not define".
    I've done the following ALE configurations at R/3 side.
    1. Created a logical system and RFC destination for TIBCO.
    2. created a TRFC port.
    3. Create a Partner profile and linked the TRFC port.
    4. posted an IDOC from WE19.
    but when i checked the status of IDOC in WE02 its displaying an warning message with status code 56 "Partner profile is not define". and i think no need to do any ALE Configuration at sender side since the sender system is TIBCO.
    pls correct me if i'm wrong. as one of my colleage suugested me to create FIle port instead of TRFC port?
    regards
    Faisal

    HI
    SAP R/3
    R/3 to XI
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (We21)
    a) First Select Transactional RFC and then click create button
    b) Enter the destination port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Create Partner Profile (WE20)
    a) Create New
    b) Create the Partner no. name as same the logical system name of the destination system.
    c) Select Partner type LS
    d) Enter details for Type: US/USER, Agent, and Lang.
    e) Click on the + button to select the message type.
    f) Select Partner no. and LS which ever create above.
    g) Select Message type
    h) Select Process code related to the Message type.
    I) save.
    XI to R/3
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (IDX1) ( Create port to get IDOC Meta data from sender system)
    a) Select create new button
    b) Enter the port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Load Meta Data for IDOC (IDX2) (To maintain IDOC Metadata, it is needed by XI because XI needs to construct IDOC-XML from IDOC. It is not needed by any sap system).
    a) Create new
    b) IDOC Message Type
    c) Enter port created in IDX1.
    Refer the below links for further assistance
    4.create partner profile using idx2
    ALE configuration for pushing idocs from SAP to XI
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi
    IDOC testing using WE19
    /people/sameer.shadab/blog/2005/07/25/reposting-idocs-instead-of-recreating--for-testing-purpose-xi
    File To IDOC - Part1 (SLD and Design):
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC&
    File To IDOC - Part2 (Configuration):
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part2+(Configuration)&
    File To IDOC - Part3 (Steps required in XI and R3):
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/05/11/fileToIDOC-Part3(StepsrequiredinXIandR3)
    cheers

  • ALE Configurations in File to IDOC Scenario

    Hi All,
    We are doing File to IDOC Scenario.
    ALE Configurations done:
    R/3 Side:
    1. Created RFC dest, pointing to XI and tested the connection for remote login to XI.
    2. Created port in R/3(using automatically generated port name) and assigned the RFC dest created above.
    3. Created partner profile and assigned the ports to the message types.
    4. Created Logical system
    XI side:
    1.  Created RFC dest, pointing to XI and tested the connection for remote login to r/3.
    2. Created port using IDX1 transaction with port name starting with SAP<SID> and assigned the RFC dest created above. (SID of XI)
    <b>3. Unable to load metadata in XI.</b>
    Now we are unable to test the scenario as it provides an error message in MONI as "<b>Error: Transaction IDX1: Port SAP<SID>, client , RFC destination contain errors</b>".
    Also Let me know whether the steps mentioned above are correct for the scenario.
    Regards,
    Nithiyanandam

    Hello,
    SAP XI
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is 3300+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (IDX1)
    a) Select create new button
    b) Enter the port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP XI towards other system.
    e) Save
    3) Load Meta Data for IDOC (IDX2) a) Create new
    b) IDOC Message Type
    c) Enter port created in IDX1.
    SAP R/3
    1) RFC Destination (SM59)
    a) Choose create.
    b) Specify the name of the RFC destination
    c) Select connection type as 3 and save
    d) In the technical settings tab enter the details SAP SID/URL and system number#.
    e) Enter the Gateway host as same details above SID/URL.
    f) Gateway service is #####+system number#.
    g) In the Logon /Security tab, enter the client user & Password details of Destination system.
    h) Test the connection and remote logon.
    2) Create Port (We21)
    a) First Select Transactional RFC and then click create button
    b) Enter the destination port name as SAP+SID (The starting char should be SAP)
    c) Enter the destination client.
    d) Enter the RFC Destination created in SAP R/3 towards other system.
    e) Save
    3) Create Partner Profile (WE20)
    a) Create New
    b) Create the Partner no. name as same the logical system name of the destination system.
    c) Select Partner type LS
    d) Enter details for Type: US/USER, Agent, and Lang.
    e) Click on the + button to select the message type.
    f) Select Partner no. and LS which ever create above.
    g) Select Message type
    h) Select Process code related to the Message type.
    I) save.
    In SLD – System Landscape Directory
    TS for R/3 (Logical system):-Assign the client name created in R/3 as Logical system Name.
    Ts for Third Party (Logical system):-
    BS for SAP R/3 (Logical system):- Assign the client name created in R/3 as Logical system Name.
    BS for Third Party (Logical system):-Enter the XI logical system name.
    With Regards,
    Vidya.
    *******Reward with Points if found useful

  • Problem in ALE configuration

    Hi ,
    I am doing ALE configuration to transfer the Vendor information from 800 client to 700
    client.
    In client 800 while I am creating partner function I am getting
    error...Could you please help me to resolve.
    In "Generate Partner Profile" (in 800 client)
    I have given ....
    Model View : "VENDMODEL1"
    Partner  System : IDES_700
    Next screen "log for partner profile generation is displayed"
    Partner
    No error is displayed here...
    But in "port"
    the following message is displayed....
    System IDES_700   : Port could not be created
                        RFC destination IDES_700 not specified for system              
    ides_700
                  Enter the RFC destination and restart the generation
    After creating Model view with Sender and Receiver with Message type as CREMAS
    what we have to do...
    whether we have to distribute it ..
    I am getting error log as ...
    Targert system IDES_700  : RFC Destination for Synchronous                  
    communication(message type SYNCH)
                      Partner Profile LS IDES_700 SYNCH does not exist
    please  help me in this regard
    With Regards,
    Sagar.

    Hi,
    Please ensure the RFC destination for both logical system (client 800 and 700) are created in SM59.
    Also you can add manually message type SYNCH with IDoc type SYNCHRON in the partner profile (WE20) prior to generate partner profile for message type CREMAS via BD64.
    Message type SYNCH is a dummy message type for determination of RFC destinations and IDoc type SYNCHRON is a dummy IDoc type for synchronous communication.
    You can setup something like this.
    Outbound parameter options:
    Field          Value
    Message type   SYNCH
    Receiver port  A000000015 (Transactional RFC)
    PacketSize     100
    Output mode    Transfer IDoc immed.
    Basic type     SYNCHRON
    Hope this will help.
    Regards,
    Ferry Lianto

  • Reg:ALE configuration

    Hi..
    I am trying to do ALE configuration for inbound IDOC.
    I have created  RFC destination on XI client using transaction SM59 and then a port  using IDX1.
    after that i have executed the transaction we20 on the  SAP system and added the IDOC basis type to the Inbound parameters of respective logical system of SAP.
    Now when i am trying to post an idoc on SAP.its showing an err"EDI: Partner profile inbound not available".
    what can be the reason of this err??

    hi
    follow below procedure then check for Error :
    Steps for ALE settings:-
    Steps for XI
    Step 1)
    Goto SM59.
    Create new RFC destination of type 3(Abap connection).
    Give a suitable name and description.
    Give the Ip address of the R3 system.
    Give the system number.
    Give the gateway host name and gateway service (3300 + system number).
    Go to the logon security tab.
    Give the lang, client, username and password.
    Test connection and remote logon.
    Step 2)
    Goto IDX1.
    Create a new port.
    Give the port name.
    Give the client number for the R3 system.
    Select the created Rfc Destination.
    Step 3)
    Goto IDX2
    Create a new Meta data.
    Give the Idoc type.
    Select the created port.
    Steps for R3.
    Step 1)
    Goto SM59.
    Create new RFC destination of type 3(Abap connection).
    Give a suitable name and description.
    Give the Ip address of the XI system.
    Give the system number.
    Give the gateway host name and gateway service (3300 + system number).
    Go to the logon security tab.
    Give the lang, client, username and password.
    Test connection and remote logon.
    Step 2)
    Goto WE21.
    Create a port under transactional RFC.(R3->XI)
    Designate the RFC destination created in prev step.
    Step 3)
    Goto SALE.
    Basic settings->Logical Systems->Define logical system.
    Create two logical systems(one for XI and the other for R3)
    Basic settings->Logical Systems->Assign logical system.
    Assign the R3 logical system to respective client.
    Step 4)
    Goto WE20.
    Partner type LS.
    Create two partner profile(one for XI the other for R3).
    Give the outbound or inbound message type based on the direction.
    Step 5)
    Not mandatory.
    Goto BD64.
    Click on Create model view.
    Add message type.
    Step 6)
    Goto WE19
    Give the basic type and execute.
    fill in the required fields.
    Goto IDOC->edit control records.
    Give the following values.(Receiver port,partner no.,part type and sender Partner no. and type)
    Click outbound processing.
    Step 7)
    Go to SM58
    if there are any messages then there is some error in execution.
    Goto WE02.
    Check the status of the IDOC.
    Goto WE47.
    TO decode the status code
    Regard's
    Chetan Ahuja

  • ALE Configuration SET UP

    Hi,
    I am creating a ALE Scenario with Material Master. I am doing this for the first time. Please tell me whether it is possible to trasfer data from a sandbox(UPG) system to a development system. If this is possible, what are the configuration steps i need to do in bothe the system to trasfer data from sandbox to Development system. thse two systems are physically independent systems.
    Thanks
    Jiten

    Hi Jitendra,
      Before you Configure go through this, If you need any clarification contact me.
    <b>
    ALE Scenario Development Guide
    To develop a new custom ALE scenario, comprises 5 steps:
    1.     Design and develop the custom IDoc with it’s segments and a new message type
    2.     Configure the ALE environment with the new IDoc and message type (customer model, partner profiles and linking IDoc to message type)
    3.     Develop the outbound process which does the following:
    •     Populates the custom IDoc with control info and functional data
    •     Sends the IDoc to the ALE layer for distribution
    •     Updates status and handles errors
    4.     Configure the ALE inbound side (partner profiles with inbound process code)
    5.     Develop the inbound process which does the following:
    •     Reads the IDoc into a BDC table; selects other data that is required
    •     Runs transaction using call transaction or BDC session
    •     Updates status and handles errors
    Below is a pictorial representation of the flow of a complete ALE scenario from the sending system to the receiving system.
    Figure 1: ALE Scenario model
    1.1.     ALE Example
    For the purposes of this example we will develop a small ALE scenario. This scenario is described below.
    “The receiver of an internal service must be able to reverse (cancel) the invoice receipt which will then cancel the applicable billing document automatically on the service provider’s system.”
    Figure 2: 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.
    </b>
    Thanks.
    Manju.
    Reward Points.

  • ALE configuration, Assign Company Code to Cross-System Company

    Hello all,
    I set up and configured ALE so that we can keep our production, QA, development master data in sync.  I activated the change pointers for the particular message type for which we want to create IDOCs when new master data is created, or existing master data is changed.  IDOCs are then sent to the QA and development systems.
    Are these three ALE configurations associated with anything outside of ALE?  Is there any area that can or will be affected by these three configuration settings?
    Transaction <b>SALE</b>
    <b>Cross-System Company Codes</b>
         - all Company codes in our system
    <b>Assign Cross-System Company Code to Chart of Accounts</b>
         - all Company codes are associated with the one chart of accounts
    <b>Assign Company Code to Cross-System Company</b>
    -     global company code is the same as the company code
    Thanks
    Bruce

    In T.Code: OX19 - Assign company code to controlling area
    Please check that if for ur Controlling Area, the
    Currency Type:
    Currency:
    Currency Type
    10     Company code currency
    20     Controlling area currency
    30     Group currency
    40     Hard currency
    50     Index-based currency
    60     Global company currency
    Currency
    required code of Currency
    Should/Are properly maintained in OX19.
    This type of error will be for this stage itself.
    Provide points if satisfied
    Regards
    Dinakar
    SAP will be throwing this type of messages when
    Differing currencies: USD - CAD
    Message no. KT276
    Diagnosis
    The system makes consistency checks during assignment of a company code to a controlling area as part of assignment control.
    The same checks take place if assignments already exist and you change the basic data in the controlling area, or if you define the controlling area and company code as a 1:1 structure.
    If the check finds an error, the system cannot execute the function ("Assign" or"Change basic data"). If you do not maintain the required data for the consistency check (such as currency, chart of accounts, or fiscal year variant in the company code), this also results in an error message.
    You want to use currency type USD. The SAP System determined the company codes assigned to controlling area CAD and the relevant currencies. One discrepancy occurred in one of the currencies.
    Note
    A precondition for currency type "10" is that all company codes assigned to the controlling area must use the same currency.
    A precondition for currency types "40" and "50" is that all company codes assigned to the controlling area must belong to the same country or use the same hard currency or index-based currency.
    A precondition for currency type "60" is that all company codes must belong to the same company or all the companies must use the same currency.
    Procedure
    Change the currency type or the currency settings.

  • ALE configuration for Outbound Idoc - Help me

    Hi Experts,
    I am newbee in SAP and XI. I was trying to send MATMAS Idoc from R3 and i was running into some issues. So i would appreciate if someone can help me.
    I am using following link as reference. /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi
    I did all the steps mentioned in the above link ( Creating Logical Systems, Assigning Client and RFC destnations, Creating distribution models ..... etc)
    and then everything went well and i saw success messags in all the steps.
    I used BD10 to send material and it went well. But when i check TRFC queue, i see some error messages; "<i><b>No service for system SAPRDI, client 800 in Integrion Directory</b></i>"
    And all the messages are hanging in the TRFC queue.
    Note: I havent configured anything in XI yet. I wanted to make sure IDoc gets to XI client first.
    Thank you in advance. Pls help me its very urgent.
    Thanks,
    Surya

    I created RFC destination (SM59) and Port (IDX1)
    Then i sent another material (BD10)  and checked tRFC queue. i found bunch of error in the Queue.
    <b>1.connection to host 10.4.23.120, service sapgw00 timed out / CPI-C error C
    No service for system SAPRDI, client 800 in Integration Directory
    partner not reached (host 10.16.176.29, service sapgw00) / CPI-C error CM
    connection to host 10.16.136.127, service sapgw58 timed out / CPI-C error</b>
    Note: i have noticed entries for R3 in SLD as below
                      System Name:  <b>RDI </b>  ( not <b>SAPRDI</b> as mentioned in the error message)
                      System Home:  r3ides
    That might be reason. If so, how to change it in R3 box? Any suggestions?
    Please send me if you guys have any links or docs to address this issue.
    Thanks,
    Surya

  • Ale configuration question

    Hi,
    While doing the ale config as per blog...
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi
    all steps worked fine...except the step where we select model view and distribute....
    I get this message...
    Communication error occurred
    Name or password is incorrect(repeat logon)..
    Any ideas ....i believe its the uid/pwd combo i had specified in the rfc destination...just wanted some clarification
    Venkat

    Yes. That is correct.
    You will find the RFC destination with same as your receiving Logical System name. Test your RFC destination whether it is working fine using TC : SM59
    Hope this will help.
    Nilesh

  • ALE Configuration Questions

    Hello Experts,
    I have a few questions regarding ALE Configuration, help appreciated
    1) Is it necessary to create user for ALE transfer in both sender and receiver system ?
    2) Is it necessary to create logical system for both sender and receiver in both the systems ?
    3) Can tRFC created in sender system have a different port name than the logical system name ?
    Is it ok, if only configuration is done in the sender system, if I am looking for one way transfer of Idocs from sender to receiver ? The receiver will receive the Idocs and process internally, sender is responsible only for sending in my case.
    I have referred the below link,
    7 Steps For ALE Configuration - ABAP Development - SCN Wiki
    Best Regards,
    Ameya B.

    Hi Mili,
    You do not need to generate partner profile during the ditribution model view process (BD64). You can add manually the partner profile via WE20 for inbound and outbound parameters. As long as distriburon model has been setup and distribute, you can continue the next step for example generating IDoc and so on.
    Sometimes, you may face an issue to generate partner profile from BD64 for some reason. I found by generating manually partner profile always quick, safe and stay away from any trouble shooting for an error.
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • ALE Configuration Needed

    Hi every one,
    I want steps involved in ale configuration.
    Lets take example two systems are Sysa and sysb
    Thank you

    hi
    CATSDB CUSTOM IDOC TRANSFERMATION BETWEEN 2 DIFFERENT APPLICATION SERVERS
    For this scenario Client 800 of application server SAPADM is the Sender and client 800 of application server SAP-REMOTE is the Receiver
    1. Creating Logical Systems
    o       Login using 800 client
    o       Go to T. Code SALE
    o       Expand Sending and Receiving Systems
    o       Expand Logical Systems
    o       Click on Define Logical System
    o       Click on New Entries
    o       Create CATSSENDER, ECC Logical Systems
    o       Save and come back
    o       Assign the CATSSENDER Logical System to client 800 of Application Server SAPADMAssign the ECC Logical System to client 800 of Application Server SAP-REMOTE
    2. Creating the RFCs
    o       Go to T. Code SM59
    o       Expand R/3 Connections
    o       Enter RFC Name as CATSSENDER
    o       Connection Type as 3
    o       Language as EN
    o       Client as 800
    o       User as SAPUSER
    o       Password as YESV13
    o       Target host as SAPADM
    o       Click on Remote logon button to test the RFC
    o       Enter RFC Name as ECC
    o       Connection Type as 3
    o       Language as EN
    o       Client as 800
    o       User as SAPUSER               
    o       Password as YESV123
    o       Target host as SAPADM                                                                               
    o       Click on Remote logon button to test the RFC
    3. Creating the Message Type
    o       Go to T. Code WE81
    o       Click on change, continue
    o       Click on New Entries button
    o       Give message type as ZCATSTIME and description
    o       Save and back
    4. Creating the Segment
    o       Go to T. Code WE31
    o       Give segment name as ZSEGMENTTIME
    o       Enter Short Text
    o       Enter the Field Name and Data Element in the text boxes
    o       Save, continue,
    o       Click on Edit -> Set Release
    5. Creating the Basic IDOC Object
    o       Go to T. code WE30
    o       Give obj. name as ZTIMEIDOC
    o       Click on create
    o       Select create new radio button, give description and continue
    o       Select the IDOC obj name and click on create button
    o       Enter the segment name which is create earlier
    o       Select the check box if you want to make the segment mandatory
    o       Enter 1 in minimum number 99999 in maximum number, continue
    o       Save and backo       Click on Edit -> Set Release
    6. Creating Customer Distribution Model
    o       Go to T. Code BD64
    o       Click on change and Create model view button
    o       Enter the short text and Technical name as CATSSENDER
    o       Select the model and click on Add Message Type Button
    o       Give the Sender as CATSSENDER,
    o       Receiver as ECC,
    o       Message Type as ZCATSTIME
    o       Select the model view & click on Environment -> Generate Partner Profiles
    o       Select Transfer IDOC Immediately and Trigger Immediately radio buttons
    o       Click on Execute
    o       You should get a list in green color which means it executed successfully.
    o       Back to main screen, select the model view
    o       Click Edit->Model view->Distribute
    o       Click on continueo     
    You should get a list saying model view is distributed successfully.
    7. Checking the Port
    o       Go to T. Code WE21
    o       Expand Transactional RFC
    o       Find the port from the list which is created using BD64 for ECC (Receiving system) RFC Destination.
    8. Checking the Partner Profiles.
    o       Go to T. Code WE20
    o       Expand Partner Type LS
    o       Select the Partner profile ECC
    o       Double click on Message Type ZCATSTIME in Outbound parmtrs.
    o       Check Receiver Port is assigned correctlyo     
    Check the Basic type as your Basic IDOC object.
    9. Assigning the Message Type to Basic IDOC Object
    o       Go to T. Code WE82
    o       Click on Change & continue, New Entries button
    o       Give the Message type as ZCATSTIME
    o       Give Basic Type as ZTIMEIDOC
    o       Release as 4.6C
    o       Save and back10. Creating Inbound Function Module (Posting Program)
    o       Go to T. Code SE37
    o       Create a function Module ZCATSDB_TIMESHEET_SURESH
    o       Set the Processing type as Remote Enabled Module and mode as start immed, in Attributes Tab.   
    o       Import Parameters
              P_WORKDATE                    LIKE               CATSDB-WORKDATE
              P_COUNTER                        LIKE               CATSDB-COUNTER
              P_LSTAR                               LIKE               CATSDB-LSTAR
    o       Export Parameters
    o       Tables 
                 S_PERNR                      LIKE           ZCATSPERNR
    [PERNR is select option parameters in ZCUSTOMIDOC report program so that it should be passed to function module ZCATSDB_TIMESHEET_SURESH in tables section. And also in tables section we used ZCATSPERNR, which is a global structure, which contains four fields as
    Ø     SIGN
    Ø     OPTION
    Ø     LOW
    Ø     HIGH]
    o       Exceptions
    o       Source Code
    FUNCTION zcatsdb_timesheet_suresh.
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(P_WORKDATE) LIKE  CATSDB-WORKDATE
    *"     VALUE(P_COUNTER) LIKE  CATSDB-COUNTER
    *"     VALUE(P_LSTAR) LIKE  CATSDB-LSTAR
    *"  TABLES
    *"      S_PERNR STRUCTURE  ZCATSPERNR
      TABLES: catsdb, edidc, edidd. " using structures of catsdb, edidc, edidd
      CONSTANTS: c_doctyp TYPE edidc-idoctp VALUE 'ZTIMEIDOC',  " idoc type
                 c_segnam TYPE edidd-segnam VALUE 'ZSEGMENTTIME',   "segment type
                 c_mestyp TYPE edidc-mestyp VALUE 'ZCATSTIME'.   " message type
    *001 comment begin
         creating internal tables with out header lines for catsdb, edidc, edidd and also
    -           work areas
    *001 comment end
      DATA: it_edidc  TYPE edidc OCCURS 0,    "  control internal table with out header line
            it_edidd  TYPE edidd OCCURS 0, " data internal table with out header line
            wa_catsdb TYPE it_catsdb1,  " work area for it_catsdb internal table
            wa_edidc  TYPE edidc,  " work area for it_edidc internal table
            wa_edidd  TYPE edidd,  " work area for it_edidd internal table
            wa_zsegmenttime TYPE zsegmenttime, " work area for zsegment internal table
            v_occmax  TYPE idocsyn-occmax,
            v_nbseg   TYPE i.
      CLEAR wa_catsdb. " clears work area of catsdb
      CLEAR wa_edidc.  " clears edidc work area
    *002  comment begin
    Save the message type and the basic IDoc type in the control segment.
    *002 comment end
      MOVE c_mestyp TO wa_edidc-mestyp. " assigning custom message type to edidc workarea
      MOVE c_doctyp TO wa_edidc-idoctp. " assigning custom idoc type to edidc workarea
    *003 comment begin
    Retrieve the maximum number of segments in the basic IDoc type.
    *003 comment end
      SELECT MIN( occmax ) FROM idocsyn INTO v_occmax WHERE idoctyp EQ c_doctyp AND segtyp EQ c_segnam.
    *004 comment begin
    Save the whole CATSDB table content in the IT_ZCATSDB internal table.
    *004 comment end
      SELECT pernr workdate lstar counter FROM catsdb INTO CORRESPONDING FIELDS OF TABLE it_catsdb WHERE pernr IN s_pernr AND workdate EQ p_workdate.
    *005 comment begin
    Create a data segment for each line of IT_ZCATSDB.
    *005 comment end
      IF sy-subrc EQ 0.
        LOOP AT it_catsdb INTO wa_catsdb WHERE pernr IN s_pernr.
          MOVE-CORRESPONDING wa_catsdb TO wa_zsegmenttime.
          CLEAR wa_edidd.
          MOVE c_segnam TO wa_edidd-segnam.
          MOVE wa_zsegmenttime TO wa_edidd-sdata.
          APPEND wa_edidd TO it_edidd.
          CLEAR wa_catsdb.
          CLEAR wa_zsegmenttime.
        ENDLOOP.
      ELSE.
        MESSAGE 'NO DATA FOUND FOR GIVEN SELECTION' TYPE 'I'.
      ENDIF.
    *006 comment begin
    Count the number of data segments.
    *006 comment end
      DESCRIBE TABLE it_edidd LINES v_nbseg.
    *007 comment begin
    If the number of data segments exceeds the maximum allowed number,then display an error message.
    *007 comment end
      IF v_nbseg GT v_occmax.
        MESSAGE  'IDOC ERROR Message' TYPE 'E000'.
      ENDIF.
      CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' " for creating an catsdb idoc
      EXPORTING
      master_idoc_control = wa_edidc
    OBJ_TYPE = ''
    CHNUM = ''
      TABLES
      communication_idoc_control = it_edidc
      master_idoc_data = it_edidd
      EXCEPTIONS
      error_in_idoc_control = 1
      error_writing_idoc_status = 2
      error_in_idoc_data = 3
      sending_logical_system_unknown = 4
      OTHERS = 5
       IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
         WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ENDIF.
    ENDFUNCTION.
    Save, check and activate
    111. Assigning the Inbound Function Module to Basic Type & Message Type
    o       Go to T. Code WE57
    o       Click on change, continue, continue and New Entries Button
    o       Enter the Module as ZCATSDB_TIMESHEET_SURESH Type as "F"
    o       Basic Type as ZTIMEIDOC
    o       Message Type as ZCATSTIME
    o       Direction as 2
    o       Save and back
    Now Login in 800 client of Application Server SAP-REMOTE
    12. Assigning the Inbound Function Module in ALE Table
    o       Go to T. Code BD51
    o       Click on continue, New Entries button
    o       Give the Inbound Function Module ZCATSDB_TIMESHEET_SURESH
    o       Give Input t. as 0 (zero)
    o       Save and back13. Creating Process Code
    o       Go to T. Code WE42
    o       Click on Change, New Entries Button
    o       Give Process Code name as ZCATSDB, give Description & Save
    o       Select Processing with ALE Services Radio button
    o       Select Processing by Function Module Radio button
    o       Click the ALE Table (arrow Icon) in Identification
    o       Give the Function Module Name ZIDOC_INPUT_ZBAPI_STUD_MAS
    o       Give maximum number of repeats 0
    o       Save and back, back
    o       Select the process code from the list & click on Logical Messages Icon
    o       Give the Message Type as ZCATSTIME
    o       Save & Back, Save & Back, Save & Back
    14. Changing the Customer Distribution model in receiving system
    o       Go to T. Code BD64
    o       Click on change and Create model view button
    o       Enter the short text and Technical name as CATSECC
    o       Select the model view & click on Environment -> Generate Partner Profiles
    o       Select Transfer IDOC Immediately and Trigger Immediately radio buttonso       Click on Execute You should get a list in green color which means it executed successfully.15. Assigning the Process Code to Message Type in Receiving System
    o       Go to T. Code WE20
    o       Expand Partner Type LS
    o       Select the Partner Profile CATSSENDER
    o       Double click on Message Type ZCATSTIME in Inbound parmtrs.
    o       Give the Process Code as ZCATSDB
    o       Click on Trigger Immediately Radio button
    o       Save & Back
    Save & Back
    16. Creating the Selection Program (Outbound Program)
    -         Login in client 800.
    -         Go to T. Code SE38
    -         Create a Report Program as ZCUSTOMIDOC with the following code
    REPORT ZCUSTOMIDOC
           NO STANDARD PAGE HEADING.
    TABLES:catsdb. " using structure of cats db table
    *000 comment begin
         this selection screen contains one select option and one parameter
    *000 comment end
    SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS pernr FOR catsdb-pernr.
    PARAMETER: workdate LIKE catsdb-workdate,
              LSTAR like catsdb-LSTAR,
              COUNTER like catsdb-counter.
    SELECTION-SCREEN: END OF BLOCK b1 .
    DATA: wa_val TYPE i.
    wa_val = pernr-high - pernr-low.
    *001 comment begin
          calling custom function module
    *001 comment end
    CALL FUNCTION 'ZCATSDB_TIMESHEET_SURESH'
      EXPORTING
        p_workdate = workdate " passing workdate parameter
        p_LSTAR = LSTAR
        p_counter = counter
      TABLES
        s_pernr    = pernr. " passing pernr select option
    IF sy-subrc EQ 0.
      MESSAGE i000(zaluri) WITH 'IDOCS CREATED FOR EMPLOYEES BETWEEN' pernr-low ' AND ' pernr-high .
    MESSAGE i000(zaluri) WITH   'IDOCS CREATED FOR EMPLOYEES BETWEEN' PERNR-LOW 'TO' PERNR-HIGH.
    gives information message if idocs are created for given  employees
    ELSE.
      MESSAGE e000(zaluri) WITH 'NO IDOCS CREATED FOR EMPLOYEES' pernr-low  'TO' pernr-high. " gives error message
    " if idoc is not created
    17. Transferring the CATSDB records from sender Application Server SAPADM   to  receiver Application Server SAP-REMOTE
    -         Execute Report Program ZCUSTOMIDOC
    -         Give the Range of PERSONNEL NO'S, Date, Activity Type, Counter to Transfer
    -         Give Message Type as ZCATSTIME
    -         Give Receiver Logical system as ECC
    -         Execute
    -         You should get the IDOC Number
    -         Take the IDOC Number and go to T. Code WE05 & Execute
    -         In Outbox you can see the IDOC Status
    -         Select the status record in left side window
    -         Double click on the Status record in right side window-         You can see the Control Record, Data Record and Status Records for that IDOC
    If the ICON is green and the status code is 3, it means the IDOC is passed to PORT Successfully
    18. SENDING IDOCS FROM APPLICATION SERVER SAPADM
    TO APPLICATION SERVER SAP-REMOTE USING WEDI
    -         Go to T. Code WEDI & execute or T. Code WE19
    -         Give idoc number it is generated recently
    -         Continue & double click on segment to view data in segment
    -         Click on EDIDC to give port, partner no, message type, partner
    type of receiver. [For sender no need to give any port no leave it as
    blank]
    -         Click on Standard Outbound Processing button and click continue
    -         You will get a message as idocs successfully transferred
    Now Login in Receiver 800 client
    -         Go to T. Code WE05 & Execute
    -         You can see the status record in left side window
    -         If the status no is 53 and color is green, it means the IDOC is posted to Application successfully.
    -         You can see the Log Information by double clicking on the status record in right side window.
    -         Now in left side window, you can see the Control Record, Data Record & Status Record of the IDOC
    -         Now go to T. Code SE16
    -         Give the table name CATSDB & press F7
    -         See the contents of the table
    -         The table is updated with the catsdb records transferred from 800 client with our selection program.
    reward if u find useful
    regards
    Nagesh.Paruchuri

  • Homogeneous System Copy - Remaining ALE Configuration

    We made a system copy of an R/3 HR productive system to a new server for testing purpose. The system copy was made with a backup / restore procedure. Now, the new server in online and is working fine. The problem starts when we want to make the accounting payroll. This process needs financial data from R/3 Finance system via ALE to make the accounting. So we decided to connect this new test system with our R/3 Finance QAS system, via ALE, to make possible the extraction of the data needed.
    When running the accounting payroll process, we get the following error: "RFC Destination is not maintained for object BUS6004 and method check" and the accounting is canceled. We noticed that the system is trying to use a RFC which its destination is R/3 HR Productive system. Obviously, we deleted the RFC connection pointing to the real productive system to prevent any damages. Also, we checked the ALE configuration and everything is OK (Transactions: BD97, WE20, WE21). But, when we checked the consistency of the ALE configuration, in transaction BDM5, we noticed that there is another ALE configuration defined, which is pointing to the R/3 HR Productive system. It seems that the system copy brings all the definitions of the ALE configurations that were defined in the original R/3 HR productive system. However, this new system is using these settings for connecting via ALE. There is a way to delete or disable these old settings defined in this new system? When making a system copy, there is a way to avoid copying the ALE configurations defined in the source system?

    You have some options here ie after system copy
    - Before starting the background process (ie  #rdisp/wp_no_btc)
    - Start SAP system, execute sm59 and append to all the  <destination/target> with <destinaion/target>_no connect for each RFC. This way the connections won't happen
    - Save
    - Stop SAP
    - remove # frm rdisp/wp_no_btc
    - Restart SAP
    whenever you want to try a connection then will remove the _NOCONNECT and it connect
    or
    you have a table RFCDES, which can be disabled (i haven't tried this).
    Cheers

  • ALE modelview error

    hi all,
    when iam doing ale config for a a simple vendor master data transfer i got error.
    the first 3 steps r ok. rfc destination and test connection and remote logon is ok.
    in step 4 ..i assigned a message type(cremas) to the modelview.when i expand modelview i shows sender lg sys,rec log sys and cremas,no fillers in cremas.
    1)but when distribute modelview error shows" no message have been defined for the selection condition in the model."
    2)target sys VBR000 rfc destination for syncronous communication (message type SYNCH) partner profile Loical sys VBR800 SYNCH does not exist.generate partnet profile OR specify outbound partner for  message type SYNCH."
    wat is the prblem .give reply.
    vijay

    Hi
    look at it u may get idea
    Application Linking and Enabling (ALE)
    In this document you will learn the step-by-step procedure to setup the ALE system and go through a transaction between two clients
    For our purpose we have two clients
    namely Client 100 and Client 200.
    System name is SAPKDC (FOR BOTH 100 AND 200 CLIENTS).
    Distribution of Material Master Data Between two Systems
    1) SETUP LOGICAL SYSTEM: (Note: Do Not Create This Step)
    To do this follow the following steps
    Execute SALE Transaction Code
    On The Screen Click on Sending and Receiving Systems.
    Then Click on Logical Systems.
    Then Click Defining Logical Systems.
    Click New Entries Button
    (E.g. (LG100 sending system)
    (LG200 receiving system))
    Enter two logical system names and their description.
    Save
    Comeback to SALE Transaction Code screen.
    2) Now you have to allocate the created logical systems to respective clients.( Note: Do Not Create This Step)
    LG100 assign to client 100
    LG200 assign to client 200
    To do this, do the following.
    Click Assigning Client to Logical System.
    Ignore the message that comes up on the screen.
    Select client 100
    Click details button on the toolbar icon or press F2.
    In the logical system box, enter LG100.
    Click on the save Icon
    Click the back button.
    Now select client 200.
    Click details icon or press f2.
    In logical Systems box, enter LG200.
    Save
    Back.
    Comeback to SALE Transaction Code screen.
    3) Maintain RFC Destination: (TR.CODE:SM59)
    (Note: Do Not Create This Step)
    Click Create Button on the Screen
    On the Screen Maintain RFC Destination i.e LG200.
    Enter LG200 in RFC destination box.
    Connection type is 3
    Give a description for the RFC destination.
    Maintain Technical Settings on Details on Technical Settings tab
    Target Host as : SAPKDC (NOTE: Save it as a Host Name)
    Maintain Logon Details on Logon/Security tab.
    Language: EN.
    User: MMUSER200 (This is the logon for dist.)
    Client : 200
    Password: MM1234.
    Save.
    Click on create to do the above process for Client 200 in
    The client 200 system.
    4) Maintain Distribution Model.(BD64). (ABAPer role starts here)
    Execute Maintain distribution model directly for
    creating the model.
    Click on change mode button on App tool bar of the Screen.
    Create Model View pushbutton on App tool bar of the Screen.
    A pop screen will appear in which you specify
    Short text as Distribution for MM Data.
    Enter Technical Name as LGMODEL.
    Select Model View and Click on Add Message Type Pushbutton on App toolbar of the Screen.
    A popup screen will appear in which you specify
    Model View as LGMODEL.
    Sender as LG100.
    Receiver as LG200.
    Again Click on Add Message Type Pushbutton on App toolbar of the Screen.
    A popup screen will appear in which you specify
    Model View as LGMODEL.
    Sender as LG200.
    Receiver as LG100.
    SAVE.
    On the same screen goto Menubar and select Environment.
    And then select Generate Partner Profiles , then execute it.
    On the Screen specify the Logical System as LG200.
    Then execute the screen.
    Click back.
    Again On the same screen goto Menubar and select EDIT.
    Again select Model View and then select Distribute.
    ****LOGIN to client 200.
    Execute Tr.code BD64 and again On the same screen goto Menubar and select Environment.
    And then select Generate Partner Profiles , then execute it.
    On the Screen specify the Model View as LGMODEL
    And Specify the Logical System as LG100.
    Then execute the screen.
    Click back.
    *******Switch back to client 100 Session.
    5) Create Material using MM03 Tr.Code.
    Enter the material name as LGMATERIAL
    Industry sector as Mechanical Engineering
    Material Type as Finished Products.
    And then Click on Data Pushbutton on the App tool bar.
    Select views.
    In the select views box for materials check basic data 1 AND 2.
    Click enter icon.
    In the next screen that you get
    Give the text of the material as NEW MATERIAL.
    Base unit of measure as KG.
    Gross Weight as 200.
    Net Weight as 100.
    Weight Unit as KG.
    In the description area language (E) and material description.
    Click Save.
    Now I Created a Material in Client 100 , I want to transfer this data to Client 200.
    6) Execute BD10 to transfer the material in which you specify
    the material as LGMATERIAL and
    message type as MATMAS (client100).
    Then a Screen will be displayed in which it shows that
    1 Master Idoc Generated .. Enter
    1 Communication Idoc Generated..Enter.
    *******LOGIN to Client 200.
    7) Execute BD11 to get the material in which you specify
    the material as LGMATERIAL and
    message type as MATMAS (client200).
    8) Execute Tr.code MM03 and give the material as LGMATERIAL
    and see that the material is displayed as it was in Client 100.
    If not follow these steps.
    9) Execute Tr.code WE19( for rectification of errors in client200).
    Specify the Existing Idoc Number and Executes it .
    A Screen is displayed in which you specify the corresponding Function Module as INPUT_IDOC_MATMAS01 and execute it.
    10) Execute Tr.code MM03 and give the material as LGMATERIAL
    and see that the material is displayed as it was in Client 100.
    Now the Material is correctly displayed in Client 200.
    11) Monitoring of IDOCS.
    Transaction Codes:
    IDOC Display of Status: WE 05.
    IDOC Date and Time: WE07.
    Outbound:
    Step 1. Application document is created when transaction is saved.
    2. Message control is invoked.
    3. Messages are processed by system.
    4. Messages are Edited (if desired).
    5. Output (ALE / EDI) is checked
    6. Validate against Message control record from Partner Profile
    7. Application Document is saved.
    8. Entry NAST table is created for every selected output program
    along with Medium & Timing.
    9. Check for Process Immediately .
    If (yes)
    Determine Processing Program from TNAPR Table.
    ELSE
    Execute RSNASTED Program.
    10. Read Partner Profile to determine Process Code.
    11. Process Code points to the Function Module & Invoked.
    12. IDoc is generated.
    13. Check for ALE Request.
    if (Yes)
    Perform Filters, Conversions, Version Changes etc.
    Else.
    IDoc is stored in DATABASE.
    INBOUND:
    Step 1. EDI Subsystem creates an IDoc file from EDI Messages
    2. Subsystem calls Functional Module EDI_DATA_INCOMING from startRFC program.
    3. Data in Control Record is validate against the Partner Profile.
    4. IDoc is generated in Database and syntax check is carried out.
    5. IDoc file is deleted once file read.
    6. Event PROCESSSTATE REACHED is triggered in Idoc Object Workflow.
    7. Check for Process Immediately.
    If NO
    Execute RBDAPP01 Program
    Else
    Read Process Code from Partner Profile
    Process Code Points to Function Module
    Application Document Posted.
    further help:
    check url
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/ale/configuration.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapdevelopment.co.uk/training
    And also u can get lots of inof from the below link.
    http://www.sapgenie.com/ale/why_ale.htm
    Regards

Maybe you are looking for

  • Error in Oracle Server Installation in AIX.--Urgent pls

    I am in the process of installing Oracle Server in AIX Machine. I am getting error when i install oracle. The following is the output of make.log /usr/ccs/bin/make -f ins_rdbms.mk part_on ORACLE_HOME=/oracle/DBW/102_64/     /bin/ar -X64 cr /oracle/DB

  • Condition type which can be selected by F4 in PO.

    Hi freinds.. once again need ur help! i have created a condition typeZHDG  (m/06) maintained the same in pricing procedure(m/08) , now the problem is while creating PO that condition type automatically fetchs some value and needs to amended each time

  • Error when using cm:search to replace pz:contentSelector

    I'm trying to select content at runtime, using cm:search. I currently have a <pz:contentSelector> that works using the contentSelector rule "cm_path contains 'blah'", but when I convert that to <cm:search query="cm_path contains 'blah'">, nothing is

  • Coding puzzle

    Hi all, I think this should be simple but I'm having trouble - can't get my head round the various options. Basically I need a list of which Reports are being run - the last run date and the user who ran it. I have two tables - one contains the Repor

  • How do I attach a photo to my signature

    How do I attach a photo to my signature in messages & email?