<?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: Mapping Fields from table1 to Table2 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/mapping-fields-from-table1-to-table2/m-p/5366756#M1234839</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;thanx.. it works !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Caro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Apr 2009 14:18:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-04-01T14:18:50Z</dc:date>
    <item>
      <title>Mapping Fields from table1 to Table2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mapping-fields-from-table1-to-table2/m-p/5366754#M1234837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, I don't have not much experience in ABAP Coding. But i hope with your help, i solve my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOURCE_PACKAGE:&lt;/P&gt;&lt;P&gt;Order (key) | item (key) | bonus | skonto | tax&lt;/P&gt;&lt;P&gt;100_______10______&lt;/P&gt;&lt;P&gt;100_______20______&lt;/P&gt;&lt;P&gt;200_______10______&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bonus, skonto, tax are condition types. These fields are at the beginning empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is another table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BIC/AZDSO_ACN00:&lt;/P&gt;&lt;P&gt;Order (key) | item (key) | condition_type (key) | condition_value&lt;/P&gt;&lt;P&gt;100________10_______u2019bonusu2019_____________150 &lt;/P&gt;&lt;P&gt;100________10_______u2019skontou2019_______ _____250 &lt;/P&gt;&lt;P&gt;100________20_______u2019bonusu2019_____________100 &lt;/P&gt;&lt;P&gt;200________10_______u2019taxu2019__________ _____100 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, for all Order (key) &amp;amp; item (key) of SOURCE_PACKAGE, I want read the corresponding condition_value from the BIC/AZDSO_ACN00 into the fields bonus, skonto, tax of SOURCE_PACKAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For all   Order (key) &amp;amp; item (key) from SOURCE_PACKAGE there is at least one of the condition types or more.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SOURCE_PACKAGE:&lt;/P&gt;&lt;P&gt;Order (key) | item (key) | bonus | skonto | tax&lt;/P&gt;&lt;P&gt;100_______10________150___250_____empty&lt;/P&gt;&lt;P&gt;100_______20________100___empty___empty&lt;/P&gt;&lt;P&gt;200_______10________empty_empty___100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first Step was, to read the active table 2   into an internal table:&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;P&gt;DATA:it_docu_condition TYPE TABLE OF /BIC/AZDSO_ACN00,&lt;/P&gt;&lt;P&gt;     wa_docu_condition LIKE LINE OF it_docu_condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;select * from /BIC/AZDSO_ACN00 into table it_docu_condition
      FOR ALL ENTRIES IN SOURCE_PACKAGE
      WHERE DOC_NUMBER eq SOURCE_PACKAGE-DOC_NUMBER
        AND S_ORD_ITEM eq SOURCE_PACKAGE-S_ORD_ITEM
        AND ( condition_type = 'skonto' OR
              condition_type = 'bonus' OR
              condition_type = 'tax' ).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, i donu2019t know, how i can map this condition types into the fields of SOURCE_PACKAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanx for help.&lt;/P&gt;&lt;P&gt;caro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2009 11:10:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mapping-fields-from-table1-to-table2/m-p/5366754#M1234837</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-31T11:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Fields from table1 to Table2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mapping-fields-from-table1-to-table2/m-p/5366755#M1234838</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 something like this. I could not try it in my system, if there are some error let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FIELD-SYMBOLS 
     : &amp;lt;SOURCE_PACKAGE&amp;gt; LIKE LINE OF SOURCE_PACKAGE.

LOOP AT SOURCE_PACKAGE ASSIGNING &amp;lt;SOURCE_PACKAGE&amp;gt;.

LOOP AT it_docu_condition into wa_docu_condition
               where Order = &amp;lt;SOURCE_PACKAGE&amp;gt;-Order  and
                        item   = &amp;lt;SOURCE_PACKAGE&amp;gt;-item.

CASE wa_docu_condition-condition_type.

when u2019bonusu2019.
&amp;lt;SOURCE_PACKAGE&amp;gt;-bonus = wa_docu_condition-condition_value.
when u2019skontou2019.
&amp;lt;SOURCE_PACKAGE&amp;gt;-skonto = wa_docu_condition-condition_value.
when u2019taxu2019.
&amp;lt;SOURCE_PACKAGE&amp;gt;-tax = wa_docu_condition-condition_value.
ENDCASE.

ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2009 12:23:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mapping-fields-from-table1-to-table2/m-p/5366755#M1234838</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-03-31T12:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping Fields from table1 to Table2</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mapping-fields-from-table1-to-table2/m-p/5366756#M1234839</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;thanx.. it works !!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Caro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Apr 2009 14:18:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mapping-fields-from-table1-to-table2/m-p/5366756#M1234839</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-04-01T14:18:50Z</dc:date>
    </item>
  </channel>
</rss>

