cancel
Showing results for 
Search instead for 
Did you mean: 

User exit for reducing Query lines!

Former Member
0 Kudos

Hello,

IS it possible to use a User Exit for queries to reduce my resultpackage before the lines arrive the reporting area?

For example:

I have a due date and in case of an entry of a field in the query result package the <exit> must read a reference from a info provider to decide if this line of this resultpackage can be load or not!

Query resultpackage

Contract :

a look up in, ODS for example, decision! delete line from package or not

and so on..

b Yes

v No

f

g

Short form:

Is it possible to manipulate the result package of a query in a user exit dynamically like described above??

AND how is it to implent?

Thank you for you answers!

By Rene

Edited by: NW-DEV on Oct 7, 2010 3:52 PM

Edited by: NW-DEV on Oct 7, 2010 3:55 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

advait_rao
Explorer
0 Kudos

Hi,

Is it necessary that you do this on the fly (during query execution)?

A simpler way to achieve this is by adding a column to your cubes ... say Flag . Update this flag, during transformations. This Flag field will indicate 'Marked for Deletion' and you can filter out records in the Query, by adding this Flag Field in Query Restrictions.

If you want to achieve this during Query execution, you may need to use Virtual Characteristics(You can search for the code/implementation steps on SDN). Again Flag field will be the Virtual Characteristic and Query Filters will contain Flag value exclusions.

Regards,

Advait

Former Member
0 Kudos

Hi,

Yes, it is neccessary to check it during the runtime.

That is my main problem.

Cause the due date is variable and dependend on that due date the validity of the result lines will differ.

Is it possible to use a BADI instead?

Thank you.

best regards Rene

advait_rao
Explorer
0 Kudos

Hi,

In that case,I think you can use a Virtual Characteristic for your requirement, which can be implemented using a BADI.

The link below explains the steps to implement a Vitual Characteristic...

[Virtual Characteristic Using BADI|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b04be008-86cc-2c10-4bad-e517ea3f4c80]

I believe you can use default values section in Query Designer to filter out all unwanted records, after the logic in BADI marks the record as unwanted.

Regards,

Advait

Former Member
0 Kudos

Hi,

thank you, I think this could be the right direction.

Please one further question.

Is it possible to make a select entry in the first Slection screen of the query which can filter the "BAD" "GOOD" or "excelent" range?

The question is, does the BAdi its work before the selection screen pops up or after inserting the filtercriteria.

When the BADI is running before than it is perfect!

By,

best regards Rene