cancel
Showing results for 
Search instead for 
Did you mean: 

ALV

Former Member
0 Kudos

Dear All ,

i have four checkboxes

1. plant

2. vendor

3. buyer

4. material

I have the following data in my itab

plant vendor buyer material qty

a001 1234 a1 s123 10

a001 5678 a1 s123 20

a001 1234 b1 s123 15

plant + vendor + buyer + material is key feild

now if he clicks checkbox plant & buyer

it should add the qty feild for record where plant & buyer is same

so in this case output report should be

a001 1234 a1 s123 10

a001 5678 a1 s123 30

i cant use collect statement as plant + vendor + buyer + material is a combined

key feild and not plant + buyer

also if i consider all the conditions in selection of checkbox

it would be 2 raise to 4 = 16 combinations

i dont want to write so much code

how do i do it

pts will be given

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Tarang,

You want to effect the output depending on the combination of these 4 check boxkes. Rgiht?? Ok. I am writting the code here for simplifying the logic.

In the Field catalog.

Loop the total fieldcatlog

Put the CASE gs_feildcat-fieldname.

When 'Plant'. "Here Plant is the fieldname

Now you can generalise that

if Platn and vendor eq 'x'

then gs_feildcat-tech = 'x'.

else.

then gs_feildcat-tech = SPACE.

endif.

In the same way write to the remainin 4 fields also. It will work fine.

I hope , i solved your problem.

Warm Regards,

Vijay

Warm Regards,

Vijay

Message was edited by:

Vijaya Bhaskarudu Gangisetty