<?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 Using Function Module RS_CONV_EX_2_IN without a predefined structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-module-rs-conv-ex-2-in-without-a-predefined-structure/m-p/7602098#M1568450</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HELLO,&lt;/P&gt;&lt;P&gt;In a SDN Blog  I have seen the FM 'RS_CONV_EX_2_IN' can be used to convert formatted char value to float.&lt;/P&gt;&lt;P&gt;I am trying this FM to convert some data but the final data format does not belong to an existing structure.&lt;/P&gt;&lt;P&gt;I have tried to define within the code but I keep getting  a 15 return code (invalid name)&lt;/P&gt;&lt;P&gt;What is wrong? Does this FM need a predefined structure to work?&lt;/P&gt;&lt;P&gt;Here is a code sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPES: BEGIN OF OUT_PUT_TYPE_STRUC,&lt;/P&gt;&lt;P&gt;                value TYPE F,&lt;/P&gt;&lt;P&gt;         END OF OUT_PUT_TYPE_STRUC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_tabfield-tabname   = 'OUT_PUT_TYPE_STRUC'.&lt;/P&gt;&lt;P&gt;lv_tabfield-fieldname = 'VALUE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS lv_value TYPE crm_imp_cell_value OBLIGATORY. u201CCHAR30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RS_CONV_EX_2_IN'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    input_external               = lv_value&lt;/P&gt;&lt;P&gt;    table_field                  = lv_tabfield&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    output_internal              = lv_cell_value&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    input_not_numerical          = 1&lt;/P&gt;&lt;P&gt;    too_many_decimals            = 2&lt;/P&gt;&lt;P&gt;    more_than_one_sign           = 3&lt;/P&gt;&lt;P&gt;    ill_thousand_separator_dist  = 4&lt;/P&gt;&lt;P&gt;    too_many_digits              = 5&lt;/P&gt;&lt;P&gt;    sign_for_unsigned            = 6&lt;/P&gt;&lt;P&gt;    too_large                    = 7&lt;/P&gt;&lt;P&gt;    too_small                    = 8&lt;/P&gt;&lt;P&gt;    invalid_date_format          = 9&lt;/P&gt;&lt;P&gt;    invalid_date                 = 10&lt;/P&gt;&lt;P&gt;    invalid_time_format          = 11&lt;/P&gt;&lt;P&gt;    invalid_time                 = 12&lt;/P&gt;&lt;P&gt;    invalid_hex_digit            = 13&lt;/P&gt;&lt;P&gt;    unexpected_error             = 14&lt;/P&gt;&lt;P&gt;    invalid_fieldname            = 15&lt;/P&gt;&lt;P&gt;    field_and_descr_incompatible = 16&lt;/P&gt;&lt;P&gt;    input_too_long               = 17&lt;/P&gt;&lt;P&gt;    no_decimals                  = 18&lt;/P&gt;&lt;P&gt;    invalid_float                = 19&lt;/P&gt;&lt;P&gt;    conversion_exit_error        = 20&lt;/P&gt;&lt;P&gt;    OTHERS                       = 21.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Dec 2010 02:15:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-12-31T02:15:56Z</dc:date>
    <item>
      <title>Using Function Module RS_CONV_EX_2_IN without a predefined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-module-rs-conv-ex-2-in-without-a-predefined-structure/m-p/7602098#M1568450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HELLO,&lt;/P&gt;&lt;P&gt;In a SDN Blog  I have seen the FM 'RS_CONV_EX_2_IN' can be used to convert formatted char value to float.&lt;/P&gt;&lt;P&gt;I am trying this FM to convert some data but the final data format does not belong to an existing structure.&lt;/P&gt;&lt;P&gt;I have tried to define within the code but I keep getting  a 15 return code (invalid name)&lt;/P&gt;&lt;P&gt;What is wrong? Does this FM need a predefined structure to work?&lt;/P&gt;&lt;P&gt;Here is a code sample:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  TYPES: BEGIN OF OUT_PUT_TYPE_STRUC,&lt;/P&gt;&lt;P&gt;                value TYPE F,&lt;/P&gt;&lt;P&gt;         END OF OUT_PUT_TYPE_STRUC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lv_tabfield-tabname   = 'OUT_PUT_TYPE_STRUC'.&lt;/P&gt;&lt;P&gt;lv_tabfield-fieldname = 'VALUE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS lv_value TYPE crm_imp_cell_value OBLIGATORY. u201CCHAR30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RS_CONV_EX_2_IN'&lt;/P&gt;&lt;P&gt;  EXPORTING&lt;/P&gt;&lt;P&gt;    input_external               = lv_value&lt;/P&gt;&lt;P&gt;    table_field                  = lv_tabfield&lt;/P&gt;&lt;P&gt;  IMPORTING&lt;/P&gt;&lt;P&gt;    output_internal              = lv_cell_value&lt;/P&gt;&lt;P&gt;  EXCEPTIONS&lt;/P&gt;&lt;P&gt;    input_not_numerical          = 1&lt;/P&gt;&lt;P&gt;    too_many_decimals            = 2&lt;/P&gt;&lt;P&gt;    more_than_one_sign           = 3&lt;/P&gt;&lt;P&gt;    ill_thousand_separator_dist  = 4&lt;/P&gt;&lt;P&gt;    too_many_digits              = 5&lt;/P&gt;&lt;P&gt;    sign_for_unsigned            = 6&lt;/P&gt;&lt;P&gt;    too_large                    = 7&lt;/P&gt;&lt;P&gt;    too_small                    = 8&lt;/P&gt;&lt;P&gt;    invalid_date_format          = 9&lt;/P&gt;&lt;P&gt;    invalid_date                 = 10&lt;/P&gt;&lt;P&gt;    invalid_time_format          = 11&lt;/P&gt;&lt;P&gt;    invalid_time                 = 12&lt;/P&gt;&lt;P&gt;    invalid_hex_digit            = 13&lt;/P&gt;&lt;P&gt;    unexpected_error             = 14&lt;/P&gt;&lt;P&gt;    invalid_fieldname            = 15&lt;/P&gt;&lt;P&gt;    field_and_descr_incompatible = 16&lt;/P&gt;&lt;P&gt;    input_too_long               = 17&lt;/P&gt;&lt;P&gt;    no_decimals                  = 18&lt;/P&gt;&lt;P&gt;    invalid_float                = 19&lt;/P&gt;&lt;P&gt;    conversion_exit_error        = 20&lt;/P&gt;&lt;P&gt;    OTHERS                       = 21.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Dec 2010 02:15:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-module-rs-conv-ex-2-in-without-a-predefined-structure/m-p/7602098#M1568450</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-31T02:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using Function Module RS_CONV_EX_2_IN without a predefined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-module-rs-conv-ex-2-in-without-a-predefined-structure/m-p/7602099#M1568451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the documentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The parameter OUTPUT_EXTERNAL must have the technical attributes of the ABAP Dictionary field specified in TABLE_FIELD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Functionality
