Parameter or select-option
hello all,
i have requierment in which i am confused.I have to declare a field in selection screen for user input. I have declared the field as parameter.But there is no multiple select option. And user ant to have multiple select option(.i.e interval range).
The problem is the field i have declared in parameter is type c.Like:: Enterprise(30) type c,
divivsion(30) type c.
So this is not having any interval range.If i use select-option i can provide the range. SO plz help how can i define the parameter in select-option if its possible.
Most important thing is is there is no filed for refrence like: s_matnr for mara-matnr. as we can define in select-option.
Plz suggest some thing on this.
Thanks & Regards,
Anu Maheshwari
Hi Anu,
Decalare it as
1)If you want your SELECT -OPTIONS to behave like parameters. USe the option.
<b>SELECT-OPTIONS ..... NO INTERVALS NO-EXTENSION</b>
REPORT abc.
DATA : v_enterpr(30) TYPE c,
v_divin(30) TYPE c.
SELECT-OPTIONS : s_enterp FOR v_enterpr NO INTERVALS NO-EXTENSION ,
s_divin FOR v_divin NO INTERVALS NO-EXTENSION .
2)If you want to have it as SELECT-OPTIONS.
Then
REPORT abc.
DATA : v_enterpr(30) TYPE c,
v_divin(30) TYPE c.
SELECT-OPTIONS : s_enterp FOR v_enterpr ,
s_divin FOR v_divin .
Refer to the program I gave in this link for more details.
Re: Difference of "NO INTERVALS NO-EXTENSION" and "Parameter"
Regards,
Arun Sambargi.
Similar Messages
-
Change the Parameter as Select option
Hi Guy's,
Please help me friends, present requirement is like this : change the Parameter into Select-Option.
Here they are using one function module, this function module import parameter taking single value, how loop this function module with in this select-option.
PARAMETERS p_fictr LIKE fmfctr-fictr.
START-OF-SELECTION.
Move the select options to internal tables (import parameter for fn)
move_sel_option : sel_buk s_bukrs ,
sel_pern s_pernr ,
sreinr s_reinr ,
spdatv s_pdatv ,
sberei s_berei .
Call the function to get all trips corresponding to sel criteria
CALL FUNCTION 'ZHR_GET_FUND_TRIPS'
EXPORTING
p_fictr = p_fictr
p_sub = p_sub
TABLES
s_bukrs = s_bukrs
s_pernr = s_pernr
s_reinr = s_reinr
s_pdatv = s_pdatv
s_berei = s_berei
i_trip = i_trip
EXCEPTIONS
OTHERS = 1.
Thanks and Regards,
Saihi,
You can first the field values using the select statement and then loop that internal table and pass the values to the function module.
try this
*PARAMETERS p_fictr LIKE fmfctr-fictr.
select-options: s_fictr for fmfctr-fictr.
START-OF-SELECTION.
Move the select options to internal tables (import parameter for fn)
move_sel_option : sel_buk s_bukrs ,
sel_pern s_pernr ,
sreinr s_reinr ,
spdatv s_pdatv ,
sberei s_berei .
select fictr
from fmfctr
into tabel itab
where fictr in s_fictr.
loop at itab.
Call the function to get all trips corresponding to sel criteria
CALL FUNCTION 'ZHR_GET_FUND_TRIPS'
EXPORTING
*p_fictr = p_fictr
p_fictr = itab-fictr
p_sub = p_sub
TABLES
s_bukrs = s_bukrs
s_pernr = s_pernr
s_reinr = s_reinr
s_pdatv = s_pdatv
s_berei = s_berei
i_trip = i_trip
EXCEPTIONS
OTHERS = 1.
endloop.
regards,
Veeresh -
Import Parameter as Select Option for a FM in ECC 6.0
Hi All,
Can someone help me get the import parameter of a function module to be of the type select-options( the way it is used in reports) in ECC 6.0.
Thanks for all your help in advance.
DivyaWhat I do is as following....
I create two parameters...One for <b>START</b> and the other for <b>END</b>....Then, inside my FM I create a RANGE...
DATA: BEGIN OF r_datum OCCURS 1,
sign(1),
option(2),
low TYPE vekp-vhilm,
high TYPE vekp-vhilm,
END OF r_datum.
Passing the START to low and END to high....
P.S: Don't forget to assign points to useful answers.
Greetings,
Blag.
Message was edited by:
Alvaro Tejada Galindo -
Change from Parameter to Select-options.
Hi All,
Requirement is to change the existing program.
One of my requirement is to change parameter(P_VKORG) to Select-options(S_VKORG).
I mean earlier we have only one Slaes Organization, now we have got to use multiple Sales organizations. For this requirement I have used select-options insted of Parmeters.
But the code has:
a)PERFORMS using Parameters( P_VKORG). This inturn is used in the select statement of the FORM-ENDFORM.
b)READ statement also has P_VKORG in where condition.
How should these be replaced with Select-options(S_VKORG)?
What would be the effect if I directly replace them with S_VKORG.
Kalyani Tyou cannot just directly replace with S_VKORG.
select option is a structure with 4 fields, sign, option, low and high, hence it has to be dealt accordingly.
a. performs has to be changed to 'tables S_VKORG'
eg. perform get_data tables s_vkorg.
b. read statement has to be modified to deal with multiple values. best option will be to select for data in s_vkorg, and save in an internal table.
for eg, if select option was for vkorg,
select vkorg from tvko into t_tvko where vkorg in s_vkorg.
now t_tvko has list of possible vkorgs - regardless of we had a range or ne or gt or CP or whatever we had in select option.
now modify the read table to do for entries in T_TVKO.
c. in the select statement which is used in forms, wherever you see ' = P_vkorg' , replace with IN S_VKORG. -
Selection-Screen Parameter and select option
Hi
I had a very small and silly problem , i have a selection screen in which i had one select-options and another parameter .
when i define both variable as select option i get output but if i define plant as parameter i dont get any output, .the code .
SELECTION-SCREEN : BEGIN OF BLOCK s_screen WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_matnr FOR plaf-matnr.", " OBLIGATORY,
PARAMETERS: s_werks like plaf-pwwrk. " , " OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK s_screen.
in this code when
i enter material number i dont get output .
i enter plant the i get output
SELECT afko~aufnr
afko~gamng
afko~plnbez
afpo~dwerk
afpo~psmng
afpo~matnr
INTO CORRESPONDING FIELDS OF TABLE i_afko
FROM afko INNER JOIN
afpo ON afpoaufnr = afkoaufnr
WHERE afpo~dwerk = s_werks
and afpo~matnr IN s_matnr
AND afpo~elikz = space.
regards
answers will be definately awarded pointsHi
When you use the plant in select-option, your code should be:
WHERE afpo~dwerk IN s_werks
and afpo~matnr IN s_matnr
if it's parameter:
WHERE afpo~dwerk = s_werks
and afpo~matnr IN s_matnr
Are u sayng in the first case you get the data and in the second one you don't?
Max -
Parameter to select-option conversion
Hello Friends,
I have a parameter field on selection screen and it is optional.
If user enters any data on parameter, then I have to retrieve only corresponding value to the parameter from table.
If user does not enter any data in parameter, then I have to fetch all the records.
I want to convert this to selection-option.
please let me know....Hi,
Instead of converting why cant you do like this ,
if P_field is initial.
select * from <table>
into table itab.
else.
select * from <table >
into table itab
where field = p_field.
endif.
You can use select-option as parameter in this way,
Select-options : s_field for wa-field no intervals no-extension.
Regads,
Raghava Channooru -
Set Parameter for Select Option & Customized field
Hi All,
I had 2 questions here:
1. This field in the report is a customized field and did not have any parameter.
Is there any way to set the parameter for such fields?
2. This field is a select option in the report.
How can i set the parameter for the select option with lower and higher range?>
Sally Teo wrote:
> Hi All,
>
> I had 2 questions here:
>
> 1. This field in the report is a customized field and did not have any parameter.
> Is there any way to set the parameter for such fields?
----> plz ref ur prev.Post.
>
> 2. This field is a select option in the report.
> How can i set the parameter for the select option with lower and higher range?--->
i dont think its possible to give High/low values to them, better to write small BDC to pass the data.
regards
Prabhu -
How to hold data in parameter or select option
i have define parametrs/select option.
once i have run report , i will enter certain value in that parametrs or select option.when i run report again i want same value in that parametrs or select option which i enter previously.urgentHi
Try this:
DATA: NEXT_RUN.
PARAMETERS: P TYPE I.
START-OF-SELECTION.
WRITE P.
INITIALIZATION.
IMPORT NEXT_RUN FROM MEMORY ID SY-REPID.
IF SY-SUBRC <> 0.
NEXT_RUN = 'X'.
EXPORT NEXT_RUN TO MEMORY ID SY-REPID.
ENDIF.
AT SELECTION-SCREEN OUTPUT.
IF NEXT_RUN = 'X'.
P = 2.
ENDIF.
Max -
We have a parameter and select option in Selection Screen, by using the parameter and select option in the select query, with out passing the any values to the Parameter and SO, how we will get the records?
hi check this..
if the parameter is empty if will not work in the select statement..you can get the values for the select options with empty structures..
check this..
tables:mara .
data: begin of itab occurs 0,
matnr like mara-matnr,
end of itab .
parameters:p_matnr like mara-matnr.
select matnr from mara into table itab
where matnr = p_matnr.
loop at itab.
write:/ itab-matnr.
endloop.
it will not fetch data..
for select-options
tables:mara .
data: begin of itab occurs 0,
matnr like mara-matnr,
end of itab .
select-options:s_matnr for mara-matnr.
select matnr from mara into table itab
where matnr in s_matnr.
loop at itab.
write:/ itab-matnr.
endloop.
it will fetch data..
regards,
venkat -
Hi,
I want to keep select-option in AR02 txcode in the selection screen SETTINGS, i want
to replace REPORT DATE from parameter to select-options.
I have copied the standard programs RAGITT_ALV01 and LDB ADA into
Zprogram can anyone guide me to this requirment.
Regards
VEnk@Hi ilesh,
Thanks for the answer. Actually someone have prepared this report but report is running
correctly when we are not checking the depreciation checkbox for the date rang (select-options).
It is not running correctly i mean it is fecthing wrong data according to the date
range when deprication checkbox is checked. Hope you got it now.
Please check my subroutine get data.
FORM GET_DATA .
Populate Report Start Date
CLEAR FS_VARI_CONTENTS.
FS_VARI_CONTENTS-SELNAME = 'BERDATUM'.
FS_VARI_CONTENTS-KIND = C_P.
FS_VARI_CONTENTS-SIGN = C_I.
FS_VARI_CONTENTS-OPTION = C_EQ.
FS_VARI_CONTENTS-LOW = BERDAT1.
FS_VARI_CONTENTS-HIGH = SPACE.
APPEND FS_VARI_CONTENTS TO T_VARI_CONTENTS.
Populate Variant table
PERFORM POPULATE_VARIANT_TABLE.
W_FLAG = '1'.
Submit report ZRAGITT_ALV01 using variant PPE_VARIANT
PERFORM SUBMIT_REPORT_ZRAGITT_ALV01 TABLES ITAB_DATA1[]
USING W_FLAG.
IF ( BERDAT2 IS NOT INITIAL ) AND
IF BERDAT1 NE BERDAT2.
DELETE T_VARI_CONTENTS INDEX 1.
Populate Report End Date
CLEAR FS_VARI_CONTENTS.
FS_VARI_CONTENTS-SELNAME = 'BERDATUM'.
FS_VARI_CONTENTS-KIND = C_P.
FS_VARI_CONTENTS-SIGN = C_I.
FS_VARI_CONTENTS-OPTION = C_EQ.
FS_VARI_CONTENTS-LOW = BERDAT2.
FS_VARI_CONTENTS-HIGH = SPACE.
INSERT FS_VARI_CONTENTS INTO T_VARI_CONTENTS INDEX 1.
W_FLAG = '2'.
Submit report ZRAGITT_ALV01 using variant PPE_VARIANT
PERFORM SUBMIT_REPORT_ZRAGITT_ALV01 TABLES ITAB_DATA2[]
USING W_FLAG.
ENDIF. " IF BERDAT1 NE BERDAT2
IF W_ENDDATE IS NOT INITIAL.
IF W_ENDDATE NE BERDAT1.
DELETE T_VARI_CONTENTS INDEX 1.
Populate Report End Date
CLEAR FS_VARI_CONTENTS.
FS_VARI_CONTENTS-SELNAME = 'BERDATUM'.
FS_VARI_CONTENTS-KIND = C_P.
FS_VARI_CONTENTS-SIGN = C_I.
FS_VARI_CONTENTS-OPTION = C_EQ.
FS_VARI_CONTENTS-LOW = W_ENDDATE.
FS_VARI_CONTENTS-HIGH = SPACE.
INSERT FS_VARI_CONTENTS INTO T_VARI_CONTENTS INDEX 1.
W_FLAG = '3'.
This is where i was strucked in.
Regards
VEnk@
Edited by: Venkat Reddy on Sep 21, 2009 12:59 PM -
Passing parameter from selection screen to corresponding report program.
Hi all,
I am developing a report in which there is a selection screen containing 2 list boxes having month 'from' and 'to' ;ie the month range for which the report is to be run and a parameter for year.below it i have 2 radio button options which will lead to the report that the user clicks on.
I have done the following in the code.
selection-screen begin of block b1 with frame title text-001.
parameters: month1(10) as listbox visible length 10 obligatory.
parameters: month2(10) as listbox visible length 10.
parameters: year(4) obligatory.
selection-screen : end of block b1.
selection-screen: begin of block b2 with frame title text-002.
parameters: rb1 radiobutton group g1,
rb2 radiobutton group g1.
selection-screen : end of block b2.
if rb1 = 'X'.
submit ZMIS1.
ENDIF.
if rb2 = 'X'.
submit ZMIS2.
endif.
Now i want the values selected in the listbox and the year to be passed in the report that will be selected in the radiobutton (ie ZMIS1 or ZMIS2) so that the corresponding report output will be displayed directly with the inputs given in the selection screen .
Please tell me how to do this.Thanks in advance.You also have to pass Selection-screen data for called program the way it has been shown down.
REPORT ZVENKAT_ALV_LIST.
DATA:
IT_RSPARAMS TYPE STANDARD TABLE OF RSPARAMS,
WA_RSPARAMS LIKE LINE OF IT_RSPARAMS.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: MONTH1(10) AS LISTBOX VISIBLE LENGTH 10 OBLIGATORY.
PARAMETERS: MONTH2(10) AS LISTBOX VISIBLE LENGTH 10.
PARAMETERS: YEAR(4) OBLIGATORY.
SELECTION-SCREEN : END OF BLOCK B1.
SELECTION-SCREEN: BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
PARAMETERS: RB1 RADIOBUTTON GROUP G1 USER-COMMAND UC1,
RB2 RADIOBUTTON GROUP G1.
SELECTION-SCREEN : END OF BLOCK B2.
IF RB1 = 'X'.
WA_RSPARAMS-SELNAME = 'P_MATNR'. "PARAMETER or SELECT-OPTION of the called program
WA_RSPARAMS-KIND = 'P'. "S=Select-options P=Parameters
WA_RSPARAMS-SIGN = 'I'.
WA_RSPARAMS-OPTION = 'EQ'.
WA_RSPARAMS-LOW = '11010'.
WA_RSPARAMS-HIGH = SPACE.
SUBMIT ZMIS1 WITH SELECTION-TABLE RSPARAMS AND RETURN.
ENDIF.
IF RB2 = 'X'.
WA_RSPARAMS-SELNAME = 'P_MATNR'. "PARAMETER or SELECT-OPTION of the called program
WA_RSPARAMS-KIND = 'P'. "S=Select-options P=Parameters
WA_RSPARAMS-SIGN = 'I'.
WA_RSPARAMS-OPTION = 'EQ'.
WA_RSPARAMS-LOW = '11010'.
WA_RSPARAMS-HIGH = SPACE.
SUBMIT ZMIS2 WITH SELECTION-TABLE RSPARAMS AND RETURN.
ENDIF.
Thanks
Venkat.O -
Passing select-options value in method
How to pass select-options value in method ?
Example:
Select-options: carrid for spfli-carrid.
class cl_myclass implementation.
select carrid connid from
spfli where carrid in carrid.
endclass.
ThanksHello Anee
The coding of this functionality is quite simple:
REPORT zmy_report.
DATA: go_myclass TYPE REF TO zcl_myclass,
gd_repid TYPE syst-repid.
PARAMETERS:
p_bukrs ...
SELECT-OPTIONS:
o_kunnr ...
START-OF-SELECTION.
gd_repid = syst-repid.
CREATE OBJECT go_myclass
EXPORTING
id_calling_program = gd_repid.
And that's how your CONSTRUCTOR method should look like:
METHOD constructor. " IMPORTING parameter id_calling_program
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = id_calling_report
TABLES
SELECTION_TABLE = me->mt_selopts.
" NOTE: define mt_selopts as instance attribute of table type RSPARAMS_TT
ENDMETHOD.
Finally you have to extract the parameter and select-options from MT_SELOPTS.
Regards
Uwe -
Symaltaneous use of select-option and parameters in smartforms .
hello Abaper,
I am design a smartforms . we have given some input. when we use only parameters it works properly. as same when we use select-option only its works .
But when i use both parameter and select option at that time error generate .
Actually call function is not works .
So please give me proper idea how to solve this problem .
Regards
kamal kishoreHi ,
Still problem is not solved.
i want to call following fields but function modules show run time error. IF separately i call only parameter its run properly.
in the same way if i call only select option is runs properly.
please suggest me how can i call both the things.
PARAMETERS: P_BUKRS TYPE BSEG-BUKRS OBLIGATORY,
P_GJAHR TYPE BSEG-GJAHR OBLIGATORY.
parameters: P_SECCO type SECCODE-SECCODE OBLIGATORY.
*SELECT-OPTIONS : P_SECCO FOR SECCODE-SECCODE OBLIGATORY.
PARAMETERS: P_QSCOD TYPE J_1IEWTNUMGR-QSCOD OBLIGATORY.
SELECT-OPTIONS: P_BUDAT FOR BKPF-BUDAT OBLIGATORY,
P_BLART FOR BKPF-BLART,
P_J_HLN FOR J_1IEWTCHLN-J_1IEXTCHLN,
P_J_HDT FOR J_1IEWTCHLN-J_1IEXTCHDT OBLIGATORY,
P_LIFNR FOR LFB1-LIFNR.
regards
kamal
Edited by: kamal_kishore_sah on Apr 12, 2011 7:44 AM -
Select options , Parameters
Guy , if I write N* in a parameter or select option field , and I want the system to bring me all coincidences with N in a select , How can I do that ?. How it works , thank you.
Hi
U should obtain automatically what you need for select-options, for parameters u should replace * with % before doing the select.
PARAMETERS: P_PARAM(10).
REPLACE '*' WITH '%' INTO P_PARAM.
IF SY-SUBRC = 0.
SELECT * FROM <TABLE> WHERE <FIELD> LIKE P_PARAM
ELSE.
SELECT * FROM <TABLE> WHERE <FIELD> = P_PARAM
Max -
How to set the parameter selection *optional* for each subreport?
Hi,
I am using Crystal Reprots 11.
I create 10 subreports, and each subreport contains a Parameters Field.
The 10 subreports are put in 10 footer sections in increasing order, i.e. subreport1, subreport2, subreport3, ..., subreport10.
When I use "Print Preview" to take a look at the whole report, CR prompts a "Edit Values" window for selecting parameter values for all 10 subreports.
For example, if I only select parameter values for subreport1 and click "OK", 9 error messages on the "Edit Values" window come out above the selection list box of every other subreports (i.e. subreport2 ~ subreport10) showing that: 'The value is not valid'.
Sometimes, I just want to review some specific subreports but not all.
How should I do to set the parameter selection optional (not mandatory) for each subreport?
Thank you in adavance.
Edited by: Holdup on Feb 17, 2012 3:44 PMHi,
Here's how you can make the prompts optional (Assuming you're using CR 2008 or higher):
1) Go into each subreport
2) You should see the parameter in the Field Explorer. Right-click the name and select Edit > Look for an option called 'Optional Prompt'. Set it to true
3) If you have a record selection in the subreport, then you need to modify the selection formula to something like this:
if not(hasvalue({?Parameter_Name})) then True else = {?Parameter_Name}
Hope this helps!
-Abhilash
Maybe you are looking for
-
Installed Lion from AppStore-looks like running Leopard & Lion-wierd
I installed Lion from the AppStore- by all accounts- it's running Lion. Yet when my machine is turned off and powered back on, the Snow Leopard appears and I lose Lion background. I have a suspiscion it is running both somehow because my computer is
-
Question about Receipt files found in ~\Library\Receipts
Hi there, I recently bought a Mac Pro and now installing all my software for music production. Although I'm new to Snow Leopard, I've been using Tiger for the last five years, so I do know a little bit about Macs. My problem is that for some reason t
-
Workflow notification delegated to the originator contains an error message in notification content
Hi All, We are using a workflow for managing User Access Request(to get new responsibilities) where approval hierarchy is set via AME rules. Facing an issue, when approver has set a vacation rule and to whom the notification delegated happens to be t
-
Import .m2t into Adobe After Effects CS6
Hi all. I'm trying import .m2t video file into Adobe After Effects CS6 but it says After Effects error: file cannot be imported - this .m2t file is damaged or unsupported I've got a full version of AEE. I'm sure that this file is not damaged. I have
-
Oracle WebCenter Adapter for MS SharePoint is not working
Can anyone please help me? I have downloaded the SharePoint adapter off of the oracle web site and followed the configuration from http://download-uk.oracle.com/docs/cd/B32110_01/webcenter.1013/b31074/jpsdg_content.htm#BABBCIEH. I have also downloade