<?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: data type decleration for date field while running bdc in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208103#M1377215</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thankyou&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Oct 2009 05:03:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-10-27T05:03:18Z</dc:date>
    <item>
      <title>data type decleration for date field while running bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208095#M1377207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have  query regarding data type of date field while running bdc.&lt;/P&gt;&lt;P&gt;Like for e.g&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data : budat type bseg-budat. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of that we have to write budat1(6)  type  c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you try with type budat than the upload of data is not proper while uploading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know that what is the reason.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vipul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 10:35:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208095#M1377207</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-25T10:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: data type decleration for date field while running bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208096#M1377208</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;It depends on the date format from the source your are uploading and using in the BDC. If the date format is anything other than YYYYMMDD, you will have to upload using budat1(6) type c and do the necessary conversions before using it in the BDC field. That must  be the reason why you are using budat1(6) type c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the date format is YYYYDDMM directly in the upload file, you can use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data : budat type bseg-budat. 
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vikranth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 10:40:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208096#M1377208</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-25T10:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: data type decleration for date field while running bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208097#M1377209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;type d has internal representation which is not accepted by reports. They expect a human readable date format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;convert those with the &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;write ...  to ... DD/MM/YYYY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; stetement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 10:54:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208097#M1377209</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2009-09-25T10:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: data type decleration for date field while running bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208098#M1377210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For a BDC the date is expected in a format as per the user settings.&lt;/P&gt;&lt;P&gt;While getting the date from the flat file get it into a variable of type c length 8 or type sydatum.&lt;/P&gt;&lt;P&gt;But assuming that the date coming from the file is in format YYYYMMDD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then while transferring to the field of the screen use WRITE TO statement so that the date comes on the screen as per the user settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ankur Parab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 11:00:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208098#M1377210</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-25T11:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: data type decleration for date field while running bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208099#M1377211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi vipul gupta ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    The data you trying to populate using BDC right.  BDC is nothing but automating SAP funcitonality for multiple transactions. Basically when u run a transaction the display of data is dependant on the user format set in user own data.  That means the date,currancy...etc will have their masks.  So while populating BDC also we should populate the data as per the user format set in user own data which is possible only with TYPE CHAR.   So you have to take all the fields in TYPE CHAR and sort out the data into user format before you populate the BDC table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here your requirement is date.  The underlying date format in database is YYYYMMDD. And the user format, let us assume MM/DD/YYYY.  Here you need to populate the date as per user format. Example today is Sept'25 2009  format for this date is 09/25/2009.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To achive this format you have to take the field of length 10 of type CHAR use the below syntax for easly formatting the date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arrange the input date (came from flat file) to YYYYMMDD in a type DATS field use the below syntax to get user format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE   W_DATE  TO W_DATE_CHAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;W_DATE IS OF TYPE DATS and W_DATE_CHAR is of type CHAR 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 11:10:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208099#M1377211</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-25T11:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: data type decleration for date field while running bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208100#M1377212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ankur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply. plz clear how to write syntax for 'Write to' according to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;vipul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 11:21:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208100#M1377212</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-25T11:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: data type decleration for date field while running bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208101#M1377213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vipul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use concatenate the days month and year in field declared by you before passing to the BDC.&lt;/P&gt;&lt;P&gt;declare three variable as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : BUDAT1(8) TYPE C.&lt;/P&gt;&lt;P&gt;DATA : dd(2) type c,&lt;/P&gt;&lt;P&gt;             mm(2) type c,&lt;/P&gt;&lt;P&gt;             yyyy(4) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pass specified value to these variables from the fied whichever value you need.&lt;/P&gt;&lt;P&gt;like dd = budat(2).&lt;/P&gt;&lt;P&gt;mm = budat+2(2).&lt;/P&gt;&lt;P&gt;yy = budat+4(4).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just before the code PERFORM BDC_FIELD, you can use concatenate statement for these fields into BUDAT1 field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE DD MM YY INTO BUDAT1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE YY MM DD INTO BUDAT1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope you understand the logic and can do as per your requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regds,&lt;/P&gt;&lt;P&gt;Anil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 11:44:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208101#M1377213</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-25T11:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: data type decleration for date field while running bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208102#M1377214</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;while passing Date and currency fields to the BDC screen you need to pass character field..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data : w_date(10) type c.

write sy-datum to w_date.  "this will convert the date according to user date format..i.e dd/mm/yyyy or dd.mm.yyyyy

"now pass w_date to BDC screen.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  call function 'CONVERT_DATE_TO_EXTERNAL'
    exporting
      date_internal            = sy-datum
    importing
      date_external            = w_date          "this is character lenght 10
    exceptions
      date_internal_is_invalid = 1
      others                   = 2.
  if sy-subrc &amp;lt;&amp;gt; 0.
  endif.


"now pass w_date to BDC screen
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Prabhudas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 11:56:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208102#M1377214</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-09-25T11:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: data type decleration for date field while running bdc</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208103#M1377215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thankyou&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 05:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-type-decleration-for-date-field-while-running-bdc/m-p/6208103#M1377215</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-10-27T05:03:18Z</dc:date>
    </item>
  </channel>
</rss>

