<?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: Odata Association without common key fields in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-association-without-common-key-fields/m-p/745305#M35712</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I used below code and now I am getting output thanks for your response.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;method VENDOR_DETAILSSE_GET_ENTITY.&lt;BR /&gt; DATA: LS_KEY TYPE /IWBEP/S_MGW_NAME_VALUE_PAIR,&lt;BR /&gt; lt_ekko TYPE TABLE OF zsw_ekko,&lt;BR /&gt; ls_ekko TYPE zsw_ekko,&lt;BR /&gt; lt_lfa1 TYPE TABLE OF zsw_lfa1,&lt;BR /&gt; ls_lfa1 TYPE zsw_lfa1.&lt;BR /&gt; TYPES: BEGIN OF TY_S_TAB,&lt;BR /&gt; EBELN TYPE ZSW_EKKO-EBELN,&lt;BR /&gt; LIFNR TYPE ZSW_LFA1-LIFNR,&lt;BR /&gt; NAME1 TYPE ZSW_LFA1-NAME1,&lt;BR /&gt; NAME2 TYPE ZSW_LFA1-NAME2,&lt;BR /&gt; ORT01 TYPE ZSW_LFA1-ORT01,&lt;BR /&gt; STRAS TYPE ZSW_LFA1-STRAS,&lt;BR /&gt; END OF TY_S_TAB.&lt;BR /&gt; DATA LS_ENTITY TYPE TY_S_TAB.&lt;BR /&gt; DATA LT_ENTITY TYPE TABLE OF TY_S_TAB.&lt;BR /&gt; READ TABLE IT_KEY_TAB INTO LS_KEY INDEX 1.&lt;BR /&gt; IF LS_KEY-NAME = 'Lifnr'.&lt;BR /&gt; &lt;BR /&gt; SELECT SINGLE * FROM ZSW_LFA1 INTO CORRESPONDING FIELDS OF ER_ENTITY WHERE LIFNR EQ LS_KEY-VALUE.&lt;BR /&gt; ENDIF.&lt;BR /&gt; IF LS_KEY-NAME = 'Ebeln'.&lt;BR /&gt; SELECT SINGLE * FROM zsw_ekko INTO CORRESPONDING FIELDS OF ls_ekko WHERE ebeln eq ls_key-value.&lt;BR /&gt; SELECT SINGLE * FROM ZSW_LFA1 INTO CORRESPONDING FIELDS OF ER_ENTITY WHERE lifnr eq ls_ekko-lifnr.&lt;BR /&gt; ENDIF.&lt;BR /&gt; &lt;BR /&gt; endmethod.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Sep 2018 11:20:33 GMT</pubDate>
    <dc:creator>gopalmishra673</dc:creator>
    <dc:date>2018-09-23T11:20:33Z</dc:date>
    <item>
      <title>Odata Association without common key fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-association-without-common-key-fields/m-p/745302#M35709</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Hi, I am creating a association in Odata using my two custom tables say ZSW_EKKO and ZSW_LFA1 but there is no common key in these tables.&lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;ZSW_EKKO&lt;/STRONG&gt;:-MANDT, EBELN, BUKRS, BSART ,LIFNR. (EBELN is key)&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;&lt;STRONG&gt;ZSW_LFA1&lt;/STRONG&gt;:-MANDT, LIFNR ,NAME1, NAME2, ORT01, STRAS. (LIFNR is key)&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;I am writing below code in my get entity method of dependent entityset. It is not working for EBELN value. Can any one suggest how to solve it.&lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;method VENDOR_DETAILSSE_GET_ENTITY.&lt;BR /&gt; DATA LS_KEY TYPE /IWBEP/S_MGW_NAME_VALUE_PAIR.&lt;BR /&gt; TYPES: BEGIN OF TY_S_TAB,&lt;BR /&gt; EBELN TYPE ZSW_EKKO-EBELN,&lt;BR /&gt; LIFNR TYPE ZSW_LFA1-LIFNR,&lt;BR /&gt; NAME1 TYPE ZSW_LFA1-NAME1,&lt;BR /&gt; NAME2 TYPE ZSW_LFA1-NAME2,&lt;BR /&gt; ORT01 TYPE ZSW_LFA1-ORT01,&lt;BR /&gt; STRAS TYPE ZSW_LFA1-STRAS,&lt;BR /&gt; END OF TY_S_TAB.&lt;BR /&gt; DATA LS_ENTITY TYPE TY_S_TAB.&lt;BR /&gt; DATA LT_ENTITY TYPE TABLE OF TY_S_TAB.&lt;BR /&gt; READ TABLE IT_KEY_TAB INTO LS_KEY INDEX 1.&lt;BR /&gt; IF LS_KEY-NAME = 'Lifnr'.&lt;BR /&gt; &lt;BR /&gt; SELECT SINGLE * FROM ZSW_LFA1 INTO CORRESPONDING FIELDS OF ER_ENTITY WHERE LIFNR EQ LS_KEY-VALUE.&lt;BR /&gt; ENDIF.&lt;BR /&gt; IF LS_KEY-NAME = 'Ebeln'.&lt;BR /&gt; SELECT ZSW_EKKO~EBELN&lt;BR /&gt; ZSW_LFA1~LIFNR&lt;BR /&gt; ZSW_LFA1~NAME1&lt;BR /&gt; ZSW_LFA1~NAME2&lt;BR /&gt; ZSW_LFA1~ORT01&lt;BR /&gt; ZSW_LFA1~STRAS&lt;BR /&gt; FROM ZSW_EKKO INNER JOIN ZSW_LFA1&lt;BR /&gt; ON ZSW_EKKO~LIFNR EQ ZSW_LFA1~LIFNR&lt;BR /&gt; INTO TABLE LT_ENTITY.&lt;BR /&gt; &lt;BR /&gt; READ TABLE LT_ENTITY INTO LS_ENTITY INDEX 1.&lt;BR /&gt; MOVE-CORRESPONDING LS_ENTITY TO ER_ENTITY.&lt;BR /&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt; &lt;/P&gt;
  &lt;P&gt;ENDIF.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 10:28:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/odata-association-without-common-key-fields/m-p/745302#M35709</guid>
      <dc:creator>gopalmishra673</dc:creator>
      <dc:date>2018-09-23T10:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Odata Association without common key fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-association-without-common-key-fields/m-p/745303#M35710</link>
      <description>&lt;P&gt;Hi Gopal,&lt;/P&gt;
  &lt;P&gt;Please can you redifine method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET and write the same code there and check whether it is working for EBELN.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 10:43:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/odata-association-without-common-key-fields/m-p/745303#M35710</guid>
      <dc:creator>former_member540475</dc:creator>
      <dc:date>2018-09-23T10:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Odata Association without common key fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-association-without-common-key-fields/m-p/745304#M35711</link>
      <description>&lt;P&gt;Hi Urvashi,&lt;/P&gt;
  &lt;P&gt;Can you please clear my one doubt. Is it possible to create association between two odata structures which do not have common key fields? &lt;/P&gt;
  &lt;P&gt;If it is not possible than I am doing wrong approach. Please guide me.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 11:07:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/odata-association-without-common-key-fields/m-p/745304#M35711</guid>
      <dc:creator>gopalmishra673</dc:creator>
      <dc:date>2018-09-23T11:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Odata Association without common key fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-association-without-common-key-fields/m-p/745305#M35712</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I used below code and now I am getting output thanks for your response.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;method VENDOR_DETAILSSE_GET_ENTITY.&lt;BR /&gt; DATA: LS_KEY TYPE /IWBEP/S_MGW_NAME_VALUE_PAIR,&lt;BR /&gt; lt_ekko TYPE TABLE OF zsw_ekko,&lt;BR /&gt; ls_ekko TYPE zsw_ekko,&lt;BR /&gt; lt_lfa1 TYPE TABLE OF zsw_lfa1,&lt;BR /&gt; ls_lfa1 TYPE zsw_lfa1.&lt;BR /&gt; TYPES: BEGIN OF TY_S_TAB,&lt;BR /&gt; EBELN TYPE ZSW_EKKO-EBELN,&lt;BR /&gt; LIFNR TYPE ZSW_LFA1-LIFNR,&lt;BR /&gt; NAME1 TYPE ZSW_LFA1-NAME1,&lt;BR /&gt; NAME2 TYPE ZSW_LFA1-NAME2,&lt;BR /&gt; ORT01 TYPE ZSW_LFA1-ORT01,&lt;BR /&gt; STRAS TYPE ZSW_LFA1-STRAS,&lt;BR /&gt; END OF TY_S_TAB.&lt;BR /&gt; DATA LS_ENTITY TYPE TY_S_TAB.&lt;BR /&gt; DATA LT_ENTITY TYPE TABLE OF TY_S_TAB.&lt;BR /&gt; READ TABLE IT_KEY_TAB INTO LS_KEY INDEX 1.&lt;BR /&gt; IF LS_KEY-NAME = 'Lifnr'.&lt;BR /&gt; &lt;BR /&gt; SELECT SINGLE * FROM ZSW_LFA1 INTO CORRESPONDING FIELDS OF ER_ENTITY WHERE LIFNR EQ LS_KEY-VALUE.&lt;BR /&gt; ENDIF.&lt;BR /&gt; IF LS_KEY-NAME = 'Ebeln'.&lt;BR /&gt; SELECT SINGLE * FROM zsw_ekko INTO CORRESPONDING FIELDS OF ls_ekko WHERE ebeln eq ls_key-value.&lt;BR /&gt; SELECT SINGLE * FROM ZSW_LFA1 INTO CORRESPONDING FIELDS OF ER_ENTITY WHERE lifnr eq ls_ekko-lifnr.&lt;BR /&gt; ENDIF.&lt;BR /&gt; &lt;BR /&gt; endmethod.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 11:20:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/odata-association-without-common-key-fields/m-p/745305#M35712</guid>
      <dc:creator>gopalmishra673</dc:creator>
      <dc:date>2018-09-23T11:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Odata Association without common key fields</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/odata-association-without-common-key-fields/m-p/745306#M35713</link>
      <description>&lt;P&gt;Hi Gopal ,&lt;/P&gt;
  &lt;P&gt;I don't know your exact requirement but there may not be any referential constraint (no common key among all these) but still the association holds true.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;You need to create association and navigation properties. Then you need to implement the create_deep_entity method in order to receive your payload and create a sales order. You can check this link on &lt;A href="https://blogs.sap.com/2014/04/27/step-by-step-development-guide-for-createdeepentity-operation/" target="test_blank"&gt;https://blogs.sap.com/2014/04/27/step-by-step-development-guide-for-createdeepentity-operation/&lt;/A&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Sep 2018 11:33:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/odata-association-without-common-key-fields/m-p/745306#M35713</guid>
      <dc:creator>former_member540475</dc:creator>
      <dc:date>2018-09-23T11:33:02Z</dc:date>
    </item>
  </channel>
</rss>

