Skip to Content
author's profile photo Former Member
Former Member

Problem with Field Exit

I have created an field exit through a program RSMODPRF. The requirement is that I have to change the type of screen field from CHAR to NUMC. That I have already done, but how to validate the felid if the user enters the character values or how to prevent user not to use character values.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2005 at 08:42 AM

    Perhaps you can try this out:

    if user_field <b>ca</b> '0123456789'.

        • User has entered numeric character.

        else.

            • User has entered non-numeric character.

            endif.

            Regards,

            Subramanian V.

            Add a comment
            10|10000 characters needed characters exceeded

          • Posted on Jan 14, 2005 at 10:12 AM

            I don't understand your problem. I'm in 4.7 and made small test:

            REPORT ztest.
            TABLES wlk1.
            PARAMETERS p_lfdnr like wlk1-lfdnr.
            

            I even can't type in any characters - that's already handled by GUI!

            Field-exits (even with RSMODPRF) will not be available in future release - if possible (and necessary) make your checks in a user-exit.

            Regards,

            Christian

            Add a comment
            10|10000 characters needed characters exceeded

          • author's profile photo Former Member
            Former Member
            Posted on Jan 14, 2005 at 06:19 PM

            I assume the field is CHAR on the screen and you want to convert it to a NUMC.

            If you are going to use the suggested IF solution mentioned earlier, you need to make some decisions about what is allowed. Assume the field is length 4. What will you do in the following situations if the user enters: (b = space)

            bbbb

            bbb1

            1bbb

            1b1b

            Also, what about a minus sign?

            Add a comment
            10|10000 characters needed characters exceeded

          Before answering

          You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
          You must be Logged in to submit an answer.

          Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.