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

abap logic

Former Member
0 Likes
597

hi,

after the collect statement, may i know what is the best practice to initialise the field that not intended for the collect. i have 6 fields which are type DEC. the internal table is like a structure where the numeric fields are type DEC.

I only want 4 out of 6 fields to accumulate the value whereas another 2 i do not want.

I cannot make the 2 fields to character field as i use itab like table occurs 0.

i just want comment what method i can use after the collect statement to initialise the other 2 fields.

thanks

hi,

after the collect statement, may i know what is the best practice to initialise the field that not intended for the collect. i have 6 fields which are type DEC. the internal table is like a structure where the numeric fields are type DEC.

I only want 4 out of 6 fields to accumulate the value whereas another 2 i do not want.

I cannot make the 2 fields to character field as i use itab like table occurs 0.

i just want comment what method i can use after the collect statement to initialise the other 2 fields.

thanks

4 REPLIES 4
Read only

Former Member
0 Likes
573

Hi,

What do you mean by initialise the field? Do you want to blank them out? The just loop at internal table and clear fields and update the table.

LOOP AT itab.
  CLEAR itab-field5.
  CLEAR itab-field6.
  MODIFY itab.
ENDLOOP.

Please paste your code here and explain in detail what exactly you want. I will help to give you a correct solution.

Regards,

RS

Read only

0 Likes
573

hi,

thanks.

actually the other 2 fields size too small to accommodate the value if using collect. i cannot change the structure to make these 2 fields to other field type.

i need to clear the value after the collect for these 2 fields. i cannot loop the internal table to clear but i must do it after the collect.

Read only

0 Likes
573

Hi,

Please paste your code here with your table definition, how you are populating the data and how you are doing collect.

Give these information to help you give the solution.

Regards,

RS

Read only

0 Likes
573

hi,

i will do it tomorrow.

thanks