<?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: Table not getting updated while executing IHC0 but it does so while executing WE19 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-not-getting-updated-while-executing-ihc0-but-it-does-so-while/m-p/12743103#M2021258</link>
    <description>&lt;P&gt;You're looking at the wrong place. Look above "Add a Comment":&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2212097-image.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2023 07:39:57 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2023-09-25T07:39:57Z</dc:date>
    <item>
      <title>Table not getting updated while executing IHC0 but it does so while executing WE19</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-not-getting-updated-while-executing-ihc0-but-it-does-so-while/m-p/12743099#M2021254</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
  &lt;P&gt;I have a requirement wherein I have to execute transaction IHC0 (which generates an inbound IDOC) and this in turn updates a field DTAWS (instruction key) of the table PAYRQ. This field is already showing in one of the idoc segments but it is not getting populated in the PAYRQ table, hence the requirement.&lt;/P&gt;
  &lt;P&gt;I have written the code inside an implicit enhancement but the issue is that the field DTAWS is not getting updated. However, on executing WE19 and generating a new idoc, I can see that the table field DTAWS is getting updated, implying that the code is working properly and the control is reaching that part. &lt;/P&gt;
  &lt;P&gt;I am not sure what I am missing. Below are the complete screenshots for your reference:&lt;/P&gt;
  &lt;P&gt;1) I right click on a particular line item and click POST.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213079-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;2) A pop will come up stating that the payment order has been posted. Then on double clicking the line, the 'DIsplay IHC Payment Order' screen comes up. I go to tab 'Admin and ref. documents' and click on refresh button. This shows the external idoc number that has been generated and the payment request number 94809.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213081-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;3) Now if I go to table PAYRQ, give the key number as &lt;STRONG&gt;94809 &lt;/STRONG&gt;and check field DTAWS, I see that the value is empty.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213084-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;4) I execute WE19 with the debugger ON and by giving idoc number as &lt;STRONG&gt;23361123.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213085-image.png" /&gt;&lt;/P&gt;
  &lt;P&gt;A new idoc is created with number &lt;STRONG&gt;23361124 &lt;/STRONG&gt;and payment key &lt;STRONG&gt;94810&lt;/STRONG&gt;. On checking the table, I can see that the DTAWS field is updated with the instruction key value as 01 , which is how the case should be.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213086-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;This is what is confusing me. &lt;U&gt;It is not getting populated on runtime but it is doing so from WE19.&lt;/U&gt;&lt;/P&gt;
  &lt;P&gt;I have written the implicit enhancement inside a method of class IHC_CL_PROC_IDOC_2_PRQ. The method name is FILL_PAYM_CNTRL. I have attached the code snippet as well.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;ENHANCEMENT 1  ZFI_PAYRQ_UPDATE.    "active version

DATA: lt_edidd   TYPE TABLE OF edidd,

     l_str1(20),     l_str2(20),    l_str3(20),    l_str4(2),&amp;lt;    l_str5(20).

IMPORT idoc_data TO lt_edidd FROM MEMORY ID 'IDOC_DATA'.

if lt_edidd IS NOT INITIAL.

READ TABLE lt_edidd INTO DATA(ls_edidd) WITH KEY segnam = 'E1IDBW1'.

IF sy-subrc IS INITIAL.

 CONDENSE ls_edidd-sdata.

SPLIT ls_edidd-sdata AT ';' INTO l_str1 l_str2 l_str3. 

IF l_str3 IS NOT INITIAL. 

CONDENSE l_str3.

  split l_str3 at '' into l_str4 l_str5.

 priv_str_instr-instr_key = l_str4.

 ENDIF.

ENDIF.

endif.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;Also I would like to mention that the functional consultant provided the FM exits &lt;EM&gt;EXIT_SAPLFBQ1_001 and &lt;/EM&gt;&lt;EM&gt;EXIT_SAPLFBQ1_002 &lt;/EM&gt;for this requirement. Below is his analysis.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2213087-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;However, the exits were not getting triggered on executing IHC0 or WE19 (Project in CMOD was also activated). So I tried with the my own approach, which is also not working !&lt;/P&gt;
  &lt;P&gt;Please provide your valuable inputs.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Manish&lt;/P&gt;</description>
      <pubDate>Sat, 23 Sep 2023 13:51:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-not-getting-updated-while-executing-ihc0-but-it-does-so-while/m-p/12743099#M2021254</guid>
      <dc:creator>manish_malakar0316</dc:creator>
      <dc:date>2023-09-23T13:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Table not getting updated while executing IHC0 but it does so while executing WE19</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-not-getting-updated-while-executing-ihc0-but-it-does-so-while/m-p/12743100#M2021255</link>
      <description>&lt;P&gt;Comment EDITED after your question EDIT.&lt;/P&gt;&lt;P&gt;You say that after copying IDoc 23361123 via WE19 "a new idoc is created with number 23361124 and payment key 94810".&lt;/P&gt;&lt;P&gt;The original IDoc has payment key 94809, so please confirm that you mean you have changed manually 94809 to 94810 before posting?&lt;/P&gt;&lt;P&gt;Could you show a screenshot of both IDocs where payment key is located? (along with the value)&lt;/P&gt;&lt;P&gt;Did you check the execution log of the IDoc 23361123 ?&lt;/P&gt;&lt;P&gt;Did you debug your custom code, and did you compare what's different between IHC0 and WE19 ?&lt;/P&gt;&lt;P&gt;NB: after your question EDIT, your code is full of &amp;lt;br&amp;gt; on one line.&lt;/P&gt;</description>
      <pubDate>Sat, 23 Sep 2023 14:52:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-not-getting-updated-while-executing-ihc0-but-it-does-so-while/m-p/12743100#M2021255</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-09-23T14:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Table not getting updated while executing IHC0 but it does so while executing WE19</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-not-getting-updated-while-executing-ihc0-but-it-does-so-while/m-p/12743101#M2021256</link>
      <description>&lt;P&gt;Please use the COMMENT button for comments, asking for complements, adding details, replying to a comment or a proposed solution or to the OP question, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area. &lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2023 16:39:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-not-getting-updated-while-executing-ihc0-but-it-does-so-while/m-p/12743101#M2021256</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-09-24T16:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Table not getting updated while executing IHC0 but it does so while executing WE19</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-not-getting-updated-while-executing-ihc0-but-it-does-so-while/m-p/12743102#M2021257</link>
      <description>&lt;P&gt;The COMMENT button was not showing, only the LIKE, SHARE and ALERT MODERATOR buttons were visible. I had to use the ANSWER button to reply&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 07:03:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-not-getting-updated-while-executing-ihc0-but-it-does-so-while/m-p/12743102#M2021257</guid>
      <dc:creator>manish_malakar0316</dc:creator>
      <dc:date>2023-09-25T07:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Table not getting updated while executing IHC0 but it does so while executing WE19</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-not-getting-updated-while-executing-ihc0-but-it-does-so-while/m-p/12743103#M2021258</link>
      <description>&lt;P&gt;You're looking at the wrong place. Look above "Add a Comment":&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2212097-image.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2023 07:39:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-not-getting-updated-while-executing-ihc0-but-it-does-so-while/m-p/12743103#M2021258</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2023-09-25T07:39:57Z</dc:date>
    </item>
  </channel>
</rss>

