<?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: Table-driven combination categorization in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950914#M1488690</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wanted to post a conclusion to this question.  I was able to successfully implement this design to solve the requirement.  Thank you for the suggestion to solve my question regarding concatenating the codes into a look-up key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Jul 2010 19:55:26 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-06T19:55:26Z</dc:date>
    <item>
      <title>Table-driven combination categorization</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950909#M1488685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a working report that has a gt_vbap internal table with only two columns; VBELN and MVGR3.  A given order (VBELN) can have multiple rows in gt_vbap for a combination of kits (a MVGR3 code is used to represent each kit) that might be bought on each order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(ex:)&lt;/P&gt;&lt;P&gt;&lt;U&gt;VBELN	    MVGR3&lt;/U&gt;&lt;/P&gt;&lt;P&gt;187037934	BKS&lt;/P&gt;&lt;P&gt;187037934	&lt;/P&gt;&lt;P&gt;187037936	JBU&lt;/P&gt;&lt;P&gt;187037936	&lt;/P&gt;&lt;P&gt;187037937	JBU&lt;/P&gt;&lt;P&gt;187037937	&lt;/P&gt;&lt;P&gt;187037937	SLC&lt;/P&gt;&lt;P&gt;187037937	DGC&lt;/P&gt;&lt;P&gt;187037937	TOC&lt;/P&gt;&lt;P&gt;187037938	JBU&lt;/P&gt;&lt;P&gt;187037938	&lt;/P&gt;&lt;P&gt;187037938	SLC&lt;/P&gt;&lt;P&gt;187037938	SPC&lt;/P&gt;&lt;P&gt;187037938	DGC&lt;/P&gt;&lt;P&gt;187037938	DTC&lt;/P&gt;&lt;P&gt;187037938	ORC&lt;/P&gt;&lt;P&gt;187037938	TOC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The report currently turns "on" a global variable flag for each MVGR3 that it finds per order and initializes the flags before the next VBELN set.&lt;/P&gt;&lt;P&gt;It then goes into a complex hard-coded IF THEN ELSE perform that has an IF clause for each possible combination of kits, using the flags to see which combination was ordered.  That perform also assigns a NUMBER to that "group" or combination.  That number is then used in another perform with hard-coded IF logic to give a unique NAME to the combination.  To write the report, the number/name rows (or different combinations) then become aggregated for sales of different types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The psuedo-code for all this is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clear each MVGR3 flag.&lt;/P&gt;&lt;P&gt;Loop at gt_vbap using field symbols to assign 'X' to flag for each found MVGR3.&lt;/P&gt;&lt;P&gt;At end of vbeln:&lt;/P&gt;&lt;P&gt;    perform get_group&lt;/P&gt;&lt;P&gt;    perform assign_description (takes the number from the group and gives a description)&lt;/P&gt;&lt;P&gt;    clear each MVGR3 flag.&lt;/P&gt;&lt;P&gt;ENDAT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;FORM GET_GROUP&lt;/P&gt;&lt;P&gt;    (contains a separate IF clause for each possible combination of MVGR3 values&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rob Burbank on Jun 16, 2010 3:45 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 19:30:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950909#M1488685</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-16T19:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: Table-driven combination categorization</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950910#M1488686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;am trying to design a way to replace all that hard-coded IF logic in the performs with a new custom table containing the numbers (there are just over a hundred combinations, but this will grow), the names of the kit combinations, and the MVGR3 (material group 3) codes that make up each valid combination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this is what I was thinking of.  Using a custom table will require less programming when valid kits are added or changed from our sales lineup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;z_kit_group_desc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Group	Desc              Col1	Col2	Col3	Col4	Col5	Col6	Col7&lt;/P&gt;&lt;P&gt;17           Only BKE	BKE						&lt;/P&gt;&lt;P&gt;18	        BKE plus	BKE	SLC					&lt;/P&gt;&lt;P&gt;u2026								&lt;/P&gt;&lt;P&gt;79	        Large Group BKE        SLC	ORC	DGC	DTC	SPC	&lt;/P&gt;&lt;P&gt;80           Big Group	BKE	SLC	ORC	DGC	DTC	SPC	TOC&lt;/P&gt;&lt;P&gt;								&lt;/P&gt;&lt;P&gt;Sorry for all that background, but here is the problem:  How can I match up the internal table gt_vbap values for each VBLEN with the new custom table "z_kit_group_desc" (not yet defined) to give a number/description group to each ordered combination?  I'm not sure how to find the proper row from my new custom table using the combination of rows from the internal table that make up the combinations on each order.  Table gt_vbap MVGR3 values do not occur in any particular order, but are part of a finite combination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Jeremy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 19:46:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950910#M1488686</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-16T19:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Table-driven combination categorization</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950911#M1488687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeremy - please note that there is a 2,500 character limit to posts in this forum. In the future, try to trim you message and post only the relevant parts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 19:48:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950911#M1488687</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-16T19:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Table-driven combination categorization</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950912#M1488688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, given that design, add a 'search string' field to your custom table which is populated by your entry transaction logic or built into your table maintenance logic.  Presumably, the 'group' description is not dependent on the order of your MG3 values, so you need to generate the search string field value based on a simple alpha sort or by reading another table that identifies the proper sort value for each MG3.  Then, you simply determine the search string value for the entries in your order (using LOOP...CONCATENATE...SPLIT INTO TABLE...SORT...LOOP...CONCATENATE or some other approach) and select from your Z-table using the resulting search string value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 20:26:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950912#M1488688</guid>
      <dc:creator>brad_bohn</dc:creator>
      <dc:date>2010-06-16T20:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Table-driven combination categorization</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950913#M1488689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the suggestions.  I'll investigate and apply that method.  I'm not a very senior abaper, so I am probably suggesting a rather elementary design, but it was the first approach I thought of to make the report easier to maintain.  Thank you and I'll check back to this thread with my progress.&lt;/P&gt;&lt;P&gt;(Moderators, sorry about the lack of formatting in my question, and the &amp;gt; 2500 character limit.  I couldn't figure out how to keep the original formatting in my question).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Jun 2010 13:46:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950913#M1488689</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-06-17T13:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: Table-driven combination categorization</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950914#M1488690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wanted to post a conclusion to this question.  I was able to successfully implement this design to solve the requirement.  Thank you for the suggestion to solve my question regarding concatenating the codes into a look-up key.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jul 2010 19:55:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/table-driven-combination-categorization/m-p/6950914#M1488690</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-06T19:55:26Z</dc:date>
    </item>
  </channel>
</rss>

