<?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: IDoc FM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-fm/m-p/1174345#M123971</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praneeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create new segments -- WE31&lt;/P&gt;&lt;P&gt;Create new IDOCs -- WE30&lt;/P&gt;&lt;P&gt;Create a new message type -- WE81&lt;/P&gt;&lt;P&gt;Link message type with IDOC type -- WE82&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outbound program LOGIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select data from application tables&lt;/P&gt;&lt;P&gt;Fill data into IDOC &lt;/P&gt;&lt;P&gt;Pass IDOC to ALE layer&lt;/P&gt;&lt;P&gt;(Call function MASTER_IDOC_DISTRIBUTE)&lt;/P&gt;&lt;P&gt;Commit Work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zale_example.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Parameter for material number for getting related information&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PARAMETER : s_matnr TYPE matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table for populating the control information for the IDOC&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : i_edidc TYPE STANDARD TABLE OF edidc INITIAL SIZE 0&lt;/P&gt;&lt;P&gt;WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table for the communication control record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : i_c_edidc TYPE STANDARD TABLE OF edidc INITIAL SIZE 0&lt;/P&gt;&lt;P&gt;WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table for the populating the data record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : i_edidd TYPE STANDARD TABLE OF edidd INITIAL SIZE 0&lt;/P&gt;&lt;P&gt;WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure for the storing material related information&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : struct_mara TYPE mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure for the storing the material description&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : struct_makt TYPE makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure for the segment to populate the record in the data record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : struct_e1maram TYPE e1maram.&lt;/P&gt;&lt;P&gt;DATA : struct_e1maktm TYPE e1maktm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Constants for the segment names.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : c_e1maram TYPE edilsegtyp.&lt;/P&gt;&lt;P&gt;DATA : c_e1maktm TYPE edilsegtyp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the application data from the tables MARA and MAKT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM get_app_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the idoc.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM pop_idoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form GET_APP_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Application data from the MARA and MAKT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_app_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Material related information from the mara.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;FROM mara&lt;/P&gt;&lt;P&gt;INTO struct_mara&lt;/P&gt;&lt;P&gt;WHERE matnr = s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check for the sy-subrc value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sy-subrc is not equal to zero go out of the program.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the material description from the makt by using matnr&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;FROM makt INTO struct_makt&lt;/P&gt;&lt;P&gt;WHERE matnr = s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check for the sy-subrc value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sy-subrc is not equal to zero go out of the program.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " GET_APP_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form MOVE_TO_E1MARAM&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;populate the segment E!MARAM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM move_mara_to_e1maram .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Clear the segment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR struct_e1maram.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pass the message type related information into the segment.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MOVE: "STRUCT_MARA-MSGFN TO STRUCT_E1MARAM-MSGFN,&lt;/P&gt;&lt;P&gt;struct_mara-matnr TO struct_e1maram-matnr,&lt;/P&gt;&lt;P&gt;struct_mara-ersda TO struct_e1maram-ersda,&lt;/P&gt;&lt;P&gt;struct_mara-ernam TO struct_e1maram-ernam,&lt;/P&gt;&lt;P&gt;struct_mara-meins TO struct_e1maram-meins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the internal table for the data record by passing the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Segment name and application data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM pop_idoc_edidd USING c_e1maram struct_e1maram.&lt;/P&gt;&lt;P&gt;ENDFORM. " MOVE_TO_E1MARAM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form MOVE_MAKT_TO_E1MAKTM&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the segment E1MAKTM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM move_makt_to_e1maktm .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Clear the segment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR struct_e1maktm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pass the message type related information into the segment.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MOVE : "STRUCT_MAKT-MSGFN TO STRUCT_E1MAKTM-MSGFN,&lt;/P&gt;&lt;P&gt;struct_makt-spras TO struct_e1maktm-spras,&lt;/P&gt;&lt;P&gt;struct_makt-maktx TO struct_e1maktm-maktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the internal table for the data record by passing the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Segment name and application data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM pop_idoc_edidd USING c_e1maktm struct_e1maktm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " MOVE_MAKT_TO_E1MAKTM&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form POP_IDOC_EDIDD&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the data record by passing the segement data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt;P_C_E1MAKTM segment name&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt;P_STRUCT_E1MAKTM Application data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM pop_idoc_edidd USING p_c_e1maktm&lt;/P&gt;&lt;P&gt;p_struct_e1maktm.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Clear the work area for the data record internaltable I_edidd&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR i_edidd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the segment name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MOVE: p_c_e1maktm TO i_edidd-segnam,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pass the application data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;p_struct_e1maktm TO i_edidd-sdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append the internaltable.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;APPEND i_edidd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " POP_IDOC_EDIDD&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form POP_IDOC&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the Idoc with related information&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM pop_idoc .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;populate the control record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM pop_con_data.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;populate the data record by first populating the header segment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM move_mara_to_e1maram.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the data record by populate the data segment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM move_makt_to_e1maktm.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;call the fM master idoc distribute for creating master idoc&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM create_mat_idoc.&lt;/P&gt;&lt;P&gt;ENDFORM. " POP_IDOC&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form POP_CON_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the control record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM pop_con_data .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Variable for the logical system name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_logsys TYPE edi_sndprn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the logical system name.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;own_logical_system = l_logsys&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;own_logical_system_not_defined = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check for the sy-subrc value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sy-subrc is not equal to zero go out of the program.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;&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 the work area of the control record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR i_edidc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the partener type to the control record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MOVE : 'LS' TO i_edidc-sndprt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the sending system name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_logsys TO i_edidc-sndprn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the type system partener used&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;'LS' TO i_edidc-rcvprt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the partner number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_logsys TO i_edidc-rcvprn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate message type&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;'MATMAS' TO i_edidc-mestyp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the idoc type.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;'MATMAS03' TO i_edidc-idoctp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append the control record data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;APPEND i_edidc.&lt;/P&gt;&lt;P&gt;ENDFORM. " POP_CON_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form CREATE_MAT_IDOC&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the FM MASTER_IDOC_DISTRIBUTE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM create_mat_idoc .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the FM MASTER_IDOC_DISTRIBUTE for passing the IDOC to ALE layer.&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 = i_edidc&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;communication_idoc_control = i_c_edidc&lt;/P&gt;&lt;P&gt;master_idoc_data = i_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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check for the sy-subrc value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sy-subrc is not equal to zero go out of the program.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " CREATE_MAT_IDOC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inbound program development&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name: Z_IDOC_INPUT_&amp;lt;Msgtype&amp;gt; &lt;/P&gt;&lt;P&gt;FUNCTION MODULE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interface:&lt;/P&gt;&lt;P&gt;ImportInput_Method process in dialog or not?&lt;/P&gt;&lt;P&gt;Mass_Processing used for WF programming&lt;/P&gt;&lt;P&gt;Export&lt;/P&gt;&lt;P&gt;In_Update_Task Was update &amp;#145;in update task&amp;#146; used ?&lt;/P&gt;&lt;P&gt;Call_Transaction_done Was a Call Transaction used ?&lt;/P&gt;&lt;P&gt;Workflow_Result Workflow events for errors ?&lt;/P&gt;&lt;P&gt;Application_Variable Workflow parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables&lt;/P&gt;&lt;P&gt;Idoc_Contrl one entry for each IDOC control record&lt;/P&gt;&lt;P&gt;Idoc_Data one entry for each IDOC data segment&lt;/P&gt;&lt;P&gt;Docnum IDOC number&lt;/P&gt;&lt;P&gt;Segnam Segment name&lt;/P&gt;&lt;P&gt;Sdata Segment data&lt;/P&gt;&lt;P&gt;Idoc_Status Status of the IDOC&lt;/P&gt;&lt;P&gt;Return_Variables created/changed application objects&lt;/P&gt;&lt;P&gt;Serialization_Info used for serialization check&lt;/P&gt;&lt;P&gt;&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;P&gt;&lt;/P&gt;&lt;P&gt;Logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check, if IDOC contains the correct message type; if not raise exception WRONG_FUNCTION_MODULE_CALLED&lt;/P&gt;&lt;P&gt;Initialize any global variables/tables.&lt;/P&gt;&lt;P&gt;Convert the character data in table IDOC_DATA to internal format in internal tables:&lt;/P&gt;&lt;P&gt;character -&amp;gt; numbers&lt;/P&gt;&lt;P&gt;ISO codes -&amp;gt; SAP codes&lt;/P&gt;&lt;P&gt;Check data&lt;/P&gt;&lt;P&gt;If O.k., post data&lt;/P&gt;&lt;P&gt;If Not: return error message to ALE&lt;/P&gt;&lt;P&gt;No Commit Work !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Return variables for successfully processed IDOCs:Workflow_Result: &amp;#145;0&amp;#146;&lt;/P&gt;&lt;P&gt;Idoc_Status: 1 record with following fields&lt;/P&gt;&lt;P&gt;Docnum IDOC number&lt;/P&gt;&lt;P&gt;Status &amp;#145;53&amp;#146;&lt;/P&gt;&lt;P&gt;Return_Variables: table must contain following entries:&lt;/P&gt;&lt;P&gt;Entry Wf_param Doc_number&lt;/P&gt;&lt;P&gt;1 &amp;#145;Processed IDoc&amp;#146; Idoc number&lt;/P&gt;&lt;P&gt;2 &amp;#145;Appl_Objects&amp;#146; Appl.Object number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jan 2006 11:45:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-01-23T11:45:25Z</dc:date>
    <item>
      <title>IDoc FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-fm/m-p/1174342#M123968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one provide me the pseudo code of writing a new FM for an OUTBOUND and INBOUND IDoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 11:24:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-fm/m-p/1174342#M123968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-23T11:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-fm/m-p/1174343#M123969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praneeth,&lt;/P&gt;&lt;P&gt;  for inbound idocs try to have a look at FM IDOC_INPUT_*&lt;/P&gt;&lt;P&gt;  for outbound FM : IDOC_OUTPUT_*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Manuel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 11:32:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-fm/m-p/1174343#M123969</guid>
      <dc:creator>manuel_bassani</dc:creator>
      <dc:date>2006-01-23T11:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-fm/m-p/1174344#M123970</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;just check the standard Inbound/outbound FM's .&lt;/P&gt;&lt;P&gt;they will serve the purpose, you can get idea how to proceed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 11:33:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-fm/m-p/1174344#M123970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-23T11:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-fm/m-p/1174345#M123971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Praneeth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create new segments -- WE31&lt;/P&gt;&lt;P&gt;Create new IDOCs -- WE30&lt;/P&gt;&lt;P&gt;Create a new message type -- WE81&lt;/P&gt;&lt;P&gt;Link message type with IDOC type -- WE82&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outbound program LOGIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select data from application tables&lt;/P&gt;&lt;P&gt;Fill data into IDOC &lt;/P&gt;&lt;P&gt;Pass IDOC to ALE layer&lt;/P&gt;&lt;P&gt;(Call function MASTER_IDOC_DISTRIBUTE)&lt;/P&gt;&lt;P&gt;Commit Work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT zale_example.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Parameter for material number for getting related information&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PARAMETER : s_matnr TYPE matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table for populating the control information for the IDOC&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : i_edidc TYPE STANDARD TABLE OF edidc INITIAL SIZE 0&lt;/P&gt;&lt;P&gt;WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table for the communication control record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : i_c_edidc TYPE STANDARD TABLE OF edidc INITIAL SIZE 0&lt;/P&gt;&lt;P&gt;WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Internal table for the populating the data record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : i_edidd TYPE STANDARD TABLE OF edidd INITIAL SIZE 0&lt;/P&gt;&lt;P&gt;WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure for the storing material related information&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : struct_mara TYPE mara.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure for the storing the material description&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : struct_makt TYPE makt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Structure for the segment to populate the record in the data record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : struct_e1maram TYPE e1maram.&lt;/P&gt;&lt;P&gt;DATA : struct_e1maktm TYPE e1maktm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Constants for the segment names.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA : c_e1maram TYPE edilsegtyp.&lt;/P&gt;&lt;P&gt;DATA : c_e1maktm TYPE edilsegtyp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the application data from the tables MARA and MAKT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM get_app_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the idoc.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM pop_idoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form GET_APP_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Application data from the MARA and MAKT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM get_app_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the Material related information from the mara.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;FROM mara&lt;/P&gt;&lt;P&gt;INTO struct_mara&lt;/P&gt;&lt;P&gt;WHERE matnr = s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check for the sy-subrc value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sy-subrc is not equal to zero go out of the program.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the material description from the makt by using matnr&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;FROM makt INTO struct_makt&lt;/P&gt;&lt;P&gt;WHERE matnr = s_matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check for the sy-subrc value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sy-subrc is not equal to zero go out of the program.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " GET_APP_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form MOVE_TO_E1MARAM&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;populate the segment E!MARAM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM move_mara_to_e1maram .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Clear the segment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR struct_e1maram.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pass the message type related information into the segment.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MOVE: "STRUCT_MARA-MSGFN TO STRUCT_E1MARAM-MSGFN,&lt;/P&gt;&lt;P&gt;struct_mara-matnr TO struct_e1maram-matnr,&lt;/P&gt;&lt;P&gt;struct_mara-ersda TO struct_e1maram-ersda,&lt;/P&gt;&lt;P&gt;struct_mara-ernam TO struct_e1maram-ernam,&lt;/P&gt;&lt;P&gt;struct_mara-meins TO struct_e1maram-meins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the internal table for the data record by passing the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Segment name and application data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM pop_idoc_edidd USING c_e1maram struct_e1maram.&lt;/P&gt;&lt;P&gt;ENDFORM. " MOVE_TO_E1MARAM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form MOVE_MAKT_TO_E1MAKTM&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the segment E1MAKTM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM move_makt_to_e1maktm .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Clear the segment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR struct_e1maktm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pass the message type related information into the segment.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MOVE : "STRUCT_MAKT-MSGFN TO STRUCT_E1MAKTM-MSGFN,&lt;/P&gt;&lt;P&gt;struct_makt-spras TO struct_e1maktm-spras,&lt;/P&gt;&lt;P&gt;struct_makt-maktx TO struct_e1maktm-maktx.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the internal table for the data record by passing the&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Segment name and application data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM pop_idoc_edidd USING c_e1maktm struct_e1maktm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " MOVE_MAKT_TO_E1MAKTM&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form POP_IDOC_EDIDD&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the data record by passing the segement data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt;P_C_E1MAKTM segment name&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;--&amp;gt;P_STRUCT_E1MAKTM Application data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM pop_idoc_edidd USING p_c_e1maktm&lt;/P&gt;&lt;P&gt;p_struct_e1maktm.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Clear the work area for the data record internaltable I_edidd&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR i_edidd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the segment name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MOVE: p_c_e1maktm TO i_edidd-segnam,&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Pass the application data&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;p_struct_e1maktm TO i_edidd-sdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append the internaltable.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;APPEND i_edidd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. " POP_IDOC_EDIDD&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form POP_IDOC&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the Idoc with related information&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM pop_idoc .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;populate the control record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM pop_con_data.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;populate the data record by first populating the header segment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM move_mara_to_e1maram.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the data record by populate the data segment&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM move_makt_to_e1maktm.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;call the fM master idoc distribute for creating master idoc&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;PERFORM create_mat_idoc.&lt;/P&gt;&lt;P&gt;ENDFORM. " POP_IDOC&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form POP_CON_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the control record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM pop_con_data .&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Variable for the logical system name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DATA: l_logsys TYPE edi_sndprn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Get the logical system name.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;own_logical_system = l_logsys&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;own_logical_system_not_defined = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check for the sy-subrc value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sy-subrc is not equal to zero go out of the program.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;&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 the work area of the control record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;CLEAR i_edidc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Move the partener type to the control record&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;MOVE : 'LS' TO i_edidc-sndprt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the sending system name&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_logsys TO i_edidc-sndprn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the type system partener used&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;'LS' TO i_edidc-rcvprt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the partner number&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;l_logsys TO i_edidc-rcvprn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate message type&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;'MATMAS' TO i_edidc-mestyp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Populate the idoc type.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;'MATMAS03' TO i_edidc-idoctp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Append the control record data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;APPEND i_edidc.&lt;/P&gt;&lt;P&gt;ENDFORM. " POP_CON_DATA&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Form CREATE_MAT_IDOC&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the FM MASTER_IDOC_DISTRIBUTE&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM create_mat_idoc .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call the FM MASTER_IDOC_DISTRIBUTE for passing the IDOC to ALE layer.&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 = i_edidc&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;communication_idoc_control = i_c_edidc&lt;/P&gt;&lt;P&gt;master_idoc_data = i_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;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Check for the sy-subrc value&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sy-subrc is not equal to zero go out of the program.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDFORM. " CREATE_MAT_IDOC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inbound program development&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name: Z_IDOC_INPUT_&amp;lt;Msgtype&amp;gt; &lt;/P&gt;&lt;P&gt;FUNCTION MODULE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interface:&lt;/P&gt;&lt;P&gt;ImportInput_Method process in dialog or not?&lt;/P&gt;&lt;P&gt;Mass_Processing used for WF programming&lt;/P&gt;&lt;P&gt;Export&lt;/P&gt;&lt;P&gt;In_Update_Task Was update &amp;#145;in update task&amp;#146; used ?&lt;/P&gt;&lt;P&gt;Call_Transaction_done Was a Call Transaction used ?&lt;/P&gt;&lt;P&gt;Workflow_Result Workflow events for errors ?&lt;/P&gt;&lt;P&gt;Application_Variable Workflow parameter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables&lt;/P&gt;&lt;P&gt;Idoc_Contrl one entry for each IDOC control record&lt;/P&gt;&lt;P&gt;Idoc_Data one entry for each IDOC data segment&lt;/P&gt;&lt;P&gt;Docnum IDOC number&lt;/P&gt;&lt;P&gt;Segnam Segment name&lt;/P&gt;&lt;P&gt;Sdata Segment data&lt;/P&gt;&lt;P&gt;Idoc_Status Status of the IDOC&lt;/P&gt;&lt;P&gt;Return_Variables created/changed application objects&lt;/P&gt;&lt;P&gt;Serialization_Info used for serialization check&lt;/P&gt;&lt;P&gt;&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;P&gt;&lt;/P&gt;&lt;P&gt;Logic:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check, if IDOC contains the correct message type; if not raise exception WRONG_FUNCTION_MODULE_CALLED&lt;/P&gt;&lt;P&gt;Initialize any global variables/tables.&lt;/P&gt;&lt;P&gt;Convert the character data in table IDOC_DATA to internal format in internal tables:&lt;/P&gt;&lt;P&gt;character -&amp;gt; numbers&lt;/P&gt;&lt;P&gt;ISO codes -&amp;gt; SAP codes&lt;/P&gt;&lt;P&gt;Check data&lt;/P&gt;&lt;P&gt;If O.k., post data&lt;/P&gt;&lt;P&gt;If Not: return error message to ALE&lt;/P&gt;&lt;P&gt;No Commit Work !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Return variables for successfully processed IDOCs:Workflow_Result: &amp;#145;0&amp;#146;&lt;/P&gt;&lt;P&gt;Idoc_Status: 1 record with following fields&lt;/P&gt;&lt;P&gt;Docnum IDOC number&lt;/P&gt;&lt;P&gt;Status &amp;#145;53&amp;#146;&lt;/P&gt;&lt;P&gt;Return_Variables: table must contain following entries:&lt;/P&gt;&lt;P&gt;Entry Wf_param Doc_number&lt;/P&gt;&lt;P&gt;1 &amp;#145;Processed IDoc&amp;#146; Idoc number&lt;/P&gt;&lt;P&gt;2 &amp;#145;Appl_Objects&amp;#146; Appl.Object number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 11:45:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-fm/m-p/1174345#M123971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-23T11:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: IDoc FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-fm/m-p/1174346#M123972</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;The sudo code for inbound one is as follows&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION Z_IDOC_INPUT_EMPMAST.
