<?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: ALE - IDOC processing in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962545#M1602971</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have implemented your coding. &lt;/P&gt;&lt;P&gt;Now the IDOC Processing is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sy-fields in the following code are empty:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* transfer message data
    ls_bdidocstat-msgty    = sy-msgty.
    ls_bdidocstat-msgid    = sy-msgid.
    ls_bdidocstat-msgno    = sy-msgno.
    ls_bdidocstat-msgv1    = sy-msgv1.
    ls_bdidocstat-msgv2    = sy-msgv2.
    ls_bdidocstat-msgv3    = sy-msgv3.
    ls_bdidocstat-msgv4    = sy-msgv4.
    ls_bdidocstat-repid    = sy-repid.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
I have fill the fields hard in the code:
    IF ls_bdidocstat-msgty IS INITIAL.
      ls_bdidocstat-msgty = 'S'.
    ENDIF.

    IF ls_bdidocstat-msgid IS INITIAL.
      ls_bdidocstat-msgid = '00'.
    ENDIF.
    IF ls_bdidocstat-msgno IS INITIAL.
      ls_bdidocstat-msgno = '162'.
    ENDIF.
    IF ls_bdidocstat-msgv1 IS INITIAL.
      ls_bdidocstat-msgv1 = 'Q4 IDOC erfolgreich'.
    ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help and greets&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jun 2011 14:57:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-06-06T14:57:23Z</dc:date>
    <item>
      <title>ALE - IDOC processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962540#M1602966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we have development a own IDOC for the communicatin with another system. &lt;/P&gt;&lt;P&gt;The InboundProcess is customized via we20 and an inbound function with following paramters&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD
*"     VALUE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC
*"  EXPORTING
*"     VALUE(WORKFLOW_RESULT) LIKE  BDWFAP_PAR-RESULT
*"     VALUE(APPLICATION_VARIABLE) LIKE  BDWFAP_PAR-APPL_VAR
*"     VALUE(IN_UPDATE_TASK) LIKE  BDWFAP_PAR-UPDATETASK
*"     VALUE(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
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this funtion a event for a workflow is created and change the Status of tge IDOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
With the function "IDOC_STATUS_WRITE_TO_DATABASE" we want set the status. 
The calling of the function looks so:
  CALL FUNCTION 'IDOC_STATUS_WRITE_TO_DATABASE'
    EXPORTING
      idoc_number               = idoc_contrl-docnum
      IDOC_OPENED_FLAG          = 'X'
*     NO_DEQUEUE_FLAG
    IMPORTING
      idoc_control              = idoc_contrl
    TABLES
      idoc_status               = l_idoc_status_tab
    EXCEPTIONS
      idoc_foreign_lock         = 1
      idoc_not_found            = 2
      idoc_status_records_empty = 3
      idoc_status_invalid       = 4
      db_error                  = 5
      OTHERS                    = 6.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We get the error "No status set by the application to pass ALE".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me!?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and greets&lt;/P&gt;&lt;P&gt;Florian Reiter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2011 17:52:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962540#M1602966</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-02T17:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: ALE - IDOC processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962541#M1602967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the error will be in rfc sm59 or you may not have distrubuted the model bd64 see it &lt;/P&gt;&lt;P&gt;thanking you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 03:21:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962541#M1602967</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-03T03:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: ALE - IDOC processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962542#M1602968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The message &lt;STRONG&gt;"No status set by the application to pass ALE"&lt;/STRONG&gt; is indicating that no messages have been updated into the IDOC_STATUS tab of your custom FM, please add a message into the IDOC Status - Something like "IDOC Posted Successfully" if everything went fine and in case of error "Application Document not posted".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 07:04:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962542#M1602968</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-03T07:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: ALE - IDOC processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962543#M1602969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the Status Tab i set the status on "53",&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  l_idoc_status_tab-docnum = idoc_contrl-docnum.
  l_idoc_status_tab-status = '53'.
  APPEND l_idoc_status_tab.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Table "EDIDS" are two entries thr first wirth status 53 and the secont with 51.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
6070218	04.06.2011	16:20:20	74	04.06.2011	16:20:20	53	DW03							IDOC Posted Successfully
6070218	04.06.2011	16:20:20	75	04.06.2011	16:20:20	51	DW03	SAPLBD20			Kein Statussatz von der Anwendung an ALE übergeben
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;are the BD64 settings mandatory?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jun 2011 14:36:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962543#M1602969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-04T14:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: ALE - IDOC processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962544#M1602970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you try to set the status using FUNCTION 'IDOC_STATUS_WRITE_TO_DATABASE'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is wrong. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The status should be returned in your inbound processing function module tables parameter IDOC_STATUS .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One of the last actions in your function (after posting document) is to set the status record based on the last message issued:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;form append_idoc_status_bapi
  using    ps_edidc        type edidc
           pt_return       type ty_t_bapiret2
  changing pt_idoc_status  type ty_t_bdidocstat.
  data:
    ls_bdidocstat type bdidocstat.
  field-symbols:
    &amp;lt;return&amp;gt; type bapiret2.
