07-20-2009 2:48 PM
HI all,
Below is my code to validate the screen fields and then make them editable in case any error.
When i complie my program it gives me an error saying *zec_acd_structure *is not defined. although i can access the data from zec_Acd_structure in the module check_allvalues. Please let me know how do i resolve the issue.
FIELD wa_header-category MODULE get_att ON INPUT.
CHAIN.
FIELD marc-werks.
FIELD wa_header-matnr.
FIELD wa_header-mfrnr.
FIELD ZEC_ACD_HEADER-MINBE1.
MODULE check_allvalues. " Checking diffrent values entered
ENDCHAIN.
Thanks
07-20-2009 2:51 PM
Hi,
FIELD wa_header-category MODULE get_att ON INPUT.
CHAIN.
FIELD marc-werks.
FIELD wa_header-matnr.
FIELD wa_header-mfrnr.
FIELD ZEC_ACD_HEADER-MINBE1. " Check this field exist on the Dynpro
MODULE check_allvalues. " Checking diffrent values entered
ENDCHAIN.
07-20-2009 2:52 PM
Hi Kumar,
check if the structure is activated and better assign a variable as a type of that structure and then use it as the selection-screen field rather than directly the struct-name.
Regards,
Vik
07-20-2009 3:01 PM
Hi,
Declare any tables, structures in the TOP INCLUDE.
Use F01 for validating.
Place the
CHAIN.
ENDCHAIN.
in the screen flow logic of your screen and do the validations for those fields in F01, then the fields will be in editable mode even after giving the error message.
For example if you want to validate these fields,
FIELD wa_header-category MODULE get_att ON INPUT.
In Screen flow logic:
CHAIN.
FIELD marc-werks MODULE chk-werks.
FIELD wa_header-matnr MODULE chk-matnr.
'
'
'
ENDCHAIN.
IN F01 you validate each field.
Hope this solves your problem.
Thanks,
Sri.