Store select-options on database
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
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
Similar Messages
-
Store select-options preferences
Hi.
How can i store a select-option's user selection in a database table???
I can not use a variant, i need to use a Z Database Table.
Which has to be the structure of this table??
How can i do this???
ThanksHi,
Select-Option : MATNR type mara-matnr.
Ranges : MATNR for MARA-MATNR.
r_matnr = s_matnr.
EXPORT R_MATNR to R_MATNR MEMORY ID 'ZID'.
while retrieving
IMPORT R_MATNR from R_MATNR MEMORY ID 'ZID'.
else store it into a DB table of same structure.
Best regards,
Prashant -
How to hide some select-option of Logical Database in report?
How to hide select-option of Logical Database in report?eg . In Logical Database 'PNP' , my code is 'GET PERNR' , excute the report , select-screen is displayed . I want to hide some select-options , such as PNPPERNR-LOW .
Edited by: rongrong wang on Mar 26, 2008 9:31 AMU need to write code in initialization as
initialization.
loop at screen.
if screen-name = 'PNPPERNR-LOW'.
screen-active = '0'.
modify screen.
endif.
if screen-name = 'PNPPERNR-HIGH'.
screen-active = '0'.
modify screen.
endif.
endloop. -
Select options for the pnp logical database.
Hi ,
We get a default selection screen when we use logical database in HR ABAP.
But we always get the selection elements as "PARAMETERS" and not as "SELECT-OPTIONS".
How can we change it to select options ....
I tried all the options in HR- Report categories but it is not working..
Kindly Help..
Regards,
Ashwin.>
ASHWIN JOHARI wrote:
> Hi ,
> But we always get the selection elements as "PARAMETERS" and not as "SELECT-OPTIONS".
> Ashwin.
Which fields? Almost all of them are defined SELECT-OPTIONS.. you dont' see the range option directly.. click on he options icon & you can enter the ranges.
~Suresh -
How to retrieve data using logical database and custom select options
Hi all,
I have a selection screen which is displayed by logical database PSJ and I have two select options of my own. I need to retrieve data based on both selection screen of logical database and my own select options. How can I do it?
Thanks in advance.Hai Gupta
Check the following Document & Links
1. A logical database is in fact
a program only.
2. This LDB provides two main things :
a) a pre-defined selection screen
which handles all user inputs and validations
b) pre defined set of data
based upon the user selection.
3. So we dont have to worry about from
which tables to fetch data.
4. Moreover, this LDB Program,
handles all user-authorisations
and is efficient in all respects.
5. tcode is SLDB
good info about Logical Database. you can check the link.
http://www.geekinterview.com/question_details/1506
http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
Re: How to Create and Use ldb in reports?
Re: Logical databases
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
Functions for displaying and changing logical databases:
Call Transaction SE36 or
Choose ABAP Workbench -> Development -> Programming environ. -> Logical databases
Interaction between database program and report:
During program processing, subroutines are performed in the database program and events are executed in the report.
To read data from a database tables we use logical database.
A logical database provides read-only access to a group of related tables to an ABAP/4 program.
advantages:-
The programmer need not worry about the primary key for each table.Because Logical database knows how the different tables relate to each other,and can issue the SELECT command with proper where clause to retrieve the data.
i)An easy-to-use standard user interface.
ii)check functions which check that user input is complete,correct,and plausible.
iii)meaningful data selection.
iv)central authorization checks for database accesses.
v)good read access performance while retaining the hierarchical data view determined by the application logic.
disadvantages:-
i)If you donot specify a logical database in the program attributes,the GET events never occur.
ii)There is no ENDGET command,so the code block associated with an event ends with the next event
statement (such as another GET or an END-OF-SELECTION).
1. transaction code SLDB.
2.enter name z<ldb-name>
3.create
4.short text
5.create
6. name of root node (here Ekko)
7. enter short text (f6)
8.node type -> data base table.
9.create
10 change logical DB
riht click on ekko and insert node
here node name ekpo
11.create
12. click on selections
13. press no Should the changed structure of Z<ldb name> be saved first.
14.select tables which you want to join.
15.transfer
16 now you have to o to coding part.
17. save
activate.
19.click to src code
double click on first include and activate
Regards
Sreeni -
SELECT OPTION in logical database PNP
Hi,
when i use ligical database PNP and i'm entering a range in personnel number, in which variables is that stored?
The select option in pnppernr, but this one is initial in start-of-selection and get event.
Is there any othe structure containing the range?
Regards
RainerI think that PNPPERNR is the range. This sample program works for me.
report zrich_0001.
TABLES: pernr.
parameters: p_check.
start-of-selection.
GET pernr.
write:/ pnppernr.
check sy-subrc = 0.
Regards,
Rich Heilman -
Select-options when Using PNP logical database
Hi ,
We get a default selection screen when we use logical database in HR ABAP.
But we always get the selection elements as "PARAMETERS" and not as "SELECT-OPTIONS".
How can we change it to select options ....
I tried all the options in HR- Report categories but it is not working..
Kindly Help..
Regards,
Ashwin.Hi,
execute the program. In the selection screen
For eg:
personel Number select the Mutiple Selection option. After that select the tab select intervals and u can give the range.
Regards,
Srinivas -
Restrict Select-Options for Logical Database field
The way we restrict select options for custom defined select option fields on selection screen.. can we restrict select options for standard Logical Database fields?
i.e. report uses PNPCE logical database and has field called PERNR. I want to restrict select options for this PERNR field so that it has options for 'Select single values' only.
Thanks,
Falguni
Edited by: Falguni V on Nov 13, 2010 6:42 AMYou can user AT SELECTION-SCREEN event, and check whether any record is having high value for PNPPERNR.
-
How to get dynamic select options from logical database?
Hi,
in one of my extended reports (means - overwritten standard SAP functionality in Z-namespace) I'm using LDB 'DDF'. I've been requested to validate some of the dynamic selection options (for example - field HKONT at Document level) and to split the logic depending on the particular value(s).
Tracking what is happened in the LDB program I found that this select option is added as dynamic WHERE clause to the SELECT statement - in a way:
WHERE bukrs = p_burks AND ... AND
(where_tab)
Is there a way to get values of these LDB dynamic select options into my report and if yes - how?
Thanks in advance.
Regards,
Ivaylo Mutafchiev
Senior SAP Abap ConsultantHi,
Try to use the following fm in your report and check
call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'
exporting
curr_report = sy-cprog
mode_write_or_move = 'M'
importing
p_trange = gt_dyn_trange
exceptions
not_found = 1
wrong_type = 2
others = 3.
PS please make a whereused of this fm , how it has been used in LDB's to get dynmic selection values
a® -
Alternative for "check select-options" for select query.
hi all,
my report is using a "GET" syntax, followed by "check select-options".
My senior told me to replace the Get syntax with select query.
Now, my program also has dynamic selection screen.
the dynamic selection screen almost has all the fields of database table.
so, what is the way to replace this check select-options while applying select query?
can you tell me how dynamic selection screen fields are populated? are they stored in some internal table?
thanks for help.HI
Here is some points about LDB.
Logical databases are special ABAP programs that retrieve data and make it available to application programs. The most common use of logical databases is still to read data from database tables by linking them to executable ABAP programs.
However, from Release 4.5A, it has also been possible to call logical databases using the function module LDB_PROCESS. This allows you to call several logical databases from any ABAP program, nested in any way. It is also possible to call a logical database more than once in a program, if it has been programmed to allow this. This is particularly useful for programs with type 1.
Logical databases contain Open SQL statements that read data from the database. You do not therefore need to use SQL in your own programs. The logical database reads the program, stores them in the program if necessary, and then passes them line by line to the application program or the function module LDB_PROCESS using an interface work area
For further on LDB's refer to this link.
[http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9b5e35c111d1829f0000e829fbfe/content.htm]
Hope this will help.
Reward if helpful.
Sumit Agarwal -
whan i am using select-options prior to this i what to display check box on the same line.
when i am selecting the this check box it should execute automaticall
could u plz explain the code clearly with example.search forums.
Re: Dynamic Selection Options
Posted on: Jul 17, 2006 5:50 PM, by user: Praveen -- Relevance: 100% -- Show all results within this thread
am doing exactly as you had stated. But the user wants to see it something like this: 1. For the selection options, he wants to see three box's. a. Technical Name of the field selection. b. ...
Re: regarding selection options
Posted on: Mar 15, 2007 8:46 AM, by user: SHIBA DUTTA -- Relevance: 99% -- Show all results within this thread
you have to use begin of line and end of line. SELECTION-SCREEN BEGIN OF LINE. SELECTION-SCREEN COMMENT 1(10) TEXT-001 FOR FIELD P1. PARAMETERS: ...
Re: Restricting selection-options
Posted on: Jan 18, 2005 8:58 AM, by user: Andreas Mann -- Relevance: 90% -- Show all results within this thread
FOR vbak-vbeln OBLIGATORY DEFAULT '5300000000'. INITIALIZATION. PERFORM init_1001. START-OF-SELECTION. SELECT belnr FROM bkpf INTO bkpf-belnr WHERE bukrs = '0001' AND ...
Check that at least on Selection Options are filled
Posted on: May 25, 2006 4:37 AM, by user: Boater -- Relevance: 90% -- Show all results within this thread
I have a program that has four selection options. The user needs to enter a selection for at least one of the four selection options. ...
possible entry for selection-options
Posted on: Feb 22, 2007 7:32 AM, by user: Tiwa Noitawee -- Relevance: 89% -- Show all results within this thread
F-1 At last 3 alphabets of Prod.hierarchy is Product line (EX1, PC5) that users have to choose via selection-options like this <b>EX1</b> EXCEL 251 : F-1 <b>PC5</b> POWERTOP W-200 ...
select-options multiple selection
Posted on: Mar 5, 2007 3:06 AM, by user: venkateswarao gangavarapu -- Relevance: 87% -- Show all results within this thread
hi can u send code for getting multiple selections in select-options Thanks in advance venkat ...
Submitting Report with selection screen options
Posted on: Apr 27, 2005 5:45 PM, by user: Rajesh Nittala -- Relevance: 85% -- Show all results within this thread
Hi all, I have a situation, in my report i am using a selection screen which contains input select-options are store(range), date (from ..to)....after that ...
sample program to remove standard selection-options & replace user defined.
Posted on: Dec 7, 2005 5:37 AM, by user: Josephine Clara Arokiasamy -- Relevance: 83% -- Show all results within this thread
The standard selection-options are provided for the logical database. i need to supress the standard selection-options ...
Adding default value for a select-options in a selection-screen
Posted on: May 26, 2006 11:51 AM, by user: sid alpay -- Relevance: 77% -- Show all results within this thread
hello gurus, i have a report program with the following select-options in a selection-screen block:
select-options: so_site for MyTable-werks.
i want the so_site ...
Adding Selection Options Fields in Report(Using Query)
Posted on: Aug 25, 2004 5:26 AM, by user: lijo joseph -- Relevance: 76% -- Show all results within this thread
Hi, how can we add Selection Fields Options in Query Reports Which we create using SQ01. I need a default option by which ...
Getting the selection parameters/options in a diffrent program
Posted on: May 11, 2006 3:05 AM, by user: Chad Cheng -- Relevance: 75% -- Show all results within this thread
use Submit to get a report from a diffrent program and I am using variants to get the value of the selection criteria. However, for a less tedious approach, I think it would be better if I get the selection ...
Read options from selection-screen
Posted on: Aug 24, 2006 3:30 PM, by user: Silke Eng -- Relevance: 75% -- Show all results within this thread
Hi Kiran, as all other questions are answered already, remains the one on the select-options. Function module <b>RS_REFRESH_FROM_SELECTOPTIONS</b> returns those. Kind regards, Silke ...
Selection screen for SAP Query: OR between options
Posted on: Jun 29, 2006 3:04 PM, by user: Tania Pouli -- Relevance: 74% -- Show all results within this thread
need a variant where either of two fields should not be 0. Is there some way to add an OR between two selection options? I can't change the actual query because it's used with many other variants. Thanks ...
Pass internal table of selection-options through method!
Posted on: Nov 22, 2004 3:49 PM, by user: Frank Roels -- Relevance: 74% -- Show all results within this thread
I created a selection screen with multiple select-options. Now I want in a method of a class work with the internal ...
select-options: at selection-screen on value-request
Posted on: Sep 18, 2006 10:51 PM, by user: Sumit Agarwal -- Relevance: 72% -- Show all results within this thread
one field is dependent on the values of the other field in the select-options. I am using the "at selection-screen on value-request event on" to populate the select-options field, S_AUFNR, that is dependent ...
Pages: 16 [ 1 2 3 4 5 6 7 8 9 10 | -
Select-options in SELECT query - syntax error
Hi all,
I get the error below when I try to use the select options in a SELECT query . Please help me.
"The IN operator with "SO_AWART" is followed neither by an internal
table nor by a value list."
The code i have used(Logical database PNP is used):
TABLES: pernr,
catsdb.
INCLUDE ztime_cwtr_top. " global Data
INCLUDE ztime_cwtr_f01.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
SELECT-OPTIONS SO_AWART FOR CATSDB-AWART.
PARAMETERS P_THRES TYPE I.
SELECTION-SCREEN END OF BLOCK B1.
Get data from CATSDB table. Workdates within the date interval are considered.
SELECT pernr workdate awart catsquantity beguz enduz status
FROM catsdb
INTO TABLE it_catsdb
WHERE pernr = pernr-pernr AND
workdate GE pn-begda AND
workdate LE pn-endda AND
status IN ('20', '30') AND
awart IN so_awart .
awart IN ('1100', '1137', '1138', '1139', '1140',
'1147', '1148', '1149', '1157', '2003' ).
when I give the values directly i do not get any syntax error, but when I use select options in the where condition I get the syntax error.
I have tried different options like using only the select-options in the where condition.
Thanks in advance.....
MadhuSolved.
Code with syntax error:
include z...top .
include z...fo1.
select-options: xxxxxxx
Code with no syntax error:
select-options: xxxxxxx
include z...top .
include z...fo1.
Thanks for all your help,
Madhu -
How can we pass the select-option value to modulepool program?
hi,
how can we pass the select-option value to modulepool program ?
Because if i declared select-options in executable program and i used SSCRFIELDS to define push buttons in selection screen.
My requirement if enter the values to select-options and press UPDATE pussbotton then i want call screen which contains tablecontrol.
How i get select-option values to PAI of call screen for getting the data from database table to my internal table?Oh I thought that you have selection-screen and again you are working on dialog programming.
if you want to use select-option directly in module pool then it is not possible.
but you can do other way.
create two varaiables
data : v_kun_low like kna1-kunnr,
v_kun_high like kna1-kunnr.
use these two variables in layout ,let user knows that he can not give options like gt,lt,eq ,it will be always BT.
and also when you see normal report program,you can use multiple values in either low or high,but here it is not possibel.
use can enter only low value and high value.
when you come to program point of view
declare one range
ranges r_kunnr for kna1-kunnr.
do the coding like
r_kunnr-low = v_kun_low.
r_kunnr-high = v_kun_high.
r_kunnr-options = 'BT'.
r_kunnr-sign = 'I'.
append r_kunnr.
now you can use r_kunnr in select query ,it will work like select-option.
other than this there is no option.
Thanks
Seshu -
Geting select option value on the basis of filtering criteria
Hi
I have a selection parameter field is PRPS-WERKS. when user will go for f4 help, the value should come as filtered on the basis of the condition : select the respective WBS ELEMENT (PRPS- PSPNR) and select the respective PR LINE item. (The relation is PRPS-PSPNR=EBKN-PS_PSP_PNR and EBKN-BANFN = EBAN-BANFN and EBKN-BNFPO = EBAN-BNFPO).now the value iof WERKS is not comming from the database table PRPS itself. how to manage this thing?Hi,
Refer the link select option in smartforms and read what i suggested..
Regards,
Dhina.. -
I am using a logical database in HR.I use the selection screen of the logical database but i want to restrict a select options for only permit introduce one value.
I restrict in abap to only use values ,nor intervals by example and other conditions.Now i have to restrict to only one value.
it must be work like a parameterHi,
U can use No-extension to restrict multiple selcet option button.
See this link
http://www.sapdevelopment.co.uk/reporting/selscr/selscr_restrictso.htm
*: Report: ZRESTRICT_SELOPT :
*: Author: www.SAPdev.co.uk :
*: Date : 2004 :
*: Description: Demonstrates how to restrict select options to only :
*: allow specific restriction options: :
*: i.e.. EQ, NE, BT etc.. :
REPORT ZRESTRICT_SELOPT.
* Include type pool SSCR
TYPE-POOLS sscr.
TABLES: EKPO.
* Selection-screen
select-options : so_ebeln for ekpo-ebeln,
so_ebelp for ekpo-ebelp.
* Variables for populating restriction data
DATA: gd_restrict TYPE sscr_restrict. "structure containing 2 tables
DATA: gd_optlist TYPE sscr_opt_list, "header line for table 1
gd_*** TYPE sscr_***. "header line for table 2
*INITIALIZATION.
INITIALIZATION.
* Restrict SO_EBELN to only except EQ, BT and NE.
gd_optlist-name = 'KEY1'. "Can be anything
gd_optlist-options-eq = 'X'.
gd_optlist-options-bt = 'X'.
gd_optlist-options-ne = 'X'.
APPEND gd_optlist TO gd_restrict-opt_list_tab.
clear: gd_optlist.
gd_***-kind = 'S'.
gd_***-name = 'SO_EBELN'.
gd_***-sg_main = 'I'.
gd_***-sg_addy = SPACE.
gd_***-op_main = 'KEY1'. "Must be same as above
APPEND gd_*** TO gd_restrict-***_tab.
clear: gd_***.
* Restrict SO_EBELP to only except CP, GE, LT.
gd_optlist-name = 'KEY2'. "Can be anything
gd_optlist-options-cp = 'X'.
gd_optlist-options-ge = 'X'.
gd_optlist-options-lt = 'X'.
APPEND gd_optlist TO gd_restrict-opt_list_tab.
clear: gd_optlist.
gd_***-kind = 'S'.
gd_***-name = 'SO_EBELP'.
gd_***-sg_main = 'I'.
gd_***-sg_addy = SPACE.
gd_***-op_main = 'KEY2'. "Must be same as above
APPEND gd_*** TO gd_restrict-***_tab.
clear: gd_***.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
* PROGRAM =
restriction = gd_restrict
* DB = ' '
EXCEPTIONS
TOO_LATE = 1
REPEATED = 2
SELOPT_WITHOUT_OPTIONS = 3
SELOPT_WITHOUT_SIGNS = 4
INVALID_SIGN = 5
EMPTY_OPTION_LIST = 6
INVALID_KIND = 7
REPEATED_KIND_A = 8
OTHERS = 9.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Kindly reward points for the answer which helped u and close the thread if ur problem got solved.
Message was edited by: Judith Jessie Selvi
Maybe you are looking for
-
Can I configure Lightroom to use all my cores in case of actions like imports?
Hi! I've a CPU with four cores and also enabled hyperthreading. But if I do an import by Lightroom it uses at best 25 % of my overall CPU performance. If it would start many low prio threads, it would speed up my import a lot, as I've import very oft
-
I would like to have access to both computer connect together. Not in target mode, I want to see the HD of my new iMac on the desktop of my G5 and also the Hd from my G5 on my iMac for a few days. Is it possible?
-
How to enable a ipod when you forgot the icloud you used to set it up ?
I had my friend charge my ipod because my charger broke and when I got it back she said that her cusin disabled my ipod on "accident" . So I was like okay cool like whatever I thought it was going to be easy to enable it but when I connected it to it
-
PV2012 locals sometimes don't behave well...
Here's one example: The squiggles are due to local paint with highlights = -30. Note: global highlight reduction of same, or greater strength, does not result in so much darkness, nor so much desaturation. Note2: marked darkening/grayness/desaturatio
-
I want to make an in app purchase on a game but it asks for my security question (which I can't remember) I click on can't remember where it takes me to safari on Apple.com where I press send reset security question to my email I click it it says it