<?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 ALE FM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-fm/m-p/3323581#M796112</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is function module in ALE?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Jan 2008 03:33:44 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-26T03:33:44Z</dc:date>
    <item>
      <title>ALE FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-fm/m-p/3323581#M796112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is function module in ALE?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jan 2008 03:33:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-fm/m-p/3323581#M796112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-26T03:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: ALE FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-fm/m-p/3323582#M796113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;function module in ALE in out bound it generates idoc from application document&lt;/P&gt;&lt;P&gt;these fm are stored in processcode tcode is WE41&lt;/P&gt;&lt;P&gt;in inbound it creates application document by reading idoc to find inbound process code tcode is WE42&lt;/P&gt;&lt;P&gt;have alook at this&lt;/P&gt;&lt;P&gt;CATSDB CUSTOM IDOC TRANSFERMATION BETWEEN 2 DIFFERENT APPLICATION SERVERS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this scenario Client 800 of application server SAPADM is the Sender and client 800 of application server SAP-REMOTE is the Receiver&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Creating Logical Systems&lt;/P&gt;&lt;P&gt;o Login using 800 client&lt;/P&gt;&lt;P&gt;o Go to T. Code SALE&lt;/P&gt;&lt;P&gt;o Expand Sending and Receiving Systems&lt;/P&gt;&lt;P&gt;o Expand Logical Systems&lt;/P&gt;&lt;P&gt;o Click on Define Logical System&lt;/P&gt;&lt;P&gt;o Click on New Entries&lt;/P&gt;&lt;P&gt;o Create CATSSENDER, ECC Logical Systems&lt;/P&gt;&lt;P&gt;o Save and come back&lt;/P&gt;&lt;P&gt;o Assign the CATSSENDER Logical System to client 800 of Application Server SAPADMAssign the ECC Logical System to client 800 of Application Server SAP-REMOTE&lt;/P&gt;&lt;P&gt;2. Creating the RFCs&lt;/P&gt;&lt;P&gt;o Go to T. Code SM59&lt;/P&gt;&lt;P&gt;o Expand R/3 Connections&lt;/P&gt;&lt;P&gt;o Enter RFC Name as CATSSENDER&lt;/P&gt;&lt;P&gt;o Connection Type as 3&lt;/P&gt;&lt;P&gt;o Language as EN&lt;/P&gt;&lt;P&gt;o Client as 800&lt;/P&gt;&lt;P&gt;o User as SAPUSER&lt;/P&gt;&lt;P&gt;o Password as YESV13&lt;/P&gt;&lt;P&gt;o Target host as SAPADM&lt;/P&gt;&lt;P&gt;o Click on Remote logon button to test the RFC&lt;/P&gt;&lt;P&gt;o Enter RFC Name as ECC&lt;/P&gt;&lt;P&gt;o Connection Type as 3&lt;/P&gt;&lt;P&gt;o Language as EN&lt;/P&gt;&lt;P&gt;o Client as 800&lt;/P&gt;&lt;P&gt;o User as SAPUSER&lt;/P&gt;&lt;P&gt;o Password as YESV123&lt;/P&gt;&lt;P&gt;o Target host as SAPADM&lt;/P&gt;&lt;P&gt;o Click on Remote logon button to test the RFC&lt;/P&gt;&lt;P&gt;3. Creating the Message Type&lt;/P&gt;&lt;P&gt;o Go to T. Code WE81&lt;/P&gt;&lt;P&gt;o Click on change, continue&lt;/P&gt;&lt;P&gt;o Click on New Entries button&lt;/P&gt;&lt;P&gt;o Give message type as ZCATSTIME and description&lt;/P&gt;&lt;P&gt;o Save and back&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Creating the Segment&lt;/P&gt;&lt;P&gt;o Go to T. Code WE31&lt;/P&gt;&lt;P&gt;o Give segment name as ZSEGMENTTIME&lt;/P&gt;&lt;P&gt;o Enter Short Text&lt;/P&gt;&lt;P&gt;o Enter the Field Name and Data Element in the text boxes&lt;/P&gt;&lt;P&gt;o Save, continue,&lt;/P&gt;&lt;P&gt;o Click on Edit -&amp;gt; Set Release&lt;/P&gt;&lt;P&gt;5. Creating the Basic IDOC Object&lt;/P&gt;&lt;P&gt;o Go to T. code WE30&lt;/P&gt;&lt;P&gt;o Give obj. name as ZTIMEIDOC&lt;/P&gt;&lt;P&gt;o Click on create&lt;/P&gt;&lt;P&gt;o Select create new radio button, give description and continue&lt;/P&gt;&lt;P&gt;o Select the IDOC obj name and click on create button&lt;/P&gt;&lt;P&gt;o Enter the segment name which is create earlier&lt;/P&gt;&lt;P&gt;o Select the check box if you want to make the segment mandatory&lt;/P&gt;&lt;P&gt;o Enter 1 in minimum number 99999 in maximum number, continue&lt;/P&gt;&lt;P&gt;o Save and backo Click on Edit -&amp;gt; Set Release&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Creating Customer Distribution Model&lt;/P&gt;&lt;P&gt;o Go to T. Code BD64&lt;/P&gt;&lt;P&gt;o Click on change and Create model view button&lt;/P&gt;&lt;P&gt;o Enter the short text and Technical name as CATSSENDER&lt;/P&gt;&lt;P&gt;o Select the model and click on Add Message Type Button&lt;/P&gt;&lt;P&gt;o Give the Sender as CATSSENDER,&lt;/P&gt;&lt;P&gt;o Receiver as ECC,&lt;/P&gt;&lt;P&gt;o Message Type as ZCATSTIME&lt;/P&gt;&lt;P&gt;o Select the model view &amp;amp; click on Environment -&amp;gt; Generate Partner Profiles&lt;/P&gt;&lt;P&gt;o Select Transfer IDOC Immediately and Trigger Immediately radio buttons&lt;/P&gt;&lt;P&gt;o Click on Execute&lt;/P&gt;&lt;P&gt;o You should get a list in green color which means it executed successfully.&lt;/P&gt;&lt;P&gt;o Back to main screen, select the model view&lt;/P&gt;&lt;P&gt;o Click Edit-&amp;gt;Model view-&amp;gt;Distribute&lt;/P&gt;&lt;P&gt;o Click on continueo&lt;/P&gt;&lt;P&gt;You should get a list saying model view is distributed successfully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. Checking the Port&lt;/P&gt;&lt;P&gt;o Go to T. Code WE21&lt;/P&gt;&lt;P&gt;o Expand Transactional RFC&lt;/P&gt;&lt;P&gt;o Find the port from the list which is created using BD64 for ECC (Receiving system) RFC Destination.&lt;/P&gt;&lt;P&gt;8. Checking the Partner Profiles.&lt;/P&gt;&lt;P&gt;o Go to T. Code WE20&lt;/P&gt;&lt;P&gt;o Expand Partner Type LS&lt;/P&gt;&lt;P&gt;o Select the Partner profile ECC&lt;/P&gt;&lt;P&gt;o Double click on Message Type ZCATSTIME in Outbound parmtrs.&lt;/P&gt;&lt;P&gt;o Check Receiver Port is assigned correctlyo&lt;/P&gt;&lt;P&gt;Check the Basic type as your Basic IDOC object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9. Assigning the Message Type to Basic IDOC Object&lt;/P&gt;&lt;P&gt;o Go to T. Code WE82&lt;/P&gt;&lt;P&gt;o Click on Change &amp;amp; continue, New Entries button&lt;/P&gt;&lt;P&gt;o Give the Message type as ZCATSTIME&lt;/P&gt;&lt;P&gt;o Give Basic Type as ZTIMEIDOC&lt;/P&gt;&lt;P&gt;o Release as 4.6C&lt;/P&gt;&lt;P&gt;o Save and back10. Creating Inbound Function Module (Posting Program)&lt;/P&gt;&lt;P&gt;o Go to T. Code SE37&lt;/P&gt;&lt;P&gt;o Create a function Module ZCATSDB_TIMESHEET_SURESH&lt;/P&gt;&lt;P&gt;o Set the Processing type as Remote Enabled Module and mode as start immed, in Attributes Tab.&lt;/P&gt;&lt;P&gt;o Import Parameters&lt;/P&gt;&lt;P&gt;P_WORKDATE LIKE CATSDB-WORKDATE&lt;/P&gt;&lt;P&gt;P_COUNTER LIKE CATSDB-COUNTER&lt;/P&gt;&lt;P&gt;P_LSTAR LIKE CATSDB-LSTAR&lt;/P&gt;&lt;P&gt;o Export Parameters&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;o Tables&lt;/P&gt;&lt;P&gt;S_PERNR LIKE ZCATSPERNR&lt;/P&gt;&lt;P&gt;[PERNR is select option parameters in ZCUSTOMIDOC report program so that it should be passed to function module ZCATSDB_TIMESHEET_SURESH in tables section&lt;STRONG&gt;.&lt;/STRONG&gt; And also in tables section we used ZCATSPERNR, which is a global structure, which contains four fields as&lt;/P&gt;&lt;P&gt;Ø SIGN&lt;/P&gt;&lt;P&gt;Ø OPTION&lt;/P&gt;&lt;P&gt;Ø LOW&lt;/P&gt;&lt;P&gt;Ø HIGH]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;o Exceptions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;o Source Code&lt;/P&gt;&lt;P&gt;FUNCTION zcatsdb_timesheet_suresh.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;""Local interface:&lt;/P&gt;&lt;P&gt;*" IMPORTING&lt;/P&gt;&lt;P&gt;*" VALUE(P_WORKDATE) LIKE CATSDB-WORKDATE&lt;/P&gt;&lt;P&gt;*" VALUE(P_COUNTER) LIKE CATSDB-COUNTER&lt;/P&gt;&lt;P&gt;*" VALUE(P_LSTAR) LIKE CATSDB-LSTAR&lt;/P&gt;&lt;P&gt;*" TABLES&lt;/P&gt;&lt;P&gt;*" S_PERNR STRUCTURE ZCATSPERNR&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;TABLES: catsdb, edidc, edidd. " using structures of catsdb, edidc, edidd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS: c_doctyp TYPE edidc-idoctp VALUE 'ZTIMEIDOC', " idoc type&lt;/P&gt;&lt;P&gt;c_segnam TYPE edidd-segnam VALUE 'ZSEGMENTTIME', "segment type&lt;/P&gt;&lt;P&gt;c_mestyp TYPE edidc-mestyp VALUE 'ZCATSTIME'. " message type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*001 comment begin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;creating internal tables with out header lines for catsdb, edidc, edidd and also&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;work areas&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*001 comment end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: it_edidc TYPE edidc OCCURS 0, " control it_edidc internal table with out header line&lt;/P&gt;&lt;P&gt;it_edidd TYPE edidd OCCURS 0, " data it_edidd internal table with out header line&lt;/P&gt;&lt;P&gt;wa_catsdb TYPE it_catsdb1, " work area for it_catsdb internal table&lt;/P&gt;&lt;P&gt;wa_edidc TYPE edidc, " work area for it_edidc internal table&lt;/P&gt;&lt;P&gt;wa_edidd TYPE edidd, " work area for it_edidd internal table&lt;/P&gt;&lt;P&gt;wa_zsegmenttime TYPE zsegmenttime, " work area for zsegment internal table&lt;/P&gt;&lt;P&gt;v_occmax TYPE idocsyn-occmax,&lt;/P&gt;&lt;P&gt;v_nbseg TYPE i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CLEAR wa_catsdb. " clears work area of catsdb&lt;/P&gt;&lt;P&gt;CLEAR wa_edidc. " clears edidc work area&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*002 comment begin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Save the message type and the basic IDoc type in the control segment.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*002 comment end&lt;/P&gt;&lt;P&gt;MOVE c_mestyp TO wa_edidc-mestyp. " assigning custom message type to edidc workarea&lt;/P&gt;&lt;P&gt;MOVE c_doctyp TO wa_edidc-idoctp. " assigning custom idoc type to edidc workarea&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*003 comment begin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Retrieve the maximum number of segments in the basic IDoc type.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*003 comment end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT MIN( occmax ) FROM idocsyn INTO v_occmax WHERE idoctyp EQ c_doctyp AND segtyp EQ c_segnam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*004 comment begin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Save the whole CATSDB table content in the IT_ZCATSDB internal table.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*004 comment end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT pernr workdate lstar counter FROM catsdb INTO CORRESPONDING FIELDS OF TABLE it_catsdb WHERE pernr IN s_pernr AND workdate EQ p_workdate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*005 comment begin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Create a data segment for each line of IT_ZCATSDB.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*005 comment end&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;LOOP AT it_catsdb INTO wa_catsdb WHERE pernr IN s_pernr.&lt;/P&gt;&lt;P&gt;MOVE-CORRESPONDING wa_catsdb TO wa_zsegmenttime.&lt;/P&gt;&lt;P&gt;CLEAR wa_edidd.&lt;/P&gt;&lt;P&gt;MOVE c_segnam TO wa_edidd-segnam.&lt;/P&gt;&lt;P&gt;MOVE wa_zsegmenttime TO wa_edidd-sdata.&lt;/P&gt;&lt;P&gt;APPEND wa_edidd TO it_edidd.&lt;/P&gt;&lt;P&gt;CLEAR wa_catsdb.&lt;/P&gt;&lt;P&gt;CLEAR wa_zsegmenttime.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;MESSAGE 'NO DATA FOUND FOR GIVEN SELECTION' TYPE 'I'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;*006 comment begin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Count the number of data segments.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*006 comment end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DESCRIBE TABLE it_edidd LINES v_nbseg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*007 comment begin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If the number of data segments exceeds the maximum allowed number,then display an error message.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*007 comment end&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF v_nbseg GT v_occmax.&lt;/P&gt;&lt;P&gt;MESSAGE 'IDOC ERROR Message' TYPE 'E000'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE' " for creating an catsdb idoc&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;master_idoc_control = wa_edidc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OBJ_TYPE = ''&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;CHNUM = ''&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;communication_idoc_control = it_edidc&lt;/P&gt;&lt;P&gt;master_idoc_data = it_edidd&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IF sy-subrc 0.&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;MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&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;WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&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;ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;Save, check and activate&lt;/P&gt;&lt;P&gt;111. Assigning the Inbound Function Module to Basic Type &amp;amp; Message Type&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;o Go to T. Code WE57&lt;/P&gt;&lt;P&gt;o Click on change, continue, continue and New Entries Button&lt;/P&gt;&lt;P&gt;o Enter the Module as ZCATSDB_TIMESHEET_SURESH Type as "F"&lt;/P&gt;&lt;P&gt;o Basic Type as ZTIMEIDOC&lt;/P&gt;&lt;P&gt;o Message Type as ZCATSTIME&lt;/P&gt;&lt;P&gt;o Direction as 2&lt;/P&gt;&lt;P&gt;o Save and back&lt;/P&gt;&lt;P&gt;Now Login in 800 client of Application Server SAP-REMOTE Idoc Receiver&lt;/P&gt;&lt;P&gt;12. Assigning the Inbound Function Module in ALE Table&lt;/P&gt;&lt;P&gt;o Go to T. Code BD51&lt;/P&gt;&lt;P&gt;o Click on continue, New Entries button&lt;/P&gt;&lt;P&gt;o Give the Inbound Function Module ZCATSDB_TIMESHEET_SURESH&lt;/P&gt;&lt;P&gt;o Give Input t. as 0 (zero)&lt;/P&gt;&lt;P&gt;o Save and back13. Creating Process Code&lt;/P&gt;&lt;P&gt;o Go to T. Code WE42&lt;/P&gt;&lt;P&gt;o Click on Change, New Entries Button&lt;/P&gt;&lt;P&gt;o Give Process Code name as ZCATSDB, give Description &amp;amp; Save&lt;/P&gt;&lt;P&gt;o Select Processing with ALE Services Radio button&lt;/P&gt;&lt;P&gt;o Select Processing by Function Module Radio button&lt;/P&gt;&lt;P&gt;o Click the ALE Table (arrow Icon) in Identification&lt;/P&gt;&lt;P&gt;o Give the Function Module Name ZIDOC_INPUT_ZBAPI_STUD_MAS&lt;/P&gt;&lt;P&gt;o Give maximum number of repeats 0&lt;/P&gt;&lt;P&gt;o Save and back, back&lt;/P&gt;&lt;P&gt;o Select the process code from the list &amp;amp; click on Logical Messages Icon&lt;/P&gt;&lt;P&gt;o Give the Message Type as ZCATSTIME&lt;/P&gt;&lt;P&gt;o Save &amp;amp; Back, Save &amp;amp; Back, Save &amp;amp; Back&lt;/P&gt;&lt;P&gt;14. Changing the Customer Distribution model in receiving system&lt;/P&gt;&lt;P&gt;o Go to T. Code BD64&lt;/P&gt;&lt;P&gt;o Click on change and Create model view button&lt;/P&gt;&lt;P&gt;o Enter the short text and Technical name as CATSECC&lt;/P&gt;&lt;P&gt;o Select the model view &amp;amp; click on Environment -&amp;gt; Generate Partner Profiles&lt;/P&gt;&lt;P&gt;o Select Transfer IDOC Immediately and Trigger Immediately radio buttonso Click on Execute You should get a list in green color which means it executed successfully.15. Assigning the Process Code to Message Type in Receiving System&lt;/P&gt;&lt;P&gt;o Go to T. Code WE20&lt;/P&gt;&lt;P&gt;o Expand Partner Type LS&lt;/P&gt;&lt;P&gt;o Select the Partner Profile CATSSENDER&lt;/P&gt;&lt;P&gt;o Double click on Message Type ZCATSTIME in Inbound parmtrs.&lt;/P&gt;&lt;P&gt;o Give the Process Code as ZCATSDB&lt;/P&gt;&lt;P&gt;o Click on Trigger Immediately Radio button&lt;/P&gt;&lt;P&gt;o Save &amp;amp; Back&lt;/P&gt;&lt;P&gt;Save &amp;amp; Back&lt;/P&gt;&lt;P&gt;16. Creating the Selection Program (Outbound Program)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Login in client 800.&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;Go to T. Code SE38&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;Create a Report Program as ZCUSTOMIDOC with the following code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZCUSTOMIDOC&lt;/P&gt;&lt;P&gt;NO STANDARD PAGE HEADING.&lt;/P&gt;&lt;P&gt;TABLES:catsdb. " using structure of cats db table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*000 comment begin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;this selection screen contains one select option and one parameter&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*000 comment end&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS pernr FOR catsdb-pernr.&lt;/P&gt;&lt;P&gt;PARAMETER: workdate LIKE catsdb-workdate,&lt;/P&gt;&lt;P&gt;LSTAR like catsdb-LSTAR,&lt;/P&gt;&lt;P&gt;COUNTER like catsdb-counter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN: END OF BLOCK b1 .&lt;/P&gt;&lt;P&gt;DATA: wa_val TYPE i.&lt;/P&gt;&lt;P&gt;wa_val = pernr-high - pernr-low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*001 comment begin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;calling custom function module&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*001 comment end&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'ZCATSDB_TIMESHEET_SURESH'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;p_workdate = workdate " passing workdate parameter&lt;/P&gt;&lt;P&gt;p_LSTAR = LSTAR&lt;/P&gt;&lt;P&gt;p_counter = counter&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;s_pernr = pernr. " passing pernr select option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;MESSAGE i000(zaluri) WITH 'IDOCS CREATED FOR EMPLOYEES BETWEEN' pernr-low ' AND ' pernr-high .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE i000(zaluri) WITH 'IDOCS CREATED FOR EMPLOYEES BETWEEN' PERNR-LOW 'TO' PERNR-HIGH.&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;gives information message if idocs are created for given employees&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;MESSAGE e000(zaluri) WITH 'NO IDOCS CREATED FOR EMPLOYEES' pernr-low 'TO' pernr-high. " gives error message&lt;/P&gt;&lt;P&gt;" if idoc is not created&lt;/P&gt;&lt;P&gt;17. Transferring the CATSDB records from sender Application Server SAPADM 800 client to receiver Application Server SAP-REMOTE 800 client&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Execute Report Program ZCUSTOMIDOC&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;Give the Range of PERSONNEL NO'S, Date, Activity Type, Counter to Transfer&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;Give Message Type as ZCATSTIME&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;Give Receiver Logical system as ECC&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;Execute&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;You should get the IDOC Number&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;Take the IDOC Number and go to T. Code WE05 &amp;amp; Execute&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;In Outbox you can see the IDOC Status&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;Select the status record in left side window&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;Double click on the Status record in right side window- You can see the Control Record, Data Record and Status Records for that IDOC&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the ICON is green and the status code is 3, it means the IDOC is passed to PORT Successfully&lt;/P&gt;&lt;P&gt;18. SENDING IDOCS FROM APPLICATION SERVER SAPADM&lt;/P&gt;&lt;P&gt;TO APPLICATION SERVER SAP-REMOTE USING WEDI&lt;/P&gt;&lt;P&gt;TEST TOOL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Go to T. Code WEDI &amp;amp; execute or T. Code WE19&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;Give idoc number it is generated recently&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;Continue &amp;amp; double click on segment to view data in segment&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;Click on EDIDC to give port, partner no, message type, partner&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;type of receiver. [For sender no need to give any port no leave it as&lt;/P&gt;&lt;P&gt;blank]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Click on Standard Outbound Processing button and click continue&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;You will get a message as idocs successfully transferred&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now Login in Receiver 800 client Application Server SAP-REMOTE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Go to T. Code WE05 &amp;amp; Execute&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;You can see the status record in left side window&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;If the status no is 53 and color is green, it means the IDOC is posted to Application successfully.&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;You can see the Log Information by double clicking on the status record in right side window.&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;Now in left side window, you can see the Control Record, Data Record &amp;amp; Status Record of the IDOC&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;Now go to T. Code SE16&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;Give the table name CATSDB &amp;amp; press F7&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;See the contents of the table&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;The table is updated with the catsdb records transferred from 800 client with our selection program.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jan 2008 03:39:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-fm/m-p/3323582#M796113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-26T03:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: ALE FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-fm/m-p/3323583#M796114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this link for Creating a Function Module (Direct Inbound Processing) in ALE.&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b7df143d711d1893e0000e8323c4f/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b7df143d711d1893e0000e8323c4f/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Maha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jan 2008 04:34:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-fm/m-p/3323583#M796114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-26T04:34:42Z</dc:date>
    </item>
  </channel>
</rss>

