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

Some problem about ALV

Former Member
0 Likes
801

Hi,

In the report, I used ALV to display the result. But on some particular fields which have been displayed, I want to do double click on each of them and then the related PDF document should be displayed. Can I realize it?

Give me some suggestions.

Thanks.

Regards,

Chris Gu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
756

Hi all,

Thank you for your reply.

But my problem is that I need to click some particular fields and then the detail information will be displayed. Attention: The detail information has already exist in the PDF documents which are on the server, I only need to show it. Do you have any idea? Please reply to me.

Thanks,

Regrads,

Chris

6 REPLIES 6
Read only

Former Member
0 Likes
756

when u click the any particular field the u need to capture the row id after that based on the u need to call the FM ( i.e for PDF documents) . one FM is there for PDF document, rite now don't know the name pls check in the sap sytem in (se37).

Read only

Former Member
0 Likes
756

Hi,

In field cat put HOTSPOT = 'X' on that particular field and then try handling the hptspot Event to download the pdf document.

Please reward points if useful.

Regards

Rose

Read only

venkat_o
Active Contributor
0 Likes
756

Here is the procedure to handle Interactive ALV and the output in PDF format.

1.

declare events table like this.

data :
      i_events  type slis_t_event,
      w_events  like line of i_events.

2.

Build events table .

w_events-name = 'USER_COMMAND' .
w_events-form = 'USER_COMMAND' .
append w_events to i_events.
clear w_events.

3.

pass this events table through REUSE_ALV_GRID_DISPLAY.

4.

USER_COMMAND call back subroutines should be like this in your case. These are nowhere called using PERFORM statement in ur program.

5.

USER_COMMAND subroutine should be like this.

*&---------------------------------------------------------------------*
*&      Form  user_command
*&---------------------------------------------------------------------*
form user_command using ucomm like sy-ucomm
                  selfield type slis_selfield.
  case ucomm .
    when '&IC1'. *This is for double click on ALV output*.
     *Read the table which is being displayed using FM REUSE_ALV_GRID or LIST_DISPLAY with index selfield-tabindex.*
*Then click on 6th point to display output as PDF.*
  endcase.
 endform.                    "user_command

selfield structure

You can also handle Interactive ALV using this structure.

types: begin of slis_selfield,
         tabname type slis_tabname,
         tabindex like sy-tabix,
         sumindex like sy-tabix,
         endsum(1) type c,
         sel_tab_field type slis_sel_tab_field,
         value type slis_entry,
         before_action(1) type c,
         after_action(1) type c,
         refresh(1) type c,
         col_stable(1) type c,
         row_stable(1) type c,
*        colwidth_optimize(1) type c,
         exit(1) type c,
         fieldname type slis_fieldname,
         grouplevel type i,
         collect_from type i,
         collect_to type i,
       end of slis_selfield.

6.

Link to get the output as PDF output.

[ABAP output in PDF format|http://www.jt77.com/development2/programming-07636.html]

I hope that this will give u some input.

Regards,

Venkat.O

Read only

Former Member
0 Likes
756

Hi all,

Thank you for your reply.

But my problem is that I need to click some particular fields and then the detail information will be displayed. Attention: The detail information has already exist in the PDF documents which are on the server, I only need to show it. Do you have any idea? Please reply to me.

Thanks,

Regrads,

Chris

Read only

Former Member
0 Likes
757

Hi all,

Thank you for your reply.

But my problem is that I need to click some particular fields and then the detail information will be displayed. Attention: The detail information has already exist in the PDF documents which are on the server, I only need to show it. Do you have any idea? Please reply to me.

Thanks,

Regrads,

Chris

Read only

0 Likes
756

Hi,

Check the following code.

*&---------------------------------------------------------------------*
*&      Form  user_command
*&---------------------------------------------------------------------*
form user_command using ucomm like sy-ucomm
                  selfield type slis_selfield.
  case ucomm .
    when '&IC1'. *This is for double click on ALV output*.
    if selfield-sel_tab_field = 'ITAB-PERNR'.
********Display your PDF.     
    endif.
  endcase.
 endform.                    "user_command

and check slis_selfield structure.

types: begin of slis_selfield,
         tabname type slis_tabname,
         tabindex like sy-tabix,
         sumindex like sy-tabix,
         endsum(1) type c,
         sel_tab_field type slis_sel_tab_field,
         value type slis_entry,
         before_action(1) type c,
         after_action(1) type c,
         refresh(1) type c,
         col_stable(1) type c,
         row_stable(1) type c,
*        colwidth_optimize(1) type c,
         exit(1) type c,
         fieldname type slis_fieldname,
         grouplevel type i,
         collect_from type i,
         collect_to type i,
       end of slis_selfield.

you will get selected field value also using selfield-value

Regards,

Venkat.O