cancel
Showing results for 
Search instead for 
Did you mean: 

date format from transaction?

Former Member
0 Kudos

Hi all,

I created one transaction in that iam calling one RFC.

The input parameters for that RFC are date, overall status and trasporting point.

overallstatus and trasporting point are option in RFC so no need to send the input for that fields.

but i need to send the input for date....but in RFC date filed is like structure i.e fromdate and todate are the inputs for it.

in transaction when i send the date as input its giving error as Invalid data error.

in SAp date format is in YYYYMMDD...........so how can i send it in this format from transaction to SAP.

Thanks and Regards,

Phani

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Hi Phani,

Create two Transaction variables SDate and EDate of data type DateTime.

Then map these dates to the input of RFC as

datefromxmlformat(Transaction.SDate, "yyyyMMdd")

datefromxmlformat(Transaction.EDate, "yyyyMMdd")

That's all.

Regards

Khaleel

Former Member
0 Kudos

Hi,

You can format the date in expression window of the link editor. I hope the datetime is in xml format. Than you can use this.

datefromxmlformat(datetime, toformat)

for example

datefromxmlformat("2009-06-30T04:00:00", "YYYYMMDD") yields "20090630".

Regards,

Kishore

Former Member
0 Kudos

Hi Phani

You can go through this thread:

Hope this may help you.

agentry_src
Active Contributor
0 Kudos

Phani,

Please provide the RFC name (if it is a standard RFC). And have you tested the RFC using SE37 with various date formats?

Regards,

Mike