<?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: Process and reprocess in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573157#M860112</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;searchsap.techtarget.com/tip/0,289483,sid21_gci1268508,00.html - 68k - Cached - Similar pages &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Processing Routines&lt;/P&gt;&lt;P&gt;Last edited:  &lt;/P&gt;&lt;P&gt;Creating and processing IDocs are a widely mechanical task, as it is true for all interface programming. We will show a short example that packs SAP R/3 SapScript standard text elements into IDocs and stores them back to texts in a second routine. The text elements can be edited with SO10. &lt;/P&gt;&lt;P&gt;Outbound function	IDoc outbound functions are function modules with a standard interface which will read data from an application database and convert the data into IDoc format.   &lt;/P&gt;&lt;P&gt;	The interface parameters need to be compatible with a well defined standard, because the function module will be called from within another program.&lt;/P&gt;&lt;P&gt;Inbound function	IDoc inbound functions are function modules with a standard interface, which will interpret the received IDoc data and prepare for processing by an application.&lt;/P&gt;&lt;P&gt;	The received IDoc data is processed record by record and interpreted according the segment information provided with each record. The prepared data can then be processed by an application, a function module or a self-written program.&lt;/P&gt;&lt;P&gt;	The example programs in the following chapters will show you how texts from the text pool can be converted into an IDoc and processed by an inbound routine to be stored into another system. The following will give you the basics to understand the example.&lt;/P&gt;&lt;P&gt;Text from READ_TEXT	SAP R/3 allows the creation of text elements, e.g. with transaction SO10. Each standard text elements has a header record which is stored in table STXH. The text lines itself are stored in a special cluster table. To retrieve the text from the cluster, you will use the standard function module function READ_TEXT . We will read such a text and  pack it into an IDoc. That is what the following simple function module does.&lt;/P&gt;&lt;P&gt;	If there is no convenient routine to process data, the easiest way to hand over the data to an apllication is to record a transaction with transaction SHDB and create a simple processing function module from that recording. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Inbound Routines&lt;/P&gt;&lt;P&gt;Last edited:  &lt;/P&gt;&lt;P&gt;Inbound processing is widely the reverse process of an outbound.. The received IDoc has to be unpacked, interpreted and transferred to an application for further processing. &lt;/P&gt;&lt;P&gt;Inbound processing function module	Below is the example of an inbound function module. This module expects an IDoc with rows of plain text and will save this text under a given name to SAP's text database. The procedure will extract the text name and the text line from the IDoc and hand over the text data to the function module READ_TEXT which will store the text in the text pool.&lt;/P&gt;&lt;P&gt;FUNCTION &lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Lokale Schnittstelle:&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  BDWFAP_PAR-RESULT&lt;/P&gt;&lt;P&gt;*"             VALUE(APPLICATION_VARIABLE) LIKE  BDWFAP_PAR-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;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;  DATA: XTHEAD   LIKE THEAD  .&lt;/P&gt;&lt;P&gt;  DATA: TLINES LIKE TLINE    OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR XTHEAD. &lt;/P&gt;&lt;P&gt;  REFRESH TLINES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*** --- Unpacking the IDoc --- ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT IDOC_DATA.&lt;/P&gt;&lt;P&gt;     CASE IDOC_DATA-SEGNAM.&lt;/P&gt;&lt;P&gt;       WHEN 'YAXX_THEAD'.&lt;/P&gt;&lt;P&gt;            MOVE IDOC_DATA-SDATA TO XTHEAD.&lt;/P&gt;&lt;P&gt;       WHEN 'YAXX_TLINE'.&lt;/P&gt;&lt;P&gt;            MOVE IDOC_DATA-SDATA TO TLINES.&lt;/P&gt;&lt;P&gt;     ENDCASE.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*** --- Calling the application to process the received data --- ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'SAVE_TEXT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            HEADER          = XTHEAD&lt;/P&gt;&lt;P&gt;            SAVEMODE_DIRECT = 'X'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            LINES           = TLINES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ADD SY-SUBRC TO OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;füllen IDOC_Status&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fill IDOC_Status&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.&lt;/P&gt;&lt;P&gt;    IDOC_STATUS-MSGV1  = IDOC_CONTRL-IDOCTP.&lt;/P&gt;&lt;P&gt;    IDOC_STATUS-MSGV2  = XTHEAD.&lt;/P&gt;&lt;P&gt;    IDOC_STATUS-MSGID  = '38'.&lt;/P&gt;&lt;P&gt;    IDOC_STATUS-MSGNO  = '000'.&lt;/P&gt;&lt;P&gt;    IF OK NE 0.&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;    ELSE.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-STATUS = '53'.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-MSGTY  = 'S'.&lt;/P&gt;&lt;P&gt;      CALL_TRANSACTION_DONE = 'X'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    APPEND IDOC_STATUS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;Unpacking the IDoc data	The received IDoc data is processed record by record and unpacking is a simple discrimination by case according the segment name provided with each record..&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*** --- Unpacking the IDoc --- ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT IDOC_DATA.bb&lt;/P&gt;&lt;P&gt;     CASE IDOC_DATA-SEGNAM.&lt;/P&gt;&lt;P&gt;      WHEN 'YAXX_THEAD'.&lt;/P&gt;&lt;P&gt;            PERFORM UNPACK_IDOC TABLES IDOC_DATA USING XTHEAD.&lt;/P&gt;&lt;P&gt;      WHEN 'YAXX_TLINE'.&lt;/P&gt;&lt;P&gt;            PERFORM UNPACK_TAB  TABLES IDOC_DATA TLINES.&lt;/P&gt;&lt;P&gt;       ENDCASE.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;Application processing	When the IDoc is unpacked it needs to be passed to the application. In our case this will be a simple call to a standard function which is going to store the data to the text database.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*** --- Calling the application to process the received data --- ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'SAVE_TEXT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            HEADER          = XTHEAD&lt;/P&gt;&lt;P&gt;            SAVEMODE_DIRECT = 'X'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            LINES           = TLINES.&lt;/P&gt;&lt;P&gt;Writing a status log	Finally the processing routine needs to pass a status record to the IDoc processor. This status indicates successful or unsuccessful processing and will be added as a log entry to the table EDIDS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fill IDOC_Status&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF OK NE 0.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-STATUS = '51'.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-STATUS = '53'.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    APPEND IDOC_STATUS.&lt;/P&gt;&lt;P&gt;	The status value '51' indicates a general error during application processing and the status '53' indicates everything is OK. There are numerous other status values, with distinct meanings, but '51' and '53' are the most common ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://idocs.de/www3/cookbooks/id" target="test_blank"&gt;http://idocs.de/www3/cookbooks/id&lt;/A&gt;&lt;/P&gt;&lt;P&gt;verify if it helps&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;sravani yendru&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Mar 2008 04:04:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-25T04:04:59Z</dc:date>
    <item>
      <title>Process and reprocess</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573156#M860111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts I have One doubt in ALEIdoc &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any One ask me in interview , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do u process Idoc in  inbound side what I have to tell &lt;/P&gt;&lt;P&gt;and If they ask me  how do u reprocess idoc at inbound side what I have to tell  please guide me &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Points will be rewarded &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;Durga .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2008 21:24:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573156#M860111</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-24T21:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Process and reprocess</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573157#M860112</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;searchsap.techtarget.com/tip/0,289483,sid21_gci1268508,00.html - 68k - Cached - Similar pages &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Processing Routines&lt;/P&gt;&lt;P&gt;Last edited:  &lt;/P&gt;&lt;P&gt;Creating and processing IDocs are a widely mechanical task, as it is true for all interface programming. We will show a short example that packs SAP R/3 SapScript standard text elements into IDocs and stores them back to texts in a second routine. The text elements can be edited with SO10. &lt;/P&gt;&lt;P&gt;Outbound function	IDoc outbound functions are function modules with a standard interface which will read data from an application database and convert the data into IDoc format.   &lt;/P&gt;&lt;P&gt;	The interface parameters need to be compatible with a well defined standard, because the function module will be called from within another program.&lt;/P&gt;&lt;P&gt;Inbound function	IDoc inbound functions are function modules with a standard interface, which will interpret the received IDoc data and prepare for processing by an application.&lt;/P&gt;&lt;P&gt;	The received IDoc data is processed record by record and interpreted according the segment information provided with each record. The prepared data can then be processed by an application, a function module or a self-written program.&lt;/P&gt;&lt;P&gt;	The example programs in the following chapters will show you how texts from the text pool can be converted into an IDoc and processed by an inbound routine to be stored into another system. The following will give you the basics to understand the example.&lt;/P&gt;&lt;P&gt;Text from READ_TEXT	SAP R/3 allows the creation of text elements, e.g. with transaction SO10. Each standard text elements has a header record which is stored in table STXH. The text lines itself are stored in a special cluster table. To retrieve the text from the cluster, you will use the standard function module function READ_TEXT . We will read such a text and  pack it into an IDoc. That is what the following simple function module does.&lt;/P&gt;&lt;P&gt;	If there is no convenient routine to process data, the easiest way to hand over the data to an apllication is to record a transaction with transaction SHDB and create a simple processing function module from that recording. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample Inbound Routines&lt;/P&gt;&lt;P&gt;Last edited:  &lt;/P&gt;&lt;P&gt;Inbound processing is widely the reverse process of an outbound.. The received IDoc has to be unpacked, interpreted and transferred to an application for further processing. &lt;/P&gt;&lt;P&gt;Inbound processing function module	Below is the example of an inbound function module. This module expects an IDoc with rows of plain text and will save this text under a given name to SAP's text database. The procedure will extract the text name and the text line from the IDoc and hand over the text data to the function module READ_TEXT which will store the text in the text pool.&lt;/P&gt;&lt;P&gt;FUNCTION &lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Lokale Schnittstelle:&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  BDWFAP_PAR-RESULT&lt;/P&gt;&lt;P&gt;*"             VALUE(APPLICATION_VARIABLE) LIKE  BDWFAP_PAR-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;*"----&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;  DATA: XTHEAD   LIKE THEAD  .&lt;/P&gt;&lt;P&gt;  DATA: TLINES LIKE TLINE    OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR XTHEAD. &lt;/P&gt;&lt;P&gt;  REFRESH TLINES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*** --- Unpacking the IDoc --- ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT IDOC_DATA.&lt;/P&gt;&lt;P&gt;     CASE IDOC_DATA-SEGNAM.&lt;/P&gt;&lt;P&gt;       WHEN 'YAXX_THEAD'.&lt;/P&gt;&lt;P&gt;            MOVE IDOC_DATA-SDATA TO XTHEAD.&lt;/P&gt;&lt;P&gt;       WHEN 'YAXX_TLINE'.&lt;/P&gt;&lt;P&gt;            MOVE IDOC_DATA-SDATA TO TLINES.&lt;/P&gt;&lt;P&gt;     ENDCASE.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*** --- Calling the application to process the received data --- ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'SAVE_TEXT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            HEADER          = XTHEAD&lt;/P&gt;&lt;P&gt;            SAVEMODE_DIRECT = 'X'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            LINES           = TLINES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ADD SY-SUBRC TO OK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;füllen IDOC_Status&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fill IDOC_Status&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.&lt;/P&gt;&lt;P&gt;    IDOC_STATUS-MSGV1  = IDOC_CONTRL-IDOCTP.&lt;/P&gt;&lt;P&gt;    IDOC_STATUS-MSGV2  = XTHEAD.&lt;/P&gt;&lt;P&gt;    IDOC_STATUS-MSGID  = '38'.&lt;/P&gt;&lt;P&gt;    IDOC_STATUS-MSGNO  = '000'.&lt;/P&gt;&lt;P&gt;    IF OK NE 0.&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;    ELSE.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-STATUS = '53'.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-MSGTY  = 'S'.&lt;/P&gt;&lt;P&gt;      CALL_TRANSACTION_DONE = 'X'.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    APPEND IDOC_STATUS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;Unpacking the IDoc data	The received IDoc data is processed record by record and unpacking is a simple discrimination by case according the segment name provided with each record..&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*** --- Unpacking the IDoc --- ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  LOOP AT IDOC_DATA.bb&lt;/P&gt;&lt;P&gt;     CASE IDOC_DATA-SEGNAM.&lt;/P&gt;&lt;P&gt;      WHEN 'YAXX_THEAD'.&lt;/P&gt;&lt;P&gt;            PERFORM UNPACK_IDOC TABLES IDOC_DATA USING XTHEAD.&lt;/P&gt;&lt;P&gt;      WHEN 'YAXX_TLINE'.&lt;/P&gt;&lt;P&gt;            PERFORM UNPACK_TAB  TABLES IDOC_DATA TLINES.&lt;/P&gt;&lt;P&gt;       ENDCASE.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;Application processing	When the IDoc is unpacked it needs to be passed to the application. In our case this will be a simple call to a standard function which is going to store the data to the text database.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*** --- Calling the application to process the received data --- ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'SAVE_TEXT'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            HEADER          = XTHEAD&lt;/P&gt;&lt;P&gt;            SAVEMODE_DIRECT = 'X'&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            LINES           = TLINES.&lt;/P&gt;&lt;P&gt;Writing a status log	Finally the processing routine needs to pass a status record to the IDoc processor. This status indicates successful or unsuccessful processing and will be added as a log entry to the table EDIDS.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;fill IDOC_Status&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    IF OK NE 0.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-STATUS = '51'.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;    ELSE.&lt;/P&gt;&lt;P&gt;      IDOC_STATUS-STATUS = '53'.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;    APPEND IDOC_STATUS.&lt;/P&gt;&lt;P&gt;	The status value '51' indicates a general error during application processing and the status '53' indicates everything is OK. There are numerous other status values, with distinct meanings, but '51' and '53' are the most common ones.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://idocs.de/www3/cookbooks/id" target="test_blank"&gt;http://idocs.de/www3/cookbooks/id&lt;/A&gt;&lt;/P&gt;&lt;P&gt;verify if it helps&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;sravani yendru&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 04:04:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573157#M860112</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T04:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Process and reprocess</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573158#M860113</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 process code assigned in the partner profile is pointing to a function module which is a processing routine for the incoming idoc.&lt;/P&gt;&lt;P&gt;Proper partner profile will be found out by using the sender logical system name and the interface is found out by using the message type and idoc type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      Use report RBDAGAI2 to reprocess the inbound idocs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reward points if you find it helpful&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prasanna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 04:21:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573158#M860113</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T04:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Process and reprocess</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573159#M860114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Durga Prasad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.How do u process Idoc in inbound side .&lt;/P&gt;&lt;P&gt;If any Error Occurs in inbound . goto WE19 and give the Error Idoc number and go for process .and select "Innbound fonction module   u will get one popup ,provide ur corresponding fiunctin module . select ok  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now the  duplicate Idoc will be  created in the above case .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. If they ask me how do u reprocess idoc at inbound side .&lt;/P&gt;&lt;P&gt;Goto bd87 Provide ur Idoc number selct process, select ur node again go for Process , Error Idoc will be reprocessed .&lt;/P&gt;&lt;P&gt;No duplicate Idoc will be created &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if u have any query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;P&gt;Sree M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 05:54:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573159#M860114</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T05:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Process and reprocess</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573160#M860115</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;Process Code turn drives which Function Module to use,which in turn will determine the content of the message. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Process Codes are used to identify the function module or API (Application Programming Interface) to be invoked for subsequent processing (Outbound or Inbound) of the business application. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outbound process code - Outbound process code under Message Control, generated the IDoc in the IDoc Interface. The process code determines the relevant function module. (TCode &amp;#150; WE41)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inbound process Code - names the function module or workflow which reads the IDoc data and transfers the data to the application document. (TCode &amp;#150; WE42)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Outbound process codes are stored in table TEDE1, while inbound process codes are stored in TEDE2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with regards,&lt;/P&gt;&lt;P&gt;sowjanyagosala&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2008 06:00:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573160#M860115</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-25T06:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Process and reprocess</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573161#M860116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sree How are you, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;as u said i tried with bd87 after entering idoc number  Gone with process, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;after that selected node , after that gone with process In Application tool  bar &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One Error is coming  there &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The operation cannot be carried out with this node type * &lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is this one plz explain , I think we can find  in the selection screen if I enter outbound idoc Number  we can find corresponding Inbound Idoc number ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How we can do this plz explain this one also &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If  possible 100 Points will be rewarded  to u  from my side &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Durga Prasad.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2008 17:07:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/process-and-reprocess/m-p/3573161#M860116</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-26T17:07:08Z</dc:date>
    </item>
  </channel>
</rss>

