Friday 19 April 2013

Sending Material Master from Source System to (800) to Receiver (810) In ALE IDOCs


Sending material master from source system to (800) to receiver (810)

 

Sender System

Step 1: Define Logical system (SALE): is the representation of an R/3 or external system in SAP R/3 for the distribution of data to and from the R/3 System

Step 2: Assign client to Logical System

Step 3: Maintain RFC destinations (SM59): In the RFC Destination we provide the receiver system details(IP address) and log on details of the receiver client.

Step 4: Maintain PORT (WE21): is a logical representation of a communication channel in SAP.

It defines the medium of transferring data.

There are four types of ports that can be defined in R/3: tRFC, File, R/2, and Internet.

Step 5: Maintain outbound partner profile (WE20): is an identifier for a system used for communicating messages. There are four types of partner profiles: KU for Customer, LI for Vendor, B for Bank, and LS for Logical System. KU, LI, and B are used for EDI partners, while LS is used for ALE communications

Step 6: Maintain Distribution model (BD64)

Step 7: Run the Outbound Program

Receiver System

Step 1: Define Logical system (SALE)

Step 2: Assign client to Logical System

Step 3: Optional

Step 4: Optional

Step 5: Maintain inbound partner profile (WE20)

Step 6: Not Required

Step 7: Not Required

Standard Outbound Idoc Process for standard Message Type MATMAS

 

 

·         Create the Logical System

Go to SALE transaction

Expand the Basic settings, Logical Systems

 

·         Click on new entries.

Enter the logical system names as

SENDER -----LOGSYS1

RECEIVER---LOGSYS2

shown below in the screen.





 Click on save button.

 and click on back.

 

·         Assign the Logical System(LOGSYS1) to Client 811, this is our sender system here.

      Select the client -----sender and click on Details icon.

        

 And then assign the logical system (LOGSYS1) -----sender to the client as shown below in the screen.

 





  Click on save button.

 and click on back.

    Then double click on 812 client and give LOGSYS2 as Logical System name for the receiver system.

 
click on save button and go back.

=> Then maintain the RFC destination in SM59
·         Go to SM59 and choose ABAP connections and click on create button.
·          Give RFC Destination name as LOGSYS2 (any name can be given, but generally receiver logical system is preferred).
·         Enter the Details as shown in the screens below:

 Provide the Hostname.







Provide Language, Client, Username, Password.       

    

Then click on Remote Log on automatically. It will switch to 812 client.       

·         Maintaining the PORT.
                  Go to  WE21
                  Select the Transactional RFC then click on create

 

   Click on Enter.(here we can also create our own port name by selecting radio button own port name).

  Give the description and RFC destination(LOGSYS2)
Then click on save .
Now the Port is created.
=>Then maintain the outbound partner profile in we20.
Goto we20.
Choose Partner Type LS and click on Create.
Enter the following partner details of the receiver .




Click on Save button and then back.
We can the see the outbound parameter details as shown below
 
Similarly create the Partner Profile for LOGSYS1.
=>Maintain the Distribution Model.
Goto BD64.

A Pop up window is displayed
Provide the short description and Technical name details as shown in the below screen.

And then click on Enter.
Now select the “ Master Data Distribution” and click on “Add Message Type”  button.
Provide the sender and receiver details.

 
And then clik on Enter.


Click on save button.
If the Partner profile is not created manually through we20.
Then , goto ‘Environment’ in the menu and click on generate partner profile.
The following screen is displayed

 
   Click on Execute.

Here we can observe that LOGSYS2 is already exists, since we have created that manually.
For the sender the sender client we have not created any partner profile before so it has created the profile for LOGSYS1.
We have completed the outbound settings, so therefore we can send the Idoc.

Inbound Configuration Settings:

 To receive the idoc at the receiver client we have to maintain the Inbound settings.

Since here we are 811 and 812 clients are from the same server we have already created
We can see the sender and receiver systems in the transaction ‘SALE’.

Now LOGON to 812 client.
Goto the transaction WE20, select Partner Type LS and click on Create button.


Provide the Details in the fields shown below and click on Inbound Parameters

   Enter the Message Type and Process Code

 
And click on SAVE button.
The Inbound configuration settings are also completed so therefore we can check the idoc list now in the client 812 and see the received idoc .
To send the idoc through the standalone program, Goto BD10.