* this Routine must be called only once per IDOC
  move-corresponding ps_edidc to ls_bdidocstat.
* transfer message data
  ls_bdidocstat-msgty    = sy-msgty.
  ls_bdidocstat-msgid    = sy-msgid.
  ls_bdidocstat-msgno    = sy-msgno.
  ls_bdidocstat-msgv1    = sy-msgv1.
  ls_bdidocstat-msgv2    = sy-msgv2.
  ls_bdidocstat-msgv3    = sy-msgv3.
  ls_bdidocstat-msgv4    = sy-msgv4.
  ls_bdidocstat-repid    = sy-repid.
* update IDOC status
  case ls_bdidocstat-msgty.
    when 'S' or 'I'.
      ls_bdidocstat-status = gc_idoc_posted_ok.
    when 'W'.
      ls_bdidocstat-status = gc_idoc_not_fully_posted.
    when 'E' or 'A'.
      ls_bdidocstat-status = gc_idoc_not_posted .
  endcase." ls_bdidocstat-msgty.
* if status = gc_idoc_posted_ok and errors or warnings (from userexit?)
* are present, then set status = gc_idoc_not_fully_posted
  if ls_bdidocstat-status = gc_idoc_posted_ok.
    loop at pt_return assigning &amp;lt;return&amp;gt;
      where type ca 'EAX'.
      ls_bdidocstat-status = gc_idoc_not_fully_posted.
      exit.
    endloop." at pt_return assigning &amp;lt;return&amp;gt;
  endif." ls_bdidocstat-status = gc_idoc_posted_ok.
  append ls_bdidocstat to pt_idoc_status.
endform.                    " append_idoc_status_bapi&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;using the constants defined in TOP include&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CONSTANTS:
  gc_idoc_not_fully_posted   TYPE teds2-status VALUE '52',
  gc_idoc_not_posted         TYPE teds2-status VALUE '51',
  gc_idoc_posted_ok          TYPE teds2-status VALUE '53',&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: We also passed the RETURN table of the BAPI function we used for posting to make sure a failure of the BAPI is reflected in the status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the function uses application log to record all messages, then the reference should be stored in status record, i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;loop at pt_idoc_status assigning &amp;lt;idoc_status&amp;gt;.
    &amp;lt;idoc_status&amp;gt;-appl_log = l_lognumber.
  endloop." at pt_idoc_status assigning &amp;lt;idoc_status&amp;gt;.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This allows users direct view of application log from IDOC monitor i.e. BD87.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jun 2011 18:24:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962544#M1602970</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2011-06-04T18:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: ALE - IDOC processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962545#M1602971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clemens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have implemented your coding. &lt;/P&gt;&lt;P&gt;Now the IDOC Processing is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The sy-fields in the following code are empty:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* transfer message data
    ls_bdidocstat-msgty    = sy-msgty.
    ls_bdidocstat-msgid    = sy-msgid.
    ls_bdidocstat-msgno    = sy-msgno.
    ls_bdidocstat-msgv1    = sy-msgv1.
    ls_bdidocstat-msgv2    = sy-msgv2.
    ls_bdidocstat-msgv3    = sy-msgv3.
    ls_bdidocstat-msgv4    = sy-msgv4.
    ls_bdidocstat-repid    = sy-repid.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
I have fill the fields hard in the code:
    IF ls_bdidocstat-msgty IS INITIAL.
      ls_bdidocstat-msgty = 'S'.
    ENDIF.

    IF ls_bdidocstat-msgid IS INITIAL.
      ls_bdidocstat-msgid = '00'.
    ENDIF.
    IF ls_bdidocstat-msgno IS INITIAL.
      ls_bdidocstat-msgno = '162'.
    ENDIF.
    IF ls_bdidocstat-msgv1 IS INITIAL.
      ls_bdidocstat-msgv1 = 'Q4 IDOC erfolgreich'.
    ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help and greets&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 14:57:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962545#M1602971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-06T14:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: ALE - IDOC processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962546#M1602972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Florian.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me suggest. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do not fill the ls_bdidocstat-msgxy fields directly. In our scenario they were always filled because the BAPI we called ended with an error or success message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should declare a type string variable and issue a &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MESSAGE ... INTO string variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have big advantages: The message INTO will automatically fill all the SY-MSGxy fields, in debugger you can see the full message in the string and you have a where-used-list for the message. For this reason you should create your own message or use a more specific one. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is always helping maintenance: See the message, do a where-used-check, find the related source code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 15:13:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962546#M1602972</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2011-06-06T15:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: ALE - IDOC processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962547#M1602973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what BAPI do you call in your Inbound IDOC funtion?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here my complete code of the Inbound function:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FUNCTION z_wfm_order_01_imp.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(INPUT_METHOD) LIKE  BDWFAP_PAR-INPUTMETHD
