Problem in getting parameter value from selection screen in web dynpro abap
Hi,
I am facing problem in getting parameter value from selection screen.
Please find my code below:
DATA LT_PAR_ITEM TYPE IF_WD_SELECT_OPTIONS=>TT_SELECTION_SCREEN_ITEM.
FIELD-SYMBOLS:<FS_PAR_ITEM> LIKE LINE OF LT_PAR_ITEM,
<FS_OBJ_USAGE> TYPE REF TO data.
WD_THIS->M_HANDLER->GET_PARAMETER_FIELDS( IMPORTING ET_FIELDS = LT_PAR_ITEM ).
LOOP AT LT_PAR_ITEM ASSIGNING <FS_PAR_ITEM>.
CASE <FS_PAR_ITEM>-M_ID.
WHEN `OBJ_USAGE`.
ASSIGN <FS_PAR_ITEM>-M_VALUE->* TO <FS_OBJ_USAGE>.
[ Here, sy-subrc is 4, <FS_OBJ_USAGE> is not assigning.]
ENDCASE.
ENDLOOP.
So, can any one solve this problem.
Thanks in advance,
Radhika
Hi Radhika,
Try using GET_RANGE_TABLE_OF_SEL_FIELD...
Please Refer below code..
DATA: NODE_FLIGHTS TYPE REF TO IF_WD_CONTEXT_NODE.
DATA: RT_CARRID TYPE REF TO DATA.
DATA: ISFLIGHT TYPE TABLE OF SFLIGHT.
DATA: WSFLIGHT TYPE SFLIGHT.
FIELD-SYMBOLS: <FS_CARRID> TYPE TABLE.
Retrieve the data from the select option
RT_CARRID = WD_THIS->M_HANDLER->GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
Assign it to a field symbol
ASSIGN RT_CARRID->* TO <FS_CARRID>.
CLEAR ISFLIGHT. REFRESH ISFLIGHT.
SELECT * INTO CORRESPONDING FIELDS OF TABLE ISFLIGHT FROM SFLIGHT
WHERE CARRID IN <FS_CARRID>.
NODE_FLIGHTS = WD_CONTEXT->GET_CHILD_NODE( NAME = `FLIGHTS` ).
NODE_FLIGHTS->BIND_ELEMENTS( ISFLIGHT ).
Thanks,
Regards,
Kiran
Similar Messages
-
How we can get the values from one screen to another screen?
hi guru's.
how we can get the values from one screen to another screen?
we get values where cusor is placed but in my requirement i want to get to field values from one screen to another screen.
regards.
satheesh.Just think of dynpros as windows into the global memory of your program... so if you want the value of a field on dynpro 1234 to appear on dynpro 2345, then just pop the value into a global variable (i.e. one defined in your top include), and you will be able to see it in your second dynpro (assuming you make the field formats etc the same on both screens!).
-
How to get parameter value from report in event of value-request?
Hi everyone,
The customer want to use particular F4 help on report, but some input value before press enter key are not used in event of "at selection-screen on value-request for xxx", How to get parameter value in this event?
many thanks!
JackYou probably want to look at function module DYNP_VALUES_READ to allow you to read the values of the other screen fields during the F4 event... below is a simple demo of this - when you press F4 the value from the p_field is read and returned in the p_desc field.
Jonathan
report zlocal_jc_sdn_f4_value_read.
parameters:
p_field(10) type c obligatory, "field with F4
p_desc(40) type c lower case.
at selection-screen output.
perform lock_p_desc_field.
at selection-screen on value-request for p_field.
perform f4_field.
*& Form f4_field
form f4_field.
*" Quick demo custom pick list...
data:
l_desc like p_desc,
l_dyname like d020s-prog,
l_dynumb like d020s-dnum,
ls_dynpfields like dynpread,
lt_dynpfields like dynpread occurs 10.
l_dynumb = sy-dynnr.
l_dyname = sy-repid.
*" Read screen value of P_FIELD
ls_dynpfields-fieldname = 'P_FIELD'.
append ls_dynpfields to lt_dynpfields.
call function 'DYNP_VALUES_READ'
exporting
dyname = l_dyname
dynumb = l_dynumb
tables
dynpfields = lt_dynpfields
exceptions
others = 1.
check sy-subrc is initial.
*" See what user typed in P_FIELD:
read table lt_dynpfields into ls_dynpfields
with key fieldname = 'P_FIELD'.
*" normally you would then build your own search list
*" based on value of P_FIELD and call F4IF_INT_TABLE_VALUE_REQUEST
*" but this is just a demo of writing back to the screen...
*" so just put the value from p_field into P_DESC plus some text...
concatenate 'This is a description for' ls_dynpfields-fieldvalue
into l_desc separated by space.
*" Pop a variable value back into screen
clear: ls_dynpfields.
ls_dynpfields-fieldname = 'P_DESC'.
ls_dynpfields-fieldvalue = l_desc.
append ls_dynpfields to lt_dynpfields.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = l_dyname
dynumb = l_dynumb
tables
dynpfields = lt_dynpfields
exceptions
others = 0.
endform. "f4_field
*& Form lock_p_desc_field
form lock_p_desc_field.
*" Make P_DESC into a display field
loop at screen.
if screen-name = 'P_DESC'.
screen-input = '0'.
modify screen.
exit.
endif.
endloop.
endform. "lock_p_desc_field -
How to put values from selection screen to ztable
hi all,
i have created a ztable.
now i want to put data through se38.
i have given 5 parameters in selection screen same as there in ztable.
now if i put values in selection screen then it should put that values to my ztable .
how can i put values into my ztable.
i used insert but not workiing.Hi,
Try this.
TABLES : ztable.
SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01.
PARAMETER : p_field1 TYPE field1_in_ztable,
p_field2 TYPE field2_in_ztable.
p_field3 TYPE field3_in_ztable.
p_field4 TYPE field4_in_ztable.
p_field5 TYPE field5_in_ztable.
SELECTION-SCREEN:END OF BLOCK b1.
DATA : itab TYPE TABLE ztable,
wa_itab TYPE ztable.
AT SELECTION-SCREEN.
MOVE p_field1 TO wa_itab-field1.
MOVE p_field2 TO wa_itab-field2.
MOVE p_field3 TO wa_itab-field3.
MOVE p_field4 TO wa_itab-field4.
MOVE p_field5 TO wa_itab-field5.
INSERT ztable FROM wa_itab.
IF sy-subrc = 0.
MESSAGE 'Successfully saved' TYPE 'I'.
ENDIF.
Thanks,
Sri.
Edited by: Sri on Jul 28, 2009 4:15 PM -
Unable to get parameter values from a remote database
I am linking to a remote database view via a synonym in Oracle and trying to retrieve parameter values from it. The username and password are the same for the local and remote database and I can run the SQL query using SQL plus against the database and values are returned. However, when I try and run the same query in Crystal Reports (XI) I receive an Oracle error:
"An attempt was made to connect or log in to a remote database using a connection description that could not be found.
Action:
Specify an existing database link. Query the data dictionary to see all existing database links. See your operating system-specific Net8 documentation for valid connection descriptors. "
How can it be that Crystal cannot run the query when it is valid in SQL plus?
Any tips/info would be appreciated.
many thanks
Claire
Oracle is version 10When running one of the reports in VS.Net this is the error I receive:
"A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in crystaldecisions.crystalreports.engine.dll
Additional information: Failed to retrieve data from the database.
Details: [Database Vendor Code: 2019 ]
Failed to retrieve data from the database.
Error in File C:\DOCUME1\CLAIRE1.REE\LOCALS~1\Temp\{0C6C6DD5-B958-4E10-A2AA-928C58E1B7CE}.rpt:
Failed to retrieve data from the database.
Details: [Database Vendor Code: 2019 ]"
When running the same report in Crystal Reports designer I receive this error message:
"Prompting failed with the following error message: 'List of Values failure: fail to get values. [Cause of error: Failed to retrieve data from the database. Details: [Database Vendor Code: 2019]. Failure to retrieve data from the database. Error in File UNKNOWN.RPT. Failure to retrieve data from the database. Details: [Database Vendor Code: 2019]]'.
Error source: prompt.dll Error code: 0x8004380D"
So this one is also failing in the designer.
All the parameters in the main report are static and the ones in the subreport are passed in from the main report. -
How to get a value from select one choice (created by static view)
Hi,
Whene ever Iam trying to get value from select one choice which is created by static view iam getting only index.How to get the actual value in 11g .please help me anybody .Thanx in advance....
Edited by: 874530 on Jul 22, 2011 11:05 PMThnax for your quick reply..
Iam using 11.1.1.3.0 version.
My code is
<af:selectOneChoice value="#{bindings.DenialLevel.inputValue}"
label="#{bindings.DenialLevel.label}"
required="#{bindings.DenialLevel.hints.mandatory}"
shortDesc="#{bindings.DenialLevel.hints.tooltip}"
id="soc2"
valuePassThru="true"
binding="#{backing_denialcomment.denialLevelList}">
<f:selectItems value="#{bindings.DenialLevel.items}" id="si6"/>
</af:selectOneChoice>
and in bean am not able to get value of attribute .Iam getting only index... -
Get parameter value from PLSQL portal Item
Hi,
i have some page link like :
http://server:7777/portal/page?...&myparameter=test
I don't know how to get myparameter. I want to access this parameter value in a PlSql portal Item in this page
can somenone help me ?
is there an API to get those parameters?
thanks in advance
JoaoIf do you want to get a parameter value from an item, you'll need to construct a procedure that receive your parameter value and configure your item to call this procedure.
But If you want to get a parameter from a portal page, first you need to configure the parameter in page properties, construct a portlet and configure "function describe_parameters" to get the parameter and work your parameter in "procedure show". -
How to get the value from select list to text box
Hi,
I have a select list i want to retrieve the value from select list to text box.
How can i do that???
Regards,
Sakthi.Hi Sakthi,
Yo can use the Java script for that..
Dynamically the value will come into text box.
Use the below script.
<script type="text/javascript">
function disFormItems()
var lReturn = $v(here your select list name)
alert(lReturn);
document.getElementById(here your text box name).value =lReturn; }
</script>Cheers,
Shan -
Set Context From Event Handler in Web Dynpro ABAP
Hi,
I am passing some parameters when navigating from one view to another. Now I would like to set the context of the second view. How can I achieve that in Web Dynpro ABAP?
Thanks.
/ ElvezI figured out ...
element->set_attribute(
exporting name = `NAME`
value = value ). -
No values from selection screen
Hi ppl,
I have written a report program which has 3 parameters on the selection screen (Personnel number - pernr, trip number - reinr and status - abrec).
I have a subroutine to check for the validity of the personnel number entered on the screen. The other two parameters do not have any validity check.
I am using these 3 parameters in my SELECT statement. But, the problem is that when I execute it, at runtime, only the parameter for personnel number shows the value entered on the selection screen. The other two parameters show initial value at runtime though an entry has been made on the selection screen. Thus, it returns a subrc value of 4 though there are matching entries.
Has anybody face such a problem? Please advise.
Thanks.Hi David,
Mentioning the event AT SELECTION SCREEN should resolve your problem.
This will ensure that the values are picked from the selection sreen for all the parameters.
(Else, if you do not use this event, your SELECT statement will not execute successfully the first time. But, if you execute your program again, it will fetch correct values.)
Hope it solves your problem.
Thanks,
Dawood. -
Unable to retreive values from selection screen built using WDR_SELEC_OPTIO
Hi All,
I have created a selection screen as below
lr_field = wd_this->m_handler->create_range_table( 'YFMTFLOW' ).
* ASSIGN lr_field->* TO <fs_range>.
* ls_date-sign = 'I'.
* ls_date-option = 'EQ'.
* ls_date-low = 'US'.
* APPEND ls_date TO <fs_range>.
* Add the select-option to the group
wd_this->m_handler->add_selection_field(
i_id = 'FLOW'
i_within_block = 'PROC'
i_no_intervals = abap_true
it_result = lr_field ).
If i enter some value and click a button to retireve the values as below
DATA
lt_sel_item TYPE if_wd_select_options=>tt_selection_screen_item.
types: ty_flow type range of yfmtflow.
FIELD-SYMBOLS:
<fs_sel_item> LIKE LINE OF lt_sel_item,
<fs_process> TYPE yfmtprocess,
<fs_flow> TYPE ty_flow.
* Get the selection-screen items
l_handler->get_selection_screen_items(
IMPORTING et_selection_screen_items = lt_sel_item ).
* Retrieve the values from the select-options items
LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
CASE <fs_sel_item>-m_id.
WHEN `PROCESS`.
ASSIGN <fs_sel_item>-m_value->* TO <fs_process>.
WHEN 'FLOW'.
ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_flow>.
ENDCASE.
ENDLOOP.
<fs_flow> is empty
but after I enter value and then press enter and then click the button to retrieve the values I am able to get low value <fs_flow> not the sign and option
Is it the standard functionality ,if yes how can we overcome
Thanks
Bala DuvvuriAm giving clear coding of select options.
nOTE: S_CARR_ID IS THE DATA ELEMENT OF CARR ID FIELD,
FOR THAT I AM APPLYING SELECT OPTIONS IN BELOW CODING.
WRITE THE BELOW CODE IN WDDOINT( ) METHOD OF
REQUIRED VIEW
Data: lt_range_table type ref to data,
read_only type abap_bool.
WD_THIS->M_WD_SELECT_OPTIONS = WD_THIS-
>WD_CPIFC_SELECT_OPTIONS( ).
WD_THIS->M_HANDLER = WD_THIS->M_WD_SELECT_OPTIONS-
>INIT_SELECT_SCREEN( ).
WD_THIS->M_HANDLER->SET_GLOBAL_OPTIONS(
I_DISPLAY_BTN_CANCEL = ABAP_FALSE
I_DISPLAY_BTN_CHECK = ABAP_FALSE
I_DISPLAY_BTN_RESET = ABAP_FALSE
I_DISPLAY_BTN_EXECUTE = ABAP_FALSE ).
LT_RANGE_TABLE = WD_THIS->M_HANDLER-
>CREATE_RANGE_TABLE( I_TYPENAME = 'S_CARR_ID' ).
WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
I_ID = 'S_CARR_ID'
IT_RESULT = LT_RANGE_TABLE
I_READ_ONLY = READ_ONLY ).
BELOW CODE IN REQUIRED ACTION( SAY IN SOME BUTTON
ACTION WHICH WILL RETRIEVE THE DATA FROM DATABASE TABLE
USING SELECTI OPTIONS VALUES)
fIRST THE GET REFERENCE TO NODE( CTRL F7--->READ
CONTEXTB---FLIGHT NODE )
***THEN BELOW CODE
DATA: RT_CARRID TYPE REF TO DATA.
DATA:IS_FLIGHT TYPE TABLE OF SFLIGHT.
FIELD_SYMBOLS: <FS_CARRID> TYPE TABLE.
RT_CARRID = WD_THIS-> M_HANDLER-
>GET_RANGE_TABLE_OF_SEL_FIELD( I_ID = 'S_CARR_ID' ).
ASSIGN RT_CARRID-> TO <FS_CARRID>.*
SELECT * INTO CORRRESPONDING FIELDS OF TABLE IS_FLIGHT
FROM SFLIGHT WHERE CARRID IN <FS_CARRID>
NODE_FLIGHT->BIND_TABLE( IS_FLIGHT ). -
Getting parameter values from ITS to back end Modulepool program
Hi,
I worked on external ITS developments for SRM project
I was passing values from and to between ITS front end template and corresponding back end module pool program.
I was using filed-set and field-get macro for passing values. It was working perfectly.
Now i am in new SRM 5.0 project where we are using integrated ITS and i developed small screen in which I am trying to read the value which I am entering in template text filed.
In debug mode i could see that ,when it execute FIELD-GET macro getting SY-SUBRC is equal to 1. I am not able to get the template value in PAI because of macro failure.
I just copied the same program which i developed in external ITS system still same problem.
Please some one help me if I am missing some thing in this.
Code which i am using.is
in ITS:
<form method="post" name="zebp_rrcode" action="`WGateURL()`" >
<textarea name="FREE_TEXT_DES" cols="35" rows="10" onKeyPress=fmlength()> </textarea>
<input type=submit name="~OKCode=TEXT" value="Send text">
</form>
In Back end code of PAI.
move sy-ucomm to ok_code.
data: len type i.
data: idx type i.
data: wide_row(80) occurs 0 with header line.
data: wide_text(80) occurs 0 with header line.
idx = 1.
field-get 'FREE_TEXT_DES' idx wide_row len.
if sy-subrc <> 0.
exit.
endif.
Regards
Srikanth Akula
Message was edited by:
Srikanth AkulaHi Srikanth,
Can you please explain us how you were able to get and set the values.
And may i know what for you have developed a Internet Service ie Scenario...?
If you have any help documents for developing ITS application... plz forward it to this mail id...
[email protected]
Thanks
Srinivasan K -
How to get default values on selection screen(multiple ranges)?
i want to know how to maintain default ranges in selection screen...like 2000 to 3000 and 7000 to 8000 and 11000 to 15000
all the above ranges must get by default how to provide those to selection screen by default...please give me idea...with example...Hi Suresh,
You can either use select-options or Ranges. If you want the selection screen to be displayed with allwoing user to enter values apart for the default ones use select options else use ranges. With ranges what ever values use hard code would be set and the end user will not be able to add any more values (or range of values).
Simply write the following code
tables : <name of the table from which the field belongs>
select-options <fieldname> for <tablename>-<fieldname>.
<fieldname>-sign = 'I'.
<fieldname>-option = 'BT'.
<fieldname>-low = '7000'.
<fieldname>-high = '8000'.
append <fieldname>..
similiarly add all the ranges that you need to include as default and in your select statement use the IN operator inthe where clause to include the range.
If using range replacethe select-option with the range statement.
Thanks. -
Having problem to get the value from radio button
i am doing my double module project for my degree course and i am also a newbie in JSP. Hope there is someone can help me to solve this problem. Now, i set the value of a radio button to "don't smoke", "smoke lightly", and "smoke heavily". Then i use request.getParameter ("smoking behavior") to get the value selected by the user, but the result is only "don't" or "smoke", which the character after spacing will be not be retrieved. I dun know how to solve it, so can any expert here help me to solve this problem? Thanks for helping.
Why do you have to use whitespace. If your radio button group is name smokingBehavior - no whitespace, wouldn't it just make sence to have values of don't, lightly and heavily. This would solve the problem easily. If your teacher is being a pain in the a&!, and requires you to use whitespace for your naming variables I guess you could insert %20 between the two words and unescape the value on the server side. This seems like a lot of unnecessary work and a silly solution - good luck!
-
How to get the value from select tag
I am trying to do the exactly same thing as this select Demo does. I can not find out a way to get the value form the first select menu and use it to get all the values to form the second select menu.
here is the web: http://www.4al.pl/phpAjaxTags/ . I am trying to do the same thing as the first demo shows!
Here is part of my code:
<!-->create the database connection <-->
<%
//Load the MySql Driver.
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/JunkDB";
java.sql.Connection con = java.sql.DriverManager.getConnection(url, "", "");
java.sql.ResultSet rsMake = con.createStatement().executeQuery("SELECT DISTINCT make FROM make_and_model ORDER BY make");
String strMake= "";%>
<!--Display the make list-->
<html:select property="make" value="make" size="1" name="make">
<html:option value="---Select a Make ----"></html:option>
<%while (rsMake.next()) {
strMake = rsMake.getString("make");
System.out.println("\tmake= " + strMake );%>
<html:option value="<%=strMake.toString()%>"></html:option>
<%} //end while loop
//<!--Display the model list-->%>
</html:select>
<html:select property="model" value="model" size="1" name="model">
<html:option value="---Select a model ----"></html:option>
<%java.sql.ResultSet rsModel = con.createStatement().executeQuery("SELECT model FROM make_and_model WHERE make='" + strMake //I want to put the value of the MAkE over here so I can get the models form database+ "' ORDER BY model");%>
<%while (rsModel.next()) {
String strModel = rsModel.getString("model");
System.out.println("\tmodel= " + strModel );%>
<html:option value="<%=strModel.toString()%>"></html:option>
<%} //end while loop
con.close();
System.out.println("connection closed");%>
</html:select>
<p><input id="notify" name="notify" class="notify" size="24" disabled="disabled" type="text"></p>
<hr><br>
</html:form>So how can I get the value of "make" so I can get all models for this kind of "make" ??
Am I doing it right ??? Or I am going to a wrong direction ???
Thanks for any input . I am new with JSP and strutsHi Sakthi,
Yo can use the Java script for that..
Dynamically the value will come into text box.
Use the below script.
<script type="text/javascript">
function disFormItems()
var lReturn = $v(here your select list name)
alert(lReturn);
document.getElementById(here your text box name).value =lReturn; }
</script>Cheers,
Shan
Maybe you are looking for
-
I am trying to enable reporting on InfoObjects on my InfoSet in BI 7.0, but whenever I open the InfoSet I cannot check the box next to the InfoObject name because it is grayed out. Can anybody explain how to remedy this? I will award points.
-
Xorg + xf86-video-intel lags with compiz / high cpu usage without it
I have recently noticed that my X server lags. It happens approximately once per second (it's fairly regular) and it can be easily observed when watching movies, dragging windows or rotating cube. Screen just hangs for some milliseconds. Lags are big
-
Can't set password for Root account
I have rebuilt my macbook from scratch not from a backup , I then opened Terminal and typed sudo passwd root (got the message) entered a password, I got Sorry try again. tryed again same thing, I definately reinstalled from scratch therefore my ro
-
Hi all of you, We have done account determination for SD. Accounting documents are also generating, but with in the invoice accounting document, number of line items are generating for each item with in the sales order, standard invoice type F2 like
-
Business Rule:Usage of @ISMBR with User Prompts/ Variables+Loop Function
Hi, currently facing a business rule user prompt - if-selection issue - not sure, if it's simply a bug or other ways how to solve it: depending on runtimeprompt [RTP_VERSIONS], either the 1st or 2nd part of the rule should get executed using a loop c