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

ALV doubts

Former Member
0 Likes
1,061

Hi all,

I am generatign the output in ALV.

In ALV final output...

1. In the top of page...it has to display...How many records are there?

(example: Total 120 records).

2. I want to add DOWNLOAD button in the standarad tool bar in addition to ALV provided buttons.

Could anyone suggests this.

Thanks in advance.

karunakar reddy

Hi all,

I am generatign the output in ALV.

In ALV final output...

1. In the top of page...it has to display...How many records are there?

(example: Total 120 records).

2. I want to add DOWNLOAD button in the standarad tool bar in addition to ALV provided buttons.

Could anyone suggests this.

Thanks in advance.

karunakar reddy

10 REPLIES 10
Read only

Former Member
0 Likes
1,026

Are you using ALV - List, Grid(FM), Grid(OOABAP) ?

Also check Serdar Simsekler's Easy Guide to ALV Grid, in the mainpage of sdn.sap.com

Regards,

Subramanian V.

Read only

Former Member
0 Likes
1,026

Hi Karunakar,

1. With FM, you must create a pf-status with your Download button and create form user-command ( referring to parameter of Alv FM ).

you can see the development class: SLIS.

2. 'Easy Guide to ALV Grid', in the main page of sdn.sap.com is a great document.

Regards / Saludos.

Carlos

Read only

Former Member
0 Likes
1,026

Dear Friend,

Just add pf-status in your report and add button in that status. after that in 'REUSE_ALV_GRID_DISPLAY' FM pass pf status in i_callback_pf_status_set parameter as 'SET_PF_STATUS'.

source code:

call function REUSE_ALV_GRID_DISPLAY

---

---

i_callback_pf_status_set parameter = 'SET_PF_STATUS'.

form set_pf_status using rt_extab type slis_t_extab.

set pf-status 'STANDARD_COPY'.

endform.

Read only

Former Member
0 Likes
1,026

Hi All,

Can anyone please paste the URL link of

Serdar Simsekler's Easy Guide to ALV Grid?

I'll appreciate your input here.

Regards,

Jaime

Read only

0 Likes
1,026

You will find it very quickly yourself if you Google it.

Rob

Read only

0 Likes
1,026

Yes I did of course before posting this question, so far I can't find the link leading to PDF link of his "How To"

Thanks.

-Jaime

Read only

0 Likes
1,026

Or should we say SCN it . Like Google, SCN will also become a verb one day

regards,

Advait

Read only

Former Member
0 Likes
1,026

Hi ,

I have done this requirement .

Please follow the below steps.

SET PF-STATUS 'P_STATUS'.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE = ' '

I_CALLBACK_PROGRAM = REPID

I_CALLBACK_PF_STATUS_SET = 'P_STATUS'

I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

  • I_STRUCTURE_NAME =

IS_LAYOUT = LW_LAYOUT

IT_FIELDCAT = LT_FIELDCAT

  • IT_EXCLUDING =

  • IT_SPECIAL_GROUPS =

IT_SORT = LT_SORT

  • IT_FILTER =

  • IS_SEL_HIDE =

  • I_DEFAULT = 'X'

  • I_SAVE = ' '

  • IS_VARIANT =

IT_EVENTS = LT_EVENTS

  • IT_EVENT_EXIT =

  • IS_PRINT =

  • IS_REPREP_ID =

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • IR_SALV_LIST_ADAPTER =

  • IT_EXCEPT_QINFO =

  • I_SUPPRESS_EMPTY_DATA = ABAP_FALSE

  • IMPORTING

  • E_EXIT_CAUSED_BY_CALLER =

  • ES_EXIT_CAUSED_BY_USER =

TABLES

T_OUTTAB = T_BKPF_BSEG_ALV.

  • 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.

ENDIF.

2. Click on PF-STATUS .

Add buttons on the Application Tool bar ...

3. remember 'USER_COMMAND' to the ALV List (see above example)

4. write below form .

FORM USER_COMMAND USING R_UCOMM TYPE SY-UCOMM

RS_SELFIELD TYPE SLIS_SELFIELD.

CASE R_UCOMM.

WHEN C_PRINT.

IF P_FNAME IS INITIAL.

MESSAGE E008(ZFI).

ELSEIF P_SERVER EQ C_X.

G_APP_OR_LOC = C_X.

ENDIF.

PERFORM SAVE_PDF_LOCAL_APP USING P_FNAME

G_APP_OR_LOC

CHANGING G_MESSAGE.

CLEAR G_APP_OR_LOC.

IF G_MESSAGE NE C_E .

MESSAGE S014(ZFI) WITH P_FNAME.

ELSE.

MESSAGE E015(ZFI) WITH P_FNAME.

ENDIF.

WHEN 'NEXT'.

  • PERFORM OUTPUT_ALV.

LEAVE TO SCREEN 0.

WHEN C_CANCEL.

LEAVE PROGRAM.

WHEN C_BACK.

LEAVE TO SCREEN 0.

WHEN C_EXIT .

LEAVE PROGRAM.

ENDCASE.

ENDFORM. "user_command

5. The same thing applicable to ALV Grid also

all the best

Read only

0 Likes
1,026

Srinivas - this is a hijacked thread. See the original date

Rob

Read only

0 Likes
1,026

Gents and Lads, the URL link for the PDF file mentioned on the thread above is a good source for everyone (newbies). Thanks.