*"----------------------------------------------------------------------
*"*"Local interface:
*"  IMPORTING
*"     REFERENCE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD
*"     REFERENCE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC
*"  EXPORTING
*"     REFERENCE(WORKFLOW_RESULT) LIKE  BDWFAP_PAR-RESULT
*"     REFERENCE(APPLICATION_VARIABLE) LIKE  BDWFAP_PAR-APPL_VAR
*"     REFERENCE(IN_UPDATE_TASK) LIKE  BDWFAP_PAR-UPDATETASK
*"     REFERENCE(CALL_TRANSACTION_DONE) LIKE  BDWFAP_PAR-CALLTRANS
*"  TABLES
*"      IDOC_CONTRL STRUCTURE  EDIDC
*"      IDOC_DATA STRUCTURE  EDIDD
*"      IDOC_STATUS STRUCTURE  BDIDOCSTAT
*"      RETURN_VARIABLES STRUCTURE  BDWFRETVAR
*"      SERIALIZATION_INFO STRUCTURE  BDI_SER
*"  EXCEPTIONS
*"      WRONG_FUNCTION_CALLED
*"----------------------------------------------------------------------

  DATA: S_EMPMAST LIKE ZEMPMASTHEADERSEG.
  DATA: T_EMPMAST LIKE ZEMPMASTSEG OCCURS 0 WITH HEADER LINE.
  DATA: WA_EMPMAST LIKE ZEMPMAST.

  DATA: L_FLAG VALUE 'Y'.
  CLEAR S_EMPMAST.
  REFRESH T_EMPMAST.


