This website is not affiliated with, sponsored by, or approved by SAP AG.

Query Infoset - Selection Field Creation - error AQ120

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Query Infoset - Selection Field Creation - error AQ120

Postby Brahio » Thu May 14, 2015 11:10 am

Hi ,
Checking if I can call on any InfoSet Code experts to assist if what I'm asking is possible.

So let's say I'm simply joining two tables VBAK and VBAP and getting the dropship PO number and PO Invoice Posting data via a custom selection field. (don't worry about so much of the content below as it my question at the end :D )

Created two fields called PO and PO_ITEM.
......Select * from VBFA into WA_VBFA WHERE
VBELV EQ VBAK-VBELN AND
POSNV EQ VBAP-POSNR AND
VBTYP_N EQ 'V'.
ENDSELECT.
MOVE WA_VBFA-VBELN to PO.
MOVE WA_VBFA-POSNN to PO_ITEM.

So I'm getting the posting date (Post_Date) from the PO invoice invoice ....
.... Select BUDAT from RBKP into WA_BUDAT WHERE
XBLNR EQ PO.
ENDSELECT.
MOVE WA_BUDAT to POST_DATE.

So my question is, I want to ensure that I get 100% of the vbak/vabp records in my selection. HOWEVER, it only to show the post date if the dates are in a particular range that I want selectable by the user. I can't bring in the POST_DATE into the selection of the query because then I will not see all of my VBAK/VBAP records. I simply want to create a selection field in the infoset (that will come into my query) that is selecting on the internal select statement.

When I created a custom SELECT field on POST_DATE, I get the error AQ120 (Selection criteria cannot reference additional fields). Is there any work around (beside getting a developer to write a custom report) to allow for selection criteria to reference the code within additional fields in an infoset?

Regards
Brahio
Brahio
 
Posts: 113
Joined: Wed Oct 30, 2002 11:09 am

Re: Query Infoset - Selection Field Creation - error AQ120

Postby Sharpshooter » Mon May 18, 2015 7:47 am

You could create selection parameters in your infoset for "From date" and "To date". Then use them in the select statements of your additional field.
Good luck!
Sharpshooter
 
Posts: 1171
Joined: Wed Mar 17, 2010 12:01 pm
Location: In the dark


Return to ABAP

Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 10 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.