*"     VALUE(MASS_PROCESSING) LIKE  BDWFAP_PAR-MASS_PROC
*"  EXPORTING
*"     VALUE(WORKFLOW_RESULT) LIKE  BDWFAP_PAR-RESULT
*"     VALUE(APPLICATION_VARIABLE) LIKE  BDWFAP_PAR-APPL_VAR
*"     VALUE(IN_UPDATE_TASK) LIKE  BDWFAP_PAR-UPDATETASK
*"     VALUE(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
*"----------------------------------------------------------------------

  DATA: ls_bdidocstat TYPE bdidocstat,
        lt_return     TYPE ty_t_bapiret2.

  FIELD-SYMBOLS: &amp;lt;return&amp;gt; TYPE bapiret2.

  INCLUDE &amp;lt;cntn01&amp;gt;.

  swc_container lt_cont.
  swc_clear_container lt_cont.
  swc_set_element lt_cont 'DOCNUM' idoc_contrl-docnum.
  swc_container_to_persistent lt_cont.

  CALL FUNCTION 'SWE_EVENT_CREATE'
    EXPORTING
      objtype                       =  'ZIE_AUTOZW'
      objkey                        =  space
      event                         =  'IDOC_Q4_IN'
*     CREATOR                       = ' '
*     TAKE_WORKITEM_REQUESTER       = ' '
*     START_WITH_DELAY              = ' '
*     START_RECFB_SYNCHRON          = ' '
*     NO_COMMIT_FOR_QUEUE           = ' '
*     DEBUG_FLAG                    = ' '
*     NO_LOGGING                    = ' '
*     IDENT                         =
*   IMPORTING
*     EVENT_ID                      =
*     RECEIVER_COUNT                =
   TABLES
     event_container               =  lt_cont
   EXCEPTIONS
     objtype_not_found             = 1
     OTHERS                        = 2.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE 'X'  NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ELSE.

* this Routine must be called only once per IDOC
    MOVE-CORRESPONDING idoc_contrl TO ls_bdidocstat.
* transfer message data
    ls_bdidocstat-msgty    = sy-msgty.
    ls_bdidocstat-msgid    = sy-msgid.
    ls_bdidocstat-msgno    = sy-msgno.
    ls_bdidocstat-msgv1    = sy-msgv1.
    ls_bdidocstat-msgv2    = sy-msgv2.
    ls_bdidocstat-msgv3    = sy-msgv3.
    ls_bdidocstat-msgv4    = sy-msgv4.
    ls_bdidocstat-repid    = sy-repid.

    IF ls_bdidocstat-msgty IS INITIAL.
      ls_bdidocstat-msgty = 'S'.
    ENDIF.

    IF ls_bdidocstat-msgid IS INITIAL.
      ls_bdidocstat-msgid = '00'.
    ENDIF.
    IF ls_bdidocstat-msgno IS INITIAL.
      ls_bdidocstat-msgno = '162'.
    ENDIF.
    IF ls_bdidocstat-msgv1 IS INITIAL.
      ls_bdidocstat-msgv1 = 'Q4 IDOC erfolgreich'.
    ENDIF.

* update IDOC status
    CASE ls_bdidocstat-msgty.
      WHEN 'S' OR 'I'.
        ls_bdidocstat-status = gc_idoc_posted_ok.
      WHEN 'W'.
        ls_bdidocstat-status = gc_idoc_not_fully_posted.
      WHEN 'E' OR 'A'.
        ls_bdidocstat-status = gc_idoc_not_posted .
    ENDCASE." ls_bdidocstat-msgty.
* if status = gc_idoc_posted_ok and errors or warnings (from userexit?)
* are present, then set status = gc_idoc_not_fully_posted
    IF ls_bdidocstat-status = gc_idoc_posted_ok.
      LOOP AT lt_return ASSIGNING &amp;lt;return&amp;gt;
        WHERE type CA 'EAX'.
        ls_bdidocstat-status = gc_idoc_not_fully_posted.
        EXIT.
      ENDLOOP." at pt_return assigning &amp;lt;return&amp;gt;
    ENDIF." ls_bdidocstat-status = gc_idoc_posted_ok.
    APPEND ls_bdidocstat TO 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, 06 Jun 2011 15:19:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962547#M1602973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-06T15:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: ALE - IDOC processing</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962548#M1602974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Florian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;we created a 100% custom IDOC created from a flat file extracted from a non-sap-legacy system. We used a copy of FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2' because 'BAPI_SALESORDER_CREATEFROMDAT2' does not support certain order types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 15:38:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/ale-idoc-processing/m-p/7962548#M1602974</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2011-06-06T15:38:38Z</dc:date>
    </item>
  </channel>
</rss>