* check if the function is called correctly                            *
  IF IDOC_CONTRL-MESTYP &amp;lt;&amp;gt; 'ZEMPMSG'.
    RAISE WRONG_FUNCTION_CALLED.
  ENDIF.

  WORKFLOW_RESULT = 0.

* Unpacking the IDoc
  LOOP AT IDOC_DATA.
    CASE IDOC_DATA-SEGNAM.
      WHEN 'ZEMPMASTHEADERSEG'.
        MOVE IDOC_DATA-SDATA TO S_EMPMAST.
      WHEN 'ZEMPMASTSEG'.
        MOVE IDOC_DATA-SDATA TO T_EMPMAST.
        APPEND T_EMPMAST.
    ENDCASE.
  ENDLOOP.


  IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
  IDOC_STATUS-MSGV1 = IDOC_CONTRL-IDOCTP.
  IDOC_STATUS-MSGID = '00'.
  IDOC_STATUS-MSGNO = '398'.

  LOOP AT T_EMPMAST.
    MOVE-CORRESPONDING  T_EMPMAST TO WA_EMPMAST.
    INSERT INTO ZEMPMAST VALUES WA_EMPMAST.
    G_OKCODE = SY-SUBRC.


    IF G_OKCODE &amp;lt;&amp;gt; 0.
      L_FLAG = 'N'.

      IDOC_STATUS-STATUS = '51'.
      IDOC_STATUS-MSGTY = 'E'.
      IDOC_STATUS-MSGV2 = 'Employee &amp;amp; already exists'.
      REPLACE '&amp;amp;' WITH WA_EMPMAST-EMPNO INTO IDOC_STATUS-MSGV2.
      IDOC_STATUS-SEGNUM = SY-TABIX + 1.
      APPEND IDOC_STATUS.

    ENDIF.

    AT LAST.

    ENDAT.
  ENDLOOP.



  IF L_FLAG &amp;lt;&amp;gt; 'Y'.
    CLEAR RETURN_VARIABLES.
    RETURN_VARIABLES-WF_PARAM   = 'Error_IDOCs'.
    RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
    APPEND RETURN_VARIABLES.
    WORKFLOW_RESULT = '99999'.

    ROLLBACK WORK.
  ELSE.
    IDOC_STATUS-STATUS = '53'.
    IDOC_STATUS-MSGTY = 'S'.
    IDOC_STATUS-MSGV2 = 'Employee Info inserted'.
    APPEND IDOC_STATUS.

  ENDIF.

ENDFUNCTION.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2006 12:04:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/idoc-fm/m-p/1174346#M123972</guid>
      <dc:creator>mandar_shete</dc:creator>
      <dc:date>2006-01-23T12:04:39Z</dc:date>
    </item>
  </channel>
</rss>

