Agentry - list screen stylesheets (selected row, selected no focus row)
Hi!
I'm trying to add a rule on list screen style sheet for "selected rows" and "selected no focus rows". The same rule with stylesheet is working fine on "highlight rows" but is not working at all on those two. I've tried to set the rule both on screen and on platform but nothing is happening.
The reason for doing this is that I want some rows to have a different colored text also when they are selected or selected but not in focus.
Has anyone any experience of this not working or suggestions on what to do?
I browsed the forums for anyone with similar problems and found that changing background color is not working but since this is the font text I thought maybe...
Thanks in advance,
Daniel
Tags edited by: Michael Appleby
Daniel,
I tried playing around with it and see what I think is the behavior but after trying it I don't think it is possible. The intent of the selected or selected no focus styles is to provide a visual indicator to the user of what rows have been selected compared to the other rows on the screen. For a list screen I don't believe you have the granularity to set different styles for each selected row.
Now, if you were using a tile list control, I do believe there you can control it since you can set the styles at the field level to control the text color. Not sure if that is an option for your application but something to consider.
--Bill
Similar Messages
-
How to hide an object in Agentry list screen
Hello,
I want to know if it is possible to hide an object in a screen list view.
For example, I update an object and fill in DeleteStaus field with "L" (mean that object is deleted) and hide it right after I mark it as deleted, then transmit it to Agentry server to get the marked field and in turn transfer it to SAP server.
Thank you very much.
Tags edited by: Michael ApplebyPG Ngu,
Steve was correct, but his rule was little off. try it like this:
NOT
EQSTR
Whatever Object -> DeleteStatus Property
L
The 'L' above is a constant. Do not use quotes. Add this as the include rule on the List Screen.
Jason Latko - Senior Product Developer at SAP -
ALV grid list report when selected from selection screen
Hi folks,
I need to get ALV grid display in my list report when selected the interval values from the selection screen. If I change the values in list of ALV grid it needs to be updated when I press UPDATE pushbutton. The output of list should be in ALV grid display.I need sorting ,flitering,totaling functionality in the list output.
For example if I selected BUKRS = 100 and 200 in the selection screen ,I need to display the ALV grid list in below the selection screen as ALV grid display...
Its urgent as I am new to ALV grid functionality...
Thanks in advance..hi raja,
check with the folllowing code.
REPORT zca0m_zca0fcstftop NO STANDARD PAGE HEADING
MESSAGE-ID zcsv_usrtbl_maintain.
Type pools *
TYPE-POOLS : slis. " Used for ALV display
Tables
TABLES: zca0fcstftop,
dd04t, "R/3 DD: Data element texts
tactt. "Activities that can be protected
internal tables
DATA: BEGIN OF wa_zca0fcstftop .
INCLUDE STRUCTURE zca0fcstftop.
DATA: END OF wa_zca0fcstftop.
DATA: t_zca0fcstftop LIKE STANDARD TABLE OF wa_zca0fcstftop.
DATA: BEGIN OF i_fcode OCCURS 0,
fcode LIKE sy-ucomm,
END OF i_fcode.
*Record for variant selection
DATA : BEGIN OF ws_variant,
selected TYPE c,
variant LIKE ltdx-variant, "Variant name
text LIKE ltdxt-text, "Variant description
END OF ws_variant.
*Table for variant selection
data : itab_variant LIKE STANDARD TABLE OF ws_variant WITH HEADER LINE.
Variant selection pop-up global variables
DECLARATION OF TABLECONTROL 'VARIANT_CNTL' ITSELF
CONTROLS: variant_cntl TYPE TABLEVIEW USING SCREEN 0200.
LINES OF TABLECONTROL 'VARIANT_CNTL'
DATA: g_variant_cntl_lines LIKE sy-loopc.
DATA:grid1 TYPE REF TO cl_gui_alv_grid ,
g_custom_container TYPE REF TO cl_gui_custom_container.
Work fields
DATA: table_name LIKE dd02l-tabname, "To store table name
field_name LIKE dd03l-fieldname, "To Store Field Name
act_auth LIKE tactz-actvt, "To pass Activity ID
tab_maint LIKE dd02l-tabname, "To pass Table Name to be Maintd.
wg_confirm_ind, "To trap User responses
flag, "To trap changes made to an entry
f_copy, "To Identify 'COPY' Command Use
f_select, "To decide between Select-options
" and Internal Table
l_transaction_code LIKE tstc-tcode,
v_langu LIKE sy-langu,
v_repid LIKE sy-repid,
s_variant TYPE disvariant.
DATA: ok_code LIKE sy-ucomm.
DATA:selected_rows TYPE lvc_t_row ,
sel_rows TYPE lvc_t_row WITH HEADER LINE.
DATA:t_lines TYPE i.
Constants *
CONSTANTS :
c_x TYPE c VALUE 'X', " Constant 'X'.
c_f TYPE c VALUE 'F'. " Constant 'F'.
Parameters and Selection Options
*Selection Screen for table maintenance
*Selection option for Plant
SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-b01.
PARAMETERS: p_werks LIKE zca0fcstftop-werks OBLIGATORY.
SELECT-OPTIONS: s_prdfml FOR zca0fcstftop-product_family,
s_bmach FOR zca0fcstftop-base_machine,
s_factop FOR zca0fcstftop-factory_top,
s_optval FOR zca0fcstftop-option_value,
s_week FOR zca0fcstftop-week.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-b02.
PARAMETERS : p_varant LIKE ltdx-variant. " ALV variant
SELECTION-SCREEN END OF BLOCK block2.
At selection screen *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varant.
PERFORM alv_variant_f4 CHANGING p_varant.
AT SELECTION-SCREEN ON p_werks .
Validating Plant on the selection screen
PERFORM validate_plant.
Initialization
INITIALIZATION.
Check Authorization for the Transaction
Authorization Check For T Code
SELECT tcode
INTO l_transaction_code
FROM tstc UP TO 1 ROWS
WHERE pgmna = sy-repid.
ENDSELECT.
AUTHORITY-CHECK OBJECT 'S_TCODE'
ID 'TCD' FIELD l_transaction_code.
IF sy-subrc NE 0.
MESSAGE e001 WITH l_transaction_code.
ENDIF.
v_langu = sy-langu. " language
v_repid = sy-repid . " abap Program name
Start Of Selection
START-OF-SELECTION.
CALL SCREEN 0050.
*& Form validate_plant *
Validating Plant on the selection screen *
FORM validate_plant .
DATA : l_werks LIKE t001w-werks. " Plant
IF p_werks IS NOT INITIAL.
SELECT SINGLE werks
FROM t001w
INTO l_werks
WHERE werks EQ p_werks.
IF sy-subrc NE 0.
MESSAGE e100(ra) WITH text-001 .
ENDIF.
ENDIF.
AUTHORITY-CHECK OBJECT 'Z_PP_PLANT'
ID 'ACTVT' FIELD '03'
ID 'WERKS' FIELD p_werks
ID 'TCD' FIELD l_transaction_code.
IF sy-subrc NE 0.
MESSAGE e000(oo) WITH 'No authorization for plant:'(e80) p_werks.
ENDIF.
ENDFORM. " validate_plant
*& Form get_data *
Get data *
FORM get_data .
SELECT * FROM zca0fcstftop
INTO TABLE t_zca0fcstftop
WHERE werks = p_werks
AND product_family IN s_prdfml
AND base_machine IN s_bmach
AND factory_top IN s_factop
AND option_value IN s_optval
AND week IN s_week.
ENDFORM. " get_data
*& Form fill_fcode
FORM fill_fcode USING value(p_0029).
i_fcode-fcode = p_0029.
APPEND i_fcode.
CLEAR i_fcode.
ENDFORM. " fill_fcode
*& Module STATUS_0100 OUTPUT
MODULE status_0100 OUTPUT.
SET PF-STATUS 'UPDATE'.
CLEAR flag.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module MODIFY_0100 OUTPUT
MODULE modify_0100 OUTPUT.
IF sy-ucomm = 'CHNG' OR
sy-ucomm = 'PICK'.
LOOP AT SCREEN.
CHECK screen-group1 = 'CHG'.
screen-required = '0'.
screen-output = '1'.
screen-input = '0'.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
Check if you are in create mode & if yes then set the screen elements
as mandatory
IF ok_code = 'CREA'.
LOOP AT SCREEN.
CHECK screen-group1 = 'CHG'.
screen-required = '1'.
screen-output = '1'.
screen-input = '1'.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
ENDMODULE. " MODIFY_0100 OUTPUT
*& Module Check_Exit INPUT
text
MODULE check_exit INPUT.
IF ( sy-ucomm = 'BACK' OR sy-ucomm = 'CANC' OR sy-ucomm = 'EXIT' ) AND
( flag = 'Y' ).
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
defaultoption = 'Y'
textline1 = text-008
textline2 = text-009
titel = text-004
cancel_display = ' '
IMPORTING
answer = wg_confirm_ind.
CASE wg_confirm_ind.
WHEN 'J'. "Yes
sy-ucomm = 'SAVE'.
CLEAR flag.
WHEN 'N'. "No
sy-ucomm = 'BACK'.
CLEAR flag.
ENDCASE.
ENDIF.
ENDMODULE. " Check_Exit INPUT
*& Module Exit_0100 INPUT
text
MODULE exit_0100 INPUT.
SET SCREEN 0. LEAVE SCREEN.
ENDMODULE. " Exit_0100 INPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'SAVE'. "Save
Check to see if the user has the appropriate authorization
IF p_werks NE zca0fcstftop-werks.
could not update - not in selection
MESSAGE e000(oo) WITH 'Entry not within selection'.
SET SCREEN 0. LEAVE SCREEN.
PERFORM get_data.
ENDIF.
IF f_copy = 'X'.
INSERT zca0fcstftop.
IF sy-subrc = 0.
MESSAGE s004.
PERFORM initialize.
SET SCREEN 0. LEAVE SCREEN.
PERFORM get_data.
ELSE.
MESSAGE w005.
ENDIF.
ELSE.
MODIFY zca0fcstftop.
IF sy-subrc = 0.
MESSAGE s004.
PERFORM initialize.
SET SCREEN 0. LEAVE SCREEN.
PERFORM get_data.
ELSE.
MESSAGE w005.
ENDIF.
ENDIF.
PERFORM get_data.
WHEN 'BACK'. "Back
SET SCREEN 0. LEAVE SCREEN.
WHEN 'CANC'. "Cancel
SET SCREEN 0. LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
COMMIT WORK.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form Initialize
FORM initialize.
CLEAR : table_name,
field_name,
wg_confirm_ind,
f_copy,
flag,
t_zca0fcstftop,
zca0fcstftop,
wa_zca0fcstftop,
i_fcode.
REFRESH: t_zca0fcstftop.
ENDFORM. " Initialize
*& Form alv_variant_f4
text
<--P_VARIANT text
FORM alv_variant_f4 CHANGING variant.
DATA: rs_variant LIKE disvariant.
DATA nof4 TYPE c.
CLEAR nof4.
LOOP AT SCREEN.
IF screen-name = 'VARIANT'.
IF screen-input = 0.
nof4 = 'X'.
ENDIF.
ENDIF.
ENDLOOP.
rs_variant-report = sy-repid.
rs_variant-username = sy-uname.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = rs_variant
i_save = 'A'
IMPORTING
es_variant = rs_variant
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0 AND nof4 EQ space.
variant = rs_variant-variant.
ENDIF.
ENDFORM. " ALV_VARIANT_F4
*& Module STATUS_0050 OUTPUT
text
MODULE status_0050 OUTPUT.
In this module Initialize the container and put the grid in it
DATA:grid_layout TYPE lvc_s_layo,
fieldcat TYPE lvc_t_fcat,
wa_fieldcat LIKE LINE OF fieldcat.
PERFORM set_auth.
SET PF-STATUS 'UPD_0050' EXCLUDING i_fcode.
SET TITLEBAR 'UPD_0050'.
IF g_custom_container IS INITIAL .
CREATE OBJECT g_custom_container
EXPORTING
container_name = 'FTDATA'.
CREATE OBJECT grid1
EXPORTING
i_parent = g_custom_container.
ELSE.
CALL METHOD grid1->free.
CALL METHOD g_custom_container->free.
CREATE OBJECT g_custom_container
EXPORTING
container_name = 'FTDATA'.
CREATE OBJECT grid1
EXPORTING
i_parent = g_custom_container.
ENDIF.
Every time refresh The variables
PERFORM initialize.
PERFORM get_data.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'ZCA0FCSTFTOP'
CHANGING
ct_fieldcat = fieldcat.
grid_layout-grid_title = text-t01.
grid_layout-sel_mode = 'A'.
grid_layout-stylefname = 'CT'.
s_variant-report = sy-repid.
s_variant-username = sy-uname.
s_variant-variant = p_varant.
CALL METHOD grid1->set_table_for_first_display
EXPORTING
i_structure_name = 'ZCA0FCSTFTOP'
is_layout = grid_layout
is_variant = s_variant
i_save = 'A'
CHANGING
it_outtab = t_zca0fcstftop
it_fieldcatalog = fieldcat.
Create Object to receive events and link them to handler methods.
When the ALV Control raises the event for the specified instance
the corresponding method is automatically called.
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_button_click FOR grid1.
ENDMODULE. " STATUS_0050 OUTPUT
*& Module USER_COMMAND_0050 INPUT
MODULE user_command_0050 INPUT.
CALL METHOD grid1->get_selected_rows
IMPORTING
et_index_rows = selected_rows.
DESCRIBE TABLE selected_rows LINES t_lines.
IF t_lines > 1 .
MESSAGE e048(zcsv_sfdr).
ENDIF.
Clear Header
CLEAR wa_zca0fcstftop.
sel_rows[] = selected_rows .
READ TABLE sel_rows INDEX 1.
READ TABLE t_zca0fcstftop INTO wa_zca0fcstftop INDEX sel_rows-index.
CASE ok_code.
WHEN 'EXIT'.
PERFORM exit_program.
WHEN 'CREA'.
CLEAR zca0fcstftop.
ok_code = sy-ucomm.
zca0fcstftop-werks = p_werks.
CALL SCREEN 100.
WHEN 'COPY'.
MOVE wa_zca0fcstftop TO zca0fcstftop .
CLEAR wa_zca0fcstftop.
f_copy = 'X'.
CALL SCREEN 100.
WHEN 'CHNG'.
CHECK NOT wa_zca0fcstftop IS INITIAL.
MOVE wa_zca0fcstftop TO zca0fcstftop .
CLEAR wa_zca0fcstftop.
ok_code = sy-ucomm.
CALL SCREEN 100.
WHEN 'DELE'.
CHECK NOT wa_zca0fcstftop IS INITIAL.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
defaultoption = 'N'
textline1 = text-005
textline2 = text-006
titel = text-007
cancel_display = ' '
IMPORTING
answer = wg_confirm_ind.
IF wg_confirm_ind EQ 'J'.
DELETE zca0fcstftop FROM wa_zca0fcstftop .
IF sy-subrc EQ 0.
MESSAGE s004.
ELSE.
MESSAGE e005.
ENDIF.
ELSEIF wg_confirm_ind EQ 'N'.
ENDIF.
ENDCASE.
CLEAR ok_code.
ENDMODULE. " USER_COMMAND_0050 INPUT
*& Form exit_program
FORM exit_program .
CALL METHOD g_custom_container->free.
CALL METHOD cl_gui_cfw=>flush.
SET SCREEN 0.
LEAVE SCREEN.
ENDFORM. " exit_program
*& Form set_auth
FORM set_auth.
REFRESH: i_fcode.
Check authorization for change
MOVE '02' TO act_auth. "02 --> Change
MOVE 'ZCA0FCSTFTOP' TO tab_maint.
AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
ID 'ACTVT' FIELD act_auth
ID 'TABLE' FIELD tab_maint.
IF sy-subrc NE 0.
PERFORM fill_fcode USING 'CHNG'.
ENDIF.
Check for authorization for create
MOVE '01' TO act_auth. "01 --> Create
MOVE 'ZCA0FCSTFTOP' TO tab_maint.
AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
ID 'ACTVT' FIELD act_auth
ID 'TABLE' FIELD tab_maint.
IF sy-subrc NE 0.
PERFORM fill_fcode USING 'CREA'.
PERFORM fill_fcode USING 'COPY'.
ENDIF.
Check for authorization for delete
MOVE '06' TO act_auth. "06 --> Delete
MOVE 'ZCA0FCSTFTOP' TO tab_maint.
AUTHORITY-CHECK OBJECT 'ZZ:TABLMNP'
ID 'ACTVT' FIELD act_auth
ID 'TABLE' FIELD tab_maint.
IF sy-subrc NE 0.
PERFORM fill_fcode USING 'DELE'.
ENDIF.
ENDFORM. " set_auth
*& Module check_change INPUT
MODULE check_change INPUT.
flag = 'Y'.
ENDMODULE. " check_change INPUT
regards,
vikas.
plz reward if helpful -
Agentry - Main Row Selection After Transmit
What is the best way to maintain the currently selected row in a list screen after a transmit? The list screen data is reloaded during the transmit so the selected row is lost.
Christopher,
I would recommend you look at implementing an exchange model so that you don't reload all your data each transmit. Without understanding your application more, typically a transaction would not remove an object only to have it re-added during the fetch. If the data is intended to stay on the device you should look at leaving it until the user is done with the data and then have it removed.
For example, in the products if the user has a work order (WO) selected and performs a transaction against the WO and then transmits the WO is not removed first as part of the transaction and then re-fetched again later.
If that is a requirement the only though is to store the id of the object to a main object property prior to the transmit and use a navigation step and list selection to try an reselect the row following the transmit. Without knowing more about your application I can't say for sure if it will work or not.
--Bill -
Limit list of values in variable selection screen
Hi
Apologies if this has been asked / answered elsewhere, but I thought I would put it out there, at least while I continue trying to find a solution.
We have a requirement to limit the data from which a user is allowed to select values in the variable selection screen. I know how to write the ABAP code that will return the list of data from which the user can choose, but not sure how to implement that in the query variable.
Essentially, the BEx query needs an input on username, and the current user should be able to choose from a list of usernames. That list of usernames should only be usernames to which the current user has access.
Don't worry about the linking of current user to user names, that is taken care of in our DSO.
What I am after, is limiting the data that comes back when the "F4 Help" type button is pressed on the variable screen.
I can default a value in the customer exit variable using ABAP code in the i_step = 1 loop, but that doesn't seem to effect the list of data available for selection.
Any decent ideas?
Cheers,
AndrewHi Andrew,
As charlie suggested go for Analysis authorization that is the simplest approach to restrict values for any object, in another way you can use following BADI for value restriction using ABAP code, refer the below link.
[http://www.consolut.com/en/s/sap-ides-access/d/s/doc/YY-BW_BADI_F4]
By using customer exit you can only populate default values but you will not be able to restrict F4 help values.
Regards,
Durgesh. -
Displaying selection screen data on alv header in multiple rows and columns
Hi
Presently in my requirement , whatever the data entered in selection screen should display on alv header and item details on alv grid display.
for eg...
on alv header
customer no : 1000 to 2000 sales order no: 111
name : gff to ff sales org:
city: country:
item details below this
plz guide me how to solve this issue.
Thanks & Regards,
PradeepHi,
Check this code this may help you.
<code>
TYPE-POOLS : SLIS.
TABLES VBRK.
TYPES : BEGIN OF TY_VBRK,
VBELN TYPE VBRK-VBELN,
VKORG TYPE VBRK-VKORG,
VTWEG TYPE VBRK-VTWEG,
SPART TYPE VBRK-SPART,
FKDAT TYPE VBRK-FKDAT,
END OF TY_VBRK,
BEGIN OF TY_VBRP,
VBELN TYPE VBRP-VBELN,
POSNR TYPE VBRP-POSNR,
MATNR TYPE VBRP-MATNR,
ARKTX TYPE VBRP-ARKTX,
FKIMG TYPE VBRP-FKIMG,
NETWR TYPE VBRP-NETWR,
END OF TY_VBRP,
BEGIN OF TY_TARGET,
VBELN TYPE VBRK-VBELN,
VKORG TYPE VBRK-VKORG,
VTWEG TYPE VBRK-VTWEG,
SPART TYPE VBRK-SPART,
FKDAT TYPE VBRK-FKDAT,
POSNR TYPE VBRP-POSNR,
MATNR TYPE VBRP-MATNR,
ARKTX TYPE VBRP-ARKTX,
FKIMG TYPE VBRP-FKIMG,
NETWR TYPE VBRP-NETWR,
END OF TY_TARGET.
DATA : T_VBRK TYPE TABLE OF TY_VBRK,
W_VBRK TYPE TY_VBRK,
T_VBRP TYPE TABLE OF TY_VBRP,
W_VBRP TYPE TY_VBRP,
T_TARGET TYPE TABLE OF TY_TARGET,
W_TARGET TYPE TY_TARGET,
FIELD CATALOG ******************
T_FCAT TYPE SLIS_T_FIELDCAT_ALV,
W_FCAT TYPE SLIS_FIELDCAT_ALV,
*************************************SUB TOTALS AND SORTING***********
T_SORT TYPE SLIS_T_SORTINFO_ALV,
W_SORT TYPE SLIS_SORTINFO_ALV,
*************************************FOR LIST HEADER******************
T_LIST_HEAD TYPE SLIS_T_LISTHEADER,
W_LIST_HEAD TYPE SLIS_LISTHEADER,
T_LIST_HEAD1 TYPE SLIS_T_LISTHEADER,
W_LIST_HEAD1 TYPE SLIS_LISTHEADER,
*************************************FOR LIST HEADER******************
W_LAYOUT TYPE SLIS_LAYOUT_ALV,
************************************FOR EVENTS************************
T_EVENT TYPE SLIS_T_EVENT,
W_EVENT TYPE SLIS_ALV_EVENT.
*********************************SELECT OPTIONS***********************
SELECT-OPTIONS : S_VBELN FOR VBRK-VBELN DEFAULT 90005316 TO 90005330.
**RETRIVING DATA************************
PERFORM DATA_RETRIVE.
**BUILDING THE FIELD CATALOG************
PERFORM BUILD_FCAT.
**BUILDING THE TABLE FOR LIST HEADER****
PERFORM BUILD_LIST_HEAD.
*******************************CALLING THE FUNCTION MODULE************
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_TOP_OF_PAGE = 'LIST_TOP_OF_PAGE'
IT_FIELDCAT = T_FCAT
IT_SORT = T_SORT
TABLES
T_OUTTAB = T_TARGET.
*& Form DATA_RETRIVE
FORM DATA_RETRIVE .
SELECT VBELN VKORG VTWEG SPART FKDAT FROM VBRK INTO CORRESPONDING FIELDS
OF TABLE T_VBRK WHERE VBELN IN S_VBELN.
IF SY-SUBRC EQ 0.
SORT T_VBRK BY VBELN.
SELECT VBELN POSNR MATNR ARKTX FKIMG NETWR FROM VBRP INTO TABLE
T_VBRP FOR ALL ENTRIES IN T_VBRK WHERE VBELN = T_VBRK-VBELN.
ENDIF.
LOOP AT T_VBRP INTO W_VBRP.
LOOP AT T_VBRK INTO W_VBRK WHERE VBELN = W_VBRP-VBELN.
W_TARGET-VBELN = W_VBRK-VBELN.
W_TARGET-VKORG = W_VBRK-VKORG.
W_TARGET-VTWEG = W_VBRK-VTWEG.
W_TARGET-SPART = W_VBRK-SPART.
W_TARGET-FKDAT = W_VBRK-FKDAT.
W_TARGET-POSNR = W_VBRP-POSNR.
W_TARGET-MATNR = W_VBRP-MATNR.
W_TARGET-ARKTX = W_VBRP-ARKTX.
W_TARGET-FKIMG = W_VBRP-FKIMG.
W_TARGET-NETWR = W_VBRP-NETWR.
APPEND W_TARGET TO T_TARGET.
ENDLOOP.
ENDLOOP.
SORT T_TARGET BY VBELN.
ENDFORM. " DATA_RETRIVE
*& Form BUILD_FCAT
FORM BUILD_FCAT .
W_FCAT-COL_POS = 1.
W_FCAT-FIELDNAME = 'VBELN'.
W_FCAT-SELTEXT_M = 'BILLING NO'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 2.
W_FCAT-FIELDNAME = 'VKORG'.
W_FCAT-SELTEXT_M = 'SALES ORGANIZATION'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 3.
W_FCAT-FIELDNAME = 'VTWEG'.
W_FCAT-SELTEXT_M = 'DISTRIBUTION CHANNEL'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 4.
W_FCAT-FIELDNAME = 'SPART'.
W_FCAT-SELTEXT_M = 'DIVISION'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 5.
W_FCAT-FIELDNAME = 'FKDAT'.
W_FCAT-SELTEXT_M = 'CREATION DATE'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 6.
W_FCAT-FIELDNAME = 'POSNR'.
W_FCAT-SELTEXT_M = 'BILLING ITEM'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 7.
W_FCAT-FIELDNAME = 'MATNR'.
W_FCAT-SELTEXT_M = 'MATERIAL NUM'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 8.
W_FCAT-FIELDNAME = 'ARKTX'.
W_FCAT-SELTEXT_M = 'DESCRIPTION'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 9.
W_FCAT-FIELDNAME = 'FKIMG'.
W_FCAT-SELTEXT_M = 'QUANTITY'.
APPEND W_FCAT TO T_FCAT.
W_FCAT-COL_POS = 10.
W_FCAT-FIELDNAME = 'NETWR'.
W_FCAT-SELTEXT_M = 'NET VALUE'.
W_FCAT-DO_SUM = 'X'.
APPEND W_FCAT TO T_FCAT.
ENDFORM. " BUILD_FCAT
*& Form BUILD_LIST_HEAD
FORM BUILD_LIST_HEAD .
DATA : L_DATE(10),
L_TIME(8).
W_LIST_HEAD-TYP = 'S'.
W_LIST_HEAD-KEY = 'Sales org :'.
W_LIST_HEAD-INFO = S_VBELN-LOW .
APPEND W_LIST_HEAD TO T_LIST_HEAD.
CLEAR W_LIST_HEAD.
W_LIST_HEAD-TYP = 'S'.
W_LIST_HEAD-KEY = 'TO '.
W_LIST_HEAD-INFO = S_VBELN-HIGH.
APPEND W_LIST_HEAD TO T_LIST_HEAD.
CLEAR W_LIST_HEAD.
ENDFORM. " BUILD_LIST_HEAD
*& Form LIST_TOP_OF_PAGE
FORM LIST_TOP_OF_PAGE .
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = T_LIST_HEAD.
ENDFORM. " LIST_TOP_OF_PAGE
<code>
Regards -
How to capture indexes of multiple rows selected in Advance list
Hi,
- I have a prefilled advance list with multiselection enabled.
- There is a button, associated with an action,which is bind to a eventHandler,that event Handler has script operation which conains the ruby scrpt code.
- Now when i select multiple rows of that advance list and click on the action,I want to capture the indexes of all the selected rows.
I tried using following ruby code:
lead=$data.datalist.LeadSelectedIndex
But it returns index of only first row selected out of various rows selected.
So please anyone help me on that.
Regards ,
Saurabh Sharma.In FP2.6 there is no chance from SDK to have a mass enabled Action and bind to a mulli selection list as a BO Action in the UI Designer, as multiplicity will always be single and only lead selection would be selected.
this feature comes only in FP3.0.
So i am not sure what excatly Saurabh wants to do : maybe do some calculations based on multi seletions then i would do the following as also what Christian mentioned
multiSelect = ($data.DataList.GetSelectedRowsCount() > 1);
NoOfRowsSelected = $data.DataList.GetSelectedRowsCount();
SummationField = 0;
if ( multiSelect )
LeadSelection = $data.DataList.LeadSelectedIndex;
RequiredDataField = $data.DataList.Get(LeadSelection).AnydataField;
for i in 0..(NoOfRowsSelected - 1)
currentRow = LeadSelection + i;
RequiredDataField = $data.DataList.Get(currentRow).AnydataField;
// imagine this is just add values of the RequiredDataField
SummationField = SummationField + RequiredDataField
end
end
So i have not tried this directly - but i hope i make the idea clear.
Regards,
Nitesh Pai -
Multi Row Selection in Table list
Hi All,
Currently in our scenorio, we are able to select only one row at a time from the table list, but we need to select multiple row at a time.
Even we have tried to select multi row using CTRL key but if we select another row previous selection got removed.
Kindly suggest where we need to make modification.
Thank you,
ChaBalan,
I have a Search Result View which allows users to select multiple rows. To process, user clicks the custom button "Submit" added on the Tool bar. In the event handler i wrote the below code. This is selecting only last record. But i want to read all selected rows.
--- htm page
<chmlb:configTable id
= "Table"
reset
= "<%= controller->get_reset_flag( ) %>"
actions
= "<%= controller->gt_button %>"
navigationMode = "BYPAGE"
table
= "//RESULT/Table"
visibleRowCount = "<%= lv_visiblerows %>"
usage
= "SEARCHRESULT"
downloadToExcel = "<%= lv_export %>"
selectedRowIndexTable = "<%= RESULT->SELECTION_TAB %>"
selectionMode
= "<%= RESULT->SELMODE_MULTI %>"
onRowSelection
= "SELECT"
showNoMatchText = "FALSE" />
method submit.
data: lv_collection TYPE REF TO if_bol_bo_col,
lv_property_access TYPE REF TO if_bol_bo_property_access.
lv_collection ?= me->typed_context->result->collection_wrapper->get_marked( ).
lv_property_access = lv_collection->get_first( ).
WHILE lv_property_access IS not INITIAL.
lv_property_access = lv_collection->get_next( ).
endwhile.
endmethod.
Thanks
Tim -
F-32 - Select list of accounts at first selection screen
Hello everybody,
Like the title says, I would like to select a list of account (and a list of CGS code) directly from the first selection screen o fF-32 transaction code.
Do you know an issue to do that?
BR
MathieuHi,
TY to help me.
But the account can be selected at selection screen but by default you can't entry no more than one.
After selection screen it is possible to select several accounts and CGS code. (on detail screen)
So I would like to select all my accounts directly at the first selection screen.
Does a standard solution exist for that?
BR -
WorkOrderList TileView Row & Selected Row Background Color Change
Hi,
can we change the background color of WorkorderList TileView Row & Selected Row Background color ?. Actually i am trying to change the color of both in WorkOrderList but it not reflecting any color on my Agentry client. I used a style on Tile List View Data/Style.
but these applied style on Rows & Selected Rows are not working in Agentry client.
if any other alternate solution exist in Agentry, please guide me.
i am using following...
sap mobile platform-2.3.3
Thanks & Regard
Manish Kumar
Tags edited by: Michael ApplebyHi Jason
Yes using Image we can achieve that goal but i want to use a background color instead of Image background. Finally I used a background color on label and set the that label field on Screen. And It's showing the background color on WorkOrderList Row & Selected Row that what i wanted. But on both Row & Selected TileView Screen showing white outline that i don't want and also i could not remove the default Selected Blue Background Color.
Please guide me how to remove white outline and default Blue Selected Background color.
Thanks & Regard
Manish Kumar -
How to add check box to list screen in SYCLO Agentry?
Hi,
How can I add a check box to the list screen. I want to add a new column which allows the user to select the check box.
I have tried with "Allow Multi-Row Select" option. When I selected this option I am getting an error
"The For Object defined for the "Transmit" action is invalid. 'None' is not a valid choice since the Multi-Row Selection option for the list screen is enabled."
-ShyamIs the list screen in transaction screenset or Object?
You can't use the field type button in a list screen. But what you can do is take a 16 x 16 image, with a checked box not checked.
Users will not be able just to check the box to enable it or not. You need to have an action linked to a button to the selected row, or you can have an action fire if the user double checks the row.
Stephen -
Using row selection in ALV using class cl_salv
Hi,
how to use row selection by using cl_salv classes...
I need to display scarr table in the basic list in ALV wthout using screens and function modules...
On multiple selection of carrid from ALV, need to display flight details from sflight.
Also how to get the selection buttons for corresponding rows.
NOTE : Using class cl_salv*
Thanks,
SiddarthYou may need to look into Rich's example code by the following thread
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cda3992d-0e01-0010-90b2-c4e1f899ac01
a® -
How to perform Autosubmit on Row selection in ADF Table
Hi,
I am using ADF Table , in which I want to enable AutoSubmit for the Table Row Selection.
I want to enable some button on my screen when a row is selected in the table.
I want to achive this with out using SelectionListener .. any iputs for this?
Thanks,
SwathiHi Timo,
here is my code : this code is to implement Custom shuttle .. where I am using two ADF Tables to display the Available list and Selected List ..and using navigation buttons to move the selected item.When I select a Row in the left table .. I want to enable the 'add' button.
<af:table value="#{pageFlowScope.ebean.al}" var="row"
rowBandingInterval="0" varStatus="vs" id="t2"
rowSelection="single"
binding="#{pageFlowScope.ebean.availableList}"
partialTriggers="::cb2 ::cbAdd ::cbRemove"
summary="#{backingBeanScope.BundleBean.MEASURES}"
selectionListener="#{pageFlowScope.ebean.rowSelection}"
inlineStyle="height:200.0px;" horizontalGridVisible="false">
<af:column sortProperty="Name" sortable="false"
headerText="Name"
id="c3" width="300" rowHeader="unstyled">
<af:panelGroupLayout id="pgl6">
<af:image source="/images/file_ena.png" id="i2"
shortDesc="#{backingBeanScope.BundleBean.FILE_ENA}"/>
<af:outputText value="#{row.label}" id="ot2"/>
</af:panelGroupLayout>
</af:column>
</af:table>
</af:panelGroupLayout>
<af:panelGroupLayout id="pgl3" layout="vertical"
inlineStyle="width:39px;">
<af:commandButton id="cbAdd"
actionListener="#{pageFlowScope.ebean.onAdd}"
partialSubmit="true"
disabled="#{pageFlowScope.ebean.dataToAdd==null}"
icon="/images/shuttleright_ena.png"
shortDesc="#{backingBeanScope.BundleBean.ADD}"
partialTriggers="t2"/>
<af:spacer width="10" height="10" id="s1"/>
<af:commandButton id="cbAddAll" action="addAll"
actionListener="#{pageFlowScope.ebean.onAddAll}"
disabled="#{pageFlowScope.ebean.availableListSize==0}"
icon="/images/shuttlerightall_ena.png"
shortDesc="#{backingBeanScope.BundleBean.ADD_ALL}"
partialTriggers="cbRemove"/>
<af:spacer width="10" height="10" id="s2"/>
<af:commandButton id="cbRemove" partialSubmit="true"
actionListener="#{pageFlowScope.ebean.onRemove}"
icon="/images/shuttleleft_ena.png"
shortDesc="#{backingBeanScope.BundleBean.REMOVE}"
partialTriggers="t3"
disabled="#{ pageFlowScope.ebean.dataToRemove==null}"/>
<af:spacer width="10" height="10" id="s4"/>
<af:commandButton id="cbRemoveAll"
actionListener="#{pageFlowScope.ebean.onRemoveAll}"
icon="/images/shuttleleftall_ena.png"
shortDesc="#{backingBeanScope.BundleBean.REMOVE_ALL}"
disabled="#{pageFlowScope.ebean.listSize==0}"
partialTriggers="cbAdd "/>
</af:panelGroupLayout>
<af:panelGroupLayout id="pgl5">
<af:outputText value="#{backingBeanScope.BundleBean.SELECTED_MEASURES}#{pageFlowScope.ebean.listSize}#{backingBeanScope.BundleBean.CB}"
id="ot3"
inlineStyle="font-weight:bold; font-size:small;"
partialTriggers="cbAdd cbRemove"/>
<af:table value="#{pageFlowScope.ebean.sl}" var="row"
rowBandingInterval="0" varStatus="vs" id="t3"
rowSelection="single"
binding="#{pageFlowScope.ebean.list}"
partialTriggers="::cbAdd ::cbAddAll ::cbRemove ::cbRemoveAll"
summary="#{backingBeanScope.BundleBean.MEASURES}"
selectionListener="#{pageFlowScope.ebean.rowSelection}"
inlineStyle="height:200.0px;" horizontalGridVisible="false">
<af:column sortProperty="Name" sortable="false"
headerText="Name"
id="c5" width="300" rowHeader="unstyled">
<af:panelGroupLayout id="pgl9">
<af:image source="/images/file_ena.png" id="i3"
shortDesc="#{backingBeanScope.BundleBean.FILE_ENA}"/>
<af:outputText value="#{row.label}" id="ot1"/>
</af:panelGroupLayout>
</af:column>
</af:table>
</af:panelGroupLayout>
public void rowSelection(SelectionEvent selectionEvent) {
RichTable at = (RichTable)selectionEvent.getComponent();
if(at.getId().equals("t2"))
getDataToAdd();
else
getDataToRemove();
public Object getDataToAdd(){
if(availableList!=null)
return availableList.getComponent().getSelectedRowData();
return null;
public Object getDataToRemove() {
if (list != null && list.getComponent().getSelectedRowKeys()!=null)
return list.getComponent().getSelectedRowData();
return null;
}Thanks,
Swathi -
Row Selection in ALV Grid created using CL_GUI_ALV_GRID
Hi,
I have ALV grid using cl_gui_alv_grid. I want to capture the row selection and display the selected rows in 2nd ALV grid (using cl_gui_alv_grid).
Method CALL METHOD Grid->get_selected_rows giving right no. of selected records first time and process these records by POST button and hence shows these records in next alv grid. but when i came back to 1st ALV by pressing BACK button on 2nd ALV then if I again select records on the same 1st ALV grid the same Method CALL METHOD Grid->get_selected_rows fires again. but this times it wouldn't give the selected records. I mean first time this gives me correct no. of selected records but 2nd time wouldn't.
how do I capture the row selection.?
Kindly suggest me. helpful answer will be appreciated.
Thanx in Advance.
RobinHi,
Write this code, you have to free the container.
MODULE user_command_0101 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
c_container->free( ).
c_container1->free( ). " this is the container of secondary list.
clear: r_grid, r_grid1, c_container, c_container1.
LEAVE TO SCREEN 100.
ENDCASE.
Regards and Best wishes. -
Cell(Row) Selection not display in OOPS ALV
Hi all,
I am not able to get the cell(row) selection in the oops ALV when i called it second time.
I am displaying some information using oops alv in 100 screen. After user action on 100 screen i am calling 200 screen with different information which is also display in oops alv. When i displaying information in second time the cell(row) selection is not getting displayed.
For both ALV the fieldcatelog is different.
Initially i tried using same container but i face same problem, so i am trying to call second alv in new screen.
But problem remain same.
Can anyone help me to solve this problem ?
Regards
Nileshhi,
can u send ur report so dat i can look furhter to it.and help u out
Maybe you are looking for
-
Can anyone repro this; it's somewhat situational depending on how you organize your projects: In the project selection user interface, go to export (5th icon from upper right) > choose a desired destination (like Save to Gallery or Camera Roll). Choo
-
I just started using Itunes again after a very long time. I don't know how to purchase and add to my ipod. I added songs to a wish list and thought at that point I would have an options to purchase. Can't seem to figure it out.
-
How to configure maven to build EJB Jar?
Hi! I would like to know how you setup Maven2 or alternatively Ant to build an EJB Jar. I have managed to do this in Maven by adding required jars to my local repository and added dependencies in the pom.xml file. This, however, do not seem like a go
-
If you can no longer rent, where do Apple TV purchases store?
I know that Apple TV recently removed to rental options from iTunes and Apple TV. Given this, I have a question related to purchases on Apple TV. If I make a purchase on the Apple TV itself, once downloaded, where does the purchase live (on the cloud
-
HTTP tunnelling on version 9.0.2.0.0 - does it work?
I can't get HTTP tunneling to work on version 9.0.2.0.0, though it seems to work OK on version 2.0.0.0 ( the version included with the JDev Release Candidate) on 9.0.2.0.0 when trying to connect to my session bean using HTTP tunneling I get the follo