Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Datumsformat RFC_READ_TABLE

Former Member
0 Likes
1,062

Guten Morgen,

ich möchte über den Funktionsbaustein RFC_READ_TABLE einen Vorgesetzten ermitteln, über Tabelle PA0001 und Options PERNR = 12345 und das Field YYCHPPA_PERNRVOR. Dies funktioniert auch soweit, allerdings sollte die Ausgabe eindeutig sein, derzeit ist sie es nicht. Um einen eindeutigen Wert zurückzuerhalten, möchte ich zusätzlich das Enddatum ENDDAT abfragen, welches fix definiert ist. Im Feld Options habe ich dann noch ENDDAT = 31.12.2012 finzugefügt. Allerdings schlägt dann die Abfrage mich einem Fehler auf. Im welchem Datumformat muss ich das ENDDAT angeben, damit die Suche funktionirt und nach der PERNR und dem ENDDAT gesucht wird?

Danke im Voraus

Steffen

6 REPLIES 6
Read only

former_member226519
Active Contributor
0 Likes
808

Das interne Datumsformat ist immer YYYYMMDD.

Allerdings halte ich es für bedenklich, ein beliebiges Datum (31.12.2012) für die Abfrage zu benutzen.

Die Abfrage sollte zu einem eindeutigen (variablen) Stichtag erfolgen: BEGDA <= Stichtag und ENDDA >= Stichtag

Read only

0 Likes
808

Thank your message.

I tryed the query with persnr = 123456 and in the next line enddat = 20121231. I got an error. Do I something wrong?

Perhaps should I use your proposal, is there problems with the fix date. This date I will use in future will be fix.

Read only

0 Likes
808

you have forgot the and statement fill the line like this AND ENDDAT = 20121231

Read only

former_member194669
Active Contributor
0 Likes
808

English please....

Read only

Former Member
0 Likes
808

I am afraid I just understand the english post but from what I see it might be that the mistake is not with the date but with the persnr. As PA000-PERNR is declared as Numc8 even thought you don't see the 0 the field is filled with 0. So I think you should look for '00123456' instead of just '123456' if you are accesing just by a literal.

I hope you find id helpfull.

Read only

0 Likes
808

Yes

You^re right.

Thank you very much for helping - it works