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

Regenerating queries with hyphens and custom data retrieval programs?

Former Member
0 Likes
1,717

After a recent stack upgrade, a five-year old production query bombed off because the SAP-generated code had hyphens in structure names.

This query also callsa custom data retrieval Z program.

What I did as a quick work-around was to:

1) pull up the complete generated program (the one whose name starts with "AQ" and has all those "equal signs" in it);

2) copy it to a Z program;

3) change the hyphens to underscores;

4) recompile it.

But what is the correct way to do this? Can the full program be regenerated correctly with underscores instead of hyphems, even when it calls a custom program?

If not, will I have to get an access key to make the repairs in the original "AQ" query program?

Sorry not to know this, but SAP didn't consider ReportWriter and Query part of the ABAP (Objects) 2003 Certification sequence. (SAPScript either, for that matter._

Thanks

Dave

After a recent stack upgrade, a five-year old production query bombed off because the SAP-generated code had hyphens in structure names.

This query also callsa custom data retrieval Z program.

What I did as a quick work-around was to:

1) pull up the complete generated program (the one whose name starts with "AQ" and has all those "equal signs" in it);

2) copy it to a Z program;

3) change the hyphens to underscores;

4) recompile it.

But what is the correct way to do this? Can the full program be regenerated correctly with underscores instead of hyphems, even when it calls a custom program?

If not, will I have to get an access key to make the repairs in the original "AQ" query program?

Sorry not to know this, but SAP didn't consider ReportWriter and Query part of the ABAP (Objects) 2003 Certification sequence. (SAPScript either, for that matter._

Thanks

Dave

12 REPLIES 12
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,623

David, you can certainly regenerate the query program from SQ01.

Select the query, then from the menu, choose, Query, More Functions, Adjust. From the same menu, then choose, Generate Program. I believe that the code gerneration will take care of your problem.

Regards,

Rich heilman

Read only

0 Likes
1,623

Rich -

I'll try it and come back to reward if it works.

Thanks

Dave

Read only

Former Member
0 Likes
1,623

You should regenerate your query in SQ01, and retransport the same to production.

Regards,

Ravi

Read only

0 Likes
1,623

Ravi -

Thanks - I will try what you/Rich suggest and come back to reward.

Dave

Read only

0 Likes
1,623

Rich/Ravi -

"Adjust" and "Generate Program" are both 'greyed-out' in the "More Functions" submenu of the "Query" menu.

???

Read only

0 Likes
1,623

Not sure why they are greyed out and I don't see in my 46c system how they ever would be, there is not authoritiy check which is shutting them off. I would suggest you look at your version to see if there are any authority checks shutting it off, or run SQ01, then immediatly type /NSU53 into the transaction box at the top of the gui, maybe there authority check will show there.

Regards,

Rich Heilman

Read only

0 Likes
1,623

Ravi/Rich -

No - the adjust/generate did nothing - the program still blows off at runtime on the same compile error.

???

Dave

Read only

0 Likes
1,623

What release are you working with? And what exactly is the error again?

Regards,

Rich Heilman

Read only

0 Likes
1,623

ECC 5.0 but with SAP Web AS, not NW2004 or NW2004s.

The error is simple - when the SAP code was originally generated back in 2001-2, it was generated with hyphens in field names of structures.

So when you execute the transaction and the actual query program compiles, it blows off on the usual "Unicode" blah-blah-blah error about not allowing hyphens inside field names.

I fixed a bunch of these errors at NASA in z-code and even found a few that SAP had missed in its own code, but never hit a query program.

Unless you can pull a rabbit out of your hat, I think I'm going to have to get the access key and modify/recompile the original generated AQ program.

Thanks for hanging in there with me on this one.

Dave

Read only

0 Likes
1,623

First.....

<i>ECC 5.0 but with SAP Web AS, not NW2004 or NW2004s.</i>

How is this possible, ECC 5.0 runs on WebAS 6.40 which is a part of NW2004. So you are running NW2004.

Next, if you modify the query, the next generation of the query would overwrite your changes, have you checked OSS about query generated programs and unicode checks?

Regards,

Rich heilman

Read only

0 Likes
1,623

I personally have no idea.

I didn't modify the original program to get it to work - I modified a z-copy. I was hoping that regeneration means recompile the original replacing unwanted hyphens with underscores.

I haven't checked OSS notes but I suppose I'll have to.

But I suspect I'll need to get the access key and modify the generated code - I think that's what they had to do at a previous client.

2 points for general kindness, even though no answer.

Read only

Former Member
0 Likes
1,623

Hi

No need to copy the generated program to run your query.

As soon as you generate a program for a particular query(As Rich states) it will create an ABAP program. That is the reason you need to generate the program as soon as you made any changes to the existing Query.

Regards

Su