<?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 problem with quantity field in an alv while displaying in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-quantity-field-in-an-alv-while-displaying/m-p/7913649#M1597911</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi eveyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I have one problem with quantity field in my ALV grid. I have ERFMG &amp;amp; Unit of measure fields in my ALV grid. ERFMG is of type QUAN 13 data type. My problem is while displaying ALV grid, if UOM is Meters, i have to display quantity in 3 decimal places and is UOM is in EA or PCS i have to display quantity field as Integer i.e without any decimal places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Is there any FM to convert this?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Can anyone help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jun 2011 08:57:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-06-24T08:57:40Z</dc:date>
    <item>
      <title>problem with quantity field in an alv while displaying</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-quantity-field-in-an-alv-while-displaying/m-p/7913649#M1597911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi eveyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   I have one problem with quantity field in my ALV grid. I have ERFMG &amp;amp; Unit of measure fields in my ALV grid. ERFMG is of type QUAN 13 data type. My problem is while displaying ALV grid, if UOM is Meters, i have to display quantity in 3 decimal places and is UOM is in EA or PCS i have to display quantity field as Integer i.e without any decimal places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Is there any FM to convert this?&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Can anyone help me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 08:57:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-quantity-field-in-an-alv-while-displaying/m-p/7913649#M1597911</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-24T08:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: problem with quantity field in an alv while displaying</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-quantity-field-in-an-alv-while-displaying/m-p/7913650#M1597912</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; Make the quantity field in the ALV output as character field. Depending on the UOM move it to the respective local variables and move it back to the final character field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 09:01:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-quantity-field-in-an-alv-while-displaying/m-p/7913650#M1597912</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-24T09:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: problem with quantity field in an alv while displaying</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-quantity-field-in-an-alv-while-displaying/m-p/7913651#M1597913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey You can check this out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OIB_QCI_CONVERSION_SIMPLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: If you are using ecc5.0 then this will not....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhargav&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 09:23:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-quantity-field-in-an-alv-while-displaying/m-p/7913651#M1597913</guid>
      <dc:creator>Venkat_Sesha</dc:creator>
      <dc:date>2011-06-24T09:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: problem with quantity field in an alv while displaying</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-quantity-field-in-an-alv-while-displaying/m-p/7913652#M1597914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The quantity field and the Unit have to be linked properly in the fieldcatalog for the ALV to display the quantity field value properly. Refer below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
* Quantity field - QUAN
Clear K_Fieldcat.
Add 1 to V_Pos.
K_Fieldcat-col_pos	= V_Pos.
K_Fieldcat-fieldname	= 'LFIMG'.
K_Fieldcat-qfieldname	= 'VRKME'.         " Quantity field
K_Fieldcat-quantity	= 'X'.
K_Fieldcat-qtabname	= 'I_RECORDS'.
K_Fieldcat-seltext_m	= 'Dlv. qty.'.
K_Fieldcat-ddictxt	= 'M'.
K_Fieldcat-outputlen	= 17.
Append K_Fieldcat to I_Fieldcat.

