Purpose Read an SAP table |
Solution
Example InputField
(1,1)
"Country"
(1,20)
size=2
_
GuiXT Script InputField (1,1) "Country" (1,20) size=2 _techName="KNA1-LAND1" name="country" -upperCase // display country name Clear V[country_name] // country code specified? if V[country] // Clear result table (important for performance reasons) Clear text[r] Call /guixt/dbselect _ cache="session" _ // use cache="session" to save RFC calls in.table="T005T" _ in.condition="LAND1 = '&V[country]' and SPRAS = '&V[_language]' " _ in.fields="LANDX" _ table.values="r" // copy country name CopyText fromText="r" toString="country_name" line=1 endif Text (1,26) "&V[country_name]"Remarks
Syntax errors/typos in the SQL parameters We use the wrong column name "LANGU" instead of "SPRAS": An error popup comes up: Display the ABAP
short dump via transaction ST22 and look at the "Error analysis" text: |
Components |