Application Development 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: 

customer information selection not working as expected

0 Kudos

Hi,

I'm facing a problem when i'm going to create report from selection screen.

purpose of the report is ti show customer information.

so im getting data from

kna1

knb1

knvv

and

knvp(to get the data of sales employee - partner function)

----- particular customer must be available on kna1,knb1 and knvv but he may not available on knvp.-----

In the selection screen below fields are available.

customer number,customer name,sales employee

------

so in my programming logic i have used inner join to join kna1,knb1 and knvv.. Then based on that using for all entries logic im getting sales employee data..

then using read table a append sales employee data to customer..

But my problem is...

if in the selection screen we have mention only one rep(0001) no any other data..

even there is only a one customer for that sales employee..im getting all the customer in to programme run-time memory so how to avoid this?

thank..

1 REPLY 1

Former Member
0 Kudos

Hi Pathum,

When you are using the for all entries, You should use the Check statement of for all entries table.

Example : You are using innerjoin the kna1 and knb1 and knvv and assigned in to one table i_kunnr(Example)

then you are doing for all entries of i_kunnr to knvp.

Before doing the for all entries, you would check the i_kunnr is initial or not.

If i_kunnr is not initial.

select * from knvv

             into table i_knvv

             for all entries in i_kunnr

             where kunnr eq i_kunnr-kunnr

if sy-subrc is initial

sort i_knvv by kunnr.

endif.         

endif.

If you are not maintain any check which i have mentioned as above bold check statement then total transparent table (knvv) records will fetch in to the application server.

I hope, it is clear to u.

Thanks,

Sekhar