Converts field contents from an external format (INPUT_EXTERNAL) into an internal format (OUTPUT_EXTERNAL). The parameter OUTPUT_EXTERNAL must have the technical attributes of the ABAP Dictionary field specified in TABLE_FIELD. The field INPUT_EXTERNAL must be a character field. It may have any length, but may not be filled to a greater length than that of OUTPUT_INTERNAL (this leads to the exception INPUT_TOO_LONG).&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use a structure, you will get an output but no values will be stored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jovito.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Dec 2010 03:00:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-module-rs-conv-ex-2-in-without-a-predefined-structure/m-p/7602099#M1568451</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-31T03:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using Function Module RS_CONV_EX_2_IN without a predefined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-module-rs-conv-ex-2-in-without-a-predefined-structure/m-p/7602100#M1568452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Jovito,&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;But the  out-put variable has the right type.&lt;/P&gt;&lt;P&gt;Here is the complete code that you can try.&lt;/P&gt;&lt;P&gt;I have tried two way for the input param.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lv_cell_value  TYPE f.
DATA lv_tabfield    TYPE tabfield.
DATA lv_value    TYPE char30 value '44,5'.

TYPES: BEGIN OF out_put_type_struc,
              value TYPE f,
       END OF out_put_type_struc.

lv_tabfield-tabname   = 'OUT_PUT_TYPE_STRUC'.
lv_tabfield-fieldname = 'VALUE'.

*PARAMETERS lv_value TYPE Char40 OBLIGATORY.

CALL FUNCTION 'RS_CONV_EX_2_IN'
  EXPORTING
    input_external               = lv_value
    table_field                  = lv_tabfield
  IMPORTING
    output_internal              = lv_cell_value
  EXCEPTIONS
    input_not_numerical          = 1
    too_many_decimals            = 2
    more_than_one_sign           = 3
    ill_thousand_separator_dist  = 4
    too_many_digits              = 5
    sign_for_unsigned            = 6
    too_large                    = 7
    too_small                    = 8
    invalid_date_format          = 9
    invalid_date                 = 10
    invalid_time_format          = 11
    invalid_time                 = 12
    invalid_hex_digit            = 13
    unexpected_error             = 14
    invalid_fieldname            = 15
    field_and_descr_incompatible = 16
    input_too_long               = 17
    no_decimals                  = 18
    invalid_float                = 19
    conversion_exit_error        = 20
    OTHERS                       = 21.

IF sy-subrc = 0 .
  WRITE lv_cell_value.
ELSE.
  WRITE: / 'error ' , sy-subrc.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Jan 2011 16:07:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-module-rs-conv-ex-2-in-without-a-predefined-structure/m-p/7602100#M1568452</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-01T16:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using Function Module RS_CONV_EX_2_IN without a predefined structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-module-rs-conv-ex-2-in-without-a-predefined-structure/m-p/7602101#M1568453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I meant to say was that according to the definition of the FM, the Structure &lt;STRONG&gt;table_field&lt;/STRONG&gt; has to have a table / field combination that exists in the ABAP dictionary i.e. SE16.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since it does not exist, you are getting sy-subrc = 15.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace the below code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lv_tabfield-tabname = 'OUT_PUT_TYPE_STRUC'.
lv_tabfield-fieldname = 'VALUE'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;With new code.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;lv_tabfield-tabname   = 'PGPL'.
lv_tabfield-fieldname = 'ABSAT'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, change the value of &lt;STRONG&gt;lv_value&lt;/STRONG&gt; from &lt;STRONG&gt;44,5&lt;/STRONG&gt; to &lt;STRONG&gt;44.5&lt;/STRONG&gt;.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lv_value    TYPE char30 VALUE '44.5'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will see the output.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;4.4500000000000000E+01&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jovito.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jan 2011 02:17:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-function-module-rs-conv-ex-2-in-without-a-predefined-structure/m-p/7602101#M1568453</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-03T02:17:17Z</dc:date>
    </item>
  </channel>
</rss>

