F4IF_INT_TABLE_VALUE_REQUEST select entrie row
Hello All,
I have a VALUE_TAB internal table (<b>it_mngrp_mncod</b>) with 3 fileds. After selecting a row in F4 pop up, I need to get all the three column values. In return_tab I am getting only the last field, which is the value of CODE in it_mngrp_mncod. Is there any way to select the entire row in F4 pop up?
Here is the piece of my code:
*& Report ZCK_TEST
REPORT zck_test.
TABLES: viqmel, viqmfe.
CALL SCREEN 101.
*& Module code_pf4_i15 INPUT
MODULE code_pf4_i15 INPUT.
DATA: BEGIN OF it_mngrp_mncod OCCURS 0,
kurztext TYPE qtxt_code,
codegruppe TYPE qcodegrp,
code TYPE qcode,
END OF it_mngrp_mncod.
DATA: it_returntab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
DATA: it_fieldtab LIKE dfies OCCURS 0 WITH HEADER LINE.
DATA p_field TYPE fieldname.
GET CURSOR FIELD p_field .
PERFORM code_pf4_f40 USING p_field.
ENDMODULE. " code_pf4_i15 INPUT
*& Form code_pf4_f40
FORM code_pf4_f40 USING p_field.
PERFORM get_f4_values CHANGING p_field.
ENDFORM. " code_pf4_f40
*& Form GET_F4_VALUES
FORM get_f4_values CHANGING p_field.
DATA: field1 TYPE fieldname,
field2 TYPE fieldname.
DATA: p_katalogart TYPE qkatart.
SPLIT p_field AT '-' INTO field1 field2.
IF field2 = 'OTGRP' OR field2 = 'OTEIL'.
p_katalogart = 'B'.
ELSEIF field2 = 'FEGRP' OR field2 = 'FECOD'.
p_katalogart = 'C'.
ELSEIF field2 = 'URGRP' OR field2 = 'URCOD'.
p_katalogart = '5'.
ELSEIF field2 = 'MNGRP' OR field2 = 'MNCOD'.
p_katalogart = 'A'.
ELSEIF field2 = 'TASK_CODEGRP' OR field2 = 'TASK_CODE' OR field2 =
'TXT_TASKCD'.
p_katalogart = '2'.
ENDIF.
SELECT codegruppe code INTO CORRESPONDING FIELDS OF TABLE
it_mngrp_mncod FROM qpcd WHERE katalogart = p_katalogart.
LOOP AT it_mngrp_mncod.
SELECT SINGLE kurztext
FROM qpct
INTO it_mngrp_mncod-kurztext
WHERE katalogart = p_katalogart
AND codegruppe = it_mngrp_mncod-codegruppe
AND code = it_mngrp_mncod-code.
MODIFY it_mngrp_mncod FROM it_mngrp_mncod TRANSPORTING kurztext.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = p_field
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = it_mngrp_mncod
field_tab = it_fieldtab
return_tab = it_returntab
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE it_returntab INDEX 1.
MOVE it_returntab-fieldval TO p_field.
ENDFORM. " GET_F4_VALUES
*& Module user_command_101 INPUT
text
MODULE user_command_101 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " user_command_101 INPUT
*& Module status_101 OUTPUT
text
MODULE status_101 OUTPUT.
SET PF-STATUS '0101'.
ENDMODULE. " status_101 OUTPUT
Hi,
Paste following code as-is just before ENDIF. Then it should work fine.
data: w_dynpro_field type dynpread.
data: t_dynpro_field type standard table of dynpread.
refresh: t_dynpro_field.
move: sy-repid to d020s-prog,
sy-dynnr to d020s-dnum.
move: 'VIQMFE-OTEIL' to w_dynpro_field-fieldname,
viqmfe-oteil to w_dynpro_field-fieldvalue.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = d020s-prog
dynumb = d020s-dnum
tables
dynpfields = t_dynpro_field
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
Hope this helps...
Thanks,
Murali
Similar Messages
-
How to get row number of selected entry from OVS search result
Hi,
Anyone having any idea on how to get row number of the selected entry/ how to differentiate rows in OVS search result in ON_OVS method?
Regards,
JatinHi,
You can get the selected record to <ls_selection> structure in co phase 3.
From that structure you can get what ever field you want.,
check the below code for reference,
<< Moderator message - Cut and paste response from F4 help for ALV table field removed. Plagiarism is not allowed in SCN >>
hope this helps u.,
Thanks & Regards,
Kiran
Edited by: Rob Burbank on Jan 5, 2012 5:24 PM -
When selecting a row from a view with a nested table I want just ONE entry returned
Does a nested table in a view "EXPLODE" all values ALWAYS no matter the where clause for the nested table?
I want to select ONE row from a view that has columns defined as TYPE which are PL/SQL TABLES OF other tables.
when I specify a WHERE clause for my query it gives me the column "EXPLODED" with the values that mathc my WHERE clause at the end of the select.
I dont want the "EXPLODED" nested table to show just the entry that matches my WHERE clause. Here is some more info:
My select statement:
SQL> select * from si_a31_per_vw v, TABLE(v.current_allergies) a where a.alg_seq
=75;
AAAHQPAAMAAAAfxAAA N00000 771 223774444 20 GREGG
CADILLAC 12-MAY-69 M R3
NON DENOMINATIONAL N STAFF USMC N
U
E06 11-JUN-02 H N
05-JAN-00 Y Y
USS SPAWAR
353535 USS SPAWAR
SI_ADDRESS_TYPE(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NUL
L, NULL)
SI_ADDRESS_TAB()
SI_ALLERGY_TAB(SI_ALLERGY_TYPE(69, 'PENICILLIN', '11-JUN-02', NULL), SI_ALLERGY
TYPE(74, 'SHELLFISH', '12-JUN-02', NULL), SIALLERGY_TYPE(68, 'PEANUTS', '13-J
UN-02', NULL), SI_ALLERGY_TYPE(75, 'STRAWBERRIES', '13-JUN-02', NULL))
SI_ALLERGY_TAB()
75 STRAWBERRIES 13-JUN-02
*******Notice the allergy entry of 75, Strawberries, 13-JUN-02 at the
end. This is what I want not all the other exploded data.
SQL> desc si_a31_per_vw
Name Null? Type
........ Omitted uneeded previous column desc because of metalink
character limit but the view is bigger then this.......
DEPT_NAME VARCHAR2(20)
DIV_NAME VARCHAR2(20)
ADDRESSES SI_ADDRESS_TAB
CURRENT_ALLERGIES SI_ALLERGY_TAB
DELETED_ALLERGIES SI_ALLERGY_TAB
SQL> desc si_allergy_tab
si_allergy_tab TABLE OF SI_ALLERGY_TYPE
Name Null? Type
ALG_SEQ NUMBER
ALG_NAME VARCHAR2(50)
START_DATE DATE
STOP_DATE DATE
SQL> desc si_allergy_type
Name Null? Type
ALG_SEQ NUMBER
ALG_NAME VARCHAR2(50)
START_DATE DATE
STOP_DATE DATECan you explain what do you mean by the following?
"PL/SQL tables (a.k.a. Index-by tables) cannot be used as the basis for columns and/or attributes"There are three kinds of collections:
(NTB) Nested Tables
(VAR) Varrying Arrays
(IBT) Index-by Tables (the collection formerly known as "PL/SQL tables")
NTB (and VAR) can be defined as persistent user defined data types, and can be used in table DDL (columns) and other user defined type specifications (attributes).
SQL> CREATE TYPE my_ntb AS TABLE OF INTEGER;
SQL> CREATE TABLE my_table ( id INTEGER PRIMARY KEY, ints my_ntb );
SQL> CREATE TYPE my_object AS OBJECT ( id INTEGER, ints my_ntb );
/IBT are declared inside stored procedures only and have slightly different syntax from NTB. Only variables in stored procedures can be based on IBT declarations.
CREATE PROCEDURE my_proc IS
TYPE my_ibt IS TABLE OF INTEGER INDEX BY BINARY_INTEGER; -- now you see why they are called Index-by Tables
my_ibt_var my_ibt;
BEGIN
NULL;
END;That sums up the significant differences as it relates to how they are declared and where they can be referenced.
How are they the same?
NTB and VAR can also be (non-persistently) declared in stored procedures like IBTs.
Why would you then ever use IBTs?
IBTs are significantly easier to work with, since you don't have to instantiate or extend them as you do with NTB and VAR, or
Many other highly valuable PL/SQL programs make use of them, so you have to keep your code integrated/consistent.
There's a lot more to be said, but I think this answers the question posed by Sri.
Michael -
Selecting a row in the output of alv grid
hi,
how do i select a row in the output of alv grid?plz help...
regards,
sheeba.Hi,
Please refer the code below:
*& Report ZDEMO_ALVGRID_SELROW *
*& Example of a simple ALV Grid Report *
*& The basic ALV grid, Enhanced to display capture each row a user has *
*& selected *
REPORT zdemo_alvgrid_selrow .
TABLES: ekko.
type-pools: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
SEl, "stores which row user has selected
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
* Build Fieldcatalog for ALV Report
form build_fieldcatalog.
* There are a number of ways to create a fieldcat.
* For the purpose of this example i will build the fieldcatalog manualy
* by populating the internal table fields individually and then
* appending the rows. This method can be the most time consuming but can
* also allow you more control of the final product.
* Beware though, you need to ensure that all fields required are
* populated. When using some of functionality available via ALV, such as
* total. You may need to provide more information than if you were
* simply displaying the result
* I.e. Field type may be required in-order for
* the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
* fieldcatalog-do_sum = 'X'.
* fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'. "Display column total
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
* Build layout for ALV grid report
form build_layout.
gd_layout-box_fieldname = 'SEL'.
"set field name to store row selection
gd_layout-edit = 'X'. "makes whole ALV table editable
gd_layout-zebra = 'X'.
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
* Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
* i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
* i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
* it_special_groups = gd_tabgroup
* IT_EVENTS = GT_XEVENTS
i_save = 'X'
* is_variant = z_template
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 DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into corresponding fields of table it_ekko.
endform. " DATA_RETRIEVAL
* FORM USER_COMMAND *
* --> R_UCOMM *
* --> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check function code
CASE r_ucomm.
WHEN '&IC1'.
* Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
* Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
* Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
* Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
WHEN '&DATA_SAVE'. "user presses SAVE
loop at it_ekko into wa_ekko.
if wa_ekko-sel EQ 'X'.
* Process records that have been selected
endif.
endloop.
ENDCASE.
ENDFORM.
Thanks,
Sriram Ponna. -
Can�t manage to select a row in a t:dataTable
I use a tomahawk dataTable to list a collection of objects called �dmex� in dmexTable.jsp
When I select one row to edit details in the next page �dmexDetails.jsp� I systematically get the last entries of my table.
In debug mode I could find out that JSF/MyFaces iterates through the whole list instead of selecting only the entry I clicked on.
Here is my code of dmexTable.jsp where #{dmexTable} is a backingBean of dmexTable.jsp and #{dmexBean} the backingBean of dmexDetails.jsp
<h:form id="formDmexTable">
<t:dataTable id="dmexTable"
cellspacing="3"
cellpadding="3"
styleClass="orders"
headerClass="ordersHeader"
rowClasses="evenRow,oddrow"
var="rowDmex"
value="#{dmexTable.dmexList}"
preserveDataModel="true" >
<h:column>
<f:facet name="header">
<h:outputText value="Id" id="columnDmexId" />
</f:facet>
<h:outputText value="#{rowDmex.dmexId}" id="rowDmexId" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{msgsDmex.application}" id="columnApps" />
</f:facet>
<t:commandLink id="selectDmexApps" action="go_to_dmexDetails" immediate="true">
<h:outputText value="#{rowDmex.application}"
id="rowApplication" />
<t:updateActionListener property="#{dmexBean.dmexId}"
value="#{rowDmex.dmexId}" />
</t:commandLink>
</h:column>
� some others properties in other columns �
</t:dataTable>
</h:form>
Herebelow the code of my RequestScope ManagedBean #{dmexTable} containing a property dmexList and a hibernate Class called �dmexManager� that gives access to the dataBase :
public class DmexTable{
private ArrayList dmexList ;
private bsa.integration.service.DmexManager dmexManager;
public ArrayList getDmexList() {
dmexList = (ArrayList) dmexManager.findPoolList(new Dmex())
return dmexList;
public void setDmexList(ArrayList dmexList) {
this.dmexList = dmexList;
SOFAR EVRYTHING WORKS FINE ; I can list my dmex in the dataTable dmexTable !
Here below is the code of my JSP view called �dmexDetails.jsp� where #{dmexBean}is still the backingBean of the view :
<h:form id="formDmexIdentification">
<t:saveState value="#{dmexBean.dmexId}" />
<h:panelGrid columns="2">
<h:outputText value="id" styleClass="sorti" />
<h:outputText value="#{dmexBean.dmex.dmexId}"styleClass="sorti"/>
<h:outputText value="#{msgsDmex.application}" styleClass="sorti" />
<h:inputText value="#{dmexBean.dmex.application}"
size="6" styleClass="ent" required="true" id="inputApplication" />
<h:message for="inputApplication" styleClass="mess" />
Herebelow the code of my RequestScope ManagedBean #{dmexDetails} containing the �t:saveState� property dmexId and the hibernate Class �dmexManager� that gives access to the dataBase :
public class DmexBean {
private int dmexId ;
public int getDmexId() {
return dmexId;
// this is the method that JSF/MyFaces iterates through when clicking on one commandLink of the Table !!!
public void setDmexId(int _rowDmexId) {
if (_rowDmexId > 0)
dmex = getSimpleDmex(_rowDmexId);
if (dmex == null) {
return;
private Dmex getSimpleDmex(int _id) {
dmex = (Dmex)dmexManager.findOneId(new Dmex(),_id);
return dmex;
I can�t figure out why clicking on the command Link JSF/MyFaces does not simply send back the selected dmexId !
May someone give a hint ? I have nomore Idea since my implementation seems exactly similar to the MyFace example I used ..Hello !
Okay, I could see the message you logged a few days before about a similar issue you identified as a Bug ... then after upgrading MyFaces to Core 1.1.3 + Tomahowak 1.1.2 I could make my test case work.
The further issue I am facing now is that in my Detail view dmexDetails.jsp when I try to POST the form I got for each inputText field the following message :
"inputText field id : Error during model data update "
I "googled" on it without success ... I am still investigating !
regards
lsalse -
Select entries and print button to pdf
I have a drill down report where I have the summary report and a row under each summary report entry which toggles to show the details report.
Now my task is to make each of the summary report entries "selectable" by a
checkbox next to each summary report entry...
For the selected entries the report needs to have a "View
Details in pdf" option...
I have no clue how to go about this, I know SSRS itself does not have the capability to let us add buttons using the GUI...
I also right-clicked on the report in the "Solution Explorer" to find a "view code" option...
Do I need to modify/add things to this code to get what I want?
Dhananjay ReleBut still the basic question remains unanswered, How do i select multiple records from my result-set?
Hi Rele,
In SQL Server Reporting Services, the checkbox is only available on Parameter area. We cannot add checkbox to report body. So you cannot select multiple report on the report body from the result-set. What you can do is using parameter to filter multiple
records, and using “Go to a report” action and passing this parameter to another report. For the detail steps, please refer to your another thread to see Simon's reply.
http://social.technet.microsoft.com/Forums/en-US/fbb73224-f010-47e5-8300-d33828cca33d/print-to-pdf-option-in-report?forum=sqlreportingservices
Regards,
Charlie Liao
TechNet Community Support -
Urgent : how to select the rows in the ALV Grid Control
How to select the rows in the ALV Grid control,
I am facing the situation where i need to select the row/rows in the Grid control and then to lock the entries,
If anyone have the solution please help me out
<b>Its very Urgent</b>Hi Bharath,
Go through this hope u can understand.
SEL_MODE. Selection mode, determines how rows can be selected. Can have the following values:
A Multiple columns, multiple rows with selection buttons.
B Simple selection, listbox, Single row/column
C Multiple rows without buttons
D Multiple rows with buttons and select all ICON
Setting and getting selected rows (Columns) and read line contents
You can read which rows of the grid that has been selected, and dynamic select rows of the grid using methods get_selected_rows and set_selected_rows. There are similar methods for columns.
Note that the grid table always has the rows in the same sequence as displayed in the grid, thus you can use the index of the selected row(s) to read the information in the rows from the table. In the examples below the grid table is named gi_sflight.
Data declaration:
DATA:
Internal table for indexes of selected rows
gi_index_rows TYPE lvc_t_row,
Information about 1 row
g_selected_row LIKE lvc_s_row.
Example 1: Reading index of selected row(s) and using it to read the grid table
CALL METHOD go_grid->get_selected_rows
IMPORTING
et_index_rows = gi_index_rows.
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines = 0.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
textline1 = 'You must choose a valid line'.
EXIT.
ENDIF.
LOOP AT gi_index_rows INTO g_selected_row.
READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
ENDIF.
ENDLOOP.
Example 2: Set selected row(s).
DESCRIBE TABLE gi_index_rows LINES l_lines.
IF l_lines > 0.
CALL METHOD go_grid->set_selected_rows
exporting
it_index_rows = gi_index_rows.
ENDIF.
Reward points if helpful.
Thanks
Naveen khan -
Copy Function with Single selection of row
I want to copy necessary Planning items in my Input ready query from period 1 to remaining periods based on variable entries. To achieve this I have created a copy planning function to copy amount entered in period 1 (variable) to range of posting period variable entries (e.g. 2 -12 or 6-12).
I have created structure for GL accounts and I want to copy from period 1 to 2 - 12 for one row at a time.
I have created WAD template, I selected in behavior section of Analysis item, single with command option and assigned Planning sequence (consisting of copy function) as command.
On execution of WAD, I select single row in my input ready query and instead of one row getting copied over to the range of posting period, all rows consisting of Planning Items with amount are getting copied over, which I am not expecting with single selection option.
How can I have only one row getting copied over?
Am I am missing something?
Your suggestions are highly appreciated.
Regards,
SachinHello Gregor,
Thanks for your response. I tried what you have suggested and also followed the documentation, not sure why it is not working as expected
In my variable I have characterictis such as:
Version
Fiscal Year
Fiscal Year Variant
Profit Center
In my rows:
Planning Item
Columns:
Period
Amount
In behavior I have selected Row Selection Single. I am using Button group and assigned following:
Command: Execute a Planning Function -> In Data Binding -> Selection Binding -> Characteristic -> Planning Item -> Binding Type -> Item Characteristic -> Web Item Selection -> Item Binding -> Query (Analysis Item) -> Characteristic -> Planning item.
For Variable I have defined nothing.
Do you think my settings are correct?
Regards,
Sachin -
Selecting Multiple rows in an ALV
Hi Experts,
Using 'REUSE_ALV_GRID_DISPLAY' is it possible to select multiple rows, WITHOUT using CTRL OR SHIFT keys ?
thanks in advance.I have done an application for multiple selection in ALV using check box concept. Please find that code below.
*& Report ZATL_DELIVERY
REPORT zatl_delivery.
INCLUDE zatl_delivery_declarations.
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln OBLIGATORY.
SELECTION-SCREEN END OF BLOCK a.
INITIALIZATION.
AT SELECTION-SCREEN.
START-OF-SELECTION .
SET PF-STATUS 'ABC'.
SET PF-STATUS 'BCD'.
get the sales order numbers thru given
selection-screen parameters
SELECT vbeln FROM vbak INTO TABLE it_data
WHERE vbeln IN s_vbeln.
AND ERDAT = P_DATE.
IF NOT it_data[] IS INITIAL.
SELECT vbeln vstel FROM vbap INTO TABLE it_vstel
FOR ALL ENTRIES IN it_data
WHERE vbeln = it_data-vbeln.
ENDIF.
LOOP AT it_data INTO wa_data.
CALL FUNCTION 'ZBAPI_GET_MATERIAL_PLANT_DTL'
EXPORTING
v_vbeln = wa_data-vbeln
TABLES
it_bapi = it_result.
LOOP AT it_result INTO wa_result.
READ TABLE it_vstel INTO wa_vstel WITH KEY
vbeln = wa_result-vbeln.
wa_final-vbeln = wa_result-vbeln. " SALES ORDER NO
wa_final-matnr = wa_result-matnr.
wa_final-vstel = wa_vstel-vstel.
wa_final-werks = wa_result-werks.
wa_final-labst = wa_result-kwmeng.
APPEND wa_final TO it_final.
CLEAR wa_result.
ENDLOOP.
REFRESH it_result.
CLEAR wa_data.
ENDLOOP.
PERFORM build_fldcat.
PERFORM disp_output.
*SET PF-STATUS 'ABC'.
*& Form ABC
text
-->EXTAB text
FORM abc USING extab TYPE slis_t_extab.
SET PF-STATUS 'ABC'. " excluding extab.
ENDFORM. "ABC
read
*& Form build_fldcat
text
--> p1 text
<-- p2 text
FORM build_fldcat .
wa_fldcat-col_pos = '1'.
wa_fldcat-fieldname = 'MARK'.
wa_fldcat-checkbox = 'X'.
wa_fldcat-edit = 'X'.
wa_fldcat-seltext_m = 'MARK'.
APPEND wa_fldcat TO i_fldcat.
CLEAR wa_fldcat.
wa_fldcat-col_pos = '2'.
wa_fldcat-fieldname = 'VBELN'.
wa_fldcat-tabname = 'IT_FINAL'.
wa_fldcat-seltext_m = 'SALES ORD NO'.
APPEND wa_fldcat TO i_fldcat.
wa_fldcat-col_pos = '3'.
wa_fldcat-fieldname = 'MATNR'.
wa_fldcat-tabname = 'IT_FINAL'.
wa_fldcat-seltext_m = 'MAT NO'.
APPEND wa_fldcat TO i_fldcat.
wa_fldcat-col_pos = '4'.
wa_fldcat-fieldname = 'WERKS'.
wa_fldcat-tabname = 'IT_FINAL'.
wa_fldcat-seltext_m = 'PLANT'.
APPEND wa_fldcat TO i_fldcat.
wa_fldcat-col_pos = '5'.
wa_fldcat-fieldname = 'LABST'.
wa_fldcat-tabname = 'IT_FINAL'.
wa_fldcat-seltext_m = 'QNTY'.
APPEND wa_fldcat TO i_fldcat.
ENDFORM. " build_fldcat
*& Form disp_output
text
--> p1 text
<-- p2 text
FORM disp_output .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'ABC'
it_fieldcat = i_fldcat
i_callback_user_command = 'CHECKED'
TABLES
t_outtab = it_final
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. " disp_output
*& Form CHECKED
text
-->R_UCOMM text
-->RS_SELFIELD text
FORM checked USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA: gd_repid LIKE sy-repid, "Exists
ref_grid TYPE REF TO cl_gui_alv_grid.
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data .
ENDIF.
CASE r_ucomm.
WHEN 'DELIVERY'.
IF rs_selfield-fieldname = 'MARK'.
DATA : date_external(10) TYPE c.
DATA: temp_date TYPE sy-datum.
temp_date = sy-datum.
temp_date = temp_date + 1.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
date_internal = sy-datum
IMPORTING
date_external = date_external
EXCEPTIONS
date_internal_is_invalid = 1
OTHERS = 2.
LOOP AT it_final INTO wa_final WHERE mark EQ 'X'.
PERFORM bdc_dynpro USING 'SAPMV50A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LV50C-VBELN'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'LIKP-VSTEL'
wa_final-vstel. " 'HLL'.
PERFORM bdc_field USING 'LV50C-DATBI'
date_external. "
PERFORM bdc_field USING 'LV50C-VBELN'
wa_final-vbeln. " '34'.
PERFORM bdc_dynpro USING 'SAPMV50A' '0200'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LIPS-MATNR(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
PERFORM bdc_field USING 'LIKP-BLDAT'
date_external. " '19.09.2008'.
CLEAR date_external.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
date_internal = temp_date
IMPORTING
date_external = date_external
EXCEPTIONS
date_internal_is_invalid = 1
OTHERS = 2.
PERFORM bdc_field USING 'LIKP-WADAT'
date_external ." '19.09.2008'.
CLEAR date_external.
PERFORM bdc_field USING 'LIKP-BTGEW'
wa_final-labst. " -'12'.
PERFORM bdc_field USING 'LIKP-GEWEI'
'wa_likp-GEWEI'.
PERFORM bdc_transaction USING 'VL01'.
PERFORM msg_get TABLES it_msg.
CLEAR wa_final.
REFRESH it_msg.
ENDLOOP.
PERFORM disp_msg.
ENDIF.
ENDCASE.
ENDFORM. "CHECKED
*& Form BDC_DYNPRO
text
-->P_0443 text
-->P_0444 text
FORM bdc_dynpro USING value(p_0443)
value(p_0444).
wa_bdc-program = p_0443.
wa_bdc-dynpro = p_0444.
wa_bdc-dynbegin = 'X'.
APPEND wa_bdc TO it_bdc.
CLEAR wa_bdc.
ENDFORM. " BDC_DYNPRO
*& Form BDC_FIELD
text
-->P_0448 text
-->P_0449 text
FORM bdc_field USING value(p_0448)
value(p_0449).
wa_bdc-fnam = p_0448.
wa_bdc-fval = p_0449.
APPEND wa_bdc TO it_bdc.
CLEAR wa_bdc.
ENDFORM. " BDC_FIELD
*& Form BDC_TRANSACTION
text
-->P_0508 text
FORM bdc_transaction USING value(p_0508).
CALL TRANSACTION p_0508 USING it_bdc
MODE 'N'
UPDATE 'S'
MESSAGES INTO it_msg.
ENDFORM. " BDC_TRANSACTION
*& Form msg_get
text
-->P_IT_MSG text
FORM msg_get TABLES p_it_msg STRUCTURE bdcmsgcoll.
LOOP AT p_it_msg INTO wa_msg.
v_msgid = wa_msg-msgid.
v_msgnr = wa_msg-msgnr.
v_msgv1 = wa_msg-msgv1.
v_msgv2 = wa_msg-msgv2.
v_msgv3 = wa_msg-msgv3.
v_msgv4 = wa_msg-msgv4.
IF wa_msg-msgtyp = 'E' OR
wa_msg-msgtyp = 'A' OR
wa_msg-msgtyp = 'X'.
PERFORM build_msg USING v_msgid
v_msgnr
v_msgv1
v_msgv2
v_msgv3
v_msgv4
CHANGING msg_text_e.
Build the text for successful records getting created
ELSEIF wa_msg-msgtyp = 'S' OR
wa_msg-msgtyp = 'W' OR
wa_msg-msgtyp = 'I'.
PERFORM build_msg USING v_msgid
v_msgnr
v_msgv1
v_msgv2
v_msgv3
v_msgv4
CHANGING msg_text_s.
ENDIF.
ENDLOOP.
ENDFORM. " msg_get
*& Form build_msg
text
-->P_V_MSGID text
-->P_V_MSGNR text
-->P_V_MSGV1 text
-->P_V_MSGV2 text
-->P_V_MSGV3 text
-->P_V_MSGV4 text
<--P_MSG_TEXT_E text
FORM build_msg USING p_v_msgid
p_v_msgnr
p_v_msgv1
p_v_msgv2
p_v_msgv3
p_v_msgv4
CHANGING p_msg_text_s.
CALL FUNCTION 'TB_MESSAGE_BUILD_TEXT'
EXPORTING
langu = sy-langu
msgid = p_v_msgid
msgno = p_v_msgnr " wa_msgcoll-msgnr
msgv1 = p_v_msgv1
msgv2 = p_v_msgv2
msgv3 = p_v_msgv3
msgv4 = p_v_msgv4
IMPORTING
text = p_msg_text_s.
wa_mess-v_msg = p_msg_text_s .
APPEND wa_mess TO i_mess.
CLEAR wa_mess.
ENDFORM. " build_msg
*& Form disp_msg
text
--> p1 text
<-- p2 text
FORM disp_msg .
PERFORM build_fieldcat_secandary.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'BCD'
it_fieldcat = i_fldcat1
i_callback_user_command = 'SECANDARY'
TABLES
t_outtab = i_mess
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. " disp_msg
*& Form build_fieldcat_secandary
text
--> p1 text
<-- p2 text
FORM build_fieldcat_secandary .
wa_fldcat1-col_pos = '1'.
wa_fldcat1-fieldname = 'V_MSG'.
wa_fldcat1-tabname = 'I_MESS'.
wa_fldcat1-seltext_m = 'MESSAGE'.
APPEND wa_fldcat1 TO i_fldcat1.
ENDFORM. " build_fieldcat_secandary
*& Form SECANDARY
text
-->R_UCOMM text
FORM secandary USING r_ucomm LIKE sy-ucomm rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN 'BCK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDFORM. "SECANDARY
*& Form ABC
text
-->EXTAB text
FORM bcd USING extab TYPE slis_t_extab.
SET PF-STATUS 'BCD'. " excluding extab.
ENDFORM. "ABC
Hope this will help you,
Murthy. -
Selecting multiple rows in datatable
Hi all,
i want to select multiple rows in datatable using checkbox or radiobox.. after selecting more than one row, user will click on "add" button and that list will be maintained by array. but i can't figure out how do i select multiple entries...
means how would i get to know which rows are selected ?
please help me out..
thanx in advance
VenkateshPointer here is : bind datatable to a datatable object in the backing bean, get the state of the checkboxes there and perform the desired operation.
HTH,
Sachin -
H:datatable..select multiple rows
Hi all, i'm trying to select multiple rows but couldn't do it.. can you please help me to solve this trouble?
Here the code..
kbankMainView.jsp
function doCount() {
button = document.getElementById('formProcedurelist:buttonCount');
button.click();
<h:commandButton id="buttonCount" style="visibility:hidden" action="#{MainViewBean.getSelectedItems}"></h:commandButton>
<h:dataTable id="tableProcedurelist" value="#{MainViewBean.procedureList}" rendered="#{!empty MainViewBean.procedureList}" var="procedure" border="1" headerClass="heading" columnClasses="col0,col1,col2,col3,col4,col5">
<h:column>
<f:facet name="header">
<f:verbatim>Sel.</f:verbatim>
</f:facet>
<h:selectBooleanCheckbox value="#{MainViewBean.selectedIds[procedure.idProcedura]}" style="cursor:pointer" onclick="javascript:doCount()"/>
</h:column>Here my bean..
MainViewBean
private List<TKbankProcedure> selectedProcedureList;
private Map<Integer, Boolean> selectedIds = new HashMap<Integer, Boolean>();
private ArrayList<TKbankProcedure> procedureList;
public void getSelectedItems() {
// Get selected items.
selectedProcedureList = new ArrayList<TKbankProcedure>();
for (TKbankProcedure procedure : procedureList) {
if (selectedIds.get(procedure.getIdProcedura()).booleanValue()) {
selectedProcedureList.add(procedure);
selectedIds.remove(procedure.getIdProcedura()); // Reset
System.out.println("number sel. items = " + selectedProcedureList.size());
}and here my faces-config.xml:
<managed-property>
<property-name>selectedIds</property-name>
<property-class>java.util.Map</property-class>
<map-entries>
<key-class>java.lang.Integer</key-class>
<value-class>java.lang.Boolean</value-class>
</map-entries>
</managed-property>
<managed-property>
<property-name>selectedProcedureList</property-name>
<property-class>java.util.List</property-class>
<list-entries>
<value-class>databaseKbank.TKbankProcedure</value-class>
</list-entries>
</managed-property>
<managed-property>
<property-name>procedureList</property-name>
<property-class>java.util.ArrayList</property-class>
<list-entries>
<value-class>databaseKbank.TKbankProcedure</value-class>
</list-entries>
</managed-property>I can't understand why returns me 0 elements selected..i really hope in your help!
However, thanks BalusC for the help you gave me in the other post!!
Edited by: emergencyDeveloper on Dec 22, 2008 7:52 AMBalusC, i've removed entries and seemed to work..but still doesn't!
Returns me these Exceptions:
ERROR [InvokeApplicationPhase] #{MainViewBean.getSelectedItems}: javax.faces.el.EvaluationException: java.lang.NullPointerException
javax.faces.FacesException: #{MainViewBean.getSelectedItems}: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
... 26 more
Caused by: java.lang.NullPointerException
at m2u_kbank.MainViewBean.getSelectedItems(MainViewBean.java:251)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
... 27 more
11:32:37,698 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: #{MainViewBean.getSelectedItems}: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
... 26 more
Caused by: java.lang.NullPointerException
at m2u_kbank.MainViewBean.getSelectedItems(MainViewBean.java:251)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
... 27 moreCan't found data in procedureList ArrayList, i think error is there..
Bean:
public void getSelectedItems() {
// Get selected items.
selectedProcedureList = new ArrayList<TKbankProcedure>();
Iterator it = procedureList.iterator();
while (it.hasNext()) {
TKbankProcedure procedure = (TKbankProcedure)it.next();
if (selectedIds.get(procedure.getIdProcedura()).booleanValue()) {
selectedProcedureList.add(procedure);
selectedIds.remove(procedure.getIdProcedura()); // Reset
}Hope in your suggest!
Thanks -
How can I display "detailStamp" facet selectively for rows in a table ?
Hi,
My JDEV version is Studio Edition Version 11.1.1.5.0
I am trying to display "detailStamp" facet selectively .
If I read api in link below
http://docs.oracle.com/cd/E26098_01/apirefs.1112/e17488/oracle/adf/view/rich/component/rich/data/RichTable.html
Use the "detailStamp" facet on the Table to include a collapsable content area for each table row. Please note that the height of the open detail area will be a set height based on the height of the detailStamp component. Adding a component that changes in height (like showDetail or panelBox) will by default produce strange results when the detailStamp component's height changes.
Detail Stamp can be selectively displayed for rows in the table by EL binding the "rendered" attribute of the "detailStamp" facet to "true" or "false". The EL binding can contain references to the table "var" attribute since during rendering it will be executed in the context of the row. Disclosure icon is displayed only for rows which have rendered="true".
I can see that i can achieve it by setting rendered property for that facet. BUT this property is not available in Studio Edition Version 11.1.1.5.0Hi Frank.
Thanks for your quick reply .
But I am using Studio Edition Version 11.1.1.5.0 . In this version the property RENDERED of f:facet name="detailStamp" is NOT allowed.
Edited by: user13764942 on Feb 7, 2013 5:48 AM
Put in another way , I want to render the "detailStamp" facet selectively for rows , so for that I need the RENDERED property of "detailStamp" facet. This property is ONLY available in Jdev version 11.2 . I am using Jdev 11.1.1.5.0 so I need some alternative to RENDERED property as this property is NOT available in Jdev 11.1.1.5.0.
Please suggest some way to achieve this behaviour of displaying "detailStamp" facet selectively ....
Thanks!
Edited by: Mangpal Singh on Feb 7, 2013 11:57 PM -
How to select multiple rows from List Of Values
Hello,
I use ADF 11g to create my list of values (LOV). I want to select multiple rows from it. but i can't.
so how i can select many rows to set them in my adf table.
Thank in advanceHi,
LOV is map to an attribute in the viewObject so it will return only one value or more values from selected row. You can't select multiple rows from LOV.
But you can do this by using popup which you can select multiple rows and insert the selected rows to another table.
This blog post explain how to achieve this :
http://husaindalal.blogspot.com/2009/11/search-from-popup-and-add-to-new-table.html#comments
Sameh Nassar -
Select mutiple rows in ALV report output
Hi All,
I want to select the Multiple records i in ALV report output with out holding the CNTL(Control Key).
Is there any options in Layout?
Please let me know
regards,
Ajay
Edited by: Ajay reddy on May 30, 2010 3:27 PMHi Ajay,
To select several rows without Control button, if the rows are adjacent:
- select the first and the last of the desired rows with Shift button pressed
or
- select a row, keep the mouse button pressed, and pass over the desired rows
I don't know an option without Control if the rows are not adjacent.
http://help.sap.com/saphelp_bw/helpdata/en/d1/7d9d37664e4d45e10000009b38f8cf/content.htm
Regards,
Paulo Carvalho -
How to select multiple row in ALV report
Hi friends,
1. How to select multiple row in ALV report
( How to set tab in ALV report and want to select multiple line.)
Thanking you.
SubashHi Sahoo,
If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
in layout structure you will find field SEL_MODE
pass :
LS_LAYOUT-SEL_MODE = 'A'.
In PAI.
CALL METHOD GRID->GET_SELECTED_ROWS
IMPORTING
ET_INDEX_ROWS = T_ROWS
ET_ROW_NO = T_ROWID.
Hope these will solve your problem.
Regards,
Kumar M.
Maybe you are looking for
-
How do I transfer pictures, music, etc to another account on the same Macbook?
I needed to create another user on my MacBook, but am not sure how to transfer my pictures, music, etc from my other account to this one. Any ideas? Thanks!
-
Automatically display the values in textfield
Hii, I have two items. 1.S_NAME (Popup list of values item) 2.S_CODE(Text field). If i select the one "NAME" from pop up list of values then i want to automatically display the corresponding S_CODE of that name ....Pls help me Thanks and Regards, Pre
-
FileSelectPopup in LW/CVI not listing all directories/files in linux.
This is concerning a port of Windows based software to Linux. The FileSelectPopup dialog does not list all the files and folders in the current directory. For example, if I look in /home/pshrewsberry I can see everything but when look in /home I ca
-
Different heatsink/fan for MEGA 651?
I'm new here so go easy on me. I did search but found little info. I'm looking for a different/better heatsink for a MEGA 651. I know there is a problem finding a retension clip that fits.....but I found an older socket 7 heatsink that fits/works. It
-
Using an AX in my hotel room.....
The hotel I am staying in offers ethernet access. I was trying to get my AX to give me wireless access but I ran into some problems: Full reset of the AX first Plug Ethernet in AX Ran Airport utility Create new wireless network>name>wep password Conf