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

FIELD BLANK

Former Member
0 Likes
1,586

HI,

IN THE ALV GRID OUT I AM HAVING ONE FIELD CALLED EKET-WEMNG

WHEN I EXECUTE THE REPORT I AM GETTING SOME VALUE FOR THIS FIELD BUT THIS FIELD NEEDS TO BE BLANK IN THE OUT PUT

HOW TO DO THIS

CAN ANYONE GUIDE ME PLZ

SIRI

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,536

First, make the "X" uppercase, if it still doesn't work, try adding this line as well.

fieldcatalog-fieldname = 'WEMNG'.

fieldcatalog-seltext_m = 'QTY RECEIVED'.

fieldcatalog-col_pos = 15 .

fieldcatalog-no_zero = 'X'.

fieldcatalog-datatype = 'QUAN'. "< -


This line

fieldcatalog-REF_TABNAME = 'EKET'.

fieldcatalog-REF_FIELDNAME = 'WEMNG'.

append fieldcatalog to fieldcatalog.

clear fieldcatalog.

Regards

RIch Heilman

13 REPLIES 13
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,536

Do you mean, that is is showing as 0, but you need it to be blank? If so, you can try setting the NO_ZERO flag in the field catalog.

....
fc_tmp-NO_ZERO = 'X'.
append fc_tmp to fieldcat.

Regards,

Rich Heilman

Read only

0 Likes
1,536

no rich

i did the same even though it is showing me the same

0.0000

how to delete that value i have to put that filed blank

Read only

0 Likes
1,536

Can you tell me how the field is defined in the internal table used in the ALV as well as the code which builds the column in the field catalog.

Regards,

RIch Heilman

Read only

0 Likes
1,536

ya definetly rich...

here is the int table declaration...

Types: begin of t_ekko,

ebeln type ekko-ebeln,

aedat type ekko-aedat,

ekgrp type ekko-ekgrp,

ekorg type ekko-ekorg,

lifnr type ekko-lifnr,

ebelp type ekpo-ebelp,

menge type ekpo-menge,

meins type ekpo-meins,

matnr type ekpo-matnr,

lgort type mard-lgort,

idnlf type ekpo-idnlf,

TXZ01 type ekpo-TXZ01,

lgpbe type mard-lgpbe,

LGOBE TYPE T001L-LGOBE,

MENGE1 TYPE EKES-MENGE,

<b>wemng type eket-wemng,</b>

end of t_ekKo.

and field catalog for that field is here

fieldcatalog-fieldname = 'WEMNG'.

fieldcatalog-seltext_m = 'QTY RECEIVED'.

fieldcatalog-col_pos = 15 .

fieldcatalog-no_zero = 'x'.

fieldcatalog-REF_TABNAME = 'EKET'.

fieldcatalog-REF_FIELDNAME = 'WEMNG'.

append fieldcatalog to fieldcatalog.

clear fieldcatalog.

I am getting in the out put 0.000

Thanks alot for your time Rich...

Read only

Former Member
0 Likes
1,536

hi sri

i think we can use this code for ur problem

declare :

data: wa_fieldcat type slis_fieldcat_alv.

read table vt_fieldcat into WA_fieldcat with key fieldname =' '.

if sy-subrc = 0.

WA_fieldcat-reptext_ddic = ' '.

modify vt_fieldcat from WA_fieldcat index sy-tabix.

endif.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,537

First, make the "X" uppercase, if it still doesn't work, try adding this line as well.

fieldcatalog-fieldname = 'WEMNG'.

fieldcatalog-seltext_m = 'QTY RECEIVED'.

fieldcatalog-col_pos = 15 .

fieldcatalog-no_zero = 'X'.

fieldcatalog-datatype = 'QUAN'. "< -


This line

fieldcatalog-REF_TABNAME = 'EKET'.

fieldcatalog-REF_FIELDNAME = 'WEMNG'.

append fieldcatalog to fieldcatalog.

clear fieldcatalog.

Regards

RIch Heilman

Read only

0 Likes
1,536

solved the problem rich...

but for 0.0000 then it is giving me blank, for some records there r other values also like 5.000 those r not blank

how to do these also blank rich...

Read only

0 Likes
1,536

Blank meaning that you don't want the decimal places? If so, then set field DECIMALS_OUT = 0.

fc_tmp-DECIMALS_OUT = 0.

Be sure to award points for any helpful answers and marked as solved when solved completely.

Regards,

Rich Heilman

Read only

0 Likes
1,536

No rich

its is the same again.. I should not display any value in that field so that client can enter their value in that field so it should be blank not even with 0.

SIRI

Read only

0 Likes
1,536

Then you shouldn't be filling it in your internal table. When filling your internal table, clear it out. Then there will be no value for it, nor will it show as 0.

Regards,

Rich HEilman

Read only

0 Likes
1,536

internal table declare without header line rich

how to clear that value can shoot me a statement plz

Read only

0 Likes
1,536
data: wa like line of itab.

loop at itab into wa.
 clear wa-fld1.
 modify itab from wa index sy-tabix.
endloop.

Regards,

Rich Heilman

Read only

0 Likes
1,536

Thanks alot rich problem solved....