<?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: Error message with internal table values in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568720#M1565178</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;May be you can try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get all possible values in an internal table it_vals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then loop at the table and concatenate all possible values in a variable and then give the message.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
l_ps_vals(50) type C.
loop at it_vals.
 concatenate l_ps_vals it_vals-inco into l_ps_vals separated by 'AND'.
endloop.

MESSAGE 'Please Select Inco-terms' l_ps_vals.type 'E'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu Verma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Jan 2011 08:31:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-01-04T08:31:13Z</dc:date>
    <item>
      <title>Error message with internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568719#M1565177</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;&lt;/P&gt;&lt;P&gt;    I have validated the field Inco terms in tcodes me21n,me22n,me23n...&lt;/P&gt;&lt;P&gt;I have one set name with 3 inco terms values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;based on some conditions...if the user enter the inco terms value other than values which have maiantained SET...it should give the error messge with 'Please select XXXXXXXX values'. (XXXXX = all values from set).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as of now i have hardcoded as MESSAGE 'Please Select Inco-terms CPT or DAP or FCA. ' TYPE 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this not required...bcoz in feture if they will add one more value that should be also displayed in error mesgg...&lt;/P&gt;&lt;P&gt;how can i achive this.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can any body plzzz help me???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 07:59:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568719#M1565177</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-04T07:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error message with internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568720#M1565178</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;May be you can try like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Get all possible values in an internal table it_vals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then loop at the table and concatenate all possible values in a variable and then give the message.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
l_ps_vals(50) type C.
loop at it_vals.
 concatenate l_ps_vals it_vals-inco into l_ps_vals separated by 'AND'.
endloop.

MESSAGE 'Please Select Inco-terms' l_ps_vals.type 'E'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu Verma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 08:31:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568720#M1565178</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-04T08:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error message with internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568721#M1565179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi varma...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Thanks for giving your reply...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you said it is working.....but supoose if they add 10 values ..it will display like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please select a or b or c or d or e or f or like taht.....as status error message...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 09:32:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568721#M1565179</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-04T09:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error message with internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568722#M1565180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi varma,&lt;/P&gt;&lt;P&gt;          &lt;/P&gt;&lt;P&gt;         loop at LT_SETLEAF_INCO into LS_SETLEAF_INCO.&lt;/P&gt;&lt;P&gt;        if lv_MSG is not INITIAL.&lt;/P&gt;&lt;P&gt;        CONCATENATE lv_MSG  Ls_SETLEAF_INCO-valfrom into lv_MSG SEPARATED BY ' or '.&lt;/P&gt;&lt;P&gt;        else.&lt;/P&gt;&lt;P&gt;          lv_MSG = Ls_SETLEAF_INCO-valfrom.&lt;/P&gt;&lt;P&gt;          endif.&lt;/P&gt;&lt;P&gt;        endloop.&lt;/P&gt;&lt;P&gt;        CLEAR: LS_SETLEAF_INCO.&lt;/P&gt;&lt;P&gt;      CONCATENATE 'Please Select Inco-terms' lv_MSG into lv_MSG1 SEPARATED BY space.&lt;/P&gt;&lt;P&gt;      MESSAGE lv_MSG1  TYPE 'E'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please select Inco-terms CPT or A or B or C or Dor E......&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;space is not coming bt D and E? is there any restricted lenght for error message?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you plz tell me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 10:22:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568722#M1565180</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-04T10:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error message with internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568723#M1565181</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;  I think could be because you need to have space on both side of OR like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
CONCATENATE lv_MSG Ls_SETLEAF_INCO-valfrom into lv_MSG SEPARATED BY '  or  '.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i think this is not the right way because it would not be possible to accomodate all inco types if they have a lot in number.It would be better if you give a message like 'Please select a valid value from table ZTABINCO' You can also provide an F4 help of the field where the value has to be selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Himanshu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 10:27:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568723#M1565181</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-04T10:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Error message with internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568724#M1565182</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;create a message in message class...and provide a long text to the messgae..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the long text Using command--&amp;gt; Enter &amp;amp;V1&amp;amp; in symbols...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And pass the concatencated string to the message as varibale 1. and enter in the short text..please check the long text!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think it will solve the issue..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Yadesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 08:51:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568724#M1565182</guid>
      <dc:creator>former_member261876</dc:creator>
      <dc:date>2011-01-07T08:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Error message with internal table values</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568725#M1565183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Veena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just follow below mentioned steps and it should resolve your issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a message class ZE1 in SE91 and a message number as mentioned below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;001  Please Select Inco-terms &amp;amp; or &amp;amp; or &amp;amp;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;amp; in the message will hold the dynamic values of the fields you pass as mentioned below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in your program show an error mesage using statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message E001(ZE1) with &amp;lt;Field1&amp;gt; &amp;lt;Field2&amp;gt;  &amp;lt;Field3&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;Field1&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;Field2&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;lt;Field3&amp;gt;  will be name of your internal table fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Sumit Naik on Jan 7, 2011 12:41 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 11:40:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/error-message-with-internal-table-values/m-p/7568725#M1565183</guid>
      <dc:creator>former_member193284</dc:creator>
      <dc:date>2011-01-07T11:40:55Z</dc:date>
    </item>
  </channel>
</rss>

