‎2007 Jul 23 9:40 AM
I want to display value of quantity field as blank if it contains vaue as 0.00
This is the query which i hav written.
select * from resb into corresponding fields of resb_itab_wa
where aufnr = itab_wa-aufnr AND WERKS = ITAB_WA-DWERK.
IF RESB_ITAB_WA-ENMNG = 0.
RESB_ITAB_WA-ENMNG = ' '.
ENDIF.
i.e. if the value of resb_itab_wa is 0.00 then it should display blank
So i wrote the above query. But there is no change . 0.00 is yet being displayed.
Do i hav to write something else since it is a quantity field.
‎2007 Jul 23 9:45 AM
WHERE do you have your problem?
in SMARTFORMS? in SAP-Script? in a write statement?
in SMARTFORMS and in SAP-Script the solution is quite easy.
at your output variable in your form just add (I).
Example: &EKPO-NETWR(I)&
if EKPO-NETWR is initial (would be 0.00), then it wiont get printed.
if it differs from initial state, then it will be printed.
if you have that problem in a write statement, you should swap that value through a char field, and print (write) that char field.
Swap the value ONLY if your value is not initial.
‎2007 Jul 23 9:43 AM
Hi Priti,
The default value depends on the data type of the variable.
If the RESB_ITAB_WA-ENMNG is QUAN, then it would display only 0.00. You cannot change it to BLANK.
To give BLANK (" ") as default value, the data type should be one that would accept CHAR values.
Allot points if answer was useful.
Best Regards,
Ram.
‎2007 Jul 23 9:45 AM
WHERE do you have your problem?
in SMARTFORMS? in SAP-Script? in a write statement?
in SMARTFORMS and in SAP-Script the solution is quite easy.
at your output variable in your form just add (I).
Example: &EKPO-NETWR(I)&
if EKPO-NETWR is initial (would be 0.00), then it wiont get printed.
if it differs from initial state, then it will be printed.
if you have that problem in a write statement, you should swap that value through a char field, and print (write) that char field.
Swap the value ONLY if your value is not initial.
‎2007 Jul 23 9:58 AM
‎2007 Jul 23 9:57 AM
Hi Preeti,
Its not your fault that the default value is being displayed.
What you can do is to have another column in your internal table of type c.
Whenever there is a value in rseb just transfer it to you column.
At the time of display hide the column with the actual values and display the type c column.
Regards,
Ravi