<?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: Converting type P to type C in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-type-p-to-type-c/m-p/6669085#M1447615</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;What is your requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Mar 2010 03:56:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-01T03:56:50Z</dc:date>
    <item>
      <title>Converting type P to type C</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-type-p-to-type-c/m-p/6669084#M1447614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having some trouble converting some data from type P to type C.  I am only new to abap so please bear with me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two variables&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA gv_shifttime TYPE p.
DATA lv_shifttime type c.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do some calculations and put the result in gv_shifttime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I run the code&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
lv_shifttime = gv_shifttime.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;all I get in lv_shifttime is *&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Mar 2010 03:51:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-type-p-to-type-c/m-p/6669084#M1447614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-01T03:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Converting type P to type C</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-type-p-to-type-c/m-p/6669085#M1447615</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;What is your requirement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Mar 2010 03:56:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-type-p-to-type-c/m-p/6669085#M1447615</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-01T03:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Converting type P to type C</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-type-p-to-type-c/m-p/6669086#M1447616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to build the Commentary for my ALV tree so that I can include the input values when it is printed.  I want to include this value in the Commentary&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Mar 2010 04:01:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-type-p-to-type-c/m-p/6669086#M1447616</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-01T04:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Converting type P to type C</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-type-p-to-type-c/m-p/6669087#M1447617</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;So why do you want to convert a packed type into character type? Can't you display directly, i mean to say, can't you directly add it to commentery directly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or is there any necessicity that you need to convert it in character format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, when you define character type variable you need to spcify length, otherwise it takes default length which is 1 in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to define your variable as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA lv_shifttime type char10.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It defines variable lv_shifttime with length 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Archana&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Mar 2010 04:09:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-type-p-to-type-c/m-p/6669087#M1447617</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-01T04:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Converting type P to type C</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/converting-type-p-to-type-c/m-p/6669088#M1447618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see what the problem was now.  When I was adding it directly I could see no value in the print preview or when I paused the program and looked at the variable, this was because the commentary info field is 60 characters long. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was converting it to a character format so I could try different things to get it working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But your advice has solved my problem, thankyou.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Mar 2010 04:25:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/converting-type-p-to-type-c/m-p/6669088#M1447618</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-01T04:25:50Z</dc:date>
    </item>
  </channel>
</rss>

