<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how data send through ale in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-data-send-through-ale/m-p/3589633#M864290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mukesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through this to know about the ALE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://abapprogramming.blogspot.com/2007/05/ale-abap-cross-applications.html" target="test_blank"&gt;http://abapprogramming.blogspot.com/2007/05/ale-abap-cross-applications.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And download this Application-Link-Enabling.Pdf from this URL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/065ab6a5-e42d-4aa1-a11e-308c04f7c43f/Application-Link-Enabling" target="test_blank"&gt;http://www.esnips.com/doc/065ab6a5-e42d-4aa1-a11e-308c04f7c43f/Application-Link-Enabling&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is helpful to you,if so please reward me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Thishya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Mar 2008 09:07:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-25T09:07:01Z</dc:date>
    <item>
      <title>how data send through ale</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-data-send-through-ale/m-p/3589632#M864289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;dear sir&lt;/P&gt;&lt;P&gt;     i want to ask that how data send through ale for select particuler table-field..plz say in detailes and with t code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 06:33:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-data-send-through-ale/m-p/3589632#M864289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T06:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: how data send through ale</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-data-send-through-ale/m-p/3589633#M864290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mukesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go through this to know about the ALE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://abapprogramming.blogspot.com/2007/05/ale-abap-cross-applications.html" target="test_blank"&gt;http://abapprogramming.blogspot.com/2007/05/ale-abap-cross-applications.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And download this Application-Link-Enabling.Pdf from this URL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.esnips.com/doc/065ab6a5-e42d-4aa1-a11e-308c04f7c43f/Application-Link-Enabling" target="test_blank"&gt;http://www.esnips.com/doc/065ab6a5-e42d-4aa1-a11e-308c04f7c43f/Application-Link-Enabling&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is helpful to you,if so please reward me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Thishya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 09:07:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-data-send-through-ale/m-p/3589633#M864290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T09:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: how data send through ale</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-data-send-through-ale/m-p/3589634#M864291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to take the date in an internal table&lt;/P&gt;&lt;P&gt;and pass that internal tabel to function module&lt;/P&gt;&lt;P&gt;'MASTER_IDOC_DISTRIBUTE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see the code&lt;/P&gt;&lt;P&gt;and ask if doubt&lt;/P&gt;&lt;P&gt;and also plzz reward points&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALE: CREATING AND USING NEW IDOC TYPES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP supplies maximal IDoc types for master data.  We can create our own reduced IDoc types, by selecting only those segments and fields which are relevant to a specific project.  We can also create extended IDoc types, by appending one or more segments to an existing IDoc type.  In both cases, we use a standard SAP IDoc type as a template for the reduction or extension.  As an alternative, R/3 allows the customers to create their own IDoc types, from scratch.  This alternative method is the topic of this article.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In our simplified scenario, an ABAP program on the sending system reads a message and a one-character key entered by the user.  The program adds the user name, the current date and time, and sends the information to the receiving system.  The receiving system processes the data and posts it to the database.  It also sets the appropriate status of the IDoc, which then can be checked in the IDoc List (WE05).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to achieve our task, the following steps are necessary:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  1. Create data container (Idoc)&lt;/P&gt;&lt;P&gt;  2. Create database table&lt;/P&gt;&lt;P&gt;  3. Create outbound program&lt;/P&gt;&lt;P&gt;  4. Create inbound function&lt;/P&gt;&lt;P&gt;  5. Set up ALE customizing&lt;/P&gt;&lt;P&gt;  6. Send data&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;Step 1: Creating a new IDoc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Create new segments&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt; Segments are field strings that contain grouped data of the message.  The name of the segment type must start with Z1.  For each field in the segment, define a field name, a data element for the segment structure, and a data element for the segment documentation.  The system will create three structures:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Z1xxxxx - field names&lt;/P&gt;&lt;P&gt;   Z2xxxxx - data elements for structure definitions&lt;/P&gt;&lt;P&gt;   Z3xxxxx - data elements for documentation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To create a new segment: in the ALE IMG, select Extensions-&amp;gt;Idoc types-&amp;gt;Maintain IDoc type (transaction WE31); Goto-&amp;gt;Maintain segment.  Enter the segment name and description, and click on Create.  After entering the segment fields, save and activate your segment.  This should be done for each new segment in your IDoc (in our case we have one segment).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Create new IDoc type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The IDoc type describes the technical structure of a message.  It defines which segments will be used, and what is the hierarchical structure of the segments.  For each segment, it also specifies whether it's mandatory or optional, and how many times the segment may appear in the IDoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To create a new IDoc type: WE30, select "Basic IDoc type", enter the name, and click on Create.  Add segments to the new IDoc type (menu Segment-&amp;gt;Create).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Create new message type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The message type describes the contents of the message.  It helps the system to decide how to process the message. To create a new message type: WE30, Environment-&amp;gt;Message types; Display-&amp;gt;Change; New entries.  Enter the message type name and description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149;	Link message type with IDoc type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALE IMG-&amp;gt;Extensions-&amp;gt;IDoc types-&amp;gt;Maintain message type for intermed. structure;  choose "EDI: Message types and assignment to IDoc types"; Display-&amp;gt;Change; New entries.  Enter the Message type, the BasIDoc type, and the release.  Your link will not be valid for prior releases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2: Create a new database table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Go to the ABAP/4 Dictionary Initial screen (SE11), and create a new table.  The  table should mirror the structure of the segment created above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 3: Create a program for outbound processing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fill data into Idoc and pass IDoc to ALE layer.  Close LUW (commit work).  The IDoc consists of a control record and one or more data records (segments).  The data segments contain the data of the message.  They are passed to ALE as an internal table (structure EDIDD).  The control record contains general information about the IDoc (structure EDIDC).  Function MASTER_IDOC_DISTRIBUTE is called to pass the IDoc to ALE.  For further details, see the code in Appendix A.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 4: Inbound processing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a function module for the inbound processing.  Check that the IDoc contains the correct message type.  Convert the character data to internal format, if necessary.  If the data is OK, post it to the database table.  Otherwise, return an error message to ALE.  For further details, see the code in Appendix B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) Allocate API to Message Type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ALE IMG-&amp;gt;Extensions-&amp;gt;Inbound-&amp;gt;Allocate function  module to logical message; New entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Module                    name of your function&lt;/P&gt;&lt;P&gt;      Type                      'F' (function module)&lt;/P&gt;&lt;P&gt;      BasicIDoc type            you created in step 1&lt;/P&gt;&lt;P&gt;      Message type              you created in step 1&lt;/P&gt;&lt;P&gt;      Direction                 '2' (inbound)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   b) Declare API Attributes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      ALE IMG-&amp;gt;Extensions-&amp;gt;Inbound-&amp;gt;Define settings for   input modules; New entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Function module           name of your function&lt;/P&gt;&lt;P&gt;      Input t.                  '1' (individual input)&lt;/P&gt;&lt;P&gt;      Dialog alllowed           ' '&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   c) Maintain Inbound Process Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALE Extensions-&amp;gt;Inbound-&amp;gt;Maintaining process  codes (inbound); select "Inbound with ALE service"   -&amp;gt;"Processing by function module"; Create;&lt;/P&gt;&lt;P&gt;      New entries&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Identification             name of your function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 5: Set up ALE customizing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the distribution model, you have to define which messages are distributed from one system to another.  The model directly controls the distribution.  ALE IMG-&amp;gt;Distribution customer model-&amp;gt;Maintain customer distribution model directly; Maintain message flow. We assume that the communication parameters, like partner profiles, ports, RFC destinations, have been set up by this time.  You can run a consistency check for your set up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step : Send data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On the sending system, run the program created in Step 3.  The data will be put into an IDoc and sent to the receiving system.  On the receiving system, use the IDoc overview (WE05) to check that your IDoc has arrived.  If it has been processed successfully, the database table created in Step 2 must contain the new record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appendix A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZALE2LK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES: Z1MESLK.  "IDoc segment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: MESSAGE LIKE Z1MESLK-MESSAGE OBLIGATORY,&lt;/P&gt;&lt;P&gt;                             MESKEY LIKE Z1MESLK-MESKEY OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF F_IDOC_HEADER.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE EDIDC.&lt;/P&gt;&lt;P&gt;DATA: END OF F_IDOC_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF T_IDOC_DATA OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE EDIDD.&lt;/P&gt;&lt;P&gt;DATA: END OF T_IDOC_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF T_COMM_IDOC_CONTROL OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE EDIDC.&lt;/P&gt;&lt;P&gt;DATA: END OF T_COMM_IDOC_CONTROL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR T_IDOC_DATA.&lt;/P&gt;&lt;P&gt;REFRESH T_IDOC_DATA.&lt;/P&gt;&lt;P&gt;CLEAR F_IDOC_HEADER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;move parameters into field string&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Z1MESLK-MESKEY = MESKEY.&lt;/P&gt;&lt;P&gt;Z1MESLK-MESSAGE = MESSAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;add data to field string&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Z1MESLK-SENDER = SY-UNAME.&lt;/P&gt;&lt;P&gt;Z1MESLK-MDATE  = SY-DATUM.&lt;/P&gt;&lt;P&gt;Z1MESLK-MTIME  = SY-UZEIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;field string to IDoc-data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;T_IDOC_DATA-SDATA = Z1MESLK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;segment name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;T_IDOC_DATA-SEGNAM = 'Z1MESLK'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;append data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;APPEND T_IDOC_DATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fill IDoc header&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;F_IDOC_HEADER-MESTYP = 'ZMESLK'.&lt;/P&gt;&lt;P&gt;F_IDOC_HEADER-IDOCTP = 'ZALE2LK'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;send IDoc&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'&lt;/P&gt;&lt;P&gt;     EXPORTING&lt;/P&gt;&lt;P&gt;          MASTER_IDOC_CONTROL                             = F_IDOC_HEADER&lt;/P&gt;&lt;P&gt;     TABLES&lt;/P&gt;&lt;P&gt;          COMMUNICATION_IDOC_CONTROL           = T_COMM_IDOC_CONTROL&lt;/P&gt;&lt;P&gt;          MASTER_IDOC_DATA                                     = T_IDOC_DATA&lt;/P&gt;&lt;P&gt;     EXCEPTIONS&lt;/P&gt;&lt;P&gt;          ERROR_IN_IDOC_CONTROL                          = 1&lt;/P&gt;&lt;P&gt;          ERROR_WRITING_IDOC_STATUS                 = 2&lt;/P&gt;&lt;P&gt;          ERROR_IN_IDOC_DATA                                  = 3&lt;/P&gt;&lt;P&gt;          SENDING_LOGICAL_SYSTEM_UNKNOWN = 4&lt;/P&gt;&lt;P&gt;          OTHERS                                                               = 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;check results&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  WRITE:/ 'IDoc created.'.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;  WRITE:/ 'Error',SY-SUBRC,'in MASTER_IDOC_DISTRIBUTE'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;close LUW&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;COMMIT WORK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appendix B&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_IDOC_INPUT_ZMESLK.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"       IMPORTING&lt;/P&gt;&lt;P&gt;*"             VALUE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD&lt;/P&gt;&lt;P&gt;*"             VALUE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC&lt;/P&gt;&lt;P&gt;*"       EXPORTING&lt;/P&gt;&lt;P&gt;*"             VALUE(WORKFLOW_RESULT) LIKE  BDWF_PARAM-RESULT&lt;/P&gt;&lt;P&gt;*"             VALUE(APPLICATION_VARIABLE) LIKE  BDWF_PARAM-APPL_VAR&lt;/P&gt;&lt;P&gt;*"             VALUE(IN_UPDATE_TASK) LIKE  BDWFAP_PAR-UPDATETASK&lt;/P&gt;&lt;P&gt;*"             VALUE(CALL_TRANSACTION_DONE) LIKE  BDWFAP_PAR-CALLTRANS&lt;/P&gt;&lt;P&gt;*"       TABLES&lt;/P&gt;&lt;P&gt;*"              IDOC_CONTRL STRUCTURE  EDIDC&lt;/P&gt;&lt;P&gt;*"              IDOC_DATA STRUCTURE  EDIDD&lt;/P&gt;&lt;P&gt;*"              IDOC_STATUS STRUCTURE  BDIDOCSTAT&lt;/P&gt;&lt;P&gt;*"              RETURN_VARIABLES STRUCTURE  BDWFRETVAR&lt;/P&gt;&lt;P&gt;*"              SERIALIZATION_INFO STRUCTURE  BDI_SER&lt;/P&gt;&lt;P&gt;*"       EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"              WRONG_FUNCTION_CALLED&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IDoc inbound processing for ALE2&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;database tables&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES: ZALE2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;field string for segment data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: F_Z1MESLK LIKE Z1MESLK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;read IDoc control record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;LOOP AT IDOC_CONTRL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;check correct IDoc type&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  IF IDOC_CONTRL-IDOCTP &amp;lt;&amp;gt; 'ZALE2LK'.&lt;/P&gt;&lt;P&gt;    RAISE WRONG_FUNCTION_CALLED.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;clear segment field string&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR F_Z1MESLK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;read segments of the IDoc&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT IDOC_DATA WHERE DOCNUM = IDOC_CONTRL-DOCNUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;move segment data into field string&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    F_Z1MESLK = IDOC_DATA-SDATA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;common 3 statements for error or success&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    CLEAR IDOC_STATUS.&lt;/P&gt;&lt;P&gt;    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.&lt;/P&gt;&lt;P&gt;    RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;check error&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF F_Z1MESLK-MESKEY IS INITIAL.  "error&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-STATUS = '51'.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-MSGTY = 'E'.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-MSGID = 'ZA'.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-MSGNO = '001'.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-UNAME = SY-UNAME.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-REPID = SY-REPID.&lt;/P&gt;&lt;P&gt;      WORKFLOW_RESULT = 99999.&lt;/P&gt;&lt;P&gt;      RETURN_VARIABLES-WF_PARAM = 'Error_IDOCs'.&lt;/P&gt;&lt;P&gt;    ELSE.       "no error&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;post data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      MOVE-CORRESPONDING F_Z1MESLK TO ZALE2.&lt;/P&gt;&lt;P&gt;      MODIFY ZALE2.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;write IDoc status OK&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      IDOC_STATUS-STATUS = '53'.&lt;/P&gt;&lt;P&gt;      RETURN_VARIABLES-WF_PARAM = 'Processed_IDOCs'.&lt;/P&gt;&lt;P&gt;      WORKFLOW_RESULT = 0.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;common 2 statements for error or success&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    APPEND IDOC_STATUS.&lt;/P&gt;&lt;P&gt;    APPEND RETURN_VARIABLES.&lt;/P&gt;&lt;P&gt;  ENDLOOP.      "loop at idoc_data&lt;/P&gt;&lt;P&gt;ENDLOOP.        "loop at idoc_contrl.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 10:16:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-data-send-through-ale/m-p/3589634#M864291</guid>
      <dc:creator>manubhutani</dc:creator>
      <dc:date>2008-03-25T10:16:18Z</dc:date>
    </item>
  </channel>
</rss>