Provide the Material and  Message Type.






Execute the WE02/WE05 to check the idoc number  and the Data records and the status of the idoc.

 

Click on execute.

The idoc list will be displayed. We can all the details related to idocs.
 
Double click on the idoc to see the details of the particular idoc.

Now we  have completed the outbound settings and also generated the outbound idoc.

Let us now see the inbound idoc.

Logon to the client 812.

Execute the Transaction code WE05/WE02.

To see the inbound idoc, provide ‘2’ in the direction box.

The list of inbound idocs are generated as shown below.

Double click on the idoc to see the details.

 
So, the idoc has been successfully received at the client 812.

Thursday 19 April 2012

Ale Idocs Faqs


1. how many type of records in Idoc?
Ans). IDoc have a 3 types of Records
     1.Control Record
     2.data Record  
     3.status record

2. what is the table for trfc port
Ans).  'TidDatabaseConnectionString' this is the type of            port for processing idoc's.

3. Without using the distribution model, can we send data from one system to another system by using ALE?
Ans). no we con't send.because When ever we try to send an IDOC  
it checks with distribution model and is there any
filtering is defind or not, if it is defined then checks
with filter data and then it checks with reciver and
messagetype.

4. what is the difference between template and table in smartforms?
Ans 1). template is a static and table is dynamic
maximum we prefer table only
 
Ans 2). table node:tables are dynamic because the table size depend on the amount of tha data selected at runtime.
Templete node:templetes are static because the no of column 
and lines are determind before the actual output.
 
5. What is the main difference between ALE/IDOC and BAPI ?
Ans. ALE/IDocs are used for asynchronous information 
interchange.while BAPIs are used for synchronous 
information interchange
 
6. can we, generate i doc for more than 1 vendor.
i.e can we generate idoc for more than 1 po order
Ans. 
 
 
 
 
 
 
7. what is the diff between sap memory and abap memory?
Ans)1. abap memory comes on application server and sap memory 
comes on database server
 
8. i was sent 10 records using outbound in ale/idoc 8 records are up dated in data base tables what happend remaing records did not showing error in we02
Ans. I understand u r trying to generate the idocs with 10 
records, and u find only 8 (records) idocs created rest
(records) are missing.
 
Check with the filter set up for the records for its 
receiving partner system(logical system). 
 
Correct the filters then try regenarating the idocs(missing 
records).
 
9. Where all the Idocs get stored after creation?
Ans. EDIDC stores control/header record.
    EDIDD/EDID4 stores data records.
    EDIDS stores status records.
10. what is the difference between repair and correction in sap.
Ans. SAP system present in customer environment is copy of
original system which is at SAP itself. That means all the
objects present in customer environment are copy of the
object originally created in SAP environment.
 
So, If we modify copy of object then it is called as repair
and assigned to development task repair. Repair of object is
also called as modification.
 
Whereas if we modify object in it's original system where it
is actually created may it be SAP system or the objects
created by customer in customer environment. Then such
changes is called as corrections and assigned to task
Development/Correction
 
11. I HAVE GENERATED AN IDOC WITH ERROR AGAIN WHEN IAM
GENERATING IT .IT IS GENERATED WITH DIFFERENT IDOC
NUMBER.BUT I WANT THE SAME NO PREVIOUSLY IT IS GENERATED?
Ans. BD87 will process existing IDOC without generating a new 
one.
WE19 will ignore the error IDOC and generate a new one 
after correction
 
12. which type of workprocess can execute only once in r/3 system(sap)?
Ans. Dialog work processor
 
13. Can we attach more than one messages with One IDOC?
Ans. Yes, It is possible to have an idoc with mutiple message 
Types
 
14. Suppose their is one sender and we have three recievers.While generating an IDOC will it generate 3 IDOC's for threereceivers? Please explain in detail how the flow goes from
outbound to inbound systems?
 
Ans. in SALE we maintain the Sendor as well as three Receivers
(how many receivers to send the same idoc),and assign the sendor in sendor system as well as assign receivers in receivers system(sale-->assignment) three receivers.
 
maintain the RFC destination on sendor side and all 
receiver side also (sm59).
 
maintain the port for sendor and three receivers.
 
maintain the sendor and all receivers for a same message 
type in distribution model.(bd64)
 
maintain the partner profiles for sendor and all receiver 
side also (we20).
 
