Skip to Content

time field content

Hi friends.

I have the following doubt about a screen field with time format (CI_FLEET-time type sy-uzeit).

It only happens in field content in a screen exit in XTOB function group to IE01/IE02 transactions.

We have a time field added in a new custom screen, inside XTOB.

When user deletes its original 00:00:00 content and press ENTER key, then the PAI is executed, so I check its value in a module in chain/field.

So I put a condition to check its content, but for my surprise, this condition is not true (even field value = space).

IF CI_FLEET-time = ''.
* Do some check here ...but is never true ...so abap execution never enters here ...
ENDIF.

So, a friend asked me to check with space instead of ''....then, it works fine.

IF CI_FLEET-time = space.
* Here it works fine. The field is empty and execution enters here ...
ENDIF.

Main doubt is because I created a test Online program ( module pool ) with a same format field on the screen.

So when I delete its content and debug the PAI, my IF wa_xpto-time = '' works fine.

IF wa_xpto-time = ''.
* do check here, works fine in a test new online ...
ENDIF.

But why it does not work in XTOB like that ?

best regards.

Glauco

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jun 06, 2014 at 04:32 AM

    Hi Glauco,

    If your requirement is to check whether the content is initial, use IS INITIAL.

    Regards,

    Abijith

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi friend.

      I have not said it. I forgot to say that IS INITIAL did not work in XTOB exit function group, to this time field.

      I solved it comparing the field with SPACE.

      But I want to know why it does not work with IF time_field = ''. Because it works in my test online program.

      So I still looking for an answer about it.

      best regards.

      Glauco

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.