<?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: conversion problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-problem/m-p/2420201#M540254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the statement CONCATENATE to add zeros before the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTESTE1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: NUMBER(10) TYPE C VALUE '80000004'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS: C_00(2) TYPE C VALUE '00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE C_00 NUMBER INTO NUMBER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result will be '0080000004' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To correct the date follow the example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: V_DATE_XL(8) TYPE C VALUE '20070626',&lt;/P&gt;&lt;P&gt;           V_DAY(2) TYPE C,&lt;/P&gt;&lt;P&gt;           V_MONTH(2) TYPE C,&lt;/P&gt;&lt;P&gt;           V_YEAR(4) TYPE C,&lt;/P&gt;&lt;P&gt;          V_FINAL_DATE(8) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V_YEAR = V_DATE_XL(4).&lt;/P&gt;&lt;P&gt;V_MONTH = V_DATE_XL+4(2).&lt;/P&gt;&lt;P&gt;V_DAY = V_DATE_XL+6(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE V_DAY V_MONTH V_YEAR INTO V_FINAL_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result will be '26062007'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2007 16:51:06 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-25T16:51:06Z</dc:date>
    <item>
      <title>conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-problem/m-p/2420199#M540252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i am updating one ztable from xlfile.&lt;/P&gt;&lt;P&gt;in that xl file i have fields like vbeln and some date fields.&lt;/P&gt;&lt;P&gt;i uploaded file by using alsm_exel_to_internal table.&lt;/P&gt;&lt;P&gt;1   &amp;gt;   the ex: vbeln length is 10 in database.&lt;/P&gt;&lt;P&gt;but in file i have vbeln value like 80000004.&lt;/P&gt;&lt;P&gt;when i updated this one this value is going to that z table same as 80000004.&lt;/P&gt;&lt;P&gt;after updating the table.&lt;/P&gt;&lt;P&gt;i am trying to fetch the that vbeln value it is not comming?.&lt;/P&gt;&lt;P&gt;2  &amp;gt; now i tried like this 0080000004 in file i am getting correct.&lt;/P&gt;&lt;P&gt;and getiing correct value when i fetched.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to correct the 80000004 to 0080000004 before update?&lt;/P&gt;&lt;P&gt;how to tell the user to enter 10 digit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;comming to date part.&lt;/P&gt;&lt;P&gt;in file yyyymmdd .&lt;/P&gt;&lt;P&gt;it will working correct.&lt;/P&gt;&lt;P&gt;if i get the date ddmmyyyy in file how to handle this one?&lt;/P&gt;&lt;P&gt;pls clarify?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 16:33:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-problem/m-p/2420199#M540252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T16:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-problem/m-p/2420200#M540253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;If you declare the internal table data same as Ztable fields with 10 char for Vbeln it is updated with 10 characters only.&lt;/P&gt;&lt;P&gt;You might have used as eight char field in internal table&lt;/P&gt;&lt;P&gt;Similarly take date field as sy-datum and in the formay YYYYMMDD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then the data is correctly uploaded into the databse table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points for useful Answers&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 16:42:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-problem/m-p/2420200#M540253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T16:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-problem/m-p/2420201#M540254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this can help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the statement CONCATENATE to add zeros before the field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZTESTE1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: NUMBER(10) TYPE C VALUE '80000004'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONSTANTS: C_00(2) TYPE C VALUE '00'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE C_00 NUMBER INTO NUMBER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result will be '0080000004' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To correct the date follow the example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: V_DATE_XL(8) TYPE C VALUE '20070626',&lt;/P&gt;&lt;P&gt;           V_DAY(2) TYPE C,&lt;/P&gt;&lt;P&gt;           V_MONTH(2) TYPE C,&lt;/P&gt;&lt;P&gt;           V_YEAR(4) TYPE C,&lt;/P&gt;&lt;P&gt;          V_FINAL_DATE(8) TYPE C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;V_YEAR = V_DATE_XL(4).&lt;/P&gt;&lt;P&gt;V_MONTH = V_DATE_XL+4(2).&lt;/P&gt;&lt;P&gt;V_DAY = V_DATE_XL+6(2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE V_DAY V_MONTH V_YEAR INTO V_FINAL_DATE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result will be '26062007'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if helpful please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 16:51:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-problem/m-p/2420201#M540254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T16:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-problem/m-p/2420202#M540255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Venkat,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Converting your field to 10 digits before uploading. You can do that in excel itself. Select the whole column. Right Click. Format Cells. Custom and type in 10 zeros.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date format: Convert your date to  yyyymmdd using FM's. Search the forum for "convert date to external" and you will get the required FM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aneesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2007 17:04:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-problem/m-p/2420202#M540255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-25T17:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: conversion problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-problem/m-p/2420203#M540256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i am uploading the file from xl file.&lt;/P&gt;&lt;P&gt;in that 1 st field is vbeln.&lt;/P&gt;&lt;P&gt;posnr ,matnr.&lt;/P&gt;&lt;P&gt;vbeln is charecter.&lt;/P&gt;&lt;P&gt;vbeln length is 10 but i got in file 8&lt;/P&gt;&lt;P&gt;8000064  i want to do like this before updating 008000064.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;posnr is numeric that y they r taking zeros in right side.&lt;/P&gt;&lt;P&gt;posnr is length is 6 but i got 2.&lt;/P&gt;&lt;P&gt;in the file is 10 after uploading to internal table it will becomming 000010.&lt;/P&gt;&lt;P&gt;i want to that value 10.&lt;/P&gt;&lt;P&gt;same in matnr value.&lt;/P&gt;&lt;P&gt;how can i resolve this one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 09:11:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-problem/m-p/2420203#M540256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T09:11:39Z</dc:date>
    </item>
  </channel>
</rss>

