<?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: Excel Problem - UOM conversion in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-problem-uom-conversion/m-p/1845974#M358908</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you coding would be something simular to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data : begin of it_bom_final occurs 0,
sort(3) type n,
matnr like mast-matnr, " Material
maktx like makt-maktx, " Material Description
bmein like stko-bmein, " UOM
bmeng like stko-bmeng, " Base Qty
matnr1 like stpox-idnrk, " BOM component
maktx1 like stpox-ojtxp, " Object description (item)
meins like stpox-meins, " Comp UOM
menge like stpox-menge, " Comp Qty / Consumption rate
ausch like stpox-ausch, " scrap percent
end of it_bom_final.


loop at it_bom_final.


  call function 'CONVERSION_EXIT_CUNIT_OUTPUT'
    exporting
      input                = itab_bom_final-bmein
*   LANGUAGE             = SY-LANGU
    importing
*   LONG_TEXT            =
      output               = itab_bom_final-bmein
*   SHORT_TEXT           =
   exceptions
     unit_not_found       = 1
     others               = 2.


  call function 'CONVERSION_EXIT_CUNIT_OUTPUT'
    exporting
      input                = itab_bom_final-meins
*   LANGUAGE             = SY-LANGU
    importing
*   LONG_TEXT            =
      output               = itab_bom_final-meins
*   SHORT_TEXT           =
   exceptions
     unit_not_found       = 1
     others               = 2.


  modify it_bom_final.

endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jan 2007 17:28:14 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-01-11T17:28:14Z</dc:date>
    <item>
      <title>Excel Problem - UOM conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-problem-uom-conversion/m-p/1845972#M358906</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;I got a internal table populated with values, in my report i got a option for report or excel. When i choose report and execute, the itab is displayed with the UNIT Of &lt;/P&gt;&lt;P&gt;Measure in english e.g CAR for Carton and PC for Piece.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However im passing the same itab to the FM 'MS_EXCEL_OLE_STANDARD_DAT'&lt;/P&gt;&lt;P&gt;But im getting the unit of measure as KAR instead of CAR and ST instead of PC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my itab structure.&lt;/P&gt;&lt;P&gt;data : begin of it_bom_final occurs 0,&lt;/P&gt;&lt;P&gt;sort(3) type n,&lt;/P&gt;&lt;P&gt;matnr  like mast-matnr,                " Material&lt;/P&gt;&lt;P&gt;maktx  like makt-maktx,                " Material Description&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;bmein  like stko-bmein,                " UOM&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;bmeng  like stko-bmeng,                " Base Qty&lt;/P&gt;&lt;P&gt;matnr1 like stpox-idnrk,               " BOM component&lt;/P&gt;&lt;P&gt;maktx1 like stpox-ojtxp,               " Object description (item)&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;meins  like stpox-meins,               " Comp UOM&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;menge  like stpox-menge,               " Comp Qty / Consumption rate&lt;/P&gt;&lt;P&gt;ausch  like stpox-ausch,               " scrap percent&lt;/P&gt;&lt;P&gt;end of it_bom_final.&lt;/P&gt;&lt;P&gt;*---&lt;/P&gt;&lt;P&gt;I need to download as CAR and PC in excel also.&lt;/P&gt;&lt;P&gt;Letme know the solution for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        senthil kumar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 17:19:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-problem-uom-conversion/m-p/1845972#M358906</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T17:19:22Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Problem - UOM conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-problem-uom-conversion/m-p/1845973#M358907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sentil,  what you are seeing here is the internal representation of the data.  Not sure why SAP does this, but sometimes, the code will have a conversion routine against it which will give a different internal code.   This is done with unit of measures and I have seen it with Order Types in SD as well.  In you case, I think it may be as easy as doing the conversion routine against the value.  Try Calling the function module  CONVERSION_EXIT_CUNIT_OUTPUT,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 17:25:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-problem-uom-conversion/m-p/1845973#M358907</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-01-11T17:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Problem - UOM conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-problem-uom-conversion/m-p/1845974#M358908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you coding would be something simular to this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zrich_0001.

data : begin of it_bom_final occurs 0,
sort(3) type n,
matnr like mast-matnr, " Material
maktx like makt-maktx, " Material Description
bmein like stko-bmein, " UOM
bmeng like stko-bmeng, " Base Qty
matnr1 like stpox-idnrk, " BOM component
maktx1 like stpox-ojtxp, " Object description (item)
meins like stpox-meins, " Comp UOM
menge like stpox-menge, " Comp Qty / Consumption rate
ausch like stpox-ausch, " scrap percent
end of it_bom_final.


loop at it_bom_final.


  call function 'CONVERSION_EXIT_CUNIT_OUTPUT'
    exporting
      input                = itab_bom_final-bmein
*   LANGUAGE             = SY-LANGU
    importing
*   LONG_TEXT            =
      output               = itab_bom_final-bmein
*   SHORT_TEXT           =
   exceptions
     unit_not_found       = 1
     others               = 2.


  call function 'CONVERSION_EXIT_CUNIT_OUTPUT'
    exporting
      input                = itab_bom_final-meins
*   LANGUAGE             = SY-LANGU
    importing
*   LONG_TEXT            =
      output               = itab_bom_final-meins
*   SHORT_TEXT           =
   exceptions
     unit_not_found       = 1
     others               = 2.


  modify it_bom_final.

endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 17:28:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-problem-uom-conversion/m-p/1845974#M358908</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-01-11T17:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Problem - UOM conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-problem-uom-conversion/m-p/1845975#M358909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is peculiar,&lt;/P&gt;&lt;P&gt;SORT	MATERIAL	UOM	QTY	BOM COMPONENT	&lt;/P&gt;&lt;P&gt;8	100026655	        CAR	1	400000972	EA&lt;/P&gt;&lt;P&gt;5	100026655	       CAR	1	400300811	LBS&lt;/P&gt;&lt;P&gt;1	100022821  	M	500	200000688	M&lt;/P&gt;&lt;P&gt;2	100051224	      CAR	1	400300816	LBS&lt;/P&gt;&lt;P&gt;1	100051224	CAR	1	200000688	M&lt;/P&gt;&lt;P&gt;3	100026655	CAR	1	400002336	PC&lt;/P&gt;&lt;P&gt;8	100026655	KAR	1	400000972	EA&lt;/P&gt;&lt;P&gt;1	100026655	KAR	1	200009715	M&lt;/P&gt;&lt;P&gt;2	100026655	KAR	1	750000078	LBS&lt;/P&gt;&lt;P&gt;3	100026655	KAR	1	400002336	ST&lt;/P&gt;&lt;P&gt;4	100026655	KAR	1	400300811	LBS&lt;/P&gt;&lt;P&gt;1	100051224	KAR	1	200000688	M&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some where its reflecting correctly and somewhere its wrong.&lt;/P&gt;&lt;P&gt;and the sort field is alinged wrongly.&lt;/P&gt;&lt;P&gt;Is it because i have moved at the top    it_bom_final-sort = sy-tabix. ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly clarify&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2007 18:08:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-problem-uom-conversion/m-p/1845975#M358909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-11T18:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Problem - UOM conversion</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/excel-problem-uom-conversion/m-p/1845976#M358910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rich, Its working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of looping at the final itab, i have loop at the initial itab and used th FM where its actually fetching the UOM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a Lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2007 06:46:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/excel-problem-uom-conversion/m-p/1845976#M358910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-12T06:46:32Z</dc:date>
    </item>
  </channel>
</rss>

