<?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 Linkage between batch number and material document in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/linkage-between-batch-number-and-material-document/m-p/8280181#M1633746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In a query that I'm writing I have batch number (MCHB-CHARG) and have to find the material document (MSEG-MBLNR) that contains this batch (to print out copy of a label that attached to the material document).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw that in MSEG there is a field of CHARG but it's not key and not in standart indexes, &lt;/P&gt;&lt;P&gt;so because it's a huge table, I don't want to do direct select from it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the other way, the field MBLNR doesn't exists in MCHA nor MCHB tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do anyone know how can I do this linkage ? is there any appropriate BAPI or standart function ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Amit Berku&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 06 Oct 2011 14:23:58 GMT</pubDate>
    <dc:creator>berkuamit</dc:creator>
    <dc:date>2011-10-06T14:23:58Z</dc:date>
    <item>
      <title>Linkage between batch number and material document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/linkage-between-batch-number-and-material-document/m-p/8280181#M1633746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In a query that I'm writing I have batch number (MCHB-CHARG) and have to find the material document (MSEG-MBLNR) that contains this batch (to print out copy of a label that attached to the material document).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw that in MSEG there is a field of CHARG but it's not key and not in standart indexes, &lt;/P&gt;&lt;P&gt;so because it's a huge table, I don't want to do direct select from it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the other way, the field MBLNR doesn't exists in MCHA nor MCHB tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do anyone know how can I do this linkage ? is there any appropriate BAPI or standart function ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Amit Berku&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2011 14:23:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/linkage-between-batch-number-and-material-document/m-p/8280181#M1633746</guid>
      <dc:creator>berkuamit</dc:creator>
      <dc:date>2011-10-06T14:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Linkage between batch number and material document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/linkage-between-batch-number-and-material-document/m-p/8280182#M1633747</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;1.   U can create  a secondary index in the table mseg with the field CHARG , LGORT . Then we can link &lt;/P&gt;&lt;P&gt;      MSEG-CHARG = MCHB-CHARG&lt;/P&gt;&lt;P&gt;      MSEG-LGORT =MCHB-LGORT&lt;/P&gt;&lt;P&gt;      Plant , material , company code , storage location  are the primary key fields of the table MCHB.&lt;/P&gt;&lt;P&gt;      The only problem with secondary index is it might increase the data load on the system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.  We can set automatic external serial number in migo but this is not a direct link&lt;/P&gt;&lt;P&gt;     &lt;A href="http://wiki.sdn.sap.com/wiki/display/ABAP/How" target="test_blank"&gt;http://wiki.sdn.sap.com/wiki/display/ABAP/How&lt;/A&gt;&lt;EM&gt;to&lt;/EM&gt;set&lt;EM&gt;automatic&lt;/EM&gt;external&lt;EM&gt;serial&lt;/EM&gt;number&lt;EM&gt;in&lt;/EM&gt;Migo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rajat Kumar Sharma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2011 15:34:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/linkage-between-batch-number-and-material-document/m-p/8280182#M1633747</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-06T15:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Linkage between batch number and material document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/linkage-between-batch-number-and-material-document/m-p/8280183#M1633748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try with the following LINKAGES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LINK1		          LNK2		        LINK3	&lt;/P&gt;&lt;P&gt;MSEG-MATNR	          MCHB-MATNR	MCH1-MATNR&lt;/P&gt;&lt;P&gt;MSEG-WERKS	          MCHB-WERKS	MCH1-CHARG&lt;/P&gt;&lt;P&gt;MSEG-LGORT	          MCHB-LGORT		&lt;/P&gt;&lt;P&gt;MSEG-CHARG	          MCHB-CHARG		&lt;/P&gt;&lt;P&gt;					&lt;/P&gt;&lt;P&gt;and GET					&lt;/P&gt;&lt;P&gt;MSEG-MBLNR				&lt;/P&gt;&lt;P&gt;MSEG-MJAHR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try it out it may work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Revert if found any alternate solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Oct 2011 18:21:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/linkage-between-batch-number-and-material-document/m-p/8280183#M1633748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-06T18:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Linkage between batch number and material document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/linkage-between-batch-number-and-material-document/m-p/8280184#M1633749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No need to create new index on such a large table like MSEG for this requirement atleast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select matnr werks lgort charg from mchb into table lt_mchb where charg = ' ...........'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * from mseg into table lt_mseg for all entries in lt_mchb&lt;/P&gt;&lt;P&gt;                     where matnr = lt_mseg-matnr.&lt;/P&gt;&lt;P&gt;                                werks = ....&lt;/P&gt;&lt;P&gt;                                lgort = ............. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will use the partial secondary index 'M' of MSEG and should be Fast enough. It is almost the same as Srikant mentioned but I don't feel the need of using MCH1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Diwakar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2011 02:18:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/linkage-between-batch-number-and-material-document/m-p/8280184#M1633749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-07T02:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: Linkage between batch number and material document</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/linkage-between-batch-number-and-material-document/m-p/8280185#M1633750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Diwakar,&lt;/P&gt;&lt;P&gt;Thank you for your quick answer, I didn't think of this direction, you solved my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regrads,&lt;/P&gt;&lt;P&gt;Amit Berku&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Oct 2011 06:18:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/linkage-between-batch-number-and-material-document/m-p/8280185#M1633750</guid>
      <dc:creator>berkuamit</dc:creator>
      <dc:date>2011-10-09T06:18:17Z</dc:date>
    </item>
  </channel>
</rss>