execute the outbound program(idoc generation)like BD12 for 
DEBMAS message type .
 
check out the status using we02 or we05.
 
15. where to see idoc in inbound side whether it is received in receiver system or not?
Ans. You can Use the Tcode BDM2..
 
Through this tcode you can view the Sending system Idoc 
Number and Corresponding recieving System Idoc number... status also you can get from this Tcode..
 
or elso note down the Corresponding Idoc number and check in WE02..
 
16. when idoc is created in which table its stored ...
Ans. EDID4 is the table to store data segments (EDIDD is the 
structue, not a table)
 
17. What is actual role of an abaper in ALE-IDOCS and also wt abaper do in case of CHANGE POINTERS.
Ans. change pointers technique is used when u want to send only
changes that are occured to the data in the database.to do
this 3 tcodes are needed.
BD61
BD50
BD21 (or) execute RBDMIDOC
 
18. What is idoc? What is the structure of idoc?
Ans. idoc stands for intermediate documents,it is used for data
sending current system to remote system .
the structure of idocs is
1. data records
2. control records
3. status recors
          these are stored in sap tables like that.
edidd
edidc
edids
 
19. what are the main transaction used for IDOCs
Ans. Use Area menu.
 
WEDI (TCODE)
 
List all the releavent IDOC transactions..
 
20. How to create an Idoc & Attached to SAP Transaction? For example we want to trigger IDOC To other system when we Save the PO Via ME21N.
Ans. To create an Idoc.
1. Create message type.
2. Attach basic types of IDOC to message type.
3. Attach FM to the message type combination of IDOC types
4. Creat a process code and attach message type to it.
5. Create a Partner function through WE20. Add an message  
   type in the outbound paramater.
6. Have an entry of port name and basic types (IDoc types) 
   in the outbound options tab
7. Add and an entry in the message control option with the 
   output type (ME21N- Output type) and the process code.
8. When you db click on the process code the FM should 
appear.
9. When an output is triggered in the ME21N transaction wit 
the EDI output medium. The idoc will be triggered
 
21. What is IDOC Extention. & How to do it?
Ans. idoc exetension is nothing but a to add the some more
functinality to the basic idoc. that is called the idoc
exetension. this is done by using the transaction code we30.
and go select the radiobutton like "exetension".
 
 
 
22. How to Handle the IDOC Errors using Messages?
Ans. ALE+WORKFLOW HANDLES ERRORS.
 
23. how to send the idoc to multiple sub systems?
Ans. if you are sending one idoc is to more systems you are 
create one sender logical system and more recive logical 
systems in T.CODE is SALE. then yoou are send In T.CODE 
BD64.
 

24. What is the difference Between IDOC type and Message type? How to link the IDOC type with Message type?

Ans. Message type gives the meaning of the IDOC and IDOC type gives the structure of an IDOC.

The linkage will happen in WE82.

In the OO(Object Oriented) approach, Message Type can be refferred to a Class and IDOC Type as an instance of the classMessage Type
 

25. Where the IDOC information gets stored?

Ans.
Table
Description
EDIDC
Stores the Control information an IDOC
EDID4
Stores the Data Records from 4.0 onwards 
EDIDS
Stores the Status of an IDOC
26. What is process code? What are type of process codes
Ans. Process code refers to an workflow or a function module which helps in reading or writing data from/to Idoc. Following are types of process code

         Process Code                                           Description
1.OutBound   Process Code   - -- -----------   This will read application data and place data in Idoc
2. InBound     Process Code  -----------------  This will Idoc and create corresponding application data
3.System        Process Code   ----------------- This will create work item in case some error occurs in
                                                                         indoc/application document Processing
4.Status          Process Code   -----------------  This will Handle Error that occurs when a idoc is sent
                                                                         to some other staus process code.


27. How to reprocess an IDOC?
Ans. You can use the below Programs for IDocs Reprocessing:
  • RBDMANI2 : Reprocess Idocs manually
  • RBDMANIN : Posting of IDocs with Status 51
  • RBDMOIND : Outbound Idocs status 03->12
  • RSEOUT00 : For Processing 30 Status IDocs
  • RBDAPP01 : For Processing 64 Status IDocs
  • RBDAGAIN : Reprocess Incorrect Outbound IDocs
  • RBDAGAI2 : Reprocessing of IDocs after ALE Input Error
