09-29-2007 10:47 AM
Hi,
I declared following variable in my progrma. In general syntax check i dont have any errors with the code but when i do the check in tcode slin following erros comming for the following code.
Field GV_KAWRT is not referenced statically in the program
same warning for all the fields.
plss let me know what is the actual probelm
Regards
Munna
DATA : GV_KAWRT TYPE KONV-KAWRT,
GV_TEMP TYPE KOMVD-KWERT VALUE 0,
GV_GROSS TYPE KOMVD-KWERT,
GV_KBETR TYPE KONV-KBETR,
GV_KWERT TYPE KONV-KWERT,
GV_VBELN TYPE VBELN,
GV_KBETR_1 TYPE KOMV-KBETR,
GV_TOTAL_AMT TYPE KONV-KWERT,
GV_TAX TYPE KONV-KBETR,
GV_TAX_VALUE TYPE KONV-KWERT.
09-29-2007 10:58 AM
Hi Sayed,
The erros is because you are not using this variable anywhere in the program.
Remove the data declaration for this variable and you will not get this error.
Regards,
Pankaj
09-29-2007 10:58 AM
Hi Sayed,
The erros is because you are not using this variable anywhere in the program.
Remove the data declaration for this variable and you will not get this error.
Regards,
Pankaj
09-29-2007 12:06 PM
Hi
Thankx for your response. i found one more probelm in slin.
SELECT SINGLE KBETR KWERT FROM KONV INTO (GV_KBETR, GV_KWERT)
WHERE KSCHL = C_DTYPE AND KNUMV = LV_KNUMV.
i'm using above select but in slin i'm getting warning message saying that
in "select single......." the where condition for the key filed "nation" does not test for equality. there fore the sigle record in question may not be unique.
internal message code : MESSAGE GSB
Regards
Munna
09-30-2007 9:16 AM
Hi Sayed,
You are getting this error because you are not comparing all key fields in the select query due to which there could be multiple recoreds matching your selection in the table.
You can use the following query; you will get the same result but the benefit is you will not get that error in the SLIN check.
SELECT kbetr kwert FROM konv INTO (gv_kbetr, gv_kwert) UP TO 1 ROWS
WHERE kschl = C_DTYPE AND knumv = lv_knumv.
ENDSELECT.
Regards,
Pankaj Sharma