<?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 Incorrect Nesting, before the statement ENDFUNCTION in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128928#M111190</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this simple ABAP program, but I don't seem to make it work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_SAP_GET_CREDIT.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Interfase local&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(CLIENT_ID) TYPE  Z_CLIENT_ID OPTIONAL&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(CREDIT_LIMIT) TYPE  STRING&lt;/P&gt;&lt;P&gt;*"     VALUE(CONDITIONS) TYPE  STRING&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      USER_DOES_NOT_EXIST&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF credit_eq_type,&lt;/P&gt;&lt;P&gt;         WEBTR  TYPE string,&lt;/P&gt;&lt;P&gt;         ZTERM  TYPE int4,&lt;/P&gt;&lt;P&gt;       END OF credit_eq_type .&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;DATA: credit_eq TYPE credit_eq_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;FROM KNB1&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF credit_eq&lt;/P&gt;&lt;P&gt;WHERE KUNNR = CLIENT_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*CREDIT_LIMIT = credit_eq-WEBTR.&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;I get this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incorrect Nesting, before the statement "ENDFUNCTION", the structure introduced by SELECT must conclude with "END SELECT"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've done selects before and it wasn't needed.... what is this?&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;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Feb 2006 23:04:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-02-23T23:04:24Z</dc:date>
    <item>
      <title>Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128928#M111190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this simple ABAP program, but I don't seem to make it work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_SAP_GET_CREDIT.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Interfase local&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(CLIENT_ID) TYPE  Z_CLIENT_ID OPTIONAL&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(CREDIT_LIMIT) TYPE  STRING&lt;/P&gt;&lt;P&gt;*"     VALUE(CONDITIONS) TYPE  STRING&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      USER_DOES_NOT_EXIST&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF credit_eq_type,&lt;/P&gt;&lt;P&gt;         WEBTR  TYPE string,&lt;/P&gt;&lt;P&gt;         ZTERM  TYPE int4,&lt;/P&gt;&lt;P&gt;       END OF credit_eq_type .&lt;/P&gt;&lt;P&gt;      &lt;/P&gt;&lt;P&gt;DATA: credit_eq TYPE credit_eq_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;FROM KNB1&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF credit_eq&lt;/P&gt;&lt;P&gt;WHERE KUNNR = CLIENT_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*CREDIT_LIMIT = credit_eq-WEBTR.&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;I get this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incorrect Nesting, before the statement "ENDFUNCTION", the structure introduced by SELECT must conclude with "END SELECT"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've done selects before and it wasn't needed.... what is this?&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;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2006 23:04:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128928#M111190</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-23T23:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128929#M111191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THIS LOOKS OK, THE ONLY THING i CAN THINK OF IS THAT YOU HAVE ANOTHER FUNCTION MODULE IN THE SAME FUNCTION GROUP WHCIH HAS THE ERROR.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2006 23:14:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128929#M111191</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-02-23T23:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128930#M111192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, I don't know why, but I placed two definitions on the DATA section and it did compile and activated... however it won't work, it shows an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"One of the statements could no be executed. Following a SELECT statement, the data READ could not be placed in AN output area"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know it's a matter of a conversion. probably due to incompatibility from the WEBTR field on KBN1 (seems to be on currency) into String... which datatype should be suitable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Feb 2006 23:23:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128930#M111192</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-23T23:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128931#M111193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use:&lt;/P&gt;&lt;P&gt;WEBTR TYPE webtr,   &lt;/P&gt;&lt;P&gt;ZTERM TYPE dzterm,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 00:12:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128931#M111193</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-02-24T00:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128932#M111194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even though you are specifying SELECT SINGLE * in your code, you are not providing the full key of KNB1 which also includes company code BUKRS. So system expects either a ENDSELECT or your INTO statement to be followed by TABLE itab instead of just INTO strcuture. That is why you got this error. So either do option 1 or 2 as follows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Option 1&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES: BEGIN OF credit_eq_type,
         WEBTR LIKE KNB1-WEBTR,
         ZTERM LIKE KNB1-ZTERM,
       END OF credit_eq_type .

DATA: credit_eq TYPE TABLE OF credit_eq_type with header line.

