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

Problem collect data

Former Member
0 Likes
385

Hi Expert,

I got problem with the moment of collected data, the example is by following below :

first line in my itab is :

matnr = 123

plant = SG12

check 1 = 'X' => character

check 2 = ''

check 3 = ''

now Iam doing collected for the second line is

matnr = 123

plant = SG12

check 1 = ''

check 2 = 'X'

check 3 = 'X'

collect......

the result of Iam doing collect is :

first line 123 SG12 X

second line 123 SG12 ' ' X X

what I expect is just only first line :

123 SG12 X X X

please give me the solution, thank for your help.

Best Regards,

Kohokoho

1 ACCEPTED SOLUTION
Read only

guilherme_frisoni
Contributor
0 Likes
350

Hi,

collect will compare all non-numbers fields and sum all numbers.

As check1, 2 and 3 ara type c, they cannot be "collected".

You can try to use type i for check1, 2 and 3, and set 0 for blank and 1 for check.

After your collect, all fields greater than zero you consider check.

Regards,

Frisoni

1 REPLY 1
Read only

guilherme_frisoni
Contributor
0 Likes
351

Hi,

collect will compare all non-numbers fields and sum all numbers.

As check1, 2 and 3 ara type c, they cannot be "collected".

You can try to use type i for check1, 2 and 3, and set 0 for blank and 1 for check.

After your collect, all fields greater than zero you consider check.

Regards,

Frisoni