Skip to Content
avatar image
Former Member

Date formating issue

Hi All,

I am receiving the Begin Date and End date from one of the RFCs and then using these dates for the import parameters of another RFC.

But the second RFC receives the dates either in YYYYMMDD or DD.MM.YYYY format.

The BeginDate and EndDate of the first RFC are binded to two input fileds so they appear as Date pickers in the runtime.

As I select the date range , I need to execute the second RFC before submition and so the Import of the Second RFC should receive the date range .

I have gone through many Forum threads but the way they are suggesting, returns me no right result. If I follow the Simple date Format, I parse the date and have a String output which the second RFC does not accept.

And if I assign the parsed value to the a Date type then I receive a null value for the same. I need your help , please suggest and guide.

Regards

DK

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Sep 18, 2009 at 11:02 AM

    You must do the conversion first and then give those formatted dates as input to your 2nd RFC. For formatting dates refer the below therad for example.

    problem in date formatting DD-MMM-YYYY

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 21, 2009 at 04:05 AM

    RFC uses java.sql.Date - convert your java.util.Date to sql fomat and the formatting will not matter.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 22, 2009 at 12:06 AM

    Hi,

    Go for external debugging on the second RFC and find the format of the dates that the BAPI is receiving and passing... Accordingly you can change the Date Format either from RFC level or from your code level..

    Regards,

    Narendra.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Mohanthy,

      As you told, BeginDate and EndDate of the first RFC are binded to two input fileds and the values of BeginDate and EndDate has to be sent as input fields to another RFC.

      Just get the values from the node generated by first rfc and set them to the i/p node of second rfc.

      Date Format should not be a issue in this case and for your information the date which is used by RFC is Java.SQL.DATE Class.

      Regards,

      Kiran Kumar