SAP QUERY RFC_READ_TABLE

Hello Everybody!
i have a question for you
i need to use rfc_read_table to retrieve all changes for customer’s masterdata
I have this settings in SAP

How can i call right query for UDATE from date to other date ?

In my code i try with this settings but the results are not the same with sap

Thank you very much for your precious help!

Loris

Hi,

Try formatting your date “YYYYMMDD”. If this won’t work, check RFC user settings for preferred date format in transaction SU01D.

Regards

3 Likes

@tomasz.gaczynski

Hello Tomasz,

correct answer. :+1:

Are you really sure that date format in the user settings has any effect to the query? In my opinion it is only the date display format. The data type DATS, which has the UDATE field, is a date string with the length of 8 and always the format YYYYMMDD, like you described.

Thanks and best regards
Stefan

Hi Stefan,

I always stick to YYYYMMDD but I know some RFC functions actually receive date as string and apply conversion exits to it, and then, user specific date format matters. This is horrible implementation practice but I’ve seen variety of horrible programming practices in SAP code :slightly_smiling_face:

In short: when dealing with SAP date, format YYYYDDMM is my first choice. If it doesn’t work, I become worried.

Cheers

2 Likes

Hello Tomasz,

thank you very much for your fast reply. Interesting, I have never seen this kind of horrible implementation practice. Good to know to keep an eye on it. :wink:

Best regards
Stefan

1 Like

Hello everybody!

my date has this string format

datetime_lastMonday.ToString(“yyyyMMdd”)

i found a solution to delete bracket and finally the query give me the right results!

thanks for your precious help

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.