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

Query Selection Criterion for two Reference Fields

Former Member
0 Likes
853

Hi,

I have developed a query wherein I need to create a Selection Criterion (of type date) but with two reference fields.

Here goes the example:

In Standard Reports, we have a transaction code IW39 (Maintenance Order List) I am creating a query in somewhat similar manner with certain calculation Fields.

This transaction has a field called "Period" which checks the value of Maintenance Order Start Date and End Date both simultaneously.

When I am creating the Selection Criterion, it certainly takes only one field as Reference and that too the field must be from table within the Functional Area.

Hence, my issue here is:

1. Since my table AFKO is not in my Functional Area I am not able to select GLTRP or GSTRP as reference fields (I have not taken this table in Join as I dont want multiple records for each piece of Equipment)

2. I want the calculation to be made for both GLTRP and GSTRP.

3. Creating the Period as Additional field, I am unable to get the FROM and TO value of this field in infoset.

Please do provide the you valuable inputs for the same.

Regards,

Chin2.

1 REPLY 1
Read only

jogeswararao_kavala
Active Contributor
0 Likes
683

1. First I never tried to understand the logic behind the Period selection in standard programs. Also I never try to replicate this field in my programs (even in ABAP).

2. So, we need to know the logic for Period fields of IW39 selection screen. Means which date represents the From field and which the To field  .

3. Create Period-low and Period-high Local fields in SQ01 and give the formula for each accordingly (based on the above point) in the Conditions area (as a function of existing fields).

4. Period as additional field and taking into selections in SQ02 is ruled out.

Alternatively, you could build your Infoset on Logical Database AFI where you get standard selections.

Good luck

KJogeswaraRao