<?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: check not triggering in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-triggering/m-p/3979325#M950458</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;    now it is triggering error message. but now the problem is it is displaying message even when the quantity is ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think there need to do some conversion from char to packed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because if i give   IF i_dynfields-fieldvalue = 0, in the below code, it is giving the error message for all values of fieldvalue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_dynfields WHERE fieldname EQ 'COWB_COMP-MATNR'.&lt;/P&gt;&lt;P&gt;    IF i_dynfields-fieldvalue IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      READ TABLE i_dynfields WITH KEY fieldname = 'COWB_COMP-ERFMG'&lt;/P&gt;&lt;P&gt;                                      stepl = i_dynfields-stepl.&lt;/P&gt;&lt;P&gt;      IF i_dynfields-fieldvalue = 0.  "OR&lt;/P&gt;&lt;P&gt;        MESSAGE e004(zmsg2) WITH 'Quantity cannot be zero or empty'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 21 Jun 2008 10:50:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-21T10:50:29Z</dc:date>
    <item>
      <title>check not triggering</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-triggering/m-p/3979324#M950457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;     I want to put check on quantity field of goods movement screen of co11n transaction if material exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the fiedexit &amp;amp; below code to read values &amp;amp; put check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: i_dynfields TYPE TABLE OF dynpread WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        num TYPE i,&lt;/P&gt;&lt;P&gt;        v_erfmg TYPE mb_erfmg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DO 11 TIMES.&lt;/P&gt;&lt;P&gt;    num = sy-index.&lt;/P&gt;&lt;P&gt;    i_dynfields-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;    i_dynfields-stepl     = num.&lt;/P&gt;&lt;P&gt;    APPEND i_dynfields.&lt;/P&gt;&lt;P&gt;    i_dynfields-fieldname = 'ERFMG'.&lt;/P&gt;&lt;P&gt;    i_dynfields-stepl     = num.&lt;/P&gt;&lt;P&gt;    APPEND i_dynfields.&lt;/P&gt;&lt;P&gt;  ENDDO.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt; ENDIF.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'DYNP_VALUES_READ'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      dyname                         = 'SAPLCOWB'&lt;/P&gt;&lt;P&gt;      dynumb                         = '0500'&lt;/P&gt;&lt;P&gt;   translate_to_upper             = 'X'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  REQUEST                        = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PERFORM_CONVERSION_EXITS       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  PERFORM_INPUT_CONVERSION       = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  DETERMINE_LOOP_INDEX           = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      dynpfields                     = i_dynfields&lt;/P&gt;&lt;P&gt; EXCEPTIONS&lt;/P&gt;&lt;P&gt;   invalid_abapworkarea           = 1&lt;/P&gt;&lt;P&gt;   invalid_dynprofield            = 2&lt;/P&gt;&lt;P&gt;   invalid_dynproname             = 3&lt;/P&gt;&lt;P&gt;   invalid_dynpronummer           = 4&lt;/P&gt;&lt;P&gt;   invalid_request                = 5&lt;/P&gt;&lt;P&gt;   no_fielddescription            = 6&lt;/P&gt;&lt;P&gt;   invalid_parameter              = 7&lt;/P&gt;&lt;P&gt;   undefind_error                 = 8&lt;/P&gt;&lt;P&gt;   double_conversion              = 9&lt;/P&gt;&lt;P&gt;   stepl_not_found                = 10&lt;/P&gt;&lt;P&gt;   OTHERS                         = 11&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT i_dynfields.&lt;/P&gt;&lt;P&gt;    IF i_dynfields-fieldname = 'MATNR'.&lt;/P&gt;&lt;P&gt;      IF i_dynfields-fieldvalue IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;        READ TABLE i_dynfields WITH KEY fieldname = 'ERFMG'&lt;/P&gt;&lt;P&gt;                                        stepl = num.&lt;/P&gt;&lt;P&gt;        IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;          IF i_dynfields-fieldvalue = 0 OR&lt;/P&gt;&lt;P&gt;             i_dynfields-fieldvalue = space.&lt;/P&gt;&lt;P&gt;            MESSAGE e004(zmsg2) WITH 'Quantity cannot be zero or empty'.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this is not executing the error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pls tell me where it is wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 05:59:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-triggering/m-p/3979324#M950457</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T05:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: check not triggering</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-triggering/m-p/3979325#M950458</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;    now it is triggering error message. but now the problem is it is displaying message even when the quantity is ne 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think there need to do some conversion from char to packed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because if i give   IF i_dynfields-fieldvalue = 0, in the below code, it is giving the error message for all values of fieldvalue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_dynfields WHERE fieldname EQ 'COWB_COMP-MATNR'.&lt;/P&gt;&lt;P&gt;    IF i_dynfields-fieldvalue IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;      READ TABLE i_dynfields WITH KEY fieldname = 'COWB_COMP-ERFMG'&lt;/P&gt;&lt;P&gt;                                      stepl = i_dynfields-stepl.&lt;/P&gt;&lt;P&gt;      IF i_dynfields-fieldvalue = 0.  "OR&lt;/P&gt;&lt;P&gt;        MESSAGE e004(zmsg2) WITH 'Quantity cannot be zero or empty'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 10:50:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-triggering/m-p/3979325#M950458</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-21T10:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: check not triggering</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-triggering/m-p/3979326#M950459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;  As per ur code given as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT i_dynfields WHERE fieldname EQ 'COWB_COMP-MATNR'.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF i_dynfields-fieldvalue IS NOT INITIAL.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;READ TABLE i_dynfields WITH KEY fieldname = 'COWB_COMP-ERFMG'&lt;/P&gt;&lt;P&gt;stepl = i_dynfields-stepl.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF i_dynfields-fieldvalue = 0. "OR&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MESSAGE e004(zmsg2) WITH 'Quantity cannot be zero or empty'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If u want to display the message when fieldvalue = 0, then i think u should check ur statement after the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The statements which i have highlighted in bold is contradicting to each other.&lt;/P&gt;&lt;P&gt;Similary the fieldnames in loop statement and in read are different.&lt;/P&gt;&lt;P&gt;In ur code the loop will repeat for fieldnames only = ''COWB_COMP-MATN' and not ''COWB_COMP-ERFMG''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Reward if helpful ***&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ruby.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 21 Jun 2008 11:19:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/check-not-triggering/m-p/3979326#M950459</guid>
      <dc:creator>former_member202474</dc:creator>
      <dc:date>2008-06-21T11:19:12Z</dc:date>
    </item>
  </channel>
</rss>

