<?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 Please Help - 0 values query in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-0-values-query/m-p/1956017#M393469</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am currently doing some work on zero billed quantity items on invoices (i.e VBRP-FKIMG).  I am trying to NOT print any items which have been zero picked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code in my SapScript to check if the value is zero is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DEFINE &amp;amp;V_VALUE&amp;amp; :=&amp;amp;VBDPR-FKIMG(T)&amp;amp;
DEFINE &amp;amp;V_CHECK&amp;amp; := ''             
PERFORM CHECK IN PROGRAM Z_ZERO    
USING &amp;amp;V_VALUE&amp;amp;                    
CHANGING &amp;amp;V_CHECK&amp;amp;                 
ENDPERFORM                         
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the Z_ZERO program is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT Z_ZERO.

FORM check TABLES in_par STRUCTURE itcsy
                  out_par STRUCTURE itcsy.

DATA: v_fkimg TYPE vbrp-fkimg.

  READ TABLE in_par WITH KEY 'V_VALUE'.
  CHECK sy-subrc = 0.
  v_fkimg = in_par-value.
  READ TABLE out_par WITH KEY 'V_CHECK'.
  CHECK sy-subrc = 0.

 IF v_fkimg IS INITIAL.
    out_par-value = 'X'.
    MODIFY out_par INDEX sy-tabix.
  ENDIF.

ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These works fine for most invoices but occasionally we seem to be getting quantities like 0,000 which is 0 but the code is short dumping at v_fkimg = in_par-value.  We added in the (T) part on the SapScript to get rid of the commas when the figure was over 1,000 but itdoesn't seem to be happeningm for 0,000 values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shed any light on this matter, as I am finding it hard to de-bug or replicate in DEV as it only happens very rarely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Feb 2007 09:46:16 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-15T09:46:16Z</dc:date>
    <item>
      <title>Please Help - 0 values query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-0-values-query/m-p/1956017#M393469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am currently doing some work on zero billed quantity items on invoices (i.e VBRP-FKIMG).  I am trying to NOT print any items which have been zero picked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code in my SapScript to check if the value is zero is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DEFINE &amp;amp;V_VALUE&amp;amp; :=&amp;amp;VBDPR-FKIMG(T)&amp;amp;
DEFINE &amp;amp;V_CHECK&amp;amp; := ''             
PERFORM CHECK IN PROGRAM Z_ZERO    
USING &amp;amp;V_VALUE&amp;amp;                    
CHANGING &amp;amp;V_CHECK&amp;amp;                 
ENDPERFORM                         
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and the Z_ZERO program is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT Z_ZERO.

FORM check TABLES in_par STRUCTURE itcsy
                  out_par STRUCTURE itcsy.

DATA: v_fkimg TYPE vbrp-fkimg.

  READ TABLE in_par WITH KEY 'V_VALUE'.
  CHECK sy-subrc = 0.
  v_fkimg = in_par-value.
  READ TABLE out_par WITH KEY 'V_CHECK'.
  CHECK sy-subrc = 0.

 IF v_fkimg IS INITIAL.
    out_par-value = 'X'.
    MODIFY out_par INDEX sy-tabix.
  ENDIF.

ENDFORM.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These works fine for most invoices but occasionally we seem to be getting quantities like 0,000 which is 0 but the code is short dumping at v_fkimg = in_par-value.  We added in the (T) part on the SapScript to get rid of the commas when the figure was over 1,000 but itdoesn't seem to be happeningm for 0,000 values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone shed any light on this matter, as I am finding it hard to de-bug or replicate in DEV as it only happens very rarely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 09:46:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-0-values-query/m-p/1956017#M393469</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T09:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help - 0 values query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-0-values-query/m-p/1956018#M393470</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;Try by Changing  the declaration of V_fkimg TYPE vbrp-fkimg to CHAR field of 13 .&lt;/P&gt;&lt;P&gt;Generally In_par and Out_par will take CHAR Data types only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 09:56:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-0-values-query/m-p/1956018#M393470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T09:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help - 0 values query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-0-values-query/m-p/1956019#M393471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed it to &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: v_fkimg(13) TYPE c&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this now doesn't pass normal 0.000 values through. V_VALUE is 0.000 but when it gets to v_fkimg = in_par-value, the v_fkimg field just stays blank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 10:13:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-0-values-query/m-p/1956019#M393471</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T10:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Please Help - 0 values query</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-0-values-query/m-p/1956020#M393472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try this --&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: v_dec(13),&lt;/P&gt;&lt;P&gt;v_mantissa(3),&lt;/P&gt;&lt;P&gt;v_amount2(16).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: v_amount like VBRP-FKIMG.&lt;/P&gt;&lt;P&gt;move v_amount to v_amount2.&lt;/P&gt;&lt;P&gt;split v_amount2 at '.' into v_dec v_mantissa.  (Separator will depend on user parameters though)&lt;/P&gt;&lt;P&gt;You can then check on v_dec variable for non zero value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Meena&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 11:00:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/please-help-0-values-query/m-p/1956020#M393472</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T11:00:45Z</dc:date>
    </item>
  </channel>
</rss>

