Application Development and Automation 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: 
Read only

The 0 problem

Former Member
0 Likes
1,175

Hi there, I need a small tip.

The problem is with the quantity.

My itab has field


mymenge TYPE i .

But there is a small problem.

When I put that value into TABLEVIEW object and column is shaded (gray background) the '0' value is visible (field format in screenpainter is set to INT1 to avoid entering characters, only digits are possible)

but ... when I set that column editable (white background) the '0' value is not visible.

And I need to see those zeros. User must see when value is '0' and when it's just empty.

Can You give me some tip how to solve that problem? I'd be thankful for help. Greetings

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,131

i had got the same problem

u need to define separate screen field as a character

and after calculating assign your numeric field to screen field,

at the time of validation

you can check value is between '0000' to '9999'

for user to prevent from entering character value

Regards

Alpesh

9 REPLIES 9
Read only

ThomasZloch
Active Contributor
0 Likes
1,131

Not sure how to do this with type I, but maybe type N is an option, allows only digits as well, but is a character field by definition.

mymenge TYPE n LENGTH 8

You could also define a separate structure for screen display this way and transfer to another structure with the original type I definition at PBO/PAI.

Thomas

Read only

0 Likes
1,131

Thomas Zloch

I tried, 0 is still invisible

Read only

0 Likes
1,131

I see. Type C would distinguish between space and 0, but then you have additional effort to ensure only valid quantities are being entered. Might be an option, unless somebody else comes up with a better idea.

Thomas

Read only

Former Member
0 Likes
1,132

i had got the same problem

u need to define separate screen field as a character

and after calculating assign your numeric field to screen field,

at the time of validation

you can check value is between '0000' to '9999'

for user to prevent from entering character value

Regards

Alpesh

Read only

0 Likes
1,131

Alpesh

at the time of validation

you can check value is between '0000' to '9999'

My CHAR type is of 3 characters. How to check thing You're writing of?

When I move INT value '0' to CHAR value '0'

the comparison :


IF ( charvalue >= '000' ) AND
  ( charvalue <= '999' ) .
* debugger is not entering that place of code  
ENDIF .

Read only

0 Likes
1,131

For validation, why not:


IF NOT charvalue CO '0123456789 '.
*  Error message
ENDIF.

Regards,

Valter Oliveira.

Read only

0 Likes
1,131

CONDENSE charvalue NO-GAPS.

IF NOT charvalue IS INITIAL.

IF NOT charvalue BETWEEN '0' AND '999'.

CLEAR charvalue.

MESSAGE E398(00) WITH 'Please enter numeric Value'.

ENDIF.

ENDIF.

use this code.

Edited by: Alpesh on Sep 18, 2008 7:06 AM

Edited by: Alpesh on Sep 18, 2008 7:08 AM

Read only

Former Member
0 Likes
1,131

Hi,

Try to define it as QUAN field on Screen but there should also be a UNIT field as the Reference field for it.

Read only

0 Likes
1,131

Neha Shukla

Field format - QUAN

Reference field - UNIT

'0' still not visible