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

Remove zeros from quantity data after calculating quantity fields

deepak_dhamat
Active Contributor
0 Likes
818

Dear ALl,

My requirement is to remove zero's from fields from internal table where i am sending that internal table as

html output thorugh mail and also aligne that fields value in center .

regards

Deepak .

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
782

its a Qty type field.

try changing it to character field of same size and move the values

5 REPLIES 5
Read only

Former Member
0 Likes
782

Hi,

To remove the leading zeros either use CONVERSION_EXIT_ALPHA_OUTPUT or SHIFT statement.

Eg,



loop at it_output.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = it_ouputt-amount
IMPORTING
output = it_output-amount.
endloop.

Regards,

Vikranth

Read only

Former Member
0 Likes
782

Hi ,

first use replace statement for replacing zeros with spaces and then use condence with no-gaps. or u can use FM CONVERSION_EXIT_ALPHA_OUTPUT .

Please let me know if you still need any more help.

Thanks and regards,

rajeshwar.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
783

its a Qty type field.

try changing it to character field of same size and move the values

Read only

venkat_o
Active Contributor
0 Likes
782

Hi, <li>Once data is ready in your internal, you can do the following way.

DATA: BEGIN OF IT_T001 OCCURS 0,
        BUKRS TYPE T001-BUKRS,
        BUTXT TYPE T001-BUTXT,
        ORT01 TYPE T001-ORT01,
      END OF IT_T001.

START-OF-SELECTION.
  SELECT * FROM T001 INTO CORRESPONDING FIELDS OF TABLE IT_T001 UP TO 10 ROWS.
  LOOP AT IT_T001.
    WRITE: IT_T001-BUKRS TO IT_T001-BUKRS LEFT-JUSTIFIED,
           IT_T001-BUTXT TO IT_T001-BUTXT NO-ZERO,
           IT_T001-ORT01 TO IT_T001-ORT01 CENTERED.
    MODIFY IT_T001.
  ENDLOOP.
Thanks Venkat.O

Read only

0 Likes
782

Thank you guys for the reply i have used character type field to display data in html output

Regards

Deepak