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

Hiding Zero amount

Former Member
0 Likes
961

Hi,

I m developing ALV using oops. i dont want to display the amount as zero if it is.

Instead of displaying zero i should display as blank.I have achieved this be wa_fcat-inttype = 'N'.

Also, i should show the total amonut. for this i said wa_fcat-do_sum = 'X'.

but as soon as i do sum, it shows me the o/p for amount zero also. my requirenemt is to print blank if the amount is zero and show total as well.

Please help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
810

HI

Set this attribute in the fieldcatalog

NO_ZERO

regards,

prasant

  • reward if helpful

4 REPLIES 4
Read only

Former Member
0 Likes
810

Set the parameter

fieldcatalog-no_zero = 'X'. for that particular field.

Regards,

Ravi

Read only

Former Member
0 Likes
811

HI

Set this attribute in the fieldcatalog

NO_ZERO

regards,

prasant

  • reward if helpful

Read only

0 Likes
810

thanks.

Problem solved.

Read only

Former Member
0 Likes
810

Hi

See this

Identification

• fieldname (field name)

value set: internal output table field name (required parameter)

Name of the internal output table field which is described by this field catalog entry

• tabname (internal output table)

value set: SPACE, internal output table name

This parameter is used in 'manual' field catalog build-up only for hierarchical-sequential lists.

Name of the internal output table which contains the field FIELDCAT-FIELDNAME.

Data Dictionary reference

• ref_fieldname (reference field name)

value set: SPACE, Data Dictionary field name

Name of the Data Dictionary field referred to.

This parameter is only used when the internal output table field described by the current field catalog entry has a reference to the Data Dictionary (not a program field), and the field name in the internal output table is different from the name of the field in the Data Dictionary. If the field names are identical, naming the Data Dictionary structure or table in the FIELDCAT-REF_TABNAME parameter is sufficient.

• ref_tabname (reference table/structure field name)

value set: SPACE, name of a Data Dictionary structure or table

Structure or table name of the referred Data Dictionary field.

This parameter is only used when the internal output table field described by the current field catalog entry has a Data Dictionary reference (not a program field).

<b>Reference to fields with currency/measurement unit</b>

Each internal output table sum or quantity field whose decimal places are to be formatted appropriately for the unit in the list must follow the convention:

• the field is of data type QUAN or CURR (internal type P) (the field must really have this physical data type. Overwriting the physical data type with the parameter FIELDCAT-DATATYPE has no effect)

• There is a field in the internal output table which contains the associated unit.

• There is also an entry in the field catalog for the unit field.

(If the unit is not to appear as a column in the list, and cannot be interactively displayed as a column, e.g. because it is always unambiguous and is therefore explicitly output by the caller in the list header, the field catalog units field entry can take the parameter FIELDCAT-TECH = 'X'.

The association of a value field to a unit affects the output as follows:

• appropriate decimal places display for the unit

• <b>an initialized field with a link to a non-initial unit is output as '0' for the unit (if FIELDCAT-NO_ZERO is initial). When this field is summed, this unit affects whether the units are homogeneous.

• an initialized field with a link to an initial unit is output as SPACE. When this field is summed, the unit SPACE does not affect the homogeneity of the units.

• When non-initial fields with an initial unit are summed, the unit SPACE is considered to be a unit.</b>

Link to currency unit

• cfieldname (currency unit field name)

value set: SPACE, output table field name

Only relevant for amount columns with associated unit.

Name of the internal output table field containing the currency unit associated with the amount field FIELDCAT-FIELDNAME. The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.

• ctabname (internal currency unit field output table)

value set: SPACE, output table field name

only relevant for hierarchical-sequential lists

Name of the internal output table containing the FIELDCAT-CFIELDNAME field.

<b>Reward points for useful Answers</b>

Regards

Anji