<?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: Modifying a Table: Two corresponding values for a single entry in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-a-table-two-corresponding-values-for-a-single-entry/m-p/2385567#M530054</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you will need to modify the existing entry in your original table but insert duplicate entries for the subsequent enties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;data l_index type sy-tabix.&lt;/P&gt;&lt;P&gt;LOOP AT I_ZFBPS_INV_LINK.&lt;/P&gt;&lt;P&gt;clear l_index.&lt;/P&gt;&lt;P&gt;LOOP AT GATEIN_ITAB WHERE GATE_ENTRY_NUM =&lt;/P&gt;&lt;P&gt;I_ZFBPS_INV_LINK-GATE_ENTRY_NUM.&lt;/P&gt;&lt;P&gt;add 1 to l_index.&lt;/P&gt;&lt;P&gt;GATEIN_ITAB-INVOICE_NO = I_ZFBPS_INV_LINK-INVOICE_NO.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;first time for this gate entry....&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if l_index = 1.&lt;/P&gt;&lt;P&gt;*...change original&lt;/P&gt;&lt;P&gt;MODIFY GATEIN_ITAB INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;subsequent...insert duplicate&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;append gatein_itab.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jun 2007 06:40:58 GMT</pubDate>
    <dc:creator>former_member186741</dc:creator>
    <dc:date>2007-06-06T06:40:58Z</dc:date>
    <item>
      <title>Modifying a Table: Two corresponding values for a single entry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-a-table-two-corresponding-values-for-a-single-entry/m-p/2385566#M530053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following select statement of mine sometime picks up two invoice nos (more than one) for a single gate entry number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT INVOICE_NO GATE_ENTRY_NUM&lt;/P&gt;&lt;P&gt;  INTO CORRESPONDING FIELDS OF TABLE I_ZFBPS_INV_LINK&lt;/P&gt;&lt;P&gt;  FROM ZFBPS_INV_LINK&lt;/P&gt;&lt;P&gt;  FOR ALL ENTRIES IN GATEIN_ITAB&lt;/P&gt;&lt;P&gt;  WHERE GATE_ENTRY_NUM = GATEIN_ITAB-GATE_ENTRY_NUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now when I try to modify my GATEIN_ITAB (main internal table)  for the INVOICE_NO in the following manner the system encounters the two Invoice Nos against the Gate_Entry_Number in where clause and doesn't modify the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT I_ZFBPS_INV_LINK.&lt;/P&gt;&lt;P&gt;    LOOP AT GATEIN_ITAB WHERE GATE_ENTRY_NUM =&lt;/P&gt;&lt;P&gt;     I_ZFBPS_INV_LINK-GATE_ENTRY_NUM.&lt;/P&gt;&lt;P&gt;      GATEIN_ITAB-INVOICE_NO = I_ZFBPS_INV_LINK-INVOICE_NO.&lt;/P&gt;&lt;P&gt;      MODIFY GATEIN_ITAB INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want both the invoice nos in my output against this gate entry number.&lt;/P&gt;&lt;P&gt;How to do this please advice.&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;Alok.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:33:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-a-table-two-corresponding-values-for-a-single-entry/m-p/2385566#M530053</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T06:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying a Table: Two corresponding values for a single entry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-a-table-two-corresponding-values-for-a-single-entry/m-p/2385567#M530054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you will need to modify the existing entry in your original table but insert duplicate entries for the subsequent enties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like:&lt;/P&gt;&lt;P&gt;data l_index type sy-tabix.&lt;/P&gt;&lt;P&gt;LOOP AT I_ZFBPS_INV_LINK.&lt;/P&gt;&lt;P&gt;clear l_index.&lt;/P&gt;&lt;P&gt;LOOP AT GATEIN_ITAB WHERE GATE_ENTRY_NUM =&lt;/P&gt;&lt;P&gt;I_ZFBPS_INV_LINK-GATE_ENTRY_NUM.&lt;/P&gt;&lt;P&gt;add 1 to l_index.&lt;/P&gt;&lt;P&gt;GATEIN_ITAB-INVOICE_NO = I_ZFBPS_INV_LINK-INVOICE_NO.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;first time for this gate entry....&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;if l_index = 1.&lt;/P&gt;&lt;P&gt;*...change original&lt;/P&gt;&lt;P&gt;MODIFY GATEIN_ITAB INDEX SY-TABIX.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;subsequent...insert duplicate&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;append gatein_itab.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 06:40:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-a-table-two-corresponding-values-for-a-single-entry/m-p/2385567#M530054</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2007-06-06T06:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying a Table: Two corresponding values for a single entry</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-a-table-two-corresponding-values-for-a-single-entry/m-p/2385568#M530055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi  ...&lt;/P&gt;&lt;P&gt;please  use  the   condition  when  you want to  modify it  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT INVOICE_NO GATE_ENTRY_NUM
INTO CORRESPONDING FIELDS OF TABLE I_ZFBPS_INV_LINK
FROM ZFBPS_INV_LINK
FOR ALL ENTRIES IN GATEIN_ITAB
WHERE GATE_ENTRY_NUM = GATEIN_ITAB-GATE_ENTRY_NUM.


LOOP AT I_ZFBPS_INV_LINK.
read table  GATEIN_ITAB  with key  GATE_ENTRY_NUM =  I_ZFBPS_INV_LINK-GATE_ENTRY_NUM
****just    have  if  logic    it will work   
IF  GATEIN_ITAB-INVOICE_NO = I_ZFBPS_INV_LINK-INVOICE_NO   .
MODIFY GATEIN_ITAB INDEX SY-TABIX.
ENDIF .
ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward  points   ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;girish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 10:24:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/modifying-a-table-two-corresponding-values-for-a-single-entry/m-p/2385568#M530055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T10:24:53Z</dc:date>
    </item>
  </channel>
</rss>

