Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

table control error message

Former Member
0 Kudos

I m doing validation in table control. Validation is working fine.

If the error message is raised the table contrl goes to disable mode even if i press back button also its remaining in tha same screen with the error message.

My requirement is after entering value in table control it must be checked for validation and an error should be raised and then i have to enter correct value in table contrl.

validation is over but it remains in disable mode itself.

Can any one suggest me how to resolve this problem.

Thanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello,

Validate the field inside <b>CHAIN .. ENDCHAIN.</b>

If the user enters the invalid value then that field alone will be open for input.

If useful rreward.

Vasanth

4 REPLIES 4

Former Member
0 Kudos

Hello,

Validate the field inside <b>CHAIN .. ENDCHAIN.</b>

If the user enters the invalid value then that field alone will be open for input.

If useful rreward.

Vasanth

0 Kudos

I m using standard function module for validation.

ctcv_value_syntax_check. and passing values to this FM and the error message is raised.

How can i use chain .. endchain & field statement here

Thanks

0 Kudos

Insert the call of that fm in the module for the validation:

MODULE VALIDATION.
  CALL FUNCTION 'CTCV_VALUE_SYNTAX_CHECK'
    EXPORTING
      CHARACTERISTIC                    = <.....>
      STRING                            = <.....>
      ........................................... 
    TABLES
      TSTRG                             = ITAB
 EXCEPTIONS
   CHARACTERISTIC_NOT_PREPARED       = 1
   CURRENCY_CHECK                    = 2
   DATE_CHECK                        = 3
   FORMAT_CHECK                      = 4
   ILLEGAL_INTERNAL_BASEUNIT         = 5
   INTERVAL_CHECK                    = 6
   PATTERN_CHECK                     = 7
   TIME_CHECK                        = 8
   UNIT_CHECK                        = 9
   NO_VALID_DIMENSION                = 10
   INTERVAL_NOT_ALLOWED              = 11
   OTHERS                            = 12
            .
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

ENDMODULE.                    "VALIDATION

Max

Former Member
0 Kudos

Hi

Use FIELD statament in PAI into LOOP/ENDLOOP

PROCESS PAI.
  LOOP AT ITAB.
     FIELD ITAB-FIELD MODULE VALIDATION.
  ENDLOOP.

In module VALIDATION insert your control and raise the message.

Here only field ITAB-FIELD will be editable after raising the error message, if you need to enter values in several fields:

PROCESS PAI.
  LOOP AT ITAB.
   CHAIN  
    FIELD: ITAB-FIELD,
           ITAB-FIELD2, 
           ITAB-FIELD3,
           ITAB-FIELD4.
    MODULE VALIDATION.
   ENDCHAIN.
  ENDLOOP.

Max