2009 Sep 16 8:49 AM
Hi,
I am declaring the 2 variables as type P. The below code was working fine, But our client, wants to remove the leading spaces for these variables,
v_lower(16) TYPE p DECIMALS 2,
v_upper(16) TYPE p DECIMALS 2.
v_lower = i_plmk-toleranzun.
v_upper = i_plmk-toleranzob.
i_output-toleranzun = v_lower.
i_output-toleranzob = v_upper.
Can any one suggest how can we achieve this. Is there any function module for achieving this.
Thanks In Advance,
Regards,
Ramana Trapatla.
Hi,
I am declaring the 2 variables as type P. The below code was working fine, But our client, wants to remove the leading spaces for these variables,
v_lower(16) TYPE p DECIMALS 2,
v_upper(16) TYPE p DECIMALS 2.
v_lower = i_plmk-toleranzun.
v_upper = i_plmk-toleranzob.
i_output-toleranzun = v_lower.
i_output-toleranzob = v_upper.
Can any one suggest how can we achieve this. Is there any function module for achieving this.
Thanks In Advance,
Regards,
Ramana Trapatla.
2009 Sep 16 9:20 AM
Hi,
If your question was in the context of displaying data of type p without the leading space, then you can use left-justified addtion to your write statement.
data: val(10) type p decimals 2.
val = '0000000123.43'.
write: val LEFT-JUSTIFIED.
Regards,
Vikranth
2009 Sep 16 9:29 AM
refer to the following code.
data : var(10) TYPE p DECIMALS 2,
var_char TYPE string.
var = '10.20'.
var_char = var.
condense var_char..
WRITE : / var_char.
2009 Sep 16 9:33 AM
Hi,
Use CONDENSE statement for your variable V_UPPER and V_LOWER.
Asha
2009 Sep 16 9:37 AM
Hi,
Use below statement to take out leading spaces.
Thanks
Venkat.O
WRITE I_OUTPUT-TOLERANZUN TO V_LOWER LEFT-JUSTIFIED.
WRITE I_OUTPUT-TOLERANZOB TO V_UPPER LEFT-JUSTIFIED.
2009 Sep 16 9:49 AM
Trylikke this
Syntax
... { {LEFT DELETING LEADING} | {RIGHT DELETING TRAILING} } pattern ... .
DATA text TYPE string VALUE `I know you know`.
SHIFT text RIGHT DELETING TRAILING 'no kw'.
Regards,
Sreeram
2011 Mar 30 12:27 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |