02-01-2008 8:00 AM
Hi,
I am working on a module pool program.I have created ascreen 2000 in which there are many fields taken from mvke,mara and marc.If the user wants to change values of some fields in the o/p in this screen,then he can change the values using the dropdown list and when he clicks on the chechbox besides that field,then the changed value should get stored in that particular table from where the field is taken.
I have written my code like this for the checked values to get updated in the database table.
CASE OK_CODE.
WHEN 'EXEC'.
IF DCHAIN_SPEC = c_x.
UPDATE mvke SET vmsta = gs_output1-vmsta.
ENDIF.
where DCHAIN_SPEC is the checkbox name.
When I activate the prg I am getting error as' Field DCHAIN_SPEC is unknown.It is neither defined in one of the tables nor defined by the data statement'.
What would be the reason for this?
02-01-2008 8:03 AM
Radha,
I think you have not declare the fields in ABAP editor Globally.
DATA : DCHAIN_SPEC.
Don't forget to reward if useful....
02-01-2008 8:06 AM
Hi,
Try the below code
PARAMETERS DCHAIN_SPEC AS CHECKBOX USER-COMMAND check.
CASE OK_CODE.
WHEN 'EXEC'.
IF DCHAIN_SPEC = c_x.
UPDATE mvke SET vmsta = gs_output1-vmsta.
ENDIF.
For more information on radio button and check box go thro the below link
http://help.sap.com/saphelp_nw70/helpdata/en/3d/c3b23782a9cc68e10000009b38f8cf/content.htm
Regards,
Chandru
02-01-2008 8:08 AM
hi
good
if you r using any field somewhere in the report than you need to declare than if it is not a field from any sap standard table or a standard include,
so pls check where how you have delclare DCHAIN_SPEC in your report, if you r using from any include program than check wheather you have use that include program in your report.
thanks
mrutyun^
02-01-2008 8:45 AM
Hi frnd,
Declare
DCHAIN_SPEC(1) type c
using data stament and try executing the same.