<?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 Using query for fetching values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-query-for-fetching-values/m-p/6904581#M1481915</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to ABAP and need your inputs for the below requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement:&lt;/P&gt;&lt;P&gt;*************&lt;/P&gt;&lt;P&gt;Tables: EKES,EKPO,EKBE_SC&lt;/P&gt;&lt;P&gt;EKES-ebeln,vbeln&lt;/P&gt;&lt;P&gt;EKPO-werks,ebeln,insmk&lt;/P&gt;&lt;P&gt;EKBE_SCu2014werks,erfme,ebeln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EBELN is the primary key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PO # will be coming from Legacy system and this will be mapped to E1BP2017_GM_ITEM_CREATE-PO_Number field.( IDOC Type  is MBGMCR03).We go for a customized IDOC as ZMBGMCR03. Now this PO # should be replaced by the Inbound delivery document number.( Table :EKES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One PO # may have more than one line item and have same or different delivery document number also.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;PO #                Item #           Delivery #&lt;/P&gt;&lt;P&gt;100                  10                 3000&lt;/P&gt;&lt;P&gt;100	   20	  4000&lt;/P&gt;&lt;P&gt;250	   10	  4578&lt;/P&gt;&lt;P&gt;250	   20	  4578		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WERKS,INSMK and ERFME should be fetched for the relevant PO ( Table :EKES	) and populate in the  relevant IDOC segment before IDOC creation ( BAPI_GOODSMVT_CREATE) in the FM IDOC_INPUT_MBGMCR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E1BP2017_GM_ITEM_CREATE-Plant&lt;/P&gt;&lt;P&gt;E1BP2017_GM_ITEM_CREATE--STCK_TYPE&lt;/P&gt;&lt;P&gt;E1BP2017_GM_ITEM_CREATE--ENTRY_UOM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Module name is ZIDOC_INPUT_MBGMCR  ( copy of standard FM: IDOC_INPUT_MBGMCR)	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How will I write a query (WERKS,INSMK and ERFME ) for replacement of PO # and fetching corresponding valued fro the relevant PO#?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dheepa on May 8, 2010 1:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 May 2010 05:52:00 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-05-07T05:52:00Z</dc:date>
    <item>
      <title>Using query for fetching values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-query-for-fetching-values/m-p/6904581#M1481915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to ABAP and need your inputs for the below requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Requirement:&lt;/P&gt;&lt;P&gt;*************&lt;/P&gt;&lt;P&gt;Tables: EKES,EKPO,EKBE_SC&lt;/P&gt;&lt;P&gt;EKES-ebeln,vbeln&lt;/P&gt;&lt;P&gt;EKPO-werks,ebeln,insmk&lt;/P&gt;&lt;P&gt;EKBE_SCu2014werks,erfme,ebeln&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EBELN is the primary key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PO # will be coming from Legacy system and this will be mapped to E1BP2017_GM_ITEM_CREATE-PO_Number field.( IDOC Type  is MBGMCR03).We go for a customized IDOC as ZMBGMCR03. Now this PO # should be replaced by the Inbound delivery document number.( Table :EKES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One PO # may have more than one line item and have same or different delivery document number also.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;PO #                Item #           Delivery #&lt;/P&gt;&lt;P&gt;100                  10                 3000&lt;/P&gt;&lt;P&gt;100	   20	  4000&lt;/P&gt;&lt;P&gt;250	   10	  4578&lt;/P&gt;&lt;P&gt;250	   20	  4578		&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WERKS,INSMK and ERFME should be fetched for the relevant PO ( Table :EKES	) and populate in the  relevant IDOC segment before IDOC creation ( BAPI_GOODSMVT_CREATE) in the FM IDOC_INPUT_MBGMCR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E1BP2017_GM_ITEM_CREATE-Plant&lt;/P&gt;&lt;P&gt;E1BP2017_GM_ITEM_CREATE--STCK_TYPE&lt;/P&gt;&lt;P&gt;E1BP2017_GM_ITEM_CREATE--ENTRY_UOM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function Module name is ZIDOC_INPUT_MBGMCR  ( copy of standard FM: IDOC_INPUT_MBGMCR)	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How will I write a query (WERKS,INSMK and ERFME ) for replacement of PO # and fetching corresponding valued fro the relevant PO#?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Dheepa on May 8, 2010 1:59 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 May 2010 05:52:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-query-for-fetching-values/m-p/6904581#M1481915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-05-07T05:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using query for fetching values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-query-for-fetching-values/m-p/6904582#M1481916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use BAPI "BAPI_PO_GETDETAIL" to get the required PO data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 May 2010 13:38:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-query-for-fetching-values/m-p/6904582#M1481916</guid>
      <dc:creator>dirk_freyaldenhoven</dc:creator>
      <dc:date>2010-05-08T13:38:46Z</dc:date>
    </item>
  </channel>
</rss>

