cancel
Showing results for 
Search instead for 
Did you mean: 

Error when generating the report (see long text), Message no. AQ_AD_HOC221

0 Kudos

Hi experts,

While executing an infoset query i am getting the error"Error when generating the report (see long text), Message no. AQ_AD_HOC221" This info set query used particularly to fetch data from IT 0008.I have 2 customized fields in infotype 0008.

When I execute  query  including one  of the customized fields  as output , i getting this error.If i run the report excluding the one custom  field the report is generating without any error.I felt the problem is with the one customized field.The coding for the customized field was done long back & done by someone worked earlier.

I check all the below procedures mentioned in performance assistant. 

Procedure

If the selection screen is too large, you need to reduce the number of your selections -Selected only pernr as selection filed & custom field and pernr as output.

Make sure that the assigned InfoSet is correct. The name of the assigned InfoSet is stored in the menu option 'Extras -> Template Information'. -Assigned InfoSet is correct

Output at least one field.-Selected more than one field as output

Otherwise you will not be able to save or generate reports.

If you do not have this problem, execute the query using the 'Output' function.- Tried. still getting the same error.

Otherwise, there is an error in the InfoSet Query. At last i created a new info set query,but again i am getting the same error if i include the particular custom field.

Could you please suggest a solution for this error?.

Accepted Solutions (0)

Answers (4)

Answers (4)

0 Kudos

Use T-code SQ02 go to selections>>Code>>Code Free

and then check BREAK-POINT and comment it/deleted.

0 Kudos

Hi Experts,

Could you please guide me to resolve the issue?.Do we need to write codes for custom fields to display the result.?

Thanks,

Jobish A

0 Kudos

Hi Experts,

Could you please guide me to resolve the issue?

Thanks,

Jobish A

former_member201275
Active Contributor
0 Kudos

When you click on execute you get your selection screen. Go to system->status and get your program name. Then go to SE38, enter your program name and click on ‘syntax check’.

0 Kudos

Thanks Glen for you reply.I checked the syntax of the program through Se38 and i got the below warning message.I don't know what i need to do with the message.Please check and let me whether i can ignore this message.

"Include LAQ_ADHOCD04

There should only be definitions in the TOP include (or nested includes

within it). This means that all kinds of implementation (CLASS...

IMPLEMENTATION, not meaningful. is not meaningful."

Thanks,

Jobish A

former_member201275
Active Contributor
0 Kudos

Have you got code in your Query? According to the error you have the definition and implementation of the class in the same include i.e. Top Include?

If you click on display/change on the message it should take you directly to the segment.

Also, you could try maybe chat to one of your abappers there.

Former Member
0 Kudos

Hi Jobish,

The problem is at the code for the error field. Go to the Infoset, check the additional field, Right click, select code, and then paste that code here...and perhaps, then we understand the core issue.

The issue could also be at the DATA: part of the code.

Kumarpal

0 Kudos

Thanks for your reply. I checked for code in "Code section-DATA" under Tab "Code".It is blank.Do we need to write codes for custom fields?

One thing i noticed is there is one reference  made for this field.It looks like fetching currency values from a custom table currency field.

Please see the attachment.

Thanks,

Jobish A

0 Kudos
Former Member
0 Kudos

Hi Jobish,

With the screenshot you provided, I do not see any issue.

The field that you are making use of is IT0008-Custom Field which has been called in the Infoset. This being a currency field, making a reference to Currency field is alright..

From the screenshot again, the custom field that is being used makes reference to HRP9009 Infotype..seems to be a Custom OM Infotype....and the Infotype 0008 screen will already have the code to put data in this custom field, i assume.....therefore, this is also ok.

So, overall the Infoset seems to be ok.

Coming to the Adhoc Query, technically I dont see any problem, meaning..

You have PERNR as selection field and PERNR + Custom Fields as output field..

Can  you do one test and let us know the result...

The PERNR field that you selected as output field, choose that as Infotype 0008-PERNR and also choose Begda and Custom fields from IT0008.

I assume this should work..

Kumarpal