11-30-2011 8:21 AM
Hello all,
I have a table in system A(a self defined Table with Delivery class "A" with "Display and Maintanance Allowed").
Have the same table in System B as well.
My problem is whenever someone changes something in the table in System "A" - with the help of changepointers ,I have to send an Idoc to System "B" to reflect this changes in system A.
I havent worked with changepOinters and have no idea how to do this.Does this have to be done programatically?
Any tutorial or any pointers in this direction would be really helpful.
Thanks
K
12-01-2011 9:55 AM
Settings on the Sender End
Table Creation T u2013 Code SE11. The table contains data that is to be sent to Receiver.
ALE Configuration
T-Code u2013 SALE
In partner profile :
Outbound Parameters add the Message type i.e is Z message type.
Define the segment type in WE31-Add table fields
Define the basic type - WE30
Next you need to make the entry of the segment in the system table.
Tcode : WE81
Code a program using 'MASTER_IDOC_DISTRIBUTE'
Reciever end :
Defining Partner Profiles ,add z message type in Inbound section.
Steps to be repeated on the receiver end
Tcode WE30
Tcode WE31
Tcode WE82
Tcode WE81
Here on the receiver end, we need to specify a process code at the time of defining the partner profile.
Process code is something that has the logic defined about what to be done after receiving the IDOC.
In our case, on receipt of the IDOC, we are updating the Z Table. i.e Inserting the data from the IDOC into the Z Table.
Creating a Process Code Tcode u2013 WE42
The logic needed is coded in the Function Module ,(Create a Z FM)
Also the processing type is selected as Processing by Function Module .
But in order to make the entry of FM to be available in the drop down ,add it in TCode u2013 BD51
Also it is important to make the entry in Tcode WE57 of FM/MESAGE TYPE etc
What to code in FM ,I guess you know
Thanks!
12-01-2011 7:07 AM
Hello,
Firstly you need develop a custom outbound idoc in system A to extract data from table.
and and custom inbound Idoc in system B to update the data in the table.
for custom idoc develeopment
http://wiki.sdn.sap.com/wiki/display/ABAP/ALEandIDocs
once you have your idoc created you need to create distribution model. in this you may activate change pointers based on your message type and fields
regards,
Abhishek
12-01-2011 9:55 AM
Settings on the Sender End
Table Creation T u2013 Code SE11. The table contains data that is to be sent to Receiver.
ALE Configuration
T-Code u2013 SALE
In partner profile :
Outbound Parameters add the Message type i.e is Z message type.
Define the segment type in WE31-Add table fields
Define the basic type - WE30
Next you need to make the entry of the segment in the system table.
Tcode : WE81
Code a program using 'MASTER_IDOC_DISTRIBUTE'
Reciever end :
Defining Partner Profiles ,add z message type in Inbound section.
Steps to be repeated on the receiver end
Tcode WE30
Tcode WE31
Tcode WE82
Tcode WE81
Here on the receiver end, we need to specify a process code at the time of defining the partner profile.
Process code is something that has the logic defined about what to be done after receiving the IDOC.
In our case, on receipt of the IDOC, we are updating the Z Table. i.e Inserting the data from the IDOC into the Z Table.
Creating a Process Code Tcode u2013 WE42
The logic needed is coded in the Function Module ,(Create a Z FM)
Also the processing type is selected as Processing by Function Module .
But in order to make the entry of FM to be available in the drop down ,add it in TCode u2013 BD51
Also it is important to make the entry in Tcode WE57 of FM/MESAGE TYPE etc
What to code in FM ,I guess you know
Thanks!
12-09-2011 1:51 PM
Hi.
Thanks for the replies.How to fill the outbound Idoc?
My scenario is as follows
Have a table which is maintained in 2 systems.
If some one edits my custom table(of Delivery class 'A') to the already existing rows(a field entry) or if he adds new contents(new row) to this table,have to update the table in the other system as well with the changed entries.
Iam going to use change pointers for that.I know to how to create an outbound Idoc,defining ALE confg: and steps that are needed in the inbound side.
But what are the steps that I have to do in the sender system side so that I can fill in the outbound Idoc and create the Idoc using changePointer.
Thats where Iam stuck at.
A step by step procedure and a sample code in this regard would be helpful.(How to activate the change pointers and how to read the tablesto fill my outbound Idoc)
Thanks...
K
12-10-2011 4:07 AM
Hey k ,
Try googling "ALE-IDOC Scenario using Custom IDOC" -I checked it and it serves ur req.
Thx
12-10-2011 8:45 AM
Hi Bobby,
1 question though
How to read the tables CDHDR AND CDPOS to get my needed data.
I mean should my select statements look like?
Should this one be planned as a job running daily?
Please suggest......
Edited by: Kohinoor72 on Dec 10, 2011 9:48 AM
12-12-2011 4:00 AM
Hey K,
Use FM CHANGEDOCUMENT_READ_HDRS_ONLY to fetch data from CDHDR table and then use FM CHANGEDOCUMENT_READ to fetch full records from the header data from CDPOS table.
Now whether you need to plan it daily- depends on your functional requirement
If they need the change in data for a specific period - monthly ,weeekly.YOu can plan accordingly with date range.
Hope it helps.
Thx.
12-13-2011 8:56 AM
Thanks a lot bobby.Will let u know if I get into trouble with this....:)