<?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: functional module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module/m-p/7466980#M1554615</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi praveen8470,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no function module required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can declare the variable as TYPE N. This is Numerical Character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best thing is to use an existing data element. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are not coming from stone age, you will use SE80 object explorer for all your development. You have a big button on the left "Repository info system". Push ist, expand the tree for dictionary, choose data elements, enter 10 for the length and NUMC for the datatype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Press F8 and choose what fits your need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare variable as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lv_numchar type NUMC10.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data type NUMC uses an implicit Input/Output conversion: For Input, leading zeros are added. For output, they are removed.&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;Clemens&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 04 Dec 2010 15:55:54 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2010-12-04T15:55:54Z</dc:date>
    <item>
      <title>functional module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module/m-p/7466978#M1554613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi everybody.....!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;               I 'm new to abap programming. My question is, if we declare a variable of 10 character size and if we pass a number of four digits, the output should display like this 0000001234. for getting this as the output, which functional module has to be used. Actually how to know abt the different functional modules which are allready predefined?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;Moderator message: please search for available information/documentation before asking, these forums are not a replacement for ABAP training, use meaningful subject lines when posting, please read the rules of engagement.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Thomas Zloch on Dec 4, 2010 9:52 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Dec 2010 06:15:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module/m-p/7466978#M1554613</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-04T06:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: functional module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module/m-p/7466979#M1554614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are several methods to add leading zeroes.&lt;/P&gt;&lt;P&gt;1. Function Module CONVERSION_EXIT_ALPHA_INPUT&lt;/P&gt;&lt;P&gt;2. OVERLAY command&lt;/P&gt;&lt;P&gt;3. UNPACK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: v_char TYPE char10.

v_char = '1234'

" Using UNPACK command which unpacks the field by adding leading zeroes
UNPACK v_char TO v_char.

" Using Function Module
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
 EXPORTING
   INPUT = v_char
 IMPORTING
   OUTPUT = v_char.

"Using OVERLAY
SHIFT v_char RIGHT DELETING TRAILING SPACE. "adds six preceeding space characters
OVERLAY v_char WITH '0000000000'.  "replace space characters with zero
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Dec 2010 13:38:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module/m-p/7466979#M1554614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-12-04T13:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: functional module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module/m-p/7466980#M1554615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi praveen8470,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;no function module required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can declare the variable as TYPE N. This is Numerical Character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best thing is to use an existing data element. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are not coming from stone age, you will use SE80 object explorer for all your development. You have a big button on the left "Repository info system". Push ist, expand the tree for dictionary, choose data elements, enter 10 for the length and NUMC for the datatype.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Press F8 and choose what fits your need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare variable as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lv_numchar type NUMC10.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data type NUMC uses an implicit Input/Output conversion: For Input, leading zeros are added. For output, they are removed.&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;Clemens&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;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Dec 2010 15:55:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/functional-module/m-p/7466980#M1554615</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2010-12-04T15:55:54Z</dc:date>
    </item>
  </channel>
</rss>

