2014 Feb 12 1:47 PM
Hi All,
I have a quantity field which displays blanks values as 0.000.The requirement was to change it to 0 ad
So I had assigned this quantity field to an integer variable and it worked.
Now I have to change this 0 to blank , but assigning to a string variable doesn't work.
Is there any better way of doing this as I find this method very crude.
Regards,
Faiz
Hi All,
I have a quantity field which displays blanks values as 0.000.The requirement was to change it to 0 ad
So I had assigned this quantity field to an integer variable and it worked.
Now I have to change this 0 to blank , but assigning to a string variable doesn't work.
Is there any better way of doing this as I find this method very crude.
Regards,
Faiz
2014 Feb 12 1:56 PM
take a look at this
data:
lv_string(20),
lv_quan type dzmeng value '0.000'.
write lv_quan to lv_string no-zero.
2014 Feb 12 3:24 PM
Hi Faizur,
If you want to have a empty string if the value is '0.000', you can try this:
if l_quan IS NOT INITIAL.
l_string = l_quan.
ENDIF.
If you want to pass the quantity without decimals, you can do a TRUNC.
if l_quan IS NOT INITIAL.
l_string = trunc(l_quan).
ENDIF.
Best regards
2014 Feb 13 7:41 AM
Hi,
TYPES : BEGIN OF GI_DATA1,
VBELN TYPE VBAK-VBELN, " SO No.
NTGEW TYPE VBAP-NTGEW, " Net Weight of the Item
GEWEI TYPE VBAP-GEWEI, " Weight Unit
END OF GI_DATA1.
DATA : IT_DATA1 TYPE STANDARD TABLE OF GI_DATA1 WITH HEADER LINE,
V_VALUE TYPE CHAR15,
WRITE IT_DATA1-NTGEW UNIT IT_DATA1-GEWEI to V_VALUE.
CONDENSE V_VALUE.
Reference Link :
Special Output Formats (SAP Library - ABAP Programming (BC-ABA))
Regards,
Kemal Tsani N
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |