‎2014 Jun 05 5:14 PM
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
‎2014 Jun 06 5:32 AM
Hi Glauco,
If your requirement is to check whether the content is initial, use IS INITIAL.
Regards,
Abijith
‎2014 Jun 06 12:26 PM
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