<?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: Changing IDOC ORDERS05 Status in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024263#M1609184</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;     Did you use user-exit EXIT_SAPLEINM_007 to populate the custom segment? In that user-exit you should be able to change the staus message of the IDOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Please let me know if you have further queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jul 2011 17:21:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-07-06T17:21:42Z</dc:date>
    <item>
      <title>Changing IDOC ORDERS05 Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024262#M1609183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm modifying IDOC basic type ORDERS05 with an Enhancement. I've created some Z segments and it's ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have a field on a Z segment that I want to validate. If this field is blank, I want to set IDOC status as '57' and put a message. The problem is that I'm creating the IDOC with exits of the function IDOC_OUTPUT_ORDERS and I want to create the IDOC with that error status instead of create IDOC and do any changes later on that IDOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest some ways for solve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks everybody,&lt;/P&gt;&lt;P&gt;Marcelly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2011 14:48:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024262#M1609183</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-06T14:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Changing IDOC ORDERS05 Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024263#M1609184</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;     Did you use user-exit EXIT_SAPLEINM_007 to populate the custom segment? In that user-exit you should be able to change the staus message of the IDOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     Please let me know if you have further queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2011 17:21:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024263#M1609184</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-06T17:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Changing IDOC ORDERS05 Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024264#M1609185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not entering on this exit when I create the message.&lt;/P&gt;&lt;P&gt;I tried to insert an infinity loop and watch the process at SM50 and it's not running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure that the custom record is modified in this exit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was checking the function IDOC_OUTPUT_ORDERS and understand that the control record is customized by:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;docu: customer exit - control record (001)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL CUSTOMER-FUNCTION '001'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            control_record_out = control_record_out&lt;/P&gt;&lt;P&gt;            dekko              = ekko&lt;/P&gt;&lt;P&gt;            dobject            = object&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            control_record_out = control_record_out&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            dxekpo             = xekpo&lt;/P&gt;&lt;P&gt;            dxeket             = xeket.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And at the form FUELLEN_IDOC_INTTAB we can customize the data segments with:&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call Customer Function 002 (enhancement MM06E001)&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  PERFORM customer_function.&lt;/P&gt;&lt;P&gt;It's called almost for every standard segment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I can't find the customization of the status segment! I don't understand why I can't reach the exit EXIT_SAPLEINM_007. Is there another exit at the message creation of purchase orders to customize the status segments?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2011 20:42:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024264#M1609185</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-06T20:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Changing IDOC ORDERS05 Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024265#M1609186</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;Try the below, i guess this should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implement function exit - EXIT_SAPLEINM_011, which gets called at the end of routine - &lt;STRONG&gt;fuellen_idoc_inttab&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Within the function exit, use the data in INT_EDIDD to validate and then raise the exception - &lt;STRONG&gt;data_not_relevant_for_sending&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;This should fail the IDOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Ramachandra&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you use user-exit EXIT_SAPLEINM_007 to populate the custom segment? In that user-exit you should be able to change the staus message of the IDOC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above userexit gets called in INPUT processing of the Orders, and is not getting called anywhere in IDOC_OUTPUT_ORDERS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Chen K V on Jul 7, 2011 11:06 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 05:28:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024265#M1609186</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-07T05:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Changing IDOC ORDERS05 Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024266#M1609187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Chen, but I tried it before too...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the request is to create the IDOC with error status 51, and if it is possible, set the message as 'Field XXX invalid'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if I raise that exception the IDOC isn't created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm almost forgetting it and creating a JOB to change the IDOC's status. But it's too fail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for everybody!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2011 14:08:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024266#M1609187</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-07T14:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Changing IDOC ORDERS05 Status</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024267#M1609188</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;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm creating the IDOC with exits of the function IDOC_OUTPUT_ORDERS &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the request is to create the IDOC with error status 51, and if it is possible, set the message as 'Field XXX invalid'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am little confused based on the above two quotes of your's, in the first one you mention that the scenario is an &lt;STRONG&gt;Outbound IDOC&lt;/STRONG&gt; and hence "IDOC_OUTPUT_ORDERS", while the second quote mentions having the IDOC status to be "51", now status "51" is for &lt;STRONG&gt;Inbound IDOCs&lt;/STRONG&gt; that failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please confirm the actual scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if I raise that exception the IDOC isn't created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Presuming&lt;/STRONG&gt; that the scenario is outbound, If you want to create an Error IDOC, then just raise the &lt;STRONG&gt;Exception 1: ERROR_MESSAGE_RECEIVED&lt;/STRONG&gt;, this should create an IDOC with an error status.&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, 08 Jul 2011 08:25:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/changing-idoc-orders05-status/m-p/8024267#M1609188</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-07-08T08:25:35Z</dc:date>
    </item>
  </channel>
</rss>

