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

Empty dmbtr field

Former Member
0 Likes
1,711

Hi! I have a question.

When in itab one of fields keeps money (eg. like dmbtr) when I enter an empty value there it becomes 0.00. Then when I use WRITE statement to write itab content on the screeen, I see 0.00 in firelds where itab-field was empty. Is there some possibility to hide those 0.00 which I receive in result of WRITE statement? Greetings. P.

PS. The same situation is with date-fields. I'd like to hide 00.00.0000 too.

Maybe we can use an example below:

DATA: my_money TYPE bsik-dmbtr.
WRITE my_money.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,257

<b> please change your Field DMBTR not to refer the Dtabase field DMBTR /WRBTR ... Becuase those fields refer to CURR field ... so</b>

declare your fields as

<b>

s_dmbtr(17) type i decima1 2 .</b>

so that when ever the value of s_dmbtr is 0.00 it wont display ....

as you know that

<b>AMOUNT fields are depend on the Currency fields , so that only your DMBTR is displaying 0.00</b> ...

reward points if it is usefull ....

Girish

6 REPLIES 6
Read only

Former Member
0 Likes
1,257

those are currency and data format fields,if you do not want to see the fields in output,then move to charcter field and display.

Thanks

Seshu

Read only

Former Member
0 Likes
1,257

Hi,

This field is related to G/L account you can go to t-code se38 & enter this field it will diplay the related tables. just check with FI person on setting of chart of accounts.

<b>Reward points</b>

Regards

Read only

Former Member
0 Likes
1,257

Try

WRITE ITAB-FIELD NO-ZERO.

(ABAP Help on the WRITE Statement has lots of useful tricks like this)

Read only

Former Member
0 Likes
1,258

<b> please change your Field DMBTR not to refer the Dtabase field DMBTR /WRBTR ... Becuase those fields refer to CURR field ... so</b>

declare your fields as

<b>

s_dmbtr(17) type i decima1 2 .</b>

so that when ever the value of s_dmbtr is 0.00 it wont display ....

as you know that

<b>AMOUNT fields are depend on the Currency fields , so that only your DMBTR is displaying 0.00</b> ...

reward points if it is usefull ....

Girish

Read only

former_member378318
Contributor
0 Likes
1,257

Use the NO-ZERO addition of the WRITE command:

WRITE l_xyv NO_ZERO.

Read only

Former Member
0 Likes
1,257

<b>for your date field</b>

don't use it as s_date like sy-datum .

<b>Declare it as </b> s_date(10) type c .

reward points if it is usefull..

Girish