cancel
Showing results for 
Search instead for 
Did you mean: 

Date formating issue

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

narendra_bendi
Active Participant
0 Kudos

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.

former_member283828
Participant
0 Kudos

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.

Regards,

Kiran Kumar

former_member283828
Participant
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.