SELECT SINGLE webtr zterm FROM KNB1
                          INTO TABLE credit_eq
                         WHERE KUNNR = CLIENT_ID.

*CREDIT_LIMIT = credit_eq-WEBTR.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Option 2&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES: BEGIN OF credit_eq_type,
         WEBTR LIKE KNB1-WEBTR,
         ZTERM LIKE KNB1-ZTERM,
       END OF credit_eq_type .

DATA: credit_eq TYPE credit_eq_type.

SELECT webtr zterm FROM KNB1 UP TO 1 ROWS
                   INTO credit_eq
                  WHERE KUNNR = CLIENT_ID.
ENDSELECT.
*CREDIT_LIMIT = credit_eq-WEBTR.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;u&amp;gt;Option 3&amp;lt;/u&amp;gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TYPES: BEGIN OF credit_eq_type,
         WEBTR LIKE KNB1-WEBTR,
         ZTERM LIKE KNB1-ZTERM,
       END OF credit_eq_type .

DATA: credit_eq TYPE credit_eq_type.

SELECT SINGLE webtr zterm FROM KNB1
                          INTO Credit_eq
                         WHERE KUNNR = CLIENT_ID
                           AND BUKRS = &amp;lt;either constant 
or another import parameter from the function module&amp;gt;.

*CREDIT_LIMIT = credit_eq-WEBTR.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3rd option is the best one if you have BUKRS. In the case where you don't have BUKRS, use the option 1. Option 2 is least efficient. &amp;lt;b&amp;gt;But in any case, please do not use SELECT * with INTO CORRESPONDING FIELDS when you need only two fields. Instead specify the fields AND yes you cannot use INTO with incompatable fields. They have to be compatible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Srinivas Adavi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 05:20:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128932#M111194</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-24T05:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128933#M111195</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;FROM KNB1&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS &amp;lt;b&amp;gt;OF credit_eq&amp;lt;/b&amp;gt;WHERE KUNNR = CLIENT_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IN THE ABOVE STATEMENT, &amp;lt;b&amp;gt;IF CREDIT_EQ IS A TABLE&amp;lt;/b&amp;gt;, U NEED TO GIVE OF TABLE&lt;/P&gt;&lt;P&gt;LIKE BELOW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;FROM KNB1&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS &amp;lt;b&amp;gt;OF TABLE credit_eq&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;WHERE KUNNR = CLIENT_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;IF ITS IS WORK AREA, U NEED TO GIVE END SELECT.&amp;lt;/b&amp;gt; LIKE BELOW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;FROM KNB1&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF credit_eq&lt;/P&gt;&lt;P&gt;WHERE KUNNR = CLIENT_ID.&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;END SELECT.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 05:32:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128933#M111195</guid>
      <dc:creator>hymavathi_oruganti</dc:creator>
      <dc:date>2006-02-24T05:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128934#M111196</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;For declaration,just try this.&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF credit_eq_type,&lt;/P&gt;&lt;P&gt;WEBTR TYPE knb1-webtr,&lt;/P&gt;&lt;P&gt;ZTERM TYPE knb1-zterm,&lt;/P&gt;&lt;P&gt;END OF credit_eq_type .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In export parameters also,change the type&lt;/P&gt;&lt;P&gt;credit_limit type knb1-webtr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 05:42:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128934#M111196</guid>
      <dc:creator>jayanthi_jayaraman</dc:creator>
      <dc:date>2006-02-24T05:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128935#M111197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Srinivas and Hymavathi,&lt;/P&gt;&lt;P&gt;Select single NEVER needs an ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 05:49:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128935#M111197</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2006-02-24T05:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128936#M111198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes niel u r right, sorry i was little confused&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 05:53:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128936#M111198</guid>
      <dc:creator>hymavathi_oruganti</dc:creator>
      <dc:date>2006-02-24T05:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128937#M111199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my final code, with no syntax errors:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_SAP_GET_CREDIT.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Interfase local&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(CLIENT_ID) TYPE  Z_CLIENT_ID OPTIONAL&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(CREDIT_LIMIT) TYPE  KNB1-WEBTR&lt;/P&gt;&lt;P&gt;*"     VALUE(CONDITIONS) TYPE  KNB1-ZTERM&lt;/P&gt;&lt;P&gt;*"  EXCEPTIONS&lt;/P&gt;&lt;P&gt;*"      USER_DOES_NOT_EXIST&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TYPES: BEGIN OF credit_eq_type,&lt;/P&gt;&lt;P&gt;         WEBTR  LIKE KNB1-WEBTR,&lt;/P&gt;&lt;P&gt;         ZTERM  LIKE KNB1-ZTERM,&lt;/P&gt;&lt;P&gt;       END OF credit_eq_type .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: credit_eq TYPE  credit_eq_type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS BU LIKE KNB1-BUKRS value 'FSMX'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT SINGLE WEBTR ZTERM&lt;/P&gt;&lt;P&gt;FROM KNB1&lt;/P&gt;&lt;P&gt;INTO credit_eq&lt;/P&gt;&lt;P&gt;WHERE KUNNR = CLIENT_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CREDIT_LIMIT = credit_eq-WEBTR.&lt;/P&gt;&lt;P&gt;CONDITIONS = credit_eq-ZTERM.&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;It does compile, however, when I execute it, it returns me 0.00 for CREDIT_LIMIT and Nothing for CONDITIONS. I check out the table and there is data for that client, any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 15:20:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128937#M111199</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-24T15:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128938#M111200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure that you are handling the internal format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure that CLIENT_ID contains data that is zero filled left.  Like '0000012345'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can handle this in the function module if you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add the following function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

