‎2007 Apr 08 9:06 PM
I have merchandiseamt(10) TYPE n,
When I display this without making any changes to it, it obviously displays 10 zeros as its initial value. How do I get rid of the initial value as I need to display it as space instead of zeros if it has no value .
‎2007 Apr 08 9:22 PM
merchandiseamt(10) is a part of a field string fs_invoice_summary_record and I transfer fs_invoice_summary_record to an output file, so write statement will not work. Can I not set it during declaration to be no-zero or perhaps a similar solution ?
‎2007 Apr 08 9:15 PM
Hi Megan,
think you mean display in a list!? Then try write merchandiseamt no-zero.
Best regards
Stephan
‎2007 Apr 08 9:22 PM
merchandiseamt(10) is a part of a field string fs_invoice_summary_record and I transfer fs_invoice_summary_record to an output file, so write statement will not work. Can I not set it during declaration to be no-zero or perhaps a similar solution ?
‎2007 Apr 08 9:31 PM
Hi,
In this case you can use the write your code like this.
You must be passing the value to merchandiseamt(10) from some variable. Let's say this variable is FIELD, then you can have your code like this.
Let me know if you have any question.
DATA: field(10) TYPE n.
DATA: BEGIN OF fs_invoice_summary_record,
merchandiseamt(10) TYPE n,
END OF fs_invoice_summary_record.
BREAK-POINT.
IF field IS INITIAL.
WRITE field TO fs_invoice_summary_record-merchandiseamt NO-ZERO.
ELSE.
fs_invoice_summary_record-merchandiseamt = field.
ENDIF.Regards,
RS