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: 

Infoset of Query, access Query select-option in Infoset code, how

Former Member
0 Kudos
1,783

Hello all,

I am attempting to access a select-option from a query in the coding section of the Infoset, "AT START-OF-SELECTION". Since the select-option does not exist in the infoset, I am attempting to use a field-symbol to reference the query selection-option range table.

Ultimately what I want to do is modify the range table based upon the user's authority, deleting individual values or ranges they do not have read access to and creating a pop-up notifying the user.

The following code is what I started with. This does not pass the syntax check, but hopefully you will be able to understand what I'm attempting to do.

This is the syntax error:

"SP$00001" and "<T_ITAB>" are type-incompatible".

ranges: wa for bseg-hkont.

types: t_wa like wa.

*

field-symbols: <t_itab> type table.

assign 'SP$00001' to <t_itab> . " Query select-option

loop at <t_itab> into wa.

  • delete if line does not pass authority check

endloop.

*If any line didn't pass authority check, and was deleted

  • display popup with info.

*endif.

Thanks

Bruce

4 REPLIES 4

former_member333737
Active Participant
0 Kudos
378

Hi Bruce,

I think you can create a selection screen without using coding.

Go to Tcode SQ02. Go to the extras tab.

There is a create option where where you can maintain your select-options by just clicking on it.

Hope this can help .

Regards,

Nikhil.

0 Kudos
378

Nikhil,

Because the field I want to validate is a possible selection-screen field in the query, from the logical database, if when editing the query I do not check the box to include this field as a selection-option, it is not used when the get takes place, even if I create a selection-option for that same table field in the infoset.

The logical database is BRF.

The field in question is BSEG-HKONT.

If I do not check GENERAL LEDGER ACCOUNT as a selection field in the query definition, all GL accounts are returned by the GET. This is true even if I create a selection-option in the infoset for field BSEG_HKONT.

If BSEG_HKONT was not a slection field of the logical database, BRF, this might not be a problem.

As it is a problem, I need to find a way to see the contents of the selection-option range table from the query in the infoset, and also be able to modify that same range table in the infoset, deleting rows that do not pass an authority check.

I hope this is clear.

Thanks

Bruce

Former Member
0 Kudos
378

No answer, just closing the question.

I did not find a solution.

dirk_wittenberg
Contributor
0 Kudos
378

Hi,

though this question has been closed, here a hint how it works:

The assign has to changed into :

assign ('SP$00001[]') to <t_itab> .

Regards,

Dirk