‎2011 Aug 09 1:06 PM
Hi.
I am designing the outbound interface from SAP for a custom Idoc type(of type BOMMAT). The problem is that the Outbound function module to create/generate & send the Idocs. I am using the MASTER_IDOC_DISTRIBUTE but dont know how to create fetch the changes & send the idocs after there is a change.
thanks in advance
Guru
‎2011 Aug 09 1:32 PM
Hi Guru,
Generally func.module 'master_idoc_distribute' will be used to create idoc control records and for transferring it to destination partner system and we can implement this functionality with simple program in which func.module needs to be called.
As you know, from Sender side - we need to maintain Messg. type and assigning messg. type to idoc type
- maintain Model view to generate partner profile and distribute as well as addition of
message type
From Receiver End - Create func. module to update database from idoc segment
- Using WE57, assigning FM to idoc type and messg. type
- Using BD51, define input method for inbound FM
- Maintain process code using WE42 to link up with messg. type
- Distribute partner profile using BD64
Now, we needs to execute program from sender end
From receiver end, check for Idocs using WE02
Best Regards,
Suren
‎2011 Aug 09 1:32 PM
Hi Guru,
Generally func.module 'master_idoc_distribute' will be used to create idoc control records and for transferring it to destination partner system and we can implement this functionality with simple program in which func.module needs to be called.
As you know, from Sender side - we need to maintain Messg. type and assigning messg. type to idoc type
- maintain Model view to generate partner profile and distribute as well as addition of
message type
From Receiver End - Create func. module to update database from idoc segment
- Using WE57, assigning FM to idoc type and messg. type
- Using BD51, define input method for inbound FM
- Maintain process code using WE42 to link up with messg. type
- Distribute partner profile using BD64
Now, we needs to execute program from sender end
From receiver end, check for Idocs using WE02
Best Regards,
Suren
‎2011 Aug 10 7:54 AM
Hi Suren,
Thanks for the quick reply.
Let me elobarate a bit more on the scenario.
As explained in your reply, I have done all the required ALE/IDOC settings. I have done the required steps for change pointer triggering too. Here, I am not worried about the Dbase update(by a program/FM, as you suggested) at the receiving end since the receiving system in my case is a third party software. I have created a dummy custom program(Its working fine too) & every time if I execute it, the Idocs are getting generated & are being received by the receiving system in XML format. The progrm currently is a simple one(for testing purpose) & I have hardcoded data values for the required segments.
My actual requirement is that as & when there is a change in BOM(CS01/CS02 or any other BOM maintaining transactions), the program should get the changes(I dont know how) & should create & send the Idocs. However, The program will be in background job schedule to execute every minute(at sm36).
So, my questions again are,
1) Is is really required to have a FM to create & send the Idocs from sending system in my case?
2) If yes, What should be there in that program(logic)?
Please also note that I have created the custom Idoc type(from BOMMAT) for having a filter in BD64. It is working fine. I know how to use BD21 for triggering changes every minute for STANDARD IDOC TYPES...
~ Guru.
‎2011 Aug 10 8:01 AM
Hi,
why don't you use BOMMAT?
You need to create a FM that reads the changepointers (CHANGE_POINTERS_READ), then fills IDoc data and send the IDoc (MASTER_IDOC_DISTRIBUTE) and then mark the change pointers as processed (CHANGE_POINTERS_STATUS_WRITE).
Best regards,
Oliver
‎2011 Aug 10 8:09 AM
Hi Oliver,
I have alreday mentioned in my previous reply that I cant use BOMMAT. The reason is that I need to have a filter with two fields(BOM Created by & Changed on), which I caould not find in BOMMAT. So, I create ZBOMMAT & now I wanted the changes to be triggered to the receiving system as & when there is a change.
~ Guru.
‎2011 Aug 10 8:42 AM
Hi,
what kind of filter? Do you need to filter the IDocs based on BOM Created by & Changed on?
Then you could use BAdI BDCP_BEFORE_WRITE and check while creating the change pointers.
Otherwise I think you need the solution I mentioned above. You need to create a FM that fills your IDoc.
Best regards,
Oliver
‎2011 Aug 10 12:12 PM
Hi Oliver,
I am not supposed to use any kind of enhancements(BADI/User exits etc). So, let me know any other suggetions?
~ Guru.
‎2011 Aug 10 12:16 PM
Hi,
there is no.
Filtering can be done via BD64 for some fields or by this BAdI with any logic.
And if you create a custom IDoc type then you have to fill it cutom.
Best regards,
Oliver
‎2011 Aug 10 12:22 PM
Thanks Oliver.
Can anybody else help me with Outbound program for custom Idoc type with Change pointer triggering?
~ Guru
Edited by: gtipturnagaraja on Aug 10, 2011 1:23 PM
‎2011 Sep 26 11:43 AM
Hi Guru,
Please check if while doing the Change pointers settings you have given custom message type in BD50. If yes activate it and give related fields in BD52 for tracking changes and maintain all outbound ALE setting with this custom IDOC name and Custom message type.
This will work as standard change pointers. you will not need any program to trigger the Idocs.
Regards,
Ganesh.