ADF 11g + How to capture the value of a dynamically created input text box
Hi All,
I have a requirement where, on selection of the value in a drop down, the input text boxes need to get dynamically populated on the JSPX page. I'm able to bring this functionality, and it is working fine.
But the challenge right now I'm facing is that, how to read/capture the value entered in those dynamic text boxes on submission of the page. Please help me in getting this resolved.
Below is the code snippet I'm using for this.
// Clearing the existing input fields in the Panel form
while (pf100.getChildren().iterator().hasNext()) {
pf100.getChildren().remove(pf100.getChildren().iterator().next());
// Creating the new fields based on the number of IP addresses selected
for (int i = 0; i < iIPAddress; i++) {
RichInputText pcPreferredDomain = new RichInputText();
pcPreferredDomain.setLabel("Preferred Domain / Hostname for Desktop PC/ Laptop - " +
(i + 1));
pcPreferredDomain.setColumns(40);
pcPreferredDomain.setId("pcpfdomain" + (i + 1));
pf100.getChildren().add(pcPreferredDomain);
Thanks All in Advance,
Thanks & Regards,
Dharmathej M
As per your method, you are creating the RichInputText components as local variables.
What happens when you are creating them as class level variables in the managed bean, if you do so, you can refer to the values of the UI components in the actionListener/action code for the command button in the managed bean
sample:
public class ManagedBean{
RichInputText [] pcPreferredDomain;
public ManagedBean(){
// Clearing the existing input fields in the Panel form
while (pf100.getChildren().iterator().hasNext()) {
pf100.getChildren().remove(pf100.getChildren().iterator().next());
pcPreferredDomain = new RichInputText[iIPAddress];
// Creating the new fields based on the number of IP addresses selected
for (int i = 0; i < iIPAddress; i++) {
pcPreferredDomain[i] = new RichInputText();
pcPreferredDomain.setLabel("Preferred Domain / Hostname for Desktop PC/ Laptop - " +
(i + 1));
pcPreferredDomain.setColumns(40);
pcPreferredDomain.setId("pcpfdomain" + (i + 1));
pf100.getChildren().add(pcPreferredDomain);
Thanks,
Navaneeth
Similar Messages
-
How to capture the values given in SSC1 transcation?
Hello All,
Can anyone suggest me, how to capture the values given in SSC1 transaction?Hello Clemens Li,
Requirement: Integration of SAP Appointment Calendar with Gmail Calendar
If I create an appointment in SSC1 transaction, it will appear in SAP Appointment calendar. The same thing should get updated in Gmail calendar of SAP user and also in the guest Gmail calendar if exists in appointment.
So, I have to capture the input values given in SSC1 transaction while creating an appointment in SAP and try to export those values to web services using some function module. Sending those values to web services completes my task.
Means, if I create an appointment in SAP, at the same time, the values which I gave must get exported to some object. So that I can send them to web services.
But my actual problem is with capturing the input values given to SSC1 transaction.
How can I get those values out to some internal table?
Another one is, I did not found any BADI to enhance SSC1 transaction so that I can include my code there.
If you know any enhancements in SSC1, please let me know.
If you want any more clarification, please let me know.
Thanks for the response
DNR Varma -
How to capture the value in AVL intracrivity report
Hi ,
i have one doubt please clarify me.
in ALV interactivity report if user click on the one field, how captured the that field value in one variable. presentably i am using
ws_field_catalog-col_pos = '2'.
ws_field_catalog-fieldname = 'BELNR'.
ws_field_catalog-tabname = 'I_OUTPUT'.
ws_field_catalog-scrtext_l = 'Original Document number.'.
ws_field_catalog-hotspot = 'V'.
ws_field_catalog-scrtext_m = 'Original Doc.no.'.
ws_field_catalog-scrtext_s = 'Original Doc.no.'.
APPEND ws_field_catalog TO lt_fieldcat.
CLEAR: ws_field_catalog.
but it is not capture the valu it is capture the only field name please any one can you suggest me.
Thanks,
Hari.hi,
there is one type pool availabe for the. SLIS_SELFIELD.
make ur own structure and use case sy-ucomm.
when '&IC1'.
write ur code here.
TYPE-POOLS: SLIS.
*type declaration for values from ekko
TYPES: BEGIN OF I_EKKO,
EBELN LIKE EKKO-EBELN,
AEDAT LIKE EKKO-AEDAT,
BUKRS LIKE EKKO-BUKRS,
BSART LIKE EKKO-BSART,
LIFNR LIKE EKKO-LIFNR,
END OF I_EKKO.
DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,
WA_EKKO TYPE I_EKKO.
*type declaration for values from ekpo
TYPES: BEGIN OF I_EKPO,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
MATNR LIKE EKPO-MATNR,
MENGE LIKE EKPO-MENGE,
MEINS LIKE EKPO-MEINS,
NETPR LIKE EKPO-NETPR,
END OF I_EKPO.
DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,
WA_EKPO TYPE I_EKPO .
*variable for Report ID
DATA: V_REPID LIKE SY-REPID .
*declaration for fieldcatalog
DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
declaration for events table where user comand or set PF status will
be defined
DATA: V_EVENTS TYPE SLIS_T_EVENT,
WA_EVENT TYPE SLIS_ALV_EVENT.
declartion for layout
DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
declaration for variant(type of display we want)
DATA: I_VARIANT TYPE DISVARIANT,
I_VARIANT1 TYPE DISVARIANT,
I_SAVE(1) TYPE C.
*PARAMETERS : p_var TYPE disvariant-variant.
*Title displayed when the alv list is displayed
DATA: I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.
DATA: I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.
INITIALIZATION.
V_REPID = SY-REPID.
PERFORM BUILD_FIELDCATLOG.
PERFORM EVENT_CALL.
PERFORM POPULATE_EVENT.
START-OF-SELECTION.
PERFORM DATA_RETRIEVAL.
PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
PERFORM DISPLAY_ALV_REPORT.
*& Form BUILD_FIELDCATLOG
Fieldcatalog has all the field details from ekko
FORM BUILD_FIELDCATLOG.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'AEDAT'.
WA_FIELDCAT-SELTEXT_M = 'DATE.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'BUKRS'.
WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKKO'.
WA_FIELDCAT-FIELDNAME = 'LIFNR'.
WA_FIELDCAT-NO_OUT = 'X'.
WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. "BUILD_FIELDCATLOG
*& Form EVENT_CALL
we get all events - TOP OF PAGE or USER COMMAND in table v_events
FORM EVENT_CALL.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "EVENT_CALL
*& Form POPULATE_EVENT
Events populated for TOP OF PAGE & USER COMAND
FORM POPULATE_EVENT.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'USER_COMMAND'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-NAME.
ENDIF.
ENDFORM. "POPULATE_EVENT
*& Form data_retrieval
retreiving values from the database table ekko
FORM DATA_RETRIEVAL.
SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.
ENDFORM. "data_retrieval
*& Form bUild_listheader
text
-->I_LISTHEADEtext
FORM BUILD_LISTHEADER USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
DATA HLINE TYPE SLIS_LISTHEADER.
HLINE-INFO = 'this is my first alv pgm'.
HLINE-TYP = 'H'.
ENDFORM. "build_listheader
*& Form display_alv_report
text
FORM DISPLAY_ALV_REPORT.
V_REPID = SY-REPID.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_GRID_TITLE = I_TITLE_EKKO
I_GRID_SETTINGS =
IS_LAYOUT = ALV_LAYOUT
IT_FIELDCAT = I_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'ZLAY1'
I_SAVE = 'A'
is_variant = i_variant
IT_EVENTS = V_EVENTS
TABLES
T_OUTTAB = IT_EKKO
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "display_alv_report
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
i_logo =
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
PERFORM BUILD_FIELDCATLOG_EKPO.
PERFORM EVENT_CALL_EKPO.
PERFORM POPULATE_EVENT_EKPO.
PERFORM DATA_RETRIEVAL_EKPO.
PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.
PERFORM DISPLAY_ALV_EKPO.
ENDCASE.
ENDFORM. "user_command
*& Form BUILD_FIELDCATLOG_EKPO
text
FORM BUILD_FIELDCATLOG_EKPO.
WA_FIELDCAT-TABNAME = 'IT_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'IT_EKPO'.
WA_FIELDCAT-FIELDNAME = 'EBELP'.
WA_FIELDCAT-SELTEXT_M = 'LINE NO'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MATNR'.
WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MENGE'.
WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'MEINS'.
WA_FIELDCAT-SELTEXT_M = 'UOM'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
WA_FIELDCAT-TABNAME = 'I_EKPO'.
WA_FIELDCAT-FIELDNAME = 'NETPR'.
WA_FIELDCAT-SELTEXT_M = 'PRICE'.
APPEND WA_FIELDCAT TO I_FIELDCAT.
CLEAR WA_FIELDCAT.
ENDFORM. "BUILD_FIELDCATLOG_EKPO
*& Form event_call_ekpo
we get all events - TOP OF PAGE or USER COMMAND in table v_events
FORM EVENT_CALL_EKPO.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = V_EVENTS
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. "event_call_ekpo
*& Form POPULATE_EVENT
Events populated for TOP OF PAGE & USER COMAND
FORM POPULATE_EVENT_EKPO.
READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
IF SY-SUBRC EQ 0.
WA_EVENT-FORM = 'TOP_OF_PAGE'.
MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
WA_EVENT-FORM.
ENDIF.
ENDFORM. "POPULATE_EVENT
*& Form TOP_OF_PAGE
text
FORM F_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_LISTHEADER
i_logo =
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
*retreiving values from the database table ekko
FORM DATA_RETRIEVAL_EKPO.
SELECT EBELN EBELP MATNR MENGE MEINS NETPR FROM EKPO INTO TABLE IT_EKPO.
ENDFORM.
FORM BUILD_LISTHEADER_EKPO USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
DATA: HLINE1 TYPE SLIS_LISTHEADER.
HLINE1-TYP = 'H'.
HLINE1-INFO = 'CHECKING PGM'.
ENDFORM.
FORM DISPLAY_ALV_EKPO.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = V_REPID
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'F_USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE = I_TITLE_EKPO
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = I_FIELDCAT[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT =
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS = V_EVENTS
TABLES
T_OUTTAB = IT_EKPO
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
REWARD ME IF HELPFUL. PLEASE -
How to capture the values that are being passed to a function module?
Hello Experts!
While executing the transaction SBWP to send a document the FM 'SO_DYNP_SHORT_MESSAGE' gets triggered as soon as the SEND button is pressed would anybody please let me know how i can capture the values that are being passed to it in the process of sending a document?
Regards
SanguineHi
well, I'm not asking you to explain about how an implicit enhancement can be done. i was just referring to the two options posted in the reply. Is there any other way out apart from the implicit enhancement option. i do find class CL_BS useful as the Method ADD_RECIPIENT gets triggered . even though there's no attachment option in the screen that pops up after the method ADD_RECIPIENT is triggered. would anybody suggest me as how to proceed further to capture the values though without attachment details
Regards
sanguine -
How to capture the value selected in the drop down box
Hi all,
I am populating values in drop down box by using FM vrm_set_values in module pool.
like below
01 ABC
02 ACB
03 BCA
04 CAB
in module pool drop down box element name is RQGM-VALUE.
Problem is what ever the value is select in the drop down box from above element RQGM-VALUE is not filling any value.
i need to capture the value selected in the drop down box and pass it to another variable.Hi,
Refer this standard code. Your issue will be resolve.
REPORT demo_dynpro_dropdown_listbox.
TYPE-POOLS vrm.
DATA: name TYPE vrm_id,
list TYPE vrm_values,
value LIKE LINE OF list.
DATA: wa_spfli TYPE spfli,
ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
TABLES demof4help.
name = 'DEMOF4HELP-CONNID'.
CALL SCREEN 100.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE init_listbox OUTPUT.
CLEAR demof4help-connid.
SELECT connid cityfrom cityto deptime
FROM spfli
INTO CORRESPONDING FIELDS OF wa_spfli
WHERE carrid = demof4help-carrier2.
value-key = wa_spfli-connid.
WRITE wa_spfli-deptime TO value-text USING EDIT MASK '__:__:__'.
CONCATENATE value-text
wa_spfli-cityfrom
wa_spfli-cityto
INTO value-text SEPARATED BY space.
APPEND value TO list.
ENDSELECT.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = name
values = list.
ENDMODULE.
MODULE user_command_100.
save_ok = ok_code.
CLEAR ok_code.
IF save_ok = 'CARRIER' AND NOT demof4help-carrier2 IS INITIAL.
LEAVE TO SCREEN 200.
ELSE.
SET SCREEN 100.
ENDIF.
ENDMODULE.
MODULE user_command_200.
save_ok = ok_code.
CLEAR ok_code.
IF save_ok = 'SELECTED'.
MESSAGE i888(sabapdocu) WITH text-001 demof4help-carrier2
demof4help-connid.
ENDIF.
ENDMODULE. -
How to Get the value in a new created view.
Hi Experts,
I have create a view along with the fields: Street No. , Street name, apt no,
how should i capture these values . in a current situation i entering the value but when i check in the debugging mode : in a collection_wrapper (context node class) i am not able the see the value which i have entered. please help me out. it is very urgent.
RohitHi Ashish,
Thanks for replying. i have already create the context node and in the using the request from field method ,i am getting the value in my work area but how to store the value in the custom fields of that particular order as well as store the value in the crmd_customer_i table...
Regards,
Rohit -
How to get the values of 2 dynamic comboboxes in one jsp to another jsp?
I have 2 comboboxes and one submit button on my jsp page.I select a value in 1st combobox then the values in the second combobox populated from the database. next i select 2nd combobox and then submit the button.After submit the button call the next jsp page. In that page i want to display the values of two comboboxes. but my problem is , in that page only 2nd combobox value is displayed.1st combobox is displayed as null. plz tell me, how to get the values of two comboboxes at a time?
Select.jsp:
<%@ page language="java" import="java.sql.*" %>
<%!
Connection con = null;
Statement st = null;
ResultSet rs = null;
String sql = null;
void addItems(javax.servlet.jsp.JspWriter out, String sql)
try{
rs = st.executeQuery(sql);
while( rs.next() )
out.println("<option>" + rs.getString(1) + "</option>");
}catch(Exception e)
System.out.println(e);
%>
<HTML>
<HEAD>
<TITLE>JSP WITH MULTIPLE FORMS</TITLE>
<script language="javascript">
function checking()
form1.submit();
</script>
</HEAD>
<body>
<center>
<b><font size="5" color="#333399">Staff ID:</font></b></center>
<FORM NAME="form1" METHOD="POST" ACTION="Select.jsp">
<p align=center>
Details of Staff :
<SELECT 1 NAME="type" onchange="checking();">
<option> Administrator </option>
<option> OfficeAssistent </option>
<option> Clerk </option>
</SELECT 1>
</p>
</FORM>
<FORM NAME="form2" METHOD="POST" action="welcome1.jsp">
<center>
<TABLE><TR><TD>Staff ID:</TD>
<TD><SELECT 2 NAME="staff_id">
<%
String type = request.getParameter("type");
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:java","system","manager");
catch (ClassNotFoundException ex) {
System.out.println(ex);
catch (SQLException ex)
System.out.println(ex);
st = con.createStatement();
sql = "select staff_id from "+type+"";
addItems(out, sql);
%>
</SELECT 2>
</TD>
</TR>
</table></center>
<h2> Details of <%= type + "s" %> </h2>
<center><input type=submit value=ok onclick="submit();"></center>
</FORM>
</BODY>
</HTML>
welcome1.jsp
<center><h1>WEL COME</h1></center>
<%
String type = request.getParameter("type");
String sid = request.getParameter("staff_id");
%>
<h2> Details of <%= type + "s" %> </h2>
<h2> Details of <%= sid %> </h2><SELECT 1 NAME="type" onchange="checking();">
<option value = "0"> Administrator </option>
<option value = "1"> OfficeAssistent </option>
<option value = "2"> Clerk </option>
</SELECT 1> -
How to capture the values after applying filter in ALV.
Hi,
I have an ALV in my application with 10 projects displayed. Out of those 10 projects, 5 projects have banking as industry.
when you filter the ALV based on industry banking I get 5 projects .In run time how can I capture only these 5 projects. when I debugged and saw the ALV table node is holding 10 prj not 5 prj.
How can read only those 5 values. Kindly help me out with sample code.
Thanks,
PriyaHi,
The class name is correct - CL_SALV_WD_FIELD. When you refer the model object(CL_SALV_WD_CONFIG_TABLE-IF_SALV_WD_FIELD_SETTINGS) this will return the field for which
you have applied filter by passing the field name.
Before you try out this approach, check the ALV event ON_CELL_ACTION fro that column name to capture the filtering value. Based on this loop at the table where field eq <<filerting value>> and get the filtered records.
As you have get_static_attributes_table it deosnot return the filtered values.
Regards,
Lekha. -
How to capture the value in buffer
Hi,
In VA01, when I change name of ship to party. Want to compare changed with name in ztable.
But when I change the name it will be in buffer.So how to do this?
Is there any function module to caputure the value in buffer.
Please suggest me.
Regards,
BrahmajiHi,
Use user exit "MV45AFZB", form routine "USEREXIT_CHECK_VBAK".
Read table xvbpa into <workarea> with key posnr ='000000' parvw = 'WE'.
Check <workarea>-KUNNR with the value in Z table.
Regards
Vinod -
How to capture the values selected at selection screen
Hi.
I need some basic idea reg. to capture the selected values at selection screen into an internal table.
for example.
Selection-screen having the following fields,
Grade1....a1
grade2..a2
grade3..a3
grade4..a4
grade15--a15
Now i want to get the values of grade into an internal table.. so that i can create dynamic table based on selected values
a1 a2 a3 a4 a5...use function moduel
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = repname " Your report name
TABLES
SELECTION_TABLE = it_sels.
you can get all values from the selection screen
a® -
How to capture the value ?
Hello Everyone,
I am running a BDC program using call transaction , and I am updating some records in FB01 , then for each record a number is generated called document number ( bkpf - belnr ),
I want to capture the number generated for each record i process ?
if i process 10 different records at a time, then how to find which document number is generated for which record ?
will be rewarded ??declare the internal table of type structure BDCMSGCOLL.
Use this itab in call transaction.
ex:
call transaction.......messages into itab.
if sy-subrc = 0.
endif.
In debugging mode check if itab contains any document number for the success full record. Generally it contains the number. -
How to capture the value of certain HTML tags
Hi All,
I would like to retrieve the values of the following HTML outputs and is wondering whether there is a simpler method to do:
<td class="propType"><b>Address</b></td>
<td class="propType"><b>Agent Office</b></td>
<td class="propType"><b>Result</b></td>
<td class="propType" align="right"><b>Amount</b></td>
<td colspan="6"><strong class="propType">
<td><strong>Date</strong></td>
<td><strong>Amount</strong></td>
<td><strong>Agent Office</strong></td>
<td><strong>Selling Agent</strong></td>
<td class="even">Aug-07</td>
<td class="even">$2,925,000 </td>
<td class="even">Di Jones RE</td>
<td class="even">Andrew Hennessy</td>One awkard method is by using the stringbuffer as follows:
String greaterthanSignedList[] = greaterthanSigned.split(">") to pickup all the text that comes after the greater than (ie ">" sign)...
String lessthanSignedList[] = lessthanSigned.split("</") to get the string before the less than (ie "</" sign) ...
Here are the output that I am looking for:
Address
Agent Office
Result
Amount
Date
Amount
Agent Office
Selling Agent
Aug-07
$2,925,000
Di Jones RE
However, I am sure that there must be an easier way to do this. Would anyone be able to point me to the right direction?
Many thanks,
Jackhtran_888 wrote:
Only 1 option is needed. ie either XSLT, SAX, DOM... whichever is the simplest.The name Simple API for XML kind of says it all, but you might need to write a lot of unnecessary code. I like to write an XSL stylesheet that converts the input data into something that I can easily parse.
The Java code looks like this:
PipedReader result = new PipedReader();
Writer resultWriter = new PipedWriter(result);
TransformerFactory transFact = TransformerFactory.newInstance();
Transformer trans = transFact.newTransformer(new StreamSource(stylesheet));
trans.transform(new StreamSource(xmlInput), new StreamResult(resultWriter));
resultWriter.close();Writing the XSL stylesheet should be trivial in your case, but you can do a lot with it.
I suggest you toy around a bit with both XSLT and SAX. Traversing the DOM manually is not really advisable.
With kind regards
Ben -
Im using measurement studio c++ to create a application. How to save a randomly generated value which display in the CNumberEdit Control to a text file? how to do the coding part?
You can use the CNiFile class to write the value out to a file. For example, create a new Measurement Studio C++ project and follow these steps:
Add a CNiNumEdit to the dialog.
Add a member variable for the CNiNumEdit called m_numEdit.
Add a button to the dialog.
Double-click the button to add a message handler for the button's BN_CLICKED message.
Add the following code to the button's BN_CLICKED message handler:
CNiFile file("C:\\Values.log", CFile::modeCreate | CFile::modeWrite | CFile::typeText);
file << m_numEdit.Value << endl;
file.Close();
Run the application, edit the CNiNumEdit's value, and click the button. The value should be written to the Values.log
file as specified in the code above.
Hope this helps.
- Elton -
I need to know when the user has changed the value of a slider or a Boolean control that was dynamically created (not part of a dialog). Is there any way to do that without polling? I would have expected these controls to post a WM_NOTIFY message to the parent window in response to user events, but that does not seem to happen. Am I missing something?
Win32 controls do typically post WM_NOTIFY messages to the parent window for user events. The Measurement Studio UI controls are actually ActiveX controls, though, and events are handled differently for ActiveX controls.
If you have a resource ID for you control, the easiest way would be to create your control in the OnInitDialog method and handle the event the same way you would if you had added the control to the dialog at design-time:
Add a declaration for the event handler in the AFX_MSG block in the dialog header file.
Make sure the AFX_MSG block in the header file includes DECLARE_EVENTSINK_MAP()
Include an ON_EVENT entry for the event in the dialog source's BEGIN_EVENT_SINK_MAP block.
Include a DDX_Control entry
in the dialog source's AFX_DATA_MAP block.
Otherwise, you'll have to dynamically sink the event at runtime after you've created the control. Microsoft's Knowledge Base has a couple of good articles that demonstrate how to do this:
SAMPLE: AtlEvnt.exe Creates ATL Sinks Using IDispEventImpl (Q194179)
AtlSink Uses ATL to Create a Dispinterface Sink (Q181277)
- Elton -
How to access the value of a dynamic checkboxes
Hello,
I have a userform with a dynamic set of checkboxes.
Set chkBox = Me.Controls.Add("Forms.Checkbox.1", "Checkbox_" & counter & "_" & i)
I'm giving the name of each checkbox multiple parts because there will be multiple rows of checkboxes.
How can I know if checkbox_1_1 is checked or not?
I have tried
For Each cont In Me.Controls
If cont.Name = strCtrlName Then
'cont.Value doesn't exist
End If
Next cont
The value property is not showing up.
Thank you for any helpMaybe you've got your strCtrlName wrong, this worked for me
Private Sub UserForm_Initialize()
Dim i As Long
Dim counter As Long
counter = 5
Dim chkBox As MSForms.CheckBox
For i = 1 To 3
Set chkBox = Me.Controls.Add("Forms.Checkbox.1", "Checkbox_" & counter & "_" & i)
chkBox.Left = 9
chkBox.Top = i * 20
chkBox.Caption = chkBox.Name
Next
End Sub
Private Sub UserForm_Click()
Dim i As Long
Dim counter As Long
counter = 5
Dim chkBox As MSForms.CheckBox
For i = 1 To 3
Set chkBox = Me.Controls("Checkbox_" & counter & "_" & i)
s = s & i & "=" & chkBox.Value & " "
Next
Me.Caption = s
End Sub
Paste the above into an empty userform and run it. Tick a couple of checkboxes and click the form.
Maybe look into WithEvents in a class module to trap and act on checkbox changes in real time.
Maybe you are looking for
-
Hard drive not recognized on startup after 10.4.6 update
This is hurting my brain. I updated to 10.4.6 from the Software Update that popped up today. Upon restart it "froze" on the greyscreen with the Apple logo. (didn't make it to the spinning wheel). I even let it sit for a good 10 minutes, hoping it wou
-
How can I config a yum plublic repository for VM support without paying ?
Please see: yum plublic repository I'm a bit confused with the options for support/updates. There is an option to get a VM support, which includes support, and a ULN subscription. There is also the option in the pricing guide to just get the ULN subs
-
Help. Acrobat pro freezes after 9.5.1 update
my acrobat pro freezes everytime when i try opening a PDF. i have just updated/upgraded to the 9.5.1. i'm on a mac os lion.
-
Crystal report error when exporting to pdf
We have developed a crystal report that gives an error (doesnt say which one) when i try to export the report to pdf. It says "exporting the report failed". Version : 11.0.0.1282. The viewer im talking about is the integrated preview of crystal repor
-
I have changed my wi fi password now i m unable to connect my pc
I have changed my wi fi password now i m unable to connect my pc