Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

pls send ALE-MESSAGE CONTROL sample code

Former Member
0 Likes
602

hai experts pls send me the sample code for ALE- MESSAGE CONTROL

thanks in advance

2 REPLIES 2
Read only

Former Member
0 Likes
397

HI

CHECK THE LINK

http://help.sap.com/saphelp_46c/helpdata/en/c8/19878343b111d1896f0000e8322d00/frameset.htm

<b>Reward points for useful Answers</b>

Regards

Anji

Read only

Former Member
0 Likes
397

Hi

Message control

is a mechanism by which documents are output based on a selection criteria and requirements. This concept is applicable not only to EDI and ALE, but also to other output mediums (for example: print, fax). Message control determines the type of document, its timing, number, and the medium. NAST table stores output records.

The conditions (selection criteria and requirements) for creating an output message are stored in condition tables. Search mechanisms are used through access sequences, output processes, and requirements to determine whether an application document qualifies for output.

ALE provides powerful capabilities to capture changes occurring to master data using Change pointers. These R/3 objects mark changes to SAP master data. ALE configuration facilitates the relation between Change Document objects and change pointers. This feature can be used to keep two or more systems synchronized with respect to master data.

In conclusion, ALE is a simple add-on application that relies heavily on the customizable distribution scenario. Every time a data object (described in an ALE scenario) changes, an IDoc is triggered. Application Link and Enabling (ALE) is one of the most common and effective technologies available for distributed SAP systems.


With Message Control is documents are output based on
certain conditions. In ALE scenarios this is basically used for transfer transaction data (fulfilling configuration settings defined in message control) from one system to another system.

Example: If you want to send purchase order IDocs from customer to vendor system using ALE. When saving of purchase order the IDocs should be triggered. Further the IDocs should only be sent when the purchasing document fulfils certain conditions - purchase document of a certain document type only needs to be sent. By output control we can configure the conditions and the timing (when the document should be triggered) and using ALE (as interfacing technology) we can send IDocs (containing application data fulfilling conditions) from one system to another system.

For More Info on Message Control,
/people/gajendra.bhakuni/blog/2007/03/13/message-control-output-control-for-ale

Application like PO(purchase order) creation use this technique , where the output type is linked to the application(Message control is a configurable cross application component which can be set in IMG .Such programs are created in the form of function modules and linked to the output type which is linked to the apllication.These have predefined interfaces.
In outbound programs(function module) that use message control the key of the
application document is passed to the function module whcig will read the data from the table depending upon the key passed(NAST structure) and fill the IDOC segemnts with the application data.The control record is also passed to the function module but is not fully filled, the rmaining fields are filled and the control is passed back to the calling program which is RSNASTED and is invoked by the
message control to process ALE and EDI output types and this program on recieving the IDOC data will create the physical IDOC in the system.

ex: for ME21 u will create the condition records in transaction mn04,there u have to assign medium for that perticular vendor,based on this it will handle.

Change Pointers:
Change pointers are the mechanism through which you can send data to another SAP system or external system if there is a change happening to specific fields of master data.

Change Pointer (Master Data Distribution)
Purpose
If you want to distribute master data changes with the SMD tool (Shared Master Data), changes to the master data objects are flagged for distribution by change pointers ( ® Master Data Distribution).

The SMD tool is connected to the change document interface. If the master data changes are to be distributed, the application writes a change document. The contents of this are passed to the SMD tool. The tool writes change pointers, reads the application data and creates the master IDoc.

The master IDoc is then passed to the ALE layer, which sends it to all interested systems.

The change pointer tables (BDCP und BDCPS) should be as small as possible. Use as few change pointers as possible and delete change pointers which you no longer need.
do the following steps for Change pointers ::

1) Tcode BD61---> check the change pointers activated check box
save and goback.

2) Tcode BD50---> check the MATMAS check box save and comeback.

3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.

4) Tcode BD52---> give message type : matmas press ok button.

select all what ever you want and delete remaining fields.

save & come back.

5) 5) go to Tcode MM02 select one material and try to change the description and save it

it will effects the target systems material desciption will also changes

6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute

give Message type : MATMAS and Executte

go through this link which ll give you detail about the change pointer

http://www.angeli.biz/www5/cookbooks/workflow/workflow_30/docu.htm

http://help.sap.com/saphelp_nw04/helpdata/en/12/83e03c19758e71e10000000a114084/content.htm

http://help.sap.com/saphelp_470/helpdata/en/dc/eb683c00e8a646e10000000a11402f/frameset.htm

Reward all helpfull answers

Regards

Pavan