2011 Oct 12 12:23 PM
Hi Experts,
I am facing the problem with table maintenance generator events.
According to my requirement, I have to validate the data while saving based on KNVV table. Here for some fields there is no foreign key relation. so i had to write the code in the EVENT BEFORE SAVE. In this Event i have used the statement like "select * from KNNVV' and i am validating the data. But the system is giving the message saying that the select statement is not accessable.
Please let me know, How to validate the data based on the table?
Regards,
TMR.
Hi Experts,
I am facing the problem with table maintenance generator events.
According to my requirement, I have to validate the data while saving based on KNVV table. Here for some fields there is no foreign key relation. so i had to write the code in the EVENT BEFORE SAVE. In this Event i have used the statement like "select * from KNNVV' and i am validating the data. But the system is giving the message saying that the select statement is not accessable.
Please let me know, How to validate the data based on the table?
Regards,
TMR.
2011 Oct 12 12:29 PM
Hi ,
tables: KNVV .
select single * from KNVV
where KUNNR = kunnr
VKORG = vkorg
VTWEG = vtweg
SPART = spart.
if sy-subrc = 0 .
table entry is there .
else .
No entry .
endif.Which SAP version you are using .
regards
Deepak.
Edited by: Deepak Dhamat on Oct 12, 2011 1:30 PM
2011 Oct 12 12:48 PM
Hi Deepak,
As you mentioned i have used the same code, even though the system is giving the same messages saying that "statement can not be accessable" .
I am working on ECC 6.0
Regards,
TMR.
2011 Oct 12 2:41 PM
Hi,
Have you re-activated your function group in SE80 after creating your event form?
If yes, can you paste your exact code over here?
Kr,
Manu.
2011 Oct 12 2:57 PM
Have you entered FORM...ENDFORM statements manually at the include where you're making your select statement?
If I remember it right, they're not automatically entered by system.
Regards
Mauricio
2011 Oct 12 3:22 PM
Hi,
lol... indeed... I would not tought of such a mistake...;) good catch, mate!
so, as Mauricio said, add the FORM/ENDFORM and don't forget to activate your FG afterwards...
Kr,
Manu.
2011 Oct 13 12:32 PM
Thx manu!
That FORM..ENDFORM thing in SM30 events already made me very nervous in the past!
BR
Mauricio
2011 Oct 12 3:10 PM
Mauricio Robert is correct..... u have to use FORM.... ENDFORM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |