Problem double click ALV GRID
Hi folks,
I'm trying to get an ALV GRID to make something if I double click one line, this is my code:
FORM create_alv.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
is_layout = gs_layout
it_fieldcat = gt_itab_catalog[]
i_default = 'X'
i_save = 'A'
it_events = events[]
TABLES
t_outtab = itab_all
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM.
FORM USER_COMMAND USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
break-point.
CASE r_ucomm.
WHEN '&IC1'.
READ TABLE itab_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
* PERFORM build_fieldcatlog_ekpo.
* PERFORM event_call_ekpo.
* PERFORM populate_event_ekpo.
* PERFORM data_retrieval_ekpo.
* PERFORM build_listheader_ekpo USING it_listheader.
* PERFORM display_alv_ekpo.
ENDCASE.
ENDFORM. "user_command
Why when I'm double clicking the form USER_COMMAND isn't being executed. The break-point I set in there doesn't get executed.
Can anyone tell me if i'm missing something.
Thanks for your help in advance.
Regards,
Gilberto Li
Hi again,
Ok here's the code:
FORM init_catalog.
* SOCIEDAD
gt_itab_catalog-fieldname = 'BUKRS'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Sociedad'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 1.
gt_itab_catalog-outputlen = 10.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* CONTRATO
gt_itab_catalog-fieldname = 'EBELN'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Contrato Marco'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 2.
gt_itab_catalog-outputlen = 15.
gt_itab_catalog-hotspot = 'X'.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* CLASE DE DOC
gt_itab_catalog-fieldname = 'BSART'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Clase de Contrato'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 3.
gt_itab_catalog-outputlen = 15.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* RIGE DESDE
gt_itab_catalog-fieldname = 'KDATB'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Rige desde'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 4.
gt_itab_catalog-outputlen = 10.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* VENCE
gt_itab_catalog-fieldname = 'KDATE'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Vence el'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 5.
gt_itab_catalog-outputlen = 10.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* FECHA DE CREACION
gt_itab_catalog-fieldname = 'AEDAT'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Creado el'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 6.
gt_itab_catalog-outputlen = 10.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* PROVEEDOR
gt_itab_catalog-fieldname = 'LIFNR'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Proveedor'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 7.
gt_itab_catalog-outputlen = 10.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* NOMBRE DE PROVEEDOR
gt_itab_catalog-fieldname = 'NAME1'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Nombre Proveedor'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 8.
gt_itab_catalog-outputlen = 20.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* CED JURIDICA
gt_itab_catalog-fieldname = 'STCD1'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Cédula Jurídica'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 9.
gt_itab_catalog-outputlen = 10.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* MATERIAL
gt_itab_catalog-fieldname = 'MATNR'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Material'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 10.
gt_itab_catalog-outputlen = 18.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* NOMBRE DE MATERIAL
gt_itab_catalog-fieldname = 'MAKTX'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Desc. Material'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 11.
gt_itab_catalog-outputlen = 20.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* MONTO
gt_itab_catalog-fieldname = 'NETPR'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Monto'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 12.
gt_itab_catalog-outputlen = 16.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
* MONEDA
gt_itab_catalog-fieldname = 'WAERS'.
gt_itab_catalog-tabname = 'ITAB_ALL'.
gt_itab_catalog-seltext_l = 'Moneda'.
gt_itab_catalog-just = 'L'.
gt_itab_catalog-col_pos = 13.
gt_itab_catalog-outputlen = 10.
APPEND gt_itab_catalog.
CLEAR gt_itab_catalog.
ENDFORM. "init_catalog
FORM init_layout.
gs_layout-zebra = 'X'.
gs_layout-f2code = '&ETA'.
gs_layout-detail_popup = 'X'.
gs_layout-no_totalline = 'X'.
ENDFORM. "init_layout
FORM listado.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
it_fieldcat = gt_itab_catalog[]
TABLES
t_outtab = itab_all
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM.
FORM USER_COMMAND USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
break-point.
CASE r_ucomm.
WHEN '&IC1'.
READ TABLE itab_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
* PERFORM build_fieldcatlog_ekpo.
* PERFORM event_call_ekpo.
* PERFORM populate_event_ekpo.
* PERFORM data_retrieval_ekpo.
* PERFORM build_listheader_ekpo USING it_listheader.
* PERFORM display_alv_ekpo.
ENDCASE.
ENDFORM. "user_command
PERFORM init_catalog.
PERFORM init_layout.
PERFORM listado.
I just post the ALV GRID creation code.
Hope you guys can guide me through this.
Thanks again.
Regards,
Gilberto Li
Similar Messages
-
hi,
i have two problems in displaying ALV grid output Using Oops.
1) How to modify the fieldcatalog after we getting a field catalog using general FM.
2) initialy it is displaying 13 fields but there are 63 fields .
eventhough we chage the layout to 63 fields it is displaying only 13 fields , these 13 fields may be different based on our selection but count of displayed fileds are same . how can display 63 fields at a time .Hi,
You can chnage using below code:
loop at gt_fieldcat.
if <gt_fieldcat-field_name> = 'FIELDNAME'.
endif.
modify gt_fieldcat.
clear gt_fieldcat.
endloop.
Make sure that all the field should not have no_out = 'X' and tech = 'X'.
Thanks,
Sriram Ponna. -
Facing problem while downloading ALV grid Output into Excel
Hi Guys,
I am facing problem while downloading ALV grid Output into Excel.
It is downloading into excel, but all character columns first and next all quantity columns it is displaying. But I need columns order as it is in the grid.
If I take all columns as characters it works fine. But it will be problem for calculating total, subtotals of quantity columns
Can someone help me regarding this
thanks for your helpHi,
Open up Excel on your desktop. Goto Tools > Macro > Security.
Make sure that your security is set to Medium (or less). SAP uses OLE automation to run the Excel instance and in Office 2003 (for example), Microsoft has increased their default security setting to High. With the High setting, the output to Excel fails.
Was this your problem? Don't forget those points, either.
check with this wetther it is solved or not.
Regards,
sana. -
Problem with Interactive ALV GRID
Hi Friends,
I am using CL_GUI_ALV_GRID for my ALV.
IT is an interactive report.
On double click of First grid, i am displaying the secondary ALV.
Problem 1.
When i come back from Secondary to First List, click a different row and go to Secondary List, the secondary list is still showing the previous records? what could be the problem. I have used
+CALL METHOD cl_gui_cfw=>flush.
lgrid_200->refresh_table_display(
EXPORTING is_stable = wa_stable ).
REFRESH it_bcont_sec. -> Internal table for secondary ALV
SET SCREEN 0.
LEAVE SCREEN. +
Problem 2.
When i come back from secondary list to primary list, i am still able to see the secondary list in the background. How can i overcome this?
I wrote
+ SET SCREEN 0.
LEAVE SCREEN +
Any clue or help is highly appreciated.
Thanks,
AjayI am using DoubleClick to jump to secondary ALV.
This is my code in Handle Double Click method:
READ TABLE it_bcont_count INTO wa_bcont_count INDEX p_e_row-index.
IF sy-subrc EQ 0.
populate Internal table for secondary alv in Screen 200
ENDIF.
IF NOT it_bcont_sec IS INITIAL.
CALL SCREEN 200.
ENDIF.
Edited by: ajay matam on Feb 25, 2011 4:27 PM -
Double Click ALV column in Web Dympro
Hi All,
I am very much new to WDA4 , can anybody plz guide me how to enable double click in ALV Report in Web dynpro ..
Plz help it is urgent .....
Thnks
SahilHello.
If you are using component SALV_WD_TABLE, you can subscribe the event ON_LEAD_SELECT on component interface. (Actually this event corresponds to user's single clicking, instead of double clicking. But both means the selection of a row, and seems no problem.) It has a parameter which contains the index of the lead selection of context binded to alv table.
For detail information please read :
http://help.sap.com/saphelp_nw2004s/helpdata/en/38/c5bacc91a345eda17f2903491c391d/content.htm
Regards.
Tak -
Total problem in Exporting ALV GRID to Excel
Hi all,
I have manipulated the Total of ALV Grid by using GET_SUBTOTALS and REFRESH method of CL_GUI_ALV_GRID. The ALV Output is also correct. When i export to Excel,only the Original total is displaying not the calculated one. How to download the exact output which is displaying in the ALV Grid to Excel.
Please help me out to solve this.
Thanks,
RameshDEAR,
AS U WANT UPLOAD WITH THE SUB TOTAL YOU TRY THIS.
FIRST to get subtotal in ALV output you select at least one column of total and then press ctrl + F6 . u will see the sub total .
and now how to download it so press ctrl + shift + F9 .
now screen appears and select second option ie spreadsheet and press enter
now a screen appear in wich u have to give file name.
so double click on search button of file name . click on desktop give ur file name as u want suppose zreport u have given.
and save type = excel file.
now save it and then generate it your output bytes will be transmitted .
now u can see in your desktop in your file name . ur output with subtotal.
regards
navin -
Double Click ALV record to open transaction with out setting parameter Id.
In an ALV GRID report I want to navigate to the transaction by double clicking on a value in the ALV and skip the first screen.
But if paramater Id is not given by SAP then how to do this task....The transaction which should be opened for the respective value after double click are VL33N HU03 VTRK VA03 ME23N.hi if no parameter id is there than use recording and use it.
use call transaction XXX using bdcdata mode 'E'.
like this.
reward if useful. -
Urgent : Problem with Editable ALV Grid for Quantity and Currency Fields
Hi All,
I am using Editable ALV Grid display and have quantity and value as editable fields in the display.
When user changes these values these values are not changing properly .
For the quantity field the domain is MENG13 with 3 deciamal places and here if we enter 500 it takes it as 0.500 .
The same problem is for the currency field. Here the Domain is WERT7 with 3 decimal places.
Here also it takes last 2 digits after decimal places by default.
Please advice how to get proper values in this case from ALV editable fields.
Thanks and Regards
Harshad
Edited by: Harshad Rahirkar on Dec 25, 2007 7:39 AMfor all the currency field , it will display like that only.
u have to manipulate uin program before displaying.
if they are giving 500, in program multiply with 100 and move it to table.
when u are getting from table, divinde and display.
this is what I am doing.
Reward if helpfull. -
Problem: User has problems to export ALV Grid to Excel...
Hello experts,
I have a very strange problem with an single user: when she tries to export ALV Grid data from SAP into Excel by List/Export/Spreadsheet, she's only able to export this to an xml-based file on her local client, every other user gets the popup to choose the spreadsheet format (XXL...).
What I did so far:
- Look up Excel Makro Security --> the same as on other desktops
- SAP GUI Patch Level --> the same as on other desktops
- Test with an different user on her desktop on SAP Report S_ALR_87012284 --> it worked perfectly
- User parameters are the same as for the test user
- Security regarding ALV is the same (S_GUI ACTVT = 61...)
Has there ever been a similar problem to anyone else?
Many thanks in advance for your feedback!Hi ,
This problem looks very weired. Just try running that FM from SE37 from the same system and see that what is happening there.... if the problem is similar then it is not the problem of your report and some patch may be missing in that system. -
Problem while downloading ALV GRID Output to Local Spreadsheet(Excel) File.
Hi,
I am displaying output in ALV GRID. While downloading the output to Excel file using "Local File" option provided by ALV.
But while downloading the columns and their respective values are coming in single column vertially of excel file instead of horizontal.
e.g. Grid output is as follows.
F1 F2
V1 V2
(F represents Field Title, and V represent Value)
Downloaded Excel File content:-
F1
F2
V1
V2
Please help.Hi ,
Please use below FM :
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\Documents and Settings\akshayr2403\Desktop\docs\rep.xls'
FILETYPE = 'WK1'
WRITE_FIELD_SEPARATOR = 'X'
tables
data_tab = it_vbak
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Also, if your problem still persist, please refer SAP's demo code on ALV "BCALV_FULLSCREEN_DEMO".
There are many sample codes available, what you need to do is just go to SE38 and put BCALV* and do F4.
I hope this will help you.
Regards,
Rahul Mahajan -
Hi All,
When I click on save after editting.I have a pop-up message having two buttons-yes and cancel.When I clcik on save,data get updated.But when I click on cancel,I want that The alv grid display page should return to previous values which were there before editting.
Please answer to my query.
Thanks and Regards,
AmanHi Try this Code
FORM list_display .
DATA: l_exit_by_caller(1) TYPE c,
ls_exit_by_user TYPE slis_exit_by_user,
l_answer(1) TYPE c.
DO.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-cprog
i_callback_pf_status_set = 'F_SET_PF_STATUS'
i_callback_user_command = 'F_USER_COMMAND'
i_callback_top_of_page = 'F_TOP_OF_PAGE'
it_fieldcat = itab_fieldcat
is_layout = wa_layout
i_save = 'A'
it_events = itab_events
IMPORTING
e_exit_caused_by_caller = l_exit_by_caller
es_exit_caused_by_user = ls_exit_by_user
TABLES
t_outtab = itab_overall
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.
ELSE.
IF ls_exit_by_user-back = 'X' OR
ls_exit_by_user-exit = 'X' OR
ls_exit_by_user-cancel = 'X'.
IF itab_overall IS INITIAL.
LEAVE LIST-PROCESSING.
ENDIF.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
text_question = text-prn
text_button_1 = text-yes
text_button_2 = text-ext
display_cancel_button = ' '
IMPORTING
answer = l_answer
EXCEPTIONS
text_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0 OR l_answer NE '1'.
EXIT.
ENDIF.
ENDIF.
ENDIF.
ENDDO.
Thanks
Pavan -
Hi All....
I have a prog in which i have used these lines.
CASE r_ucomm.
WHEN '&IC1'.
IF RS_SELFIELD-FIELDNAME = 'OBJECTNAME'.
SET PARAMETER ID 'OBT' FIELD OBJECTNAME.
CALL TRANSACTION 'SE38' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
now if i click in the column named 'OBJECTNAME', it Goes to the SE38 screen.
I need it to go to other screens like 'SE11', 'SE93' ETC.. according to the type of the object, which also is in the alv grid along with the objectname.
How should i put a loop or a condition statement inside the case????
Pls Help.
thanks in advance.Hi ,
Let itab be the internal table u passed to
REUSE_ALV_LIST_DISPLAY
TABLES 'T_OUTTAB'.
CASE r_ucomm.
WHEN '&IC1'.
IF RS_SELFIELD-FIELDNAME = 'OBJECTNAME'.
read table itab index RS_SELFIELD-tabindex.
case itab-objecttype .
when 'PROG'.
*Set the parameter id
CALL TRANSACTION 'SE38' AND SKIP FIRST SCREEN.
when 'TABL'.
*Set the parameter Id
CALL TRANSACTION 'SE11' AND SKIP FIRST SCREEN.
endcase.
ENDIF.
This should work.....
Please reward if useful...
Thanks Arjun
ENDCASE.
Edited by: Arjun Puthuruthy on Mar 11, 2008 11:47 AM
Some changes made -
Problem in downloading ALv Grid output
Hi Friends,
I've made an ALV report using the FM: REUSE_ALV_GRID_DISPLAY. Now when I try to download the output in excel using the path:LIST->EXPORT->EXCELSHEET, the 'excelsheet' option is showing as disabled. This is happening only for this report, while I'm successfully ablw to do this for other ALV grid reports. I'm on ECC6.0 & trying to download the output in XXL format.Kindly help me as what exactly needs to looked into.
Thanks:
Gauravhi,
Think that you does n't have authorization for that (auth group "J_1IDNLD").
You can try to do with another user which is ahving authorisation.
Get authorization for above grp. Hope it will helps you. Thanks!
Kishore -
iPhoto09 v 8.1.2
Double clicking on thumbnail results in glimpse of photo before changing to ! with a black background.
No photo, no slideshow.
(Preferences set to magnify with double click)That indicates that the iPhoto database has lost the connection to the high resolution photo - if you have not made any changes to the library (like cleaning uyp, deleting using thrid party software or form the all images list) then rebuilding will probably resolve it - Back up your iPhoto library, Depress and hold the option (alt) and command keys and launch iPhoto - rebuild your iPhoto database
LN -
Hi all,
I have a problem with an ALV GRID Control: I print in the screen an ALV with the clauses 'starting at...ending at...' ; when I do double click in a line of the ALV I show the details but, the size of the ALV get smaller and smaller for everytime I do double-click...
Any ideas about how to solve this?
Thanks and Regard.
Urtzi.I have two dynpros:
- In the first, in PBO I do
CALL METHOD grid1->set_table_for_first_display
To display the ALV
- When I do double-clic, I raise the event handle_double_click. In the event I do a
CALL SCREEN 2000 STARTING AT d_left_d d_top_d ENDING AT y1 y2
to get the details. then, in the screen 2000, in the PBO, I do another
CALL METHOD grid2->set_table_for_first_display
to display the second ALV, the details.
Regards.
Maybe you are looking for
-
Active Directory accounts problem logging in to Mavericks
We have twenty iMacs in a lab and five in an Internet café, all wired to a multiple subnet network. OS X Mavericks is bound to Active Directory. Frequently OS X Mavericks behaves as if the network user account password is entered incorrectly until t
-
Why Soundtrack 2.0.2 doesn't load after FCP ST2 upgrade?
I just installed the Final Cut Studio 2 upgrade and now Soundtrack doesn't open anymore. This is the error I get: Dyld Error Message: Library not loaded: /System/Library/PrivateFrameworks/BrowserKit.framework/Versions/A/BrowserKit Referenced from: /A
-
I know this is not strictly a discussion group for Cameras and Formats so I apolgise in advance for posting, but my options for advice are drying up and I figure that subscribers of the Final Cut Pro group will perhaps be able to assist. We're a musi
-
In Elements 12 when I add media I get a popup with the error message The instruction at "0x2e084f4e" referenced memory at "0x7fe45168". The memory could not be "read". The exact codes in the quotes are different every time I ge the error. I have post
-
Converting 3.5 Workbooks to 7.x
Hi, I have the 7.x Migration Book from SAP Press and nowhere in the book does it mention anything about converting BEx Workbooks to 7.x. Do we or should we convert the Workbooks as well to 7.x? What is the Benefit of converting Workbooks to 7.x? Th