How to pass value to select-option parameter using SET PARAMETER Command
Hi,
Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??
Passing values to parameter id
set parameter id 'VKS' field kschl.
set parameter id 'VKO' field vkorg.
set parameter id 'VTW' field vtweg.
set parameter id 'KDA' field erdat.
set parameter id 'MAT' field matnr_from.
Change condition price.
call transaction 'VK12' and skip first screen.
Thanks in advance.
Regards,
Balamurugan.
Hi,
instead of using set parameters and dden call transaction use this..........
submit RV13A004 WITH SELECTION-TABLE rspar
Effect
If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
SELNAME (length 8),
KIND (length 1),
SIGN (length 1),
OPTION (length 2),
LOW (length 45),
HIGH (length 45).
To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
Notes
In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
Cheers
Will.
Similar Messages
-
How to pass values to select options of custom transactions?
I have to call custom transaction-ZMM_POST from my custom report.
I have to pass values to select options(Not to parameters) of ZMM_POST from my report only.
Please tell me how to pass values to select options of custom transactions?Have you tried this?
DATA: T_RSPARAMS TYPE STANDARD TABLE OF RSPARAMS WITH HEADER LINE.
T_RSPARAMS-SELNAME = "S_BUKRS".
T_RSPARAMS-KIND = "S".
T_RSPARAMS-SIGN = "I".
T_RSPARAMS-OPTION = "BT".
T_RSPARAMS-LOW = "100".
T_RSPARAMS-HIGH = "300"
APPEND T_RSPARAMS.
SUBMIT Z_DUMMY WITH SELECTION-TABLE T_RSPARAMS.
Greetings,
Blag. -
Passing value to select options screen.
Hi All,
Can anybody help me how to pass a value to select option screen from another screen?
It's like a user enters a value in a input field and press a button to navigate to the next screen which contains the select option fields.How can i show the value enterd in the previous screen to be shown in one of teh input field in the select option screen.Hi,
Store the values that you have to pass in a global variable declared in component controller and
Use the following piece of code in the second view,
DATA: lt_range_table TYPE REF TO data,
rt_range_table TYPE REF TO data,
read_only TYPE abap_bool,
typename TYPE string.
* create a range table that consists of this new data element
lt_range_table = lo_r_helper_class->create_range_table( i_typename = 'MATNR' ).
FIELD-SYMBOLS: <tab> TYPE INDEX TABLE,
<struct> TYPE ANY,
<wa> TYPE ANY,
<option> TYPE char2,
<sign> TYPE char1,
<high> TYPE ANY,
<low> TYPE ANY,
<wa_values> TYPE ANY.
ASSIGN lt_range_table->* TO <tab>.
APPEND INITIAL LINE TO <tab> ASSIGNING <wa>.
ASSIGN COMPONENT 'OPTION' OF STRUCTURE <wa> TO <option>.
ASSIGN COMPONENT 'HIGH' OF STRUCTURE <wa> TO <high>.
ASSIGN COMPONENT 'LOW' OF STRUCTURE <wa> TO <low>.
ASSIGN COMPONENT 'SIGN' OF STRUCTURE <wa> TO <sign>.
<sign> = 'I'. "Default sign which you want to give
<option> = 'EQ'. "Default option you want to give
<low> = 'M-01'." pass your valriable name here
*<high> = 'High_value'.
* add a new field to the selection
lo_r_helper_class->add_selection_field( i_id = 'S_MATNR'
i_description = 'Material'
it_result = lt_range_table ).
Regards,
Radhika. -
How to Captured Value into Select-Options Range Table Without "Enter"
Hi,
I defined a set of Select-Options in the Web Dynpro. I found that the value for the Select-Options will not be captured whenever I manually type in the value instead of choosing it from F4 Help Drop Down.
However, this problem can be resolved if I manually type in the value for Select-Options in the Selection Field and I press "Enter". Without pressing "Enter" value will not be captured.
Any solution for this issue? Please help.Hi Kris,
My problem is only when the user key in the value themselves rather than choosing it from Select-Options drop down value. Most of the time user will know what value to key in and will skip the step to choose from the Drop Down List. Thus, if this happen, the value keyed in by the user will not be able to capture into the range table.
I am using this logic to capture the value for selection item:
wd_this->m_helper->get_selection_screen_items(
IMPORTING et_selection_screen_items = lt_sel_item ).
* Values From Selection Screen
LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
CASE <fs_sel_item>-m_id.
WHEN `PERNR`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_pernr>.
WHEN `BUKRS`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_bukrs>.
WHEN `STAT2`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_stat2>.
WHEN `WERKS`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_werks>.
WHEN `BTRTL`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_btrtl>.
WHEN `PERSG`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persg>.
WHEN `PERSK`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persk>.
WHEN `ABKRS`.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_abkrs>.
WHEN `BEGDA`.
ASSIGN <fs_sel_item>-m_value->* TO <fs_begda>.
ENDCASE.
ENDLOOP.
E.g. User key in the BUKRS without using the Drop Down Value provided by the Select-Options. For this case, <fs_bukrs> table will be initial as no value is captured.
Edited by: Girish Nabar on Apr 21, 2011 8:55 AM -
How to pass values in select statement as a parameter?
Hi,
Very simple query, how do I pass the values that i get in the cursor to a select statement. If table1 values are 1,2,3,4 etc , each time the cursor goes through , I will get one value in the variable - Offer
So I want to pass that value to the select statement.. how do i do it?
the one below does not work.
drop table L1;
create table L1
(col1 varchar(300) null) ;
insert into L1 (col1)
select filter_name from table1 ;
SET SERVEROUTPUT ON;
DECLARE
offer table1.col1%TYPE;
factor INTEGER := 0;
CURSOR c1 IS
SELECT col1 FROM table1;
BEGIN
OPEN c1; -- PL/SQL evaluates factor
LOOP
FETCH c1 INTO offer;
EXIT WHEN c1%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(offer);
select * from table1 f where f.filter_name =:offer ;
factor := factor + 1;
DBMS_OUTPUT.PUT_LINE(factor);
END LOOP;
CLOSE c1;
END;Hi User,
You are looking somethuing like this, as passing the values to the Cursor as a Paramter.
DECLARE
CURSOR CURR (V_DEPT IN NUMBER) --- Cursor Declaration which accepts the deptno as parameter.
IS
SELECT *
FROM EMP
WHERE DEPTNO = V_DEPT; --- The, Input V_DEPT is passed here.
L_EMP EMP%ROWTYPE;
BEGIN
OPEN CURR (30); -- Opening the Cursor to Process the Value for Department Number 30 and Processing it with a Loop below.
DBMS_OUTPUT.PUT_LINE ('Employee Details for Deptno:30');
LOOP
FETCH CURR INTO L_EMP;
EXIT WHEN CURR%NOTFOUND;
DBMS_OUTPUT.PUT ('EMPNO: ' || L_EMP.EMPNO || ' is ');
DBMS_OUTPUT.PUT_LINE (L_EMP.ENAME);
END LOOP;
CLOSE CURR;
DBMS_OUTPUT.PUT_LINE ('Employee Details for Deptno:20'); -- Opening the Cursor to Process the Value for Department Number 20
OPEN CURR (20);
LOOP
FETCH CURR INTO L_EMP;
EXIT WHEN CURR%NOTFOUND;
DBMS_OUTPUT.PUT ('EMPNO: ' || L_EMP.EMPNO || ' is ');
DBMS_OUTPUT.PUT_LINE (L_EMP.ENAME);
END LOOP;
CLOSE CURR;
END;Thanks,
Shankar -
How to pass standard program selection options to custom program?
Hi... i want to use standard program select-options in a custom program.. actually in a custom program i'm using one standard program and one custom program. standard program contains selection scren. i want to use that selection screen in custum program.
can anybody please provide solution for this.
looking forward for ur updatesfirst you must find where the selection screen logic is written in standard one.once you get this details than you may Include the same screen and include program in your zprogram.and here your work is not finished you may need to do some change apart from copy all this details.
Amit. -
How to pass values to select clause in PL/SQL procedure
Am relatively new to PL/SQL programming and ran into the following issue...
Table
EMP_MASTER
ID VARCHAR2(10);
FIRSTNAME VARCHAR2(20);
DATA FOR EMP_MASTER
'1','SCOTT'
'2','TIGER'
I ran the following SQL Query
SELECT COUNT(*) FROM EMP_MASTER WHERE FIRSTNAME IN ('SCOTT','TIGER');
This select Query is working fine and we get the count = 2 as
expected. Now I want a procedure for the same fn()
CREATE OR REPLACE PROCEDURE TEST_EMP_MASTER(NAMELIST IN VARCHAR2)
IS
CNT NUMBER := 0;
BEGIN
SELECT COUNT(*) INTO CNT FROM EMP_MASTER WHERE FIRSTNAME IN (NAMELIST);
DBMS_OUTPUT.PUT_LINE('Output-->NAMELIST:'||NAMELIST||':cnt:'||cnt);
END;
Now when I test the procedure by passing just one value its working
fine. But when I want to pass multiple values, it doesnt work!
set serveroutput on;
i.e exec TEST_EMP_MASTER('SCOTT'); Works and the output is
Output--->NAMELIST:SCOTT:cnt:1
but don't get the expected output for exec TEST_EMP_MASTER('SCOTT,TIGER');
I understand that the IN modifier in the WHERE clause expects the
values as 'Value1','value2'....I tried different combination by the
passing the values with quotes '''value1'',''value2'''.....but no
successSelect e.*
From EMP_MASTER e;
ID FIRSTNAME
1 1 SCOTT
2 2 TIGER
3 3 CAT
4 4 MOUSE
SQL> create or replace procedure count_emp_master (p_namelist VARCHAR2)
2 AS
3 v_namelist VARCHAR2 (1000) := p_namelist;
4 v_name Varchar2(100);
5 v_count Number := 0;
6 p_count_emp Number := 0;
7 BEGIN
8 v_namelist := ',' || v_namelist || ',';
9
10 FOR cur IN 1 .. LENGTH (v_namelist) - LENGTH (REPLACE (v_namelist, ',', '')) - 1
11 LOOP
12 v_name := (SUBSTR (v_namelist,
13 INSTR (v_namelist, ',', 1, cur) + 1,
14 INSTR (v_namelist, ',', 1, cur + 1)
15 - INSTR (v_namelist, ',', 1, cur) - 1
16 ));
17 Select Count(1)
18 Into v_count
19 From emp_master
20 Where FIRSTNAME = v_name;
21
22 p_count_emp := p_count_emp + v_count;;
23
24 END LOOP;
25
26 dbms_output.put_line ('namelist --> '||p_namelist ||'p_count_emp -->'||p_count_emp);
27 END count_emp_master;
28 /
Procedure created
SQL> exec count_EMP_MASTER('SCOTT');
namelist --> SCOTTp_count_emp -->1
PL/SQL procedure successfully completed
SQL> exec count_EMP_MASTER('SCOTT,TIGER');
namelist --> SCOTT,TIGERp_count_emp -->2
PL/SQL procedure successfully completed
SQL> exec count_EMP_MASTER('SCOTT,TIGER,CAT');
namelist --> SCOTT,TIGER,CATp_count_emp -->3
PL/SQL procedure successfully completed
SQL> exec count_EMP_MASTER('SCOTT,TIGER,CAT,MOUSE');
namelist --> SCOTT,TIGER,CAT,MOUSEp_count_emp -->4
PL/SQL procedure successfully completed
SQL> Message was edited by:
Nicloei W -
How to pass value to pop up window using javascript function?
I am not sure how to do this, I want to open new window from existing form,This is Mod/PLsql for consists some javascript functions also. When I am clicking on new window in form then new form should open with results of value entered,but new window form is opening with main page :( , not able to get text box value from parent form. How to call textbox input value in popup window from parent window using javascript?
currently I'm using following code:
HTP.p('<script type="text/javascript">
function pop_up5()
var l_url=window.opener.document.getElementById("p_single_store_pc").value;
window.open(l_url, '''', ''fullscreen=no, scrollbars=1'');
</script>' );
Edited by: user11970612 on Jun 14, 2012 5:02 AMthis is probably due to the Javascript code and not a "real link" to another page... I don't know if the null is due to the Javascript...
But if you really really want to use javascript instead of a ... you can pass the location of the url with JSP (on your main page) as a parameter to the open window... (...) u can put instead of main.jsp <%= request.getServerName()+request.getRequestURI() %>
the value <%= ... %> will return something like test.com/html/main.jsp
Hope this helps. -
Getting values from select option
Hi,
I have a requirement where the user is going to pass values in select-option in low and high. lets say s_bwart(movement types).
now i have to fetch this bwart values into an internal table.
my internal table will be having only one field that is bwart. so how do i populate my internal table with those values. could any body help me in this.
Thanks in advance
nehaHi, when using SELECT-OPTIONS, use can pretty much do any kind of selection he wants, including ranges, and excluding values, so the best way to handle it is to select from the data base when the user executes the report. for example.
data: begin of ibwart occurs 0,
bwart type mseg-bwart,
end of ibwart.
select-options: s_Bwart for mseg-bwart.
start-of-selection.
select bwart into table ibwart
from <b>T156</b>
where bwart in s_bwart.
Regards,
Rich Heilman -
How to pass values between pages?
Hi
Anybody know how you pass values like ids between pages using buttons?
Cheers
dan
Message was edited by:
user551484Hi
Why do you want to do this? You can access values from other pages so if you are on page 2 and there is an item on page 1 called P1_ID you can simply assign it to an item on page 2 by typing in P1_ID in the source value for your page 2 item.
Or you could reference it direct in your pl/sql process by typing &P1_ID. (note the fullstop)
If you did want to pass a value using a button you can do so by clicking on the button name in then scroll down to the section called optional URL redirect.
set target is a - to page in this application
then select the page you want the button to send you to
then click the flashlight icon next to set these items
you can then select the page item you want to send the value to and the page item you are getting the value from.
Danny
Message was edited by:
Danny Roach -
How to get the values of Select-options from the screen.
The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.
Hi,
Refer this following code..this will solve your problem...
"Following code reads value entered in s_po select options and willprovide search
"help for s_item depending upon s_po value.
REPORT TEST.
TABLES : ekpo.
DATA: BEGIN OF itab OCCURS 0,
ebelp LIKE ekpo-ebelp,
END OF itab.
SELECT-OPTIONS s_po FOR ekpo-ebeln.
SELECT-OPTIONS s_item FOR ekpo-ebelp.
INITIALIZATION.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
DATA:
dyn_field TYPE dynpread,
temp_fields TYPE TABLE OF dynpread,
zlv_dynpro TYPE syst-repid.
zlv_dynpro = syst-repid.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = zlv_dynpro
dynumb = syst-dynnr
request = 'A'
TABLES
dynpfields = temp_fields
EXCEPTIONS
OTHERS = 0.
LOOP AT temp_fields INTO dyn_field.
IF dyn_field-fieldname EQ 'S_PO-LOW'.
SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
WHERE ebeln EQ dyn_field-fieldvalue.
EXIT.
ENDIF.
ENDLOOP. -
How to assign list of default value for select-option variable???
Hi every one
This is Deepak,
I want to know how to assign list of default value to select-option variable ? please any body tel me solution
for example
select-option matnr for mara-matnr default ..............and here i want to give more than 1 values that will be default value and use can choose any one at the time of input .
Thank you in advance
DeepakHi.
Check the following sample code.
REPORT ztn_test.
" It is example for list populating.
TABLES:knvp.
data: BEGIN OF itab OCCURS 10,
kunnr like knvp-kunnr,
END OF itab.
data: wa_itab like itab.
TYPE-POOLS: vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
PARAMETERS: s_kunnr(20) type c as LISTBOX VISIBLE LENGTH 40 .
AT SELECTION-SCREEN OUTPUT.
SELECT kunnr from knvp into CORRESPONDING FIELDS OF TABLE itab WHERE parvw = 'SP'. " SP for ur requirement
" I have used loop to populate some values from table
loop at itab into wa_itab.
name = 'S_KUNNR'.
value-key = sy-tabix.
value-text = wa_itab-kunnr.
append value to list.
clear wa_itab.
endloop.
" If u want individaully assign the values change the code as
name = 'S_KUNNR'." Select option name
value-key = 1." Index
value-text = 'VAL1'.
append value to list.
name = 'S_KUNNR'." Select option name
value-key = 2." Index
value-text = 'VAL2'.
append value to list.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING id = name
values = list.
Edited by: tahir naqqash on Feb 21, 2009 4:38 PM -
How to set default value in select option for ABAP query
Hi experts,
What is the way to set up default values for select-options in ABAP query.
e.g.
I have one field 'Year' in my ABAP query selection screen.
I want value of current year to be appeared here whenever user execute report
Thanks in Advance
-HarkamalHi Harkamal,
execute your Query via SQ01. On Selection-Screen
goto save Variant. Mark your field
as selection variable an press Button election variable.
Take variable from TVARV and use it.
Than save the Variant.
Look at TVARV if the 'Year' is updated to the actualYear!
regards, Dieter -
How to pass values of the prompt through Action Link - URL in 11g
Hi All,
I am in OBIEE 11g v6.
Let's say, I have two dashbaord pages P1 and P2.
P1 page contains
1. Prompt PR1 - containing a single column EmpName
2. Report R1
P2 page contains
1. Prompt PR2 - containing a single column EmpName (same column as in PR1)
2. Report R2
Requirement :
Let's say a user select a value = David from the EmpName column in prompt PR1. In the Report R1, on one the measure columns 'Sales', I am using an action link - Navigate to URL ( I can't use Navigate to BI Content for some reasons). In the URL, I am giving the URL to page P2. Can I pass the selected value (which is David) to the EmpName column of the Prompt PR2 of Page P2 so that Report R2 is automatically limited by David when I land on that page through the URL?
Few things to consider are, I can't use EmpName column in my report R1 on page P1, I just want to pass the value of a common column from one prompt on Page1 to another prompt on Page2. Is that possible. Can anybody please help?
Thanks,
RonnyHmm can you give a try one more time with
Add EmpName name and hide it on report R1 on page P1
and set EmpName as Is Prompted on report R2 on page P2 and with my earlier steps should work.
Other option is read this doc once that helps you how to pass value thru url.
http://docs.oracle.com/cd/E21043_01/bi.1111/e16364/apiwebintegrate.htm#z1005224
You need to have a EmpName as Is Prompted on report R2 on page P2
If helps pls mark -
How to assing parameters to select-options
hi all
thanks in advance
how to assign parameter value to select-option
date
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
select-options s_budat FOR mkpf-budat OBLIGATORY,
s_budat1 FOR mkpf-budat.
parameters cperiod like mkpf-budat.
SELECTION-SCREEN:END OF BLOCK B1.
cperiod assign to s_budat-low
or dummy s_budat1 and how give selection criteria
thanks allHi,
I think you want to set some default values in select options.
so following is code...
TABLES:MKPF.
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_BUDAT FOR MKPF-BUDAT OBLIGATORY,
S_BUDAT1 FOR MKPF-BUDAT.
PARAMETERS CPERIOD LIKE MKPF-BUDAT.
SELECTION-SCREEN:END OF BLOCK B1.
AT SELECTION-SCREEN OUTPUT.
S_BUDAT-LOW = SY-DATUM.
append s_budat.
hope it will help you...
Award points if useful...
Maybe you are looking for
-
I have reached out to this community as my Iphone display gone black and got the solution to keep home and power button pressed. It worked but I would like to know 1. Why it went black and is there a permanent fix for this 2.Will the IOS gets automa
-
Here's a screen grab from a webpage I am creating. I need help on two issues. 1. Note I have highlighted there is a gap between the right hand image in the header and the top edge of the browser. How can I close this gap? 2. There are three columns (
-
I Would like to cancel My account to Adobe Exportpdf
How do I cancel my account? I seem to run into questions I can't find?
-
Hi Nimrod, Thanks for your reply. Source element of my idoc occurs n times. target is 0..1 i need to pass only second occurences. Example: IDOC E1MARAEXTRT-FIELD1 HAVE 2 OCCURENCES. E1MARAEXTRT[01]-FIELD1- vALUE E1MARAEXTRT[02]-FIELD1- DESCRIPTION. I
-
Web access using Macbook and cellphone (Telus)
I have a web-enable cell phone that I would like to have my Macbook use to access the internet using Bluetooth to communicate with the phone. I'm running Mac OS X (10.5.3), the phone is an LG Chocolate and my cell carrier is Telus (Canada). Has anyon