10-24-2006 9:07 AM
Hi,
I designed a screen to maintain custom transparent Table.
Before inserting the record I need to check whether the same record exist in the table or not with the screen fileds.
in the screen I get the fields from the same table in which I have to maintain the Table.
How shall I check the table fileds with the screen fileds.
Table Fields
z_intfc
z_attr
z_value
In the screen I select the same fileds.
I don't know how to check the screen fileds with table fields.
Any suggestions please.
I created four push buttons INSERT,UPDATE, DELETE, EXIT
How shall I code thenm in the program to check the above
options?
any suggestions please...
Thanks in advance
sailekha
10-24-2006 9:15 AM
Hi
For validation, You can have the same fields of the table on your screen.
And, you can say
Select <key field>
from ztable
where keyfield = ztable-keyfield.
OR
You can as well use/move to a structure and use those fields for validation.
You can use the same structure field values for INSERT,UPDATE and DELETE.
Regards,
Raj
10-24-2006 9:15 AM
Hi
For validation, You can have the same fields of the table on your screen.
And, you can say
Select <key field>
from ztable
where keyfield = ztable-keyfield.
OR
You can as well use/move to a structure and use those fields for validation.
You can use the same structure field values for INSERT,UPDATE and DELETE.
Regards,
Raj
10-24-2006 9:17 AM
Hi
Why don't you generat the program for SM30?
Anyway you have to insert a validation module in PAI:
PROCESS PAI.
CHAIN.
FIELD: <ZTABLE>-z_intfc,
<ZTABLE>-z_attr,
<ZTABLE>-z_value.
MODULE VALIDATION.
ENDCHAIN.
Max
10-24-2006 9:34 AM
Hello,
If you are using fields z_intfc ,z_attr,z_value for screen variables,then select data from custom table into internal table work are & compare each field ,if it does not match then update record in custom table else no updation.
Hope this helps.
Thanks.
Mark points if helpful.
10-24-2006 10:25 AM
Hi,
when 'INSE'
select * from ztable where
fld1 = screen-fld1 .
if sy-subrc eq 0.
message e000(zz) 'Record already Exist'.
else.
insert ztable from wa.
endif.
REgards
amole