<?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: Create View - Same table is used twice in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099551#M1183402</link>
    <description>&lt;P&gt;I just (in 2019) had the same problem as the original author&lt;/P&gt;</description>
    <pubDate>Wed, 30 Oct 2019 14:24:22 GMT</pubDate>
    <dc:creator>vonglan</dc:creator>
    <dc:date>2019-10-30T14:24:22Z</dc:date>
    <item>
      <title>Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099539#M1183390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would to create a DB/maintenance view, in which the same DB table should be used twice (the table is the foreign key of two separate fields of main table).&lt;/P&gt;&lt;P&gt;In standard database views there is option of ALIAS definition, but I haven't been find any similar option in SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;View of main table ZMAT_CONVERT which contain the fields MATNR_FROM, MATNR_TO.&lt;/P&gt;&lt;P&gt;MATNR_FROM should be linked to MARA, but MATNR_TO should also be linked to MARA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can this be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Shai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 08:39:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099539#M1183390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-21T08:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099540#M1183391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Goto SE11. Selct view and specify a name. Click on Create. Select Maintenance View. Now you need to specify your table ie ZMAT_CONVERT . Click on Relationships button. The set of all relationships ie foreign key relationships appear. Select the desired table ie. MARA. Automatically it displays the list of all join conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jayanthi.K&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 08:56:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099540#M1183391</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-21T08:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099541#M1183392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shai wants to link MARA twice to two different MATNR fields, I don't think this is possible using the SAP data dictionary.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 09:01:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099541#M1183392</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-01-21T09:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099542#M1183393</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;I at one time tried to do like, but beside me was not got.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2009 09:17:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099542#M1183393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-21T09:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099543#M1183394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks your for your replies. &lt;/P&gt;&lt;P&gt;However, as Thomas mentioned, I am asking how can I use the same table twice in my view? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(For example: I have two fields: MATNR_FROM, MATNR_TO in my main table and I would like to link both of them separately to MARA table)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 10:46:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099543#M1183394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T10:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099544#M1183395</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;It's not possible to use a table twice in the same database view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jan 2009 10:55:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099544#M1183395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-22T10:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099545#M1183396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I understood that it is not possible use the same table twice in a database view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to do it in maintenance view screen (even if some programming is requried)?&lt;/P&gt;&lt;P&gt;For example: Display the material description for both fields: MATNR_FROM and MATNR_TO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 14:51:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099545#M1183396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-28T14:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099546#M1183397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can probably do it via table maintenance events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw70/helpdata/EN/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw70/helpdata/EN/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2009 15:00:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099546#M1183397</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-01-28T15:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099547#M1183398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;Thanks for your reply. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have finally succeeded doing it, although it was kind of tricky: &lt;/P&gt;&lt;P&gt;1. First, I have created a maintenance view based on tables ZMARA_DEST and MAKT (MAKT was defined as foreign key and assigned to view tables only once). &lt;/P&gt;&lt;P&gt;2. Then, I have added to the View fields the field MAKT-MAKTX twice with two different view field names (For some reason, it is possible). &lt;/P&gt;&lt;P&gt;3. At last, I have implemented all 3 self-defined events: AA, AC, AD, for which I have copied the standard forms (get_data, read_single, compl), and made some modifications. In my case, I changed the selection method of MAKTX2 value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards, &lt;/P&gt;&lt;P&gt;Shai&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 12:36:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099547#M1183398</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-29T12:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099548#M1183399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, thanks for posting how you solved it.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jan 2009 12:59:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099548#M1183399</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-01-29T12:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099549#M1183400</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Shai (who posted the question) has answered this himself, but it is hidden in the comments, therefore I copy it here, and add an improvement below:&lt;/P&gt;&lt;P&gt;"Hi,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I have finally succeeded doing it, although it was kind of tricky:&lt;/P&gt;&lt;P&gt;1. First, I have created a maintenance view based on tables ZMARA_DEST and MAKT (MAKT was defined as foreign key and assigned to view tables only once).&lt;/P&gt;&lt;P&gt;2. Then, I have added to the View fields the field MAKT-MAKTX twice with two different view field names (For some reason, it is possible).&lt;/P&gt;&lt;P&gt;3. At last, I have implemented all 3 self-defined events: AA, AC, AD, for which I have copied the standard forms (get_data, read_single, compl), and made some modifications. In my case, I changed the selection method of MAKTX2 value.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Shai"&lt;/P&gt;&lt;P&gt;ADDITION:&lt;/P&gt;&lt;P&gt;For step 3, I implemented just events 05 (FORM add_text) and AA (FORM read_and_add_text).&lt;/P&gt;&lt;P&gt;Here is my example coding:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;FORM add_text.

  CHECK zieplant_ctrl_v-old_iwerk IS NOT INITIAL

    AND zieplant_ctrl_v-old_iwerk_txt = zieplant_ctrl_v-new_iwerk_txt.

  SELECT SINGLE name1

    FROM t001w

    WHERE werks = @zieplant_ctrl_v-old_iwerk

    INTO @zieplant_ctrl_v-old_iwerk_txt.

ENDFORM.



FORM read_and_add_text.

  PERFORM get_data_zieplant_ctrl_v. " standard-generated routine for reading

  LOOP AT total[] ASSIGNING &amp;lt;vim_total_struc&amp;gt;.

    zieplant_ctrl_v = &amp;lt;vim_total_struc&amp;gt;.

    PERFORM add_text.

    &amp;lt;vim_total_struc&amp;gt; = zieplant_ctrl_v.

  ENDLOOP.

ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Oct 2019 12:29:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099549#M1183400</guid>
      <dc:creator>vonglan</dc:creator>
      <dc:date>2019-10-30T12:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099550#M1183401</link>
      <description>&lt;P&gt;the abap syntax you are using did not exist in year 2009   &lt;/P&gt;&lt;P&gt;why do you answer to a very old question ?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 12:33:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099550#M1183401</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2019-10-30T12:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099551#M1183402</link>
      <description>&lt;P&gt;I just (in 2019) had the same problem as the original author&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 14:24:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099551#M1183402</guid>
      <dc:creator>vonglan</dc:creator>
      <dc:date>2019-10-30T14:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099552#M1183403</link>
      <description>&lt;P&gt;good point &lt;/P&gt;&lt;P&gt;thanks for sharing &lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 14:41:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099552#M1183403</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2019-10-30T14:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099553#M1183404</link>
      <description>&lt;P&gt;Thank you, Edo. It helped me in 2020!&lt;/P&gt;&lt;P&gt;I must say I had to implement the event 05 as well for changes to existing data.&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 04:50:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099553#M1183404</guid>
      <dc:creator>Silva_Marcos</dc:creator>
      <dc:date>2020-05-07T04:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create View - Same table is used twice</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099554#M1183405</link>
      <description>&lt;P&gt;Thank you Edo! &lt;/P&gt;&lt;P&gt;I did exactly as you posted and it worked to perfection!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 15:31:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/create-view-same-table-is-used-twice/m-p/5099554#M1183405</guid>
      <dc:creator>rafteodoro</dc:creator>
      <dc:date>2024-01-12T15:31:14Z</dc:date>
    </item>
  </channel>
</rss>