28.  How to trace the IDocs of the Receiving system from the Sending system?
Ans. Steps:
  • Execute the transaction BD87
  • Give the Outbound IDocs in the IDoc Number field and execute or Just Note the Start time and End time when u execute the Master Data Transaction say for eg.BD10 and specify the same in the Time Created input field of BD87,also give the Message Type and the Receiving System Names and execute.
  • Select the Repective Message Type and Press the Trace IDoc Button.
29. How to trace IDocs based on the data .
Ans. Steps:
  • Execute Transaction WE09
  • Put in the message type name in the field labeled 'Logical Message' Ex - DEBMAS
  • Now we will move to the section 'Criteria for Search in Data Records '
  • In this section we will put the Segment name in which we want to search the existance of data in the field labeled 'Search in Segment' EX - E1KNA1M
  • In the field labeled 'Search in Field' we will put the field name of the segment in which we want to search the existance of data. Ex - KUNNR for searching IDOCs for certain customer number.
  • Now in the field labeled 'For Value' we will put the search value. Ex - Customer number as 100 .
  • We will now execute the transaction.
  • The result can be a single Idoc or a list of multiple IDOCS depending upon the Search Criteria entered.
30. How to Send and Receive an IDoc in the same system.
Ans. Steps :
  • Create a Dummy Logical System.
    • Goto T-Code SALE-> sending and Receiving Systems -> Logical Systems -> New entries.Enter SYSID_CLNT, but this one is Dummy so use the first 2 characters of the SYSID and prefix 'D' then underscore and then the Client number.
·
    • E.g.: If ERP_100 is the logical system of the R/3 then create ERD_100 as the dummy system.
  • Create Port for the Original System, (ERP_100)
    • Goto WE21 and select Transactional Port and press the Create button. Name the Port as "SAP" contatenated with the SYSID in our example it would be SAPERP Select the appropriate version and enter the RFC dest of the system that you are working on in this case it will be 'ERP'.
  • Create Partner Profile in partner type LS:
    • Receiver Side ( Outbound to ) : In Partner type LS nameERD_100create the Outbound Parameters, give the Message type, Receiver Port same as the port we created in step 2. Enter the Basic type.
·
    • Sender Side ( Inbound From ): In partner type LS nameERP_100 create the Inbound Parameters, give the appropriate message type and the process code.
  • Now create the stand alone program to send the IDoc:
    • The program will at some point calls the MASTER_IDOC_DISTRIBUTE function module. When you pass the EDIDC structure it will be populated as follows:
      i_edidc-mestyp =
       message type.
      i_edidc-idoctp =
       basic type.
      i_edidc-rcvprt = 'LS'.
      Concatenate 'SAP' sy-sysid into l_port.
       
      i_edidc-RCVPOR = l_port.
      i_edidc-rcvprn = 'ERD_000'.
      CONCATENATE sy-sysid '_' sy-mandt
      INTO l_sndprn.
      i_edidc-SNDPRN = l_sndprn.
      i_edidc-sndprt = 'LS'.
      i_edidc-sndpor = l_port.
  • Observe that the Sender port and the receiver port is the same, this does the trick. The outbound Idoc is sent on the port SAPERP with the Sender as ERP_100 and receiver as ERD_100 and then the Inbound Idoc is also sent to the same port SAPERP with the Sender as ERP_100 and receiver as ERD_10
Ans.
IDocs are processed by a function module, which are mapped against in table EDIFCT. When you process an IDoc with BD87 you can have a breakpoint in the function and it will stop.
For outbound processing it depends on which program is sending the IDoc. For transactional data like
purchase orders, the IDoc is created via RSNAST00 which in turn calls a function module assigned to the processing code (BD41).
 
 
 
.Message Control Tecnique:
to create a message control:

if you want to send a po go to  <me21n> select/create the
po.no click /messages/ enter details of output type, medium
and partner , also configure the same in <nace>.

go to <we20>
select the vendor and double click the message type will
take to another screen.
click message control and enter the details with respect
to /messages/ and give the process code & save.

message control will be created.



What is IDOC Extention. & How to do it?

Ans. idoc exetension is nothing but a to add the some more
functinality to the basic idoc. that is called the idoc
exetension. this is done by using the transaction code we30.
and go select the radiobutton like "exetension".