<?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: date conversion possible?  date to char in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710152#M310645</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the responses.    Let me expand the problem a bit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am trying to pass a date field into an existing(non-modifiable) function.&lt;/P&gt;&lt;P&gt;2. The function wants the field as something like DDATE  in an 8-character&lt;/P&gt;&lt;P&gt;   format.&lt;/P&gt;&lt;P&gt;3. When I try the date to C conversion, I still get the same error:&lt;/P&gt;&lt;P&gt;     "The function module interface allows you to specify only fields&lt;/P&gt;&lt;P&gt;of a particular type under "DDATE".  The field (my_field)  has a different&lt;/P&gt;&lt;P&gt;field type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    How do I determine what field type it wants and what field type I am passing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Nov 2006 17:03:24 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-17T17:03:24Z</dc:date>
    <item>
      <title>date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710147#M310640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have very limited ABAP experience, and need to convert &lt;/P&gt;&lt;P&gt;a date variable to an 8-character CHAR variable.   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a quick easy way to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 16:13:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710147#M310640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T16:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710148#M310641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;do this way ..&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data : v_date like sy-datum,
         v_char(8) type c.


    v_char = v_date.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 16:15:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710148#M310641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T16:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710149#M310642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: l_date TYPE dats,
          l_date_c(8).

MOVE l_date TO l_date_c.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 16:16:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710149#M310642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T16:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710150#M310643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;data: datum type sy-datum.
data: date(8) type c.

date = datum.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 16:19:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710150#M310643</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-17T16:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710151#M310644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA: v_date1 TYPE string.&lt;/P&gt;&lt;P&gt;v_date1 = sy-datum.&lt;/P&gt;&lt;P&gt;WRITE / v_date1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kathirvel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 16:27:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710151#M310644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T16:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710152#M310645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the responses.    Let me expand the problem a bit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am trying to pass a date field into an existing(non-modifiable) function.&lt;/P&gt;&lt;P&gt;2. The function wants the field as something like DDATE  in an 8-character&lt;/P&gt;&lt;P&gt;   format.&lt;/P&gt;&lt;P&gt;3. When I try the date to C conversion, I still get the same error:&lt;/P&gt;&lt;P&gt;     "The function module interface allows you to specify only fields&lt;/P&gt;&lt;P&gt;of a particular type under "DDATE".  The field (my_field)  has a different&lt;/P&gt;&lt;P&gt;field type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    How do I determine what field type it wants and what field type I am passing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 17:03:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710152#M310645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T17:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710153#M310646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The actual error msg is : "CALL_FUNCTION_CONFLICT_TYPE"  &lt;/P&gt;&lt;P&gt;I&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 17:04:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710153#M310646</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T17:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710154#M310647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the function name and how is your field declared?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 17:05:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710154#M310647</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T17:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710155#M310648</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;Declare your variable as&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;DATA: date type datum.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;pass your date to this field&lt;/P&gt;&lt;P&gt;date = yourdate.&lt;/P&gt;&lt;P&gt;pass this variable date to the function module#&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because the Function Module type ddate is of the data element datum.&lt;/P&gt;&lt;P&gt;This should solve your problem&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 17:15:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710155#M310648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T17:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710156#M310649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried the datum declaration as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   DATA:  ddate TYPE datum.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The remote function I am trying to call (a custom function, not SAP standard).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I am using to call the remote custom function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   call function 'Z_MY_PR_FUNCTION'&lt;/P&gt;&lt;P&gt;	             exporting&lt;/P&gt;&lt;P&gt;	                  zekko       = xekko&lt;/P&gt;&lt;P&gt;	                  zekpo       = xekpo&lt;/P&gt;&lt;P&gt;	                  ddate       = my_structure-delivery_date&lt;/P&gt;&lt;P&gt;	             importing&lt;/P&gt;&lt;P&gt;	                  document_no = l_pr&lt;/P&gt;&lt;P&gt;	             tables&lt;/P&gt;&lt;P&gt;	                  return      = return&lt;/P&gt;&lt;P&gt;	             exceptions&lt;/P&gt;&lt;P&gt;	                  others      = 1.&lt;/P&gt;&lt;P&gt;	                  &lt;/P&gt;&lt;P&gt;My delivery_date variable(my_structure-delivery_date) is in the form of a date, &lt;/P&gt;&lt;P&gt;my ddate variable is of the type DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is some of the header information from the remote function(which will&lt;/P&gt;&lt;P&gt;eventually create a Purch. Requisition):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Z_MY_REMOTE_PR_FUNCTION.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(ZEKKO) LIKE  EKKO STRUCTURE  EKKO&lt;/P&gt;&lt;P&gt;*"     REFERENCE(ZEKPO) LIKE  EKPO STRUCTURE  EKPO&lt;/P&gt;&lt;P&gt;*"     REFERENCE(DDATE) TYPE  CHAR8&lt;/P&gt;&lt;P&gt;*"  EXPORTING&lt;/P&gt;&lt;P&gt;*"     REFERENCE(DOCUMENT_NO) LIKE  EBAN-BANFN&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      RETURN STRUCTURE  BAPIRET2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this function, my DDATE variable gets assign to a bapiebanc-deliv_date variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 17:49:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710156#M310649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T17:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710157#M310650</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;Then the issue might be that the bapiebanc-deliv_date does not match the ddate that you have in your custom function module.&lt;/P&gt;&lt;P&gt;why dont you change the custom function module so that ddate is the same data element as bapiebanc-deliv_date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then this should solve your problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 18:36:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710157#M310650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T18:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: date conversion possible?  date to char</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710158#M310651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all the reponses.   I still have not resolved the problem.&lt;/P&gt;&lt;P&gt;After trying several of the suggestions here, I still end up with the&lt;/P&gt;&lt;P&gt;same problem.  Even though I pass a character field which has been&lt;/P&gt;&lt;P&gt;assigned a date value, it gets passed as a date to the function, so &lt;/P&gt;&lt;P&gt;apparently ABAP does not have an implicit date-to-char conversion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a part of the output from the dump:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name of formal parameter.......: "DDATE".&lt;/P&gt;&lt;P&gt;Name of actual paramter          "DDATE".&lt;/P&gt;&lt;P&gt;Type of actual parameter	  "D".&lt;/P&gt;&lt;P&gt;Lenght of actual parameter	   8.&lt;/P&gt;&lt;P&gt;Type of formal parameter	   "C".&lt;/P&gt;&lt;P&gt;Length of formal parameter         8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?  I'll try anything....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 19:59:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-possible-date-to-char/m-p/1710158#M310651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T19:59:46Z</dc:date>
    </item>
  </channel>
</rss>

