2010 Mar 16 7:31 AM
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
2010 Mar 16 8:44 AM
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
2010 Mar 17 9:40 AM
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.
2010 Mar 17 10:05 AM
you have forgot the and statement fill the line like this AND ENDDAT = 20121231
2010 Mar 16 8:50 AM
2010 Mar 17 10:11 AM
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.
2010 Mar 30 3:41 PM