<?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 Help with Parameter in Function Module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-parameter-in-function-module/m-p/3315038#M794037</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I'm developing a Function, where i have the follwoing code for encrypting a field value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;***********************************************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local Interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(INPUT)&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(OUTPUT)&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;  DATA: o_encryptor        TYPE REF TO cl_hard_wired_encryptor,&lt;/P&gt;&lt;P&gt;        o_cx_encrypt_error TYPE REF TO cx_encrypt_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: v_ac_string  TYPE string ,&lt;/P&gt;&lt;P&gt;        v_ac_xstring TYPE xstring,&lt;/P&gt;&lt;P&gt;        v_en_string  TYPE string,&lt;/P&gt;&lt;P&gt;        v_en_xstring TYPE xstring,&lt;/P&gt;&lt;P&gt;        v_de_string  TYPE string,&lt;/P&gt;&lt;P&gt;        v_de_xstring TYPE string,&lt;/P&gt;&lt;P&gt;        v_error_msg  TYPE string.&lt;/P&gt;&lt;P&gt;______________________________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  v_ac_string = INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TRY.&lt;/P&gt;&lt;P&gt;      CALL METHOD o_encryptor-&amp;gt;encrypt_string2string&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          the_string = v_ac_string&lt;/P&gt;&lt;P&gt;        RECEIVING&lt;/P&gt;&lt;P&gt;          result     = v_en_string.&lt;/P&gt;&lt;P&gt;    CATCH cx_encrypt_error INTO o_cx_encrypt_error.&lt;/P&gt;&lt;P&gt;      CALL METHOD o_cx_encrypt_error-&amp;gt;if_message~get_text&lt;/P&gt;&lt;P&gt;        RECEIVING&lt;/P&gt;&lt;P&gt;          result = v_error_msg.&lt;/P&gt;&lt;P&gt;      MESSAGE v_error_msg TYPE 'E'.&lt;/P&gt;&lt;P&gt;  ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Function module is free from any syntax error, but When i execute the function, i get the following message&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error analysis&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    An exception occurred that is explained in detail below.&lt;/P&gt;&lt;P&gt;    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not&lt;/P&gt;&lt;P&gt;     caught in&lt;/P&gt;&lt;P&gt;    procedure "CONVERSION_EXIT_TEST3_INPUT" "(FUNCTION)", nor was it propagated by&lt;/P&gt;&lt;P&gt;     a RAISING clause.&lt;/P&gt;&lt;P&gt;    Since the caller of the procedure could not have anticipated that the&lt;/P&gt;&lt;P&gt;    exception would occur, the current program is terminated.&lt;/P&gt;&lt;P&gt;    The reason for the exception is:&lt;/P&gt;&lt;P&gt;    You attempted to use a 'NULL' object reference (points to 'nothing')&lt;/P&gt;&lt;P&gt;    access a component (variable: "O_ENCRYPTOR").&lt;/P&gt;&lt;P&gt;    An object reference must point to an object (an instance of a class)&lt;/P&gt;&lt;P&gt;    before it can be used to access components.&lt;/P&gt;&lt;P&gt;    Either the reference was never set or it was set to 'NULL' using the&lt;/P&gt;&lt;P&gt;    CLEAR statement.&lt;/P&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Now my question is how should i declare the INPUT Parameter, meaning what TYPE or TYPE REF TO&lt;/STRONG&gt;    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinldy try this code and pass on some solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solutions will be rewarded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jan 2008 15:37:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-01-28T15:37:31Z</dc:date>
    <item>
      <title>Help with Parameter in Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-parameter-in-function-module/m-p/3315038#M794037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I'm developing a Function, where i have the follwoing code for encrypting a field value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;***********************************************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local Interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(INPUT)&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(OUTPUT)&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;  DATA: o_encryptor        TYPE REF TO cl_hard_wired_encryptor,&lt;/P&gt;&lt;P&gt;        o_cx_encrypt_error TYPE REF TO cx_encrypt_error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: v_ac_string  TYPE string ,&lt;/P&gt;&lt;P&gt;        v_ac_xstring TYPE xstring,&lt;/P&gt;&lt;P&gt;        v_en_string  TYPE string,&lt;/P&gt;&lt;P&gt;        v_en_xstring TYPE xstring,&lt;/P&gt;&lt;P&gt;        v_de_string  TYPE string,&lt;/P&gt;&lt;P&gt;        v_de_xstring TYPE string,&lt;/P&gt;&lt;P&gt;        v_error_msg  TYPE string.&lt;/P&gt;&lt;P&gt;______________________________________________________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  v_ac_string = INPUT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TRY.&lt;/P&gt;&lt;P&gt;      CALL METHOD o_encryptor-&amp;gt;encrypt_string2string&lt;/P&gt;&lt;P&gt;        EXPORTING&lt;/P&gt;&lt;P&gt;          the_string = v_ac_string&lt;/P&gt;&lt;P&gt;        RECEIVING&lt;/P&gt;&lt;P&gt;          result     = v_en_string.&lt;/P&gt;&lt;P&gt;    CATCH cx_encrypt_error INTO o_cx_encrypt_error.&lt;/P&gt;&lt;P&gt;      CALL METHOD o_cx_encrypt_error-&amp;gt;if_message~get_text&lt;/P&gt;&lt;P&gt;        RECEIVING&lt;/P&gt;&lt;P&gt;          result = v_error_msg.&lt;/P&gt;&lt;P&gt;      MESSAGE v_error_msg TYPE 'E'.&lt;/P&gt;&lt;P&gt;  ENDTRY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*******************************************************************************************************************&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Function module is free from any syntax error, but When i execute the function, i get the following message&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*********************************************************************&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error analysis&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;    An exception occurred that is explained in detail below.&lt;/P&gt;&lt;P&gt;    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not&lt;/P&gt;&lt;P&gt;     caught in&lt;/P&gt;&lt;P&gt;    procedure "CONVERSION_EXIT_TEST3_INPUT" "(FUNCTION)", nor was it propagated by&lt;/P&gt;&lt;P&gt;     a RAISING clause.&lt;/P&gt;&lt;P&gt;    Since the caller of the procedure could not have anticipated that the&lt;/P&gt;&lt;P&gt;    exception would occur, the current program is terminated.&lt;/P&gt;&lt;P&gt;    The reason for the exception is:&lt;/P&gt;&lt;P&gt;    You attempted to use a 'NULL' object reference (points to 'nothing')&lt;/P&gt;&lt;P&gt;    access a component (variable: "O_ENCRYPTOR").&lt;/P&gt;&lt;P&gt;    An object reference must point to an object (an instance of a class)&lt;/P&gt;&lt;P&gt;    before it can be used to access components.&lt;/P&gt;&lt;P&gt;    Either the reference was never set or it was set to 'NULL' using the&lt;/P&gt;&lt;P&gt;    CLEAR statement.&lt;/P&gt;&lt;P&gt;**********************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Now my question is how should i declare the INPUT Parameter, meaning what TYPE or TYPE REF TO&lt;/STRONG&gt;    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinldy try this code and pass on some solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solutions will be rewarded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2008 15:37:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-parameter-in-function-module/m-p/3315038#M794037</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-28T15:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Parameter in Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-parameter-in-function-module/m-p/3315039#M794038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        I am away from my system.. but looking at ur req .. Its feels like you are not handling the exception in some of the FM or the method you are calling.. handle the exception your issue will be resolved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2008 15:40:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-parameter-in-function-module/m-p/3315039#M794038</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-01-28T15:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Parameter in Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-parameter-in-function-module/m-p/3315040#M794039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if i use the same code in se38, its working fine. But my requirement is to use the code in a function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now i have not defined any &lt;STRONG&gt;TYPE&lt;/STRONG&gt; or &lt;STRONG&gt;TYPE REF TO&lt;/STRONG&gt; in the Importing Parameter &lt;STRONG&gt;INPUT&lt;/STRONG&gt; . Looks like the System looks for it to be referenced to some thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So &lt;STRONG&gt;what should i Rererence the parameter INPUT to&lt;/STRONG&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using the code,,,,, you will get the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2008 16:11:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-parameter-in-function-module/m-p/3315040#M794039</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-28T16:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Parameter in Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-parameter-in-function-module/m-p/3315041#M794040</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 your problem does not come from FM parameters but from the fact you are calling a method on an object (o_encryptor) that you never created before that !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You delcared the data but never used the CREATE OBJECT statement...&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;Nicolas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2008 16:37:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-parameter-in-function-module/m-p/3315041#M794040</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-28T16:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Parameter in Function Module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-parameter-in-function-module/m-p/3315042#M794041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nicolas....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You solved my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2008 16:42:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-with-parameter-in-function-module/m-p/3315042#M794041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-01-28T16:42:39Z</dc:date>
    </item>
  </channel>
</rss>

