‎2008 Mar 23 3:36 PM
Hi,
I displayed a list on the screen.
Upon double clicking generally the ALV field SLIS_SELFIELD reads the value clicked, Field Name and Row ID, Column ID.
The problem is my list involves data from diff tables.
But i want to read whole line of data on double clicking the List and move it to my form.
On clicking the whole line of data should be retrieved.
Note : The data is not having any key fields.
Fullfilled Answers will be rewarded Possibly Max Marks
‎2008 Mar 23 4:32 PM
Hi Anji Reddy,
Though, I do not know how to pick the entire line data in an ALV Report, I think I have a solution to your problem.
You can include a check box element in the ALV Report. For the final internal table from you fetch the data for ALV, include a single character field and define it as the check box in the Fieldcatalog.
FIELDCATALOG-CHECKBOX = 'X'.
FIELDCATALOG-EDIT = 'X'.
Now when you click at the checkbox, the internal table would get updated for the field (i.e. meant for checkbox) as 'X'.
Now you could read the internal table for the field = 'X'. This would get the entire line data into the work area. Now go ahead and fill in the details for the form's FM.
Hope you got that...Incase if you have any further doubts do get back. I've worked on similar requirement and I could give sample code too.
Reward points if this helps,
Kiran Kumar Somaroutu
‎2008 Mar 23 4:20 PM
Hi,
Please refer to the link below :
http://www.sapdev.co.uk/reporting/alv/alvgrid_enhanced.htm
Thanks,
Sriram Ponna.
‎2008 Mar 23 4:32 PM
Hi Anji Reddy,
Though, I do not know how to pick the entire line data in an ALV Report, I think I have a solution to your problem.
You can include a check box element in the ALV Report. For the final internal table from you fetch the data for ALV, include a single character field and define it as the check box in the Fieldcatalog.
FIELDCATALOG-CHECKBOX = 'X'.
FIELDCATALOG-EDIT = 'X'.
Now when you click at the checkbox, the internal table would get updated for the field (i.e. meant for checkbox) as 'X'.
Now you could read the internal table for the field = 'X'. This would get the entire line data into the work area. Now go ahead and fill in the details for the form's FM.
Hope you got that...Incase if you have any further doubts do get back. I've worked on similar requirement and I could give sample code too.
Reward points if this helps,
Kiran Kumar Somaroutu
‎2008 Mar 24 4:53 AM
If possible sent me a piece of code for the double click routine. I want to know the way u deal with the transferrring of final internal table to the module.
‎2008 Mar 24 5:06 AM
Hi,
if u click on a field u can get selected line number in the alv.so with that u can u can read the entire row.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
* Check function code
CASE r_ucomm.
WHEN '&IC1'.
READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
ENDCASE.
ENDFORM.
rgds,
bharat.
‎2008 Mar 24 5:19 AM