TYPES: BEGIN OF credit_eq_type,
WEBTR LIKE KNB1-WEBTR,
ZTERM LIKE KNB1-ZTERM,
END OF credit_eq_type .

DATA: credit_eq TYPE credit_eq_type.

CONSTANTS BU LIKE KNB1-BUKRS value 'FSMX'.

&amp;lt;b&amp;gt;call function 'CONVERSION_EXIT_ALPHA_INPUT'
  exporting
    input         = CLIENT_ID
 IMPORTING
   OUTPUT        = CLIENT_ID.&amp;lt;/b&amp;gt;

SELECT SINGLE WEBTR ZTERM
FROM KNB1
INTO credit_eq
WHERE KUNNR = CLIENT_ID.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REgard,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 15:26:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128938#M111200</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-02-24T15:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128939#M111201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How is  Z_CLIENT_ID Typed?  You may be able to handle this if  Z_CLIENT_ID is typed correctly.  I hope that it is at least a 10 character field.  Otherwise, the funciton module will work for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 15:28:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128939#M111201</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-02-24T15:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128940#M111202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Put a break point in the FM,&amp;amp; see whether the data is populating from your select statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 15:30:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128940#M111202</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-24T15:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128941#M111203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Z_CLIENT_ID is an INT4 with length 10. I placed the code you suggested:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    input         = CLIENT_ID&lt;/P&gt;&lt;P&gt; IMPORTING&lt;/P&gt;&lt;P&gt;   OUTPUT        = CLIENT_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I get this runtime error: OBJECTS NOT_CHAR_LIKE&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 15:36:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128941#M111203</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-24T15:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128942#M111204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; Can you move the valur into a char variable &amp;amp; use FM 'CONVERSION_EXIT_ALPHA_INPUT' ,&amp;amp; then pass it to your select.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 15:39:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128942#M111204</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-24T15:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128943#M111205</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;Please define Z_CLIENT_Id as Charcter type. Then your code will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lanka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 15:42:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128943#M111205</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-24T15:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128944#M111206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Excelent.... working good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 15:45:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128944#M111206</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-24T15:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128945#M111207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have made client_id optional. I don't think it should be. Are you sure you passed a valid value to it? Are you getting an exception?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 15:50:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128945#M111207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-24T15:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect Nesting, before the statement ENDFUNCTION</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128946#M111208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;optional yes, however, I tried non-optional and it wouldn't work =(. Since it's working now, I believe I'll leave it that way, thaks Rob!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Feb 2006 15:51:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/incorrect-nesting-before-the-statement-endfunction/m-p/1128946#M111208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-02-24T15:51:28Z</dc:date>
    </item>
  </channel>
</rss>

