Application Development 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: 

Modifying select option of an infoset in a query

Former Member
0 Kudos

Hello All,

Could you please let me know, if we can modify the select option (which is in the format sp$0008) of an infoset query, in the extras section.

My requirement is that, we have add an entry to the select option sp$0008, if no inputs are given in the selection screen.

I have tried doing it in all the available sections, but it shows an error message that sp$0008 is unknown.

Thanks and Regards,

Naga

7 REPLIES 7

Juwin
Active Contributor
0 Kudos

What is not clear from your post is if this is a standard query or custom. If custom, you should be able to edit that in SQ02 and required code.

If standard: Do you have a transaction assigned to the query program? If so, you can specify a default variant in the transaction. That way, you can specify a default value in that variant.

Thanks,

Juwin

Former Member
0 Kudos

Hello Juwin,

This is a custom query and yes, i have to tried to modify code in extra section.

But getting this sort of error message

Thanks,

Naga

Juwin
Active Contributor
0 Kudos

And what if you use S_LIFEX instead of the sp$... field?

Thanks,

Juwin

Former Member
0 Kudos

Hey Juwin,

Thanks for the quick response.

Let me share my requirement elaborately. Currently we have a query, where in the infoset, join is made between VBRP and VBRK tables, over VBELN field,

Now our requirement is that, we have add a new field in selection screen and report output, from LIKP table and field is LIFEX. We have created an additional field Z_LIFEX for this and added code in extras column for output field and select-options S_LIFEX for selection screen.

By passing the VBRK-ZUONR to LIKP-VBELN, we are fetching LIFEX value. We wrote an check statement to see if the LIFEX is present in the selection screen S_LIFEX.

Now, when we run report by passing the existing parameters along with new parameter, it is working fine. But when we pass LIFEX alone, it is giving timeout error, because all the records of VBRK and VBRP tables are being considered.

To avoid this, we thought including a logic, such that, if no other inputs are given in selection screen, other than LIFEX. We will fetch VBELN from LIKP table, and then pass that to the select options(sp$0008) to avoid runtime error.

Regards,

Naga

Juwin
Active Contributor
0 Kudos

Naga Rao Sunkara wrote:

We will fetch VBELN from LIKP table, and then pass that to the select options(sp$0008) to avoid runtime error.

Thats a very bad idea and inviting more problems. The user should know by default that if they don't pass enough restrictions, the report will timeout. That's the case with any SAP report, nothing special about the query. If you are so concerned about this, may be you can make date fields as mandatory, so that user is prompted to enter atleast that while executing the report.

Thanks,

Juwin

Former Member
0 Kudos

Even we are thinking about the same. Just to want cross check on this with you all.

Thanks for your help.

Former Member
0 Kudos

Hello Juwin,

BTW, can you please let me know how can we make a field mandatory in selection screen other than the custom created one.

Thanks,

Naga