* Unit key for QUAN field - UNIT
Clear K_Fieldcat.
Add 1 to V_Pos.
K_Fieldcat-col_pos	= V_Pos.
K_Fieldcat-fieldname	= 'VRKME'.
K_Fieldcat-tabname	= 'I_RECORDS'.
K_Fieldcat-reptext_ddic = 'SU'.
K_Fieldcat-outputlen	= 3.
Append K_Fieldcat to I_Fieldcat.
Add 1 to V_Pos.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 17:16:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-quantity-field-in-an-alv-while-displaying/m-p/7913652#M1597914</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-24T17:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: problem with quantity field in an alv while displaying</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-quantity-field-in-an-alv-while-displaying/m-p/7913653#M1597915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HELLOW,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am using alv grid to display MM data , in query i m doing sum  for qnty (LMNGA), i need to display that sum in other couimn , i tried but it display only 0.00 , my query  and code is below, i relly thanks ful for help .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT A~ARBID&lt;/P&gt;&lt;P&gt;         A~BUDAT&lt;/P&gt;&lt;P&gt;         A~WERKS&lt;/P&gt;&lt;P&gt;        SUM( A~LMNGA )        -- I m displaying this field in alv grid&lt;/P&gt;&lt;P&gt;         A~AUFNR&lt;/P&gt;&lt;P&gt;         B~KDAUF&lt;/P&gt;&lt;P&gt;         B~KDPOS&lt;/P&gt;&lt;P&gt;         C~VBELN&lt;/P&gt;&lt;P&gt;         C~KUNNR&lt;/P&gt;&lt;P&gt;         D~NAME1&lt;/P&gt;&lt;P&gt;         E~MATNR&lt;/P&gt;&lt;P&gt;         F~KDKG1&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE  i_alv&lt;/P&gt;&lt;P&gt;               FROM AFRU AS A INNER JOIN AUFK AS B ON A&lt;SUB&gt;AUFNR EQ B&lt;/SUB&gt;AUFNR&lt;/P&gt;&lt;P&gt;                              INNER JOIN VBAK AS C ON B&lt;SUB&gt;KDAUF = C&lt;/SUB&gt;VBELN&lt;/P&gt;&lt;P&gt;                              INNER JOIN KNA1 AS D ON C&lt;SUB&gt;KUNNR = D&lt;/SUB&gt;KUNNR&lt;/P&gt;&lt;P&gt;                              INNER JOIN VBAP AS E ON B&lt;SUB&gt;KDAUF = E&lt;/SUB&gt;VBELN&lt;/P&gt;&lt;P&gt;                              INNER JOIN VBKD AS F ON B&lt;SUB&gt;KDAUF = F&lt;/SUB&gt;VBELN&lt;/P&gt;&lt;P&gt;   WHERE   A&lt;SUB&gt;ARBID = '10000181' AND  A&lt;/SUB&gt;BUDAT BETWEEN    PONO AND jobno&lt;/P&gt;&lt;P&gt;   GROUP BY A&lt;SUB&gt;ARBID  A&lt;/SUB&gt;BUDAT A&lt;SUB&gt;WERKS  A&lt;/SUB&gt;AUFNR B&lt;SUB&gt;KDAUF   F&lt;/SUB&gt;KDKG1   E&lt;SUB&gt;MATNR  D&lt;/SUB&gt;NAME1 C&lt;SUB&gt;KUNNR   C&lt;/SUB&gt;VBELN  B~KDPOS&lt;/P&gt;&lt;P&gt;ORDER BY B~KDPOS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;displaying the alv grid&lt;/P&gt;&lt;P&gt;FORM get_fieldcatalog.&lt;/P&gt;&lt;P&gt;  DATA: ls_fcat TYPE lvc_s_fcat.&lt;/P&gt;&lt;P&gt;  REFRESH: fieldcat.  CLEAR: ls_fcat.&lt;/P&gt;&lt;P&gt;  ls_fcat-reptext    = 'ObjectID'.&lt;/P&gt;&lt;P&gt;  ls_fcat-fieldname  = 'ARBID'.&lt;/P&gt;&lt;P&gt;  ls_fcat-ref_table  = 'I_ALV'.&lt;/P&gt;&lt;P&gt;  ls_fcat-NO_OUT = 'X'.&lt;/P&gt;&lt;P&gt;  ls_fcat-outputlen  = '18'.&lt;/P&gt;&lt;P&gt;  ls_fcat-fix_column = 'X'.&lt;/P&gt;&lt;P&gt;  ls_fcat-key        = 'X'.&lt;/P&gt;&lt;P&gt;  ls_fcat-col_pos    = '1'.&lt;/P&gt;&lt;P&gt;  REFRESH: fieldcat.  CLEAR: ls_fcat.&lt;/P&gt;&lt;P&gt;  ls_fcat-reptext    = 'ProductionOrderNo'.&lt;/P&gt;&lt;P&gt;  ls_fcat-fieldname  = 'AUFNR'.&lt;/P&gt;&lt;P&gt;  ls_fcat-ref_table  = 'I_ALV'.&lt;/P&gt;&lt;P&gt;  ls_fcat-outputlen  = '15'.&lt;/P&gt;&lt;P&gt;  ls_fcat-col_pos    = '2'.&lt;/P&gt;&lt;P&gt;  APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.&lt;/P&gt;&lt;P&gt;  ls_fcat-reptext    = 'SalesOrder'.&lt;/P&gt;&lt;P&gt;  ls_fcat-fieldname  = 'KDAUF'.&lt;/P&gt;&lt;P&gt;  ls_fcat-ref_table  = 'I_ALV'.&lt;/P&gt;&lt;P&gt;  ls_fcat-outputlen  = '10'.&lt;/P&gt;&lt;P&gt;  ls_fcat-col_pos    = '3'.&lt;/P&gt;&lt;P&gt;  APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.&lt;/P&gt;&lt;P&gt;  ls_fcat-reptext    = 'CustomerName'.&lt;/P&gt;&lt;P&gt;  ls_fcat-fieldname  = 'NAME1'.&lt;/P&gt;&lt;P&gt;  ls_fcat-ref_table  = 'I_ALV'.&lt;/P&gt;&lt;P&gt;  ls_fcat-outputlen  = '25'.&lt;/P&gt;&lt;P&gt;  ls_fcat-col_pos    = '4'.&lt;/P&gt;&lt;P&gt;  APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.&lt;/P&gt;&lt;P&gt;  ls_fcat-reptext    = 'MaterialCode'.&lt;/P&gt;&lt;P&gt;  ls_fcat-fieldname  = 'MATNR'.&lt;/P&gt;&lt;P&gt;  ls_fcat-ref_table  = 'I_ALV'.&lt;/P&gt;&lt;P&gt;  ls_fcat-outputlen  = '25'.&lt;/P&gt;&lt;P&gt;  ls_fcat-col_pos    = '5'.&lt;/P&gt;&lt;P&gt;  APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.&lt;/P&gt;&lt;P&gt;  ls_fcat-reptext    = 'KVA'.&lt;/P&gt;&lt;P&gt;  ls_fcat-fieldname  = 'KDKG1'.&lt;/P&gt;&lt;P&gt;  ls_fcat-ref_table  = 'I_ALV'.&lt;/P&gt;&lt;P&gt;  ls_fcat-outputlen  = '08'.&lt;/P&gt;&lt;P&gt;  ls_fcat-col_pos    = '6'.&lt;/P&gt;&lt;P&gt;  APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.&lt;/P&gt;&lt;P&gt;  ls_fcat-reptext    = 'Qnty'.&lt;/P&gt;&lt;P&gt;  ls_fcat-fieldname  = 'LMNGA'.                          this is the field which shows 0.00&lt;/P&gt;&lt;P&gt;  ls_fcat-ref_table  = 'I_ALV'.&lt;/P&gt;&lt;P&gt;  ls_fcat-outputlen  = '08'.&lt;/P&gt;&lt;P&gt;  ls_fcat-col_pos    = '7'.&lt;/P&gt;&lt;P&gt;  ls_fcat-DO_SUM = 'X'.&lt;/P&gt;&lt;P&gt;  APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.&lt;/P&gt;&lt;P&gt;  ls_fcat-reptext    = 'PostingDate'.&lt;/P&gt;&lt;P&gt;  ls_fcat-fieldname  = 'BUDAT'.&lt;/P&gt;&lt;P&gt;  ls_fcat-ref_table  = 'I_ALV'.&lt;/P&gt;&lt;P&gt;  ls_fcat-outputlen  = '10'.&lt;/P&gt;&lt;P&gt;  ls_fcat-fix_column = 'X'.&lt;/P&gt;&lt;P&gt;  ls_fcat-key        = 'X'.&lt;/P&gt;&lt;P&gt;  ls_fcat-col_pos    = '8'.&lt;/P&gt;&lt;P&gt;  ls_FCAT-DATATYPE = 'DATS'.&lt;/P&gt;&lt;P&gt;  ls_FCAT-INTTYPE = 'D'.&lt;/P&gt;&lt;P&gt;  ls_FCAT-INTLEN = '000008'.&lt;/P&gt;&lt;P&gt;  ls_FCAT-DD_OUTLEN = '000010'.&lt;/P&gt;&lt;P&gt;  APPEND ls_fcat TO fieldcat.  CLEAR: ls_fcat.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Oct 2011 04:55:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-with-quantity-field-in-an-alv-while-displaying/m-p/7913653#M1597915</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-22T04:55:26Z</dc:date>
    </item>
  </channel>
</rss>

