Preventing selection for specific ALV rows
In WD ABAP, does anyone know the technique for using the SET_ROW_SELECTABLE / SET_ROW_SELECTABLE_FIELDNAME methods to shut off the row selection button for specific ALV
rows? I'm not wanting to completely hide the buttons a la the SET_SELECTION_MODE method, just make some rows unselectable while leaving others intact.
The "Preventing Selection" section of the online help
(http://help.sap.com/saphelp_nw2004s/helpdata/en/74/fd4142646ab46be10000000a155106/frameset.htm)
says this should be possible, but doesn't give an example of how to do it.
Any ideas?
Thanks in advance for your help!
- Jason Block
Hi,
see the method documentation in the system, for IF_SALV_WD_TABLE_SETTINGS SET_ROW_SELECTABLE
Regards, Heidi
Similar Messages
-
ALV: how to handle event for multi (lead) row selection ?
Hi,
I use editable ALV and configure it for multi (lead) selection. Works fine.
But I could not find any event handler for reading the selected lines.
There is only the Event handler ON_LEAD_SELECT: this works only for 1 line
(the lead line). But I could not read multi lines. Who can help?
Thanks in advance, ChristianHi Christian,
did you try a custom button?
Try a call
node->GET_SELECTED_ELEMENTS
I cant remember if ALV sends event when multi-selection is on for each row selection.
ie as each row is selected, do you get control ?
If so, then you should still be able to call node->GET_SELECTED_ELEMENTS .
regards
Phil. -
Oracle HR 11.5.7 -Select DateTracked Info of Employees for Specific Period
Oracle HR 11.5.7 -Select DateTracked Info of Employees for Specific Period (From/To)
Hi,
We have Oracle Human Resources 11.5.7 and I would like to know which is the best way to use when need to query data for employees valid within a specific period (From/To) or at specific date.
For example:
Say Current Date= 25-OCT-05
1.
If I want to query the number of employees booked for a training event occurred as at 01-AUG-05 and one of the employees booked left as at 30-SEP-05, I would like to be included in the query.
or 2.
If I want to see the employees assignment details for a specific period to see the active(latest) assignment details as at that period.
I would appreciate any feedback regarding the best way to do such queries as far as accuracy of data and performance is concerned.
Thanking you in advance.
Best regards,
ElenaThank you for your reply..:)
Actually I'm already using this..
My problem is when I need to retrieve information for a specific period of time.
For example say I want to retrieve all sickness absences for Year 2004 and want to retrieve the last employee details (people & assignment tables) that fall within this period (either with an effective date >= sysdate (ie. still active) or which was current upto 31-dec-2004 and might changed later on).
To be more specific let's say an employee took sick leave in 2004 for total 10 days and has the following rows in per_people_f and per_assignments_f:
per_people_f:
start_date end_date person_id other personal details
01-FEB-2001 - 15-MAR-2004 3808 xxxx
16-MAR-2004 - 30-JUN-2004 3808 yyyy
01-JUL-2004 - 17-FEB-2005 3808 zzzz
18-FEB-2005 TO DATE 3808 www
per_assignments_f:
start_date end_date person_id assign_id other assignment details
01-FEB-2001 - 15-JAN-2003 3808 1114 aaaa
16-JAN-2003 - 30-AUG-2004 3808 1114 bbbb
31-AUG-2004 - TO DATE 3808 1114 cccc
What I need the query to return for the above example is:
per_people_f:
start_date end_date person_id other personal details
01-JUL-2004 - 17-FEB-2005 3808 zzzz
and
per_assignments_f:
start_date end_date person_id assign_id other assignment details
31-AUG-2004 - TO DATE 3808 1114 cccc
and sickness days =10
(sum of duration where
absence start_date >= 01-JAN-2004
AND end_date<=31-DEC-2004)
Thanking you in advance for any help on this issue.
Regards,
Elena -
ALV: Need to select/deselect all output rows iwth a Button
Hi All,
I have an ALV grid displaying a few lines of data.
User needs a button in the application toolbar to SELECT/DESELECT all rows displayed in the ALV list.
I am using OO for displaying the layout.
I want to know if there is a method which can SELECT/DESELECT all displayed rows. If there is no method, is there a workaround of achieving same.
Just for your info I dont have a check-box as the first colum of my ALV.
Appreciate your feedback on same.
Thanks and Regards
Rajivhi
chk this out
TYPE-POOLS : SLIS.
Tables *
TABLES:
VBRK,
VBRP.
Parameters and select options OR SELECTION SCREEN
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS:
S_VBELN FOR VBRK-VBELN.
SELECTION-SCREEN END OF BLOCK B1.
Internal Tables *
work areas
DATA: BEGIN OF IT_VBRP OCCURS 0,
VBELN LIKE VBRK-VBELN,
POSNR LIKE VBRP-POSNR,
UEPOS LIKE VBRP-UEPOS,
FKIMG LIKE VBRP-FKIMG,
NETWR LIKE VBRP-NETWR,
MEINS LIKE VBRP-MEINS.
DATA : END OF IT_VBRP.
Variables *
DATA : GR_ALVGRID TYPE REF TO CL_GUI_ALV_GRID,
GC_CUSTOM_CONTROL_NAME TYPE SCRFNAME VALUE 'CC_ALV',
GR_CCONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
GT_FIELDCAT TYPE LVC_T_FCAT,
GS_LAYOUT TYPE LVC_S_LAYO,
V_FLAG VALUE 'X'.
Start of Program *
INITIALIZATION. *
INITIALIZATION.
S_VBELN-LOW = 1.
S_VBELN-HIGH = 1000000000.
S_VBELN-OPTION = 'EQ'.
S_VBELN-SIGN = 'I'.
APPEND S_VBELN.
SELECTION-SCREEN *
AT SELECTION-SCREEN.
PERFORM VALIDATION.
START-OF-SELECTION *
START-OF-SELECTION.
PERFORM GET_DATA.
CALL SCREEN 0100.
END-OF-SELECTION *
END-OF-SELECTION.
TOP-OF-PAGE *
TOP-OF-PAGE.
END-OF-PAGE *
END-OF-PAGE.
AT USER-COMMAND *
*& Form VALIDATION
text
--> p1 text
<-- p2 text
FORM VALIDATION .
SELECT SINGLE VBELN
FROM VBRK
INTO VBRK-VBELN
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E000 WITH 'no billing documents found'.
ENDIF.
ENDFORM. " VALIDATION
*& Form GET_DATA
text
--> p1 text
<-- p2 text
FORM GET_DATA .
SELECT VBELN
POSNR
UEPOS
FKIMG
NETWR
MEINS
FROM VBRP
INTO TABLE IT_VBRP
WHERE VBELN IN S_VBELN.
ENDFORM. " GET_DATA
*& Module DISPLAY_ALV OUTPUT
text
MODULE DISPLAY_ALV OUTPUT.
IF V_FLAG = 'X'.
PERFORM DISPLAY_ALV.
PERFORM PREPARE_FIELD_CATALOG CHANGING GT_FIELDCAT.
PERFORM PREPARE_LAYOUT CHANGING GS_LAYOUT.
CALL METHOD GR_ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME = 'VBRP'
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT = GS_LAYOUT
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = IT_VBRP[]
IT_FIELDCATALOG = GT_FIELDCAT
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT
EXPORTING
I_READY_FOR_INPUT = 1.
ELSE.
CALL METHOD GR_ALVGRID->REFRESH_TABLE_DISPLAY
EXPORTING
IS_STABLE =
I_SOFT_REFRESH =
EXCEPTIONS
FINISHED = 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.
ENDIF.
CLEAR V_FLAG.
ENDIF.
ENDMODULE. " DISPLAY_ALV OUTPUT
*& Form DISPLAY_ALV
text
--> p1 text
<-- p2 text
FORM DISPLAY_ALV .
IF GR_ALVGRID IS INITIAL.
CREATE OBJECT GR_ALVGRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = GR_CCONTAINER
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDFORM. " DISPLAY_ALV
*& Form PREPARE_FIELD_CATALOG
text
<--P_GT_FIELDCAT text
FORM PREPARE_FIELD_CATALOG CHANGING P_GT_FIELDCAT TYPE LVC_T_FCAT.
DATA : LS_FCAT TYPE LVC_S_FCAT,
L_POS TYPE I.
L_POS = L_POS + 1.
LS_FCAT-FIELDNAME = 'VBELN'.
LS_FCAT-TABNAME = 'IT_VBRP'.
LS_FCAT-COL_POS = L_POS.
LS_FCAT-SCRTEXT_M = 'Billing Document'.
LS_FCAT-OUTPUTLEN = '10'.
APPEND LS_FCAT TO P_GT_FIELDCAT.
CLEAR LS_FCAT.
L_POS = L_POS + 1.
LS_FCAT-FIELDNAME = 'POSNR'.
LS_FCAT-TABNAME = 'IT_VBRP'.
LS_FCAT-COL_POS = L_POS.
LS_FCAT-SCRTEXT_M = 'Billing Item'.
LS_FCAT-OUTPUTLEN = '6'.
APPEND LS_FCAT TO P_GT_FIELDCAT.
CLEAR LS_FCAT.
L_POS = L_POS + 1.
LS_FCAT-FIELDNAME = 'UEPOS'.
LS_FCAT-TABNAME = 'IT_VBRP'.
LS_FCAT-COL_POS = L_POS.
LS_FCAT-SCRTEXT_M = 'Higher Level Item'.
LS_FCAT-OUTPUTLEN = '6'.
APPEND LS_FCAT TO P_GT_FIELDCAT.
CLEAR LS_FCAT.
L_POS = L_POS + 1.
LS_FCAT-FIELDNAME = 'FKIMG'.
LS_FCAT-TABNAME = 'IT_VBRP'.
LS_FCAT-COL_POS = L_POS.
LS_FCAT-SCRTEXT_M = 'Invoice Quantity'.
LS_FCAT-OUTPUTLEN = '13'.
APPEND LS_FCAT TO P_GT_FIELDCAT.
CLEAR LS_FCAT.
L_POS = L_POS + 1.
LS_FCAT-FIELDNAME = 'NETWR'.
LS_FCAT-TABNAME = 'IT_VBRP'.
LS_FCAT-COL_POS = L_POS.
LS_FCAT-SCRTEXT_M = 'Net Value'.
LS_FCAT-OUTPUTLEN = '15'.
APPEND LS_FCAT TO P_GT_FIELDCAT.
CLEAR LS_FCAT.
L_POS = L_POS + 1.
LS_FCAT-FIELDNAME = 'MEINS'.
LS_FCAT-TABNAME = 'IT_VBRP'.
LS_FCAT-COL_POS = L_POS.
LS_FCAT-SCRTEXT_M = 'Unit of Measure'.
LS_FCAT-OUTPUTLEN = '3'.
APPEND LS_FCAT TO P_GT_FIELDCAT.
CLEAR LS_FCAT.
L_POS = L_POS + 1.
ENDFORM. " PREPARE_FIELD_CATALOG
*& Form PREPARE_LAYOUT
text
<--P_GS_LAYOUT text
FORM PREPARE_LAYOUT CHANGING P_GS_LAYOUT TYPE LVC_S_LAYO.
P_GS_LAYOUT-ZEBRA = 'X'.
P_GS_LAYOUT-GRID_TITLE = 'INVOICE DETAILS'.
P_GS_LAYOUT-SMALLTITLE = 'X'.
P_GS_LAYOUT-EDIT = 'X'.
ENDFORM. " PREPARE_LAYOUT
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'CANCEL'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
WHEN 'CANCEL'.
LEAVE TO SCREEN 0.
WHEN 'EXIT'.
CALL TRANSACTION 'SE38'.
WHEN 'CHANGE'.
IF GR_ALVGRID->IS_READY_FOR_INPUT( ) = 0.
CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT
EXPORTING
I_READY_FOR_INPUT = 1.
ELSE.
CALL METHOD GR_ALVGRID->SET_READY_FOR_INPUT
EXPORTING
I_READY_FOR_INPUT = 0.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT -
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 -
Deactivate the double click/ hot spot for a particular row in alv grid.
Hello,
As per a certain condition how to deactivate the double click/ hot spot for a particular row in alv grid.
Regards,
Sarojwhere u define layout there is a field hotspot.like
data: var.
if con is true
var = 'X'. (show hotspot)
else.
var = ' '. (deactive hotspot)
elseif ws_fieldcat-fieldname = 'DMBTR'
AND ws_fieldcat-tabname = 'T_MTAB'.
ws_fieldcat-do_sum = C_X.
<b>ws_fieldcat-hotsopts = var.</b>
MODIFY Wt_fieldcat FROM ws_fieldcat
TRANSPORTING DO_SUM.
It is helpful for u. if any problen send me ur coding i will change it.
Regards
Manish Kumar -
How do you set the font color for a specific entire row inside a JTable?
How do you set the font color for a specific entire row inside a JTable?
I want to change the font color for only a couple of rows inside a JTable.
I've seen some ways to possibly do this with an individual cell.
Clarification on changing the font color in an individual cell would be helpful too if
there is no easy way to do this for a row.hai,
Try out with this piece of code.Create your table and assign the renderer to each column in the table.
CellColorRenderer m_CellColorRenderer = new CellColorRenderer();
for(int i=0;i<your_JTable.getColumnCount();i++)
your_JTable.getColumnModel().getColumn(i).setCellRenderer(m_CellColorRenderer);
class CellColorRenderer extends JLabel implements TableCellRenderer
CellColorRenderer()
setOpaque(true);
setHorizontalAlignment(LEFT);
setVerticalAlignment(CENTER);
setBackground(Color.white);
setForeground(Color.black);
protected void setValue(Object value)
setText((value == null) ? "" : value.toString());
public Component getTableCellRendererComponent(JTable table,Object value,boolean isSelected, boolean hasFocus, int row,int column)
if(isSelected == true)
setForeground(Color.red);
else
setForeground(Color.black);
setValue(value);
return this;
regards,
bala -
DI-Error: You cannot select batch or serial numbers for a closed row
Hello Experts,
I have several B1-Systems connected to R/3-Systems via B1iSN.
In B1 for example I have 2 rows in Purchase Order. One row was closed by a goods receipt - 1 row is still open.
From our R/3-System we send Order-Acknowledgements to B1. Because line 1 is already closed we want to ignore row 1 and update only information in row 2. By using KeyExpansion I could solve that requirement (check in B1-System if row is already closed -> insert row in IDoc only with LineNum). For example:
<Document_Lines>
*<row>* <!-- ignore -->
*<LineNum>0</LineNum>*
*</row>*
<row> <!-- update -->
<LineNum>1</LineNum>
<ItemCode>ABCDEFGHIJK</ItemCode>
</row>
</Document_Lines>
Unfortunately DI-API does not allow to update each row separated. I always have to send all rows in IDoc even if one row is closed.
For one B1-Company batchnumbers on every transaction is required. When creating Goods Receipt we have to define a batchnumber for item. But now if I want to update a open row (as described above) I get an B1iSN-Error:
DI Error: (-10) You cannot select batch or serial numbers for a closed row
Any ideas to solve that Error? Thanks.
Regards,
GBHi Bastian,
I have still one open question. How to tread Document Lines Additional Expenses?
If I use the logic of visual order I still get the error "You cannot select batch or serial numbers for a closed row".
Example:
<Document_LinesAdditionalExpenses>
- <row>
<LineNumber>4</LineNumber>*no expenses*
</row>
- <row>
<LineNumber>0</LineNumber>*no expenses*
</row>
- <row>
<LineNumber>1</LineNumber>*no expenses*
</row>
- <row>
<LineNumber>2</LineNumber>*no expenses*
</row>
- <row>
<LineNumber>3</LineNumber>*expenses correct*
<ExpenseCode>3</ExpenseCode>
<LineTotal>10.00</LineTotal>
</row>
</Document_LinesAdditionalExpenses>
How can I solve that?
Thanks and regards,
GB -
Row Selection for second and subsequent level nodes in tree table
Hi All,
We have a .jsff page with tree bindings to display a three-level hierarchy tree table.Suppose the hierarchy is
-> Department
->-> Employees
->->-> Employee details.
I have a use case where-in when we add the employee node within a department,the department node must expand and the newly added employee node must be selected.
In both the cases(for new department or employee), we are following the approach mentioned below:
1. Get the treeTable Iterator.
2.Adding the new object to the java ArrayList which is bound to the corresponding level in the tree.
3.Refreshing the treeTable iterator.
4.Execute treeTable.setSelectedRowKeys()
5.Add a partial target to the treetable.
The issue is that the new employee gets added but the upper-level department node collapses and no selection is performed on the new employee node.
But when we add a new department node, it gets selected on creation.
Is there any additional steps to be performed for second-level row selection?Hi,
Thanks for the reply.
I looked at the code given in sample 61.
In the sample, a new node is not added dynamically (for ex.either new location or its child nodes.)
As mentioned in the above post, after adding a new node at a level in our use case, when we perform the refresh of the tree-table's iterator,the selection state of the rows is not shown on the table.
If the tree-table's iterator is not refreshed and the treeTable.setSelectedRowKeys() is executed, the rows get selected but the subsequent node additions do not show up in the table as the table's iterator is not refreshed.
Any sample code is available where in both the addition of new node and its selection is performed at the same time?
Thanks. -
How to display the rows in a color for specific dynamic condition.
Hi,
I am new to OAF. I created a custom Search Page.My requirement is we need to display a color for specific dynamic condition. Could any one help me how to do this?
Thanks in Advance
Sruthi.Hi,
Sruthi wrote:
I am new to OAF. I created a custom Search Page.My requirement is we need to display a color for specific dynamic condition. Could any one help me how to do this?------I think we can display colours at coloumns level only,nt at row levevl.
------use CSSStyle to set the colour, via webBean.
Co-ProcessRequest:*
import oracle.cabo.style.CSSStyle;
CSSStyle oraaniltext = new CSSStyle();
oraaniltext.setProperty("color", "#F6358A");
oraaniltext.setProperty("background-color", "#000000");
OAMessageTextInputBean comCode = (OAMessageTextInputBean)webBean.findChildRecursive("InvoiceIdTI");
comCode.setInlineStyle(oraaniltext);
http://www.computerhope.com/htmcolor.htm
Regards
Meher Irk
Edited by: Meher Irk on Oct 25, 2010 9:46 PM -
Hi Guru’s,
I have an issue in Transaction SE16, Field selection (User-Specific Settings) is NOT working in Tables (ALL tables).
Following is the screenshot attached for your kind reference,
That is in the initial screen of transaction SE16 if I choose Filed Name or Filed Label only the technical details (Field Names) are appearing and not the descriptions like Client, Purchasing Doc, and Company Code Doc. Category Document Type etc…
Right now I am using ECC6 and EHP7 SAP system.
Please help me to resolve this issue by implementing any OSS note or User Role creations or any technical changes required in system.
Hope the requirement is clear and in case need any clarification please revert back.
NOTE: Right now in Development System we don’t have any successful user to compare the settings.
Regards,
Kumar.SThanks Patra.
Even I searched in SAP portal and couldn't able to find the relevant OSS note.
Following is my BASIS team response,
"Only you can view Table Field values from higher release"
Can you suggest / guide on this comment as well.
Looking forward to your speedy response.
Regards,
Kumar.S -
Hello experts ,
can anybody plz tell me How to implement the line selection event in alv ? I want to retrieve value of the filed clicked by the user and query another table with that field value and display that data ....Hi,
Below is the sample code.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = G_REPID
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
IT_FIELDCAT = i_FCAT[]
TABLES
T_OUTTAB = i_invoice[]
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.
FORM user_command USING pv_ucomm TYPE syucomm
ps_selfield TYPE slis_selfield.
*Handle the specific user-commands. *
CASE pv_ucomm.
Or some other GUI-functions *
Handle double click or hotspot on a specific field. *
These are some examples *
WHEN gc_double_click.
CASE ps_selfield-fieldname.
WHEN 'BELNR'.
i_invoice-belnr = g_belnr.
i_invoice-gjahr = g_gjahr.
READ TABLE i_invoice INDEX ps_selfield-tabindex.
IF sy-subrc EQ 0 AND NOT i_invoice-belnr IS INITIAL.
SET PARAMETER ID 'RBN' FIELD i_invoice-belnr.
SET PARAMETER ID 'GJR' FIELD i_invoice-gjahr.
CALL TRANSACTION 'MIR4' AND SKIP FIRST SCREEN.
ENDIF.
WHEN 'EBELN'.
READ TABLE i_invoice INDEX ps_selfield-tabindex.
IF sy-subrc EQ 0 AND NOT i_invoice IS INITIAL.
SET PARAMETER ID 'BES' FIELD i_invoice-ebeln.
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
endcase.
endcase.
endform. "user_command
Regards,
Jayanth G -
Change Layout in Selection Screen for OO ALV-Grid
Hello everyone,
I got a problem regarding layouts for objectoriented ALV Grid. I want to make it possible that user can take the layout for ALV he wants to on the selection screen. So far thats no problem and it works. But there are some little problems which I do not know how to fix them. But first the facts:
(1) I got my parameter for layout
PARAMETER: p_vari TYPE disvariant-variant.
(2) I fill my global layout structure in initialization
INITIALIZATION.
* Variante vorbelegen
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
* Layout holen
CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = gs_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc = 0.
p_vari = gs_variant-variant.
ENDIF.
(3) I got my handling for F4-value help on variant parameter
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
CALL FUNCTION 'LVC_VARIANT_F4'
EXPORTING
is_variant = gs_variant
i_save = 'A'
IMPORTING
es_variant = gs_variant
EXCEPTIONS
not_found = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE text-m01 TYPE 'S'.
ELSE.
p_vari = gs_variant-variant.
ENDIF.
(4) I give back my parameters content into the variant structure at start of selection
START-OF-SELECTION.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-variant = p_vari.
This works all fine but I got some problems when using default variants/layouts. For example I got a default variant only for me. When starting the selection screen it works fine that the default layout was written. It is displayed automatically in the variant parameter. But I want that if i I empty the content (blank it out) from my variant parameter, that report should start with "normal" layout how it was written in the report and NOT with default layout.
When I clear the gs_variant it works like I want it, but then the alv layout button looks like (without functions for layout), because I do not have the reference to my report.
So what to do? :-)
Regards
MichaelWow that was fast, works great, thanks :-)
I did not use this parameter in set table method but now I fill it dynamically.
Ok next problem, one step harder ;-)
Now I have one selection screen for one ALV-Grid, but four radio buttons which control with which data the ALV gets filled (four different fieldcats, data tables and so on). Each Grid got an own HANDLE so that the layouts can be separated in four categories.
Now I want that by changing the radio button the individual standard layout for the chosen alv grid is getting filled.
This works fine when using it in selection screen output.
AT SELECTION-SCREEN OUTPUT.
CLEAR gs_variant.
* Layout-Handles individuell für Klausel-Radiobuttons setzen
IF p_py IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLPY'.
ELSEIF p_rh IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLRH'.
ELSEIF p_aj IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLAJ'.
ELSEIF p_sr IS NOT INITIAL.
gs_variant-username = sy-uname.
gs_variant-report = sy-repid.
gs_variant-handle = 'KLSR'.
ENDIF.
* Layout holen
CALL FUNCTION 'LVC_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = gs_variant
EXCEPTIONS
wrong_input = 1
not_found = 2
program_error = 3
OTHERS = 4.
IF sy-subrc = 0.
p_vari = gs_variant-variant.
ELSE.
CLEAR p_vari.
ENDIF.
But unfortunately selection screen output is getting passed by EACH changing in the selection screen. This means when I try to clear the default layout in my parameter field, it gets refilled automatically with default layout. If I do a condition around the filling (only if not initial) the default value filling does not work fine in every case, e.g. when clearing the parameters field and then change the radiobutton -> then it does not get filled automatically. -
Item renderer for specific rows
I need to have a checkbox item renderer for a spark datagrid column. I am using the following to get an item renderer into column:
var checkBoxRenderer:ClassFactory = new ClassFactory(GridCheckBoxItemRenderer);
column.itemRenderer = checkBoxRenderer;
My question is if I need to show a checkbox for specific rows can I do that without going into GridCheckBoxItemRenderer's source code?
ThanksHi Zolotoj ,
Please go through following links :
http://stackoverflow.com/questions/1952940/show-itemrenderer-in-specific-datagrid-rows-oth ers-empty
http://www.flexer.info/2009/01/09/different-rows-in-datagrid-programmatically-added-itemre nderers-classfactory-and-ifactory/
It will provide you some idea to how to proceed further for this problem.
Thanks and Regards,
Vibhuti Gosavi | [email protected] | www.infocepts.com -
Hi Guys,
Any ideas how can I set the specific ALV layout fo FBL1N report in the way, that special group of users see only one/few specific document types (not all of them) for the certain supplier. I don't want to do that in ABAP.
Regards
Adamhi Adam,
you can assign authorization to each single document type in transaction OBA7. You also have to maintain the user profiles as well (the respective auth object is F_BKPF_BLA). Of course this will be valid in the whole system, but it does not make much sense that users have limited authorization in one specific transaction only.
hope this helps
ec
Maybe you are looking for
-
How can i move my iphoto library from my desktop
Hi all I recently had a problem with iPhoto 11, when it stopped responding, and during the following weeks trying to get it going again I copied my iPhoto library to my desktop so as to try different things but not damage my photos, well in the end I
-
How to raise a exception if the incoming value for a source field is empty
Dear all, I have a scenario where the source and target structures are as follows : The output for the above transformation logic is The occurrence for field id in source and target is 1:1 Even if i don't provide the input value for id field, syste
-
Make to order Sales Order create Purchase Requsition
Hi, Does anybody know how to create purchase requestion directly from make to order sales order? Thanks Steven
-
Looking for jdbc driver ?
hi, i am looking for a jdbc or odbc filemaker driver ? does anyone know where to download one for free ? it's not for production environement!!! it's only for testing access to filemaker pro database from jsp page ... thanks for your help
-
Has anyone had a problem with the F keys changing functions all by themselves? i.e.: my volume keys make the dashboard come up?....how do I fix this..i've had my macbook for 4 days...no clue