Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Regarding Function Module ALV - Highly Required

Former Member
0 Likes
626

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
605

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

5 REPLIES 5
Read only

Former Member
0 Likes
605

Hi,

Please refer to the link below :

http://www.sapdev.co.uk/reporting/alv/alvgrid_enhanced.htm

Thanks,

Sriram Ponna.

Read only

Former Member
0 Likes
606

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

Read only

0 Likes
605

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.

Read only

0 Likes
605

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.

Read only

Former Member
0 Likes
605

Hi Anji,

Please see the thread.I have answered same question here.

Please see my answers in this thread

Plkease reward if useful

Thanks Arjun