0
測試目的更改系統變量我上運行的程序得到一個錯誤:沒有corrosponding航班發現 進行分析後的代碼,我發現該程序調用BAPI:在ABAP
BAPI_SFLIGHT_GETLIST
*"*"Lokale Schnittstelle:
*" IMPORTING
*" VALUE(FROMCOUNTRYKEY) LIKE BAPISFDETA-COUNTRYFR
*" VALUE(FROMCITY) LIKE BAPISFDETA-CITYFROM
*" VALUE(TOCOUNTRYKEY) LIKE BAPISFDETA-COUNTRYTO
*" VALUE(TOCITY) LIKE BAPISFDETA-CITYTO
*" VALUE(AIRLINECARRIER) LIKE BAPISFDETA-CARRID DEFAULT SPACE
*" VALUE(AFTERNOON) LIKE BAPI_AUX-AFTERNOON DEFAULT SPACE
*" VALUE(MAXREAD) LIKE BAPI_AUX-MAXREAD DEFAULT 0
*" EXPORTING
*" VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
*" TABLES
*" FLIGHTLIST STRUCTURE BAPISFLIST
的BAPI進一步調用select:
SELECT SFLIGHT-CARRID SFLIGHT-CONNID SFLIGHT-FLDATE
AIRPFROM AIRPTO
DEPTIME
SEATSMAX SEATSOCC
FROM SPFLI " connections
INNER JOIN SFLIGHT " flights
ON SPFLI~CARRID = SFLIGHT~CARRID
AND SPFLI~CONNID = SFLIGHT~CONNID
INNER JOIN SCITAIRP AS F " Mapping cities to
ON SPFLI~AIRPFROM = F~AIRPORT " airports
INNER JOIN SCITAIRP AS T
ON SPFLI~AIRPTO = T~AIRPORT
WHERE F~COUNTRY = FROMCOUNTRYKEY " restrictions
AND F~CITY = FROMCITY
AND T~COUNTRY = TOCOUNTRYKEY
AND T~CITY = TOCITY
**AND FLDATE >= SY-DATUM**
AND DEPTIME > AFTERNOON_HLP
AND SPFLI~CARRID IN CARRID
ORDER BY FLDATE AIRPFROM AIRPTO.
由於SY-DATUM =今天的日期,select不能夠返回任何數據。在數據庫中,今天沒有航班。
如何更改sy-datum系統字段?
作爲測試目的的解決方法,我試圖將fldate從數據庫中的sflight表更改爲today'a date,但是系統會拋出參照完整性約束錯誤。有沒有其他的工作可用?
是否「重新生成SFLIGHT演示數據」選項? – vwegert
您是否有權訪問調試模式和權限以更改調試中的變量值? – Christian
那麼如果你在沙盒機器上,你可以在badi結尾添加一個增強功能,並通過你自己的選擇。 – Togo