cancel
Showing results for 
Search instead for 
Did you mean: 

Store select-options on database

chrwittm
Advisor
Advisor
0 Kudos

Hello ABAP community,

I would like to store select-options on the database. Of course, beforehand they need to be entered by the user. From this, the two questions arise:

• Is here a way to put select-options on a regular dynpro?

• Is there a re-usable mechanism of saving select-options to the database. Such a mechanism should exist because saving variants of a report is doing basically this.

Thanks for your input,

Christian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can put the selection options and parameters to an itab by function module 'RS_REFRESH_FROM_SELECTOPTIONS'

And you can do anything with it storing to database or exporting to memory.

Sample Code:

DATA:

seltab like RSPARAMS occurs 5 with header line.

CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'

EXPORTING

CURR_REPORT = 'REPORTNAME'

  • IMPORTING

  • SP =

TABLES

SELECTION_TABLE = seltab

EXCEPTIONS

NOT_FOUND = 1

NO_REPORT = 2

OTHERS = 3

.

SUBMIT zprogrep

EXPORTING LIST TO MEMORY

AND RETURN

WITH SELECTION-TABLE seltab .

Answers (4)

Answers (4)

chrwittm
Advisor
Advisor
0 Kudos

Thank you all for your answers,

I will implement this in the near future and let you know about the result.

@Serdar: The idea od coding a subscreen is brilliant. This will be my first try.

Thanks a lot Christian

Former Member
0 Kudos

Hi Christian,

Did the replies help? If so, don't forget to assign points. I gave them some, but feel free to increase them!

See: </people/mark.finnern/blog/2004/08/10/spread-the-love for directions.

Click on the Yellow Star icon in each reply.

You can give:

1 - 10 pointer (solves problem, marks as answered)

2 - 6 pointers (very helpful)

Lots of 2 pointers (helpful)

Thanks!

Linda (and Mark Finnern)

ssimsekler
Active Contributor
0 Kudos

Hi Christian

To use select-options features at an ordinary screen you can use the FM <b>"COMPLEX_SELECTIONS_DIALOG"</b>.

<b>OR</b>

You can code a selection screen

(

SELECTION-SCREEN BEGIN OF SCREEN 1001 .
...
SELECTION-SCREEN END OF SCREEN 1001 .

)

within your program and call it as a subscreen at your screen.

"Variant Management" feature of selection screens is a whole process. That is you can find and utilize it using its FMs (e.g. RS_CHANGE_CREATED_VARIANT, RS_CREATE_VARIANT, RS_REFRESH_FROM_SELECTOPTIONS,...) conveniently. However, I guess it will be sophisticated, i.e. variant id's, and other stuff...

Regarding to your scenario you can prefer storing them by your own procedure at whose basis again the structure <b>"RSPARAMS"</b> exists.

Hope this helps...

*--Serdar

FredericGirod
Active Contributor
0 Kudos

Hi Christian,

What kind of select-option did you want to store ?

There is a way to use the SET (if your field is manage by the SET :). For exemple you can store a complexe selection of profit center with the transaction KSH1(/2/3).

Frédéric

Former Member
0 Kudos

Hi,

what i did is, declared a sreen of type subcreen and called this screen after the PBO.

every thing is fine but the multiple selection button is not working.

can u please tell me how to do that, my mail id is dhadisree@yahoo.com

regards

sree

sergey_korolev
Active Contributor
0 Kudos

Sorry for hasty incorrect answer, thanks Serdar.

Message was edited by: Sergei Korolev