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

BDC in ALV

Former Member
0 Likes
740

Hi, need help in ALV. My task is to display report using ALV with Check box for each record, Com.Code, Doc.No., Doc.Date, Pos.Date & Doc.Hdr.Text fields. In status bar I need 3 extra buttons, for selecting all records, deselecting them & 3rd for calling BDC using call transaction. Thanks in advance........

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
699

Hi,

To get a check box in the ALV, declare a char var of length 1. display it along with the alv report.

to the 3 buttons in the status bar, copy the standard status bar having all these required options to ur program and call this status bar in ur alv function module also declare a form statement with the name of the status bar and within that form use set pf-status 'new status bar name'.

on selecting records from the alv output and clicking on the select button from the status bar

the char field will have a value ='X'. hope u can work with this.

tc

saji

Hi, need help in ALV. My task is to display report using ALV with Check box for each record, Com.Code, Doc.No., Doc.Date, Pos.Date & Doc.Hdr.Text fields. In status bar I need 3 extra buttons, for selecting all records, deselecting them & 3rd for calling BDC using call transaction. Thanks in advance........

3 REPLIES 3
Read only

Former Member
0 Likes
700

Hi,

To get a check box in the ALV, declare a char var of length 1. display it along with the alv report.

to the 3 buttons in the status bar, copy the standard status bar having all these required options to ur program and call this status bar in ur alv function module also declare a form statement with the name of the status bar and within that form use set pf-status 'new status bar name'.

on selecting records from the alv output and clicking on the select button from the status bar

the char field will have a value ='X'. hope u can work with this.

tc

saji

Read only

Former Member
0 Likes
699

HI,

Please check the below code....

FORM USER_COMMAND USING P_UCOMM TYPE SY-UCOMM

P_SELFLD TYPE SLIS_SELFIELD.

DATA : L_REP_MODE. "report mode

CASE P_UCOMM.

Data ref1 type ref to cl_gui_alv_grid.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

E_GRID = ref1.

call method ref1->check_changed_data

WHEN 'BUTTON1'.

loop at itab.

itab-check = 'X'.

Modify itab.

endloop.

WHEN 'BUTTON2'.

loop at itab.

itab-check = ' '.

Modify itab.

endloop.

WHEN 'BUTTON3'.

Implement your logic here(Call Transaction)

WHEN OTHERS.

ENDCASE.

cheers,

Bujji

Read only

Former Member
0 Likes
699

Hi,

I got the solution for this requirement.

We need to design Status bar for ALV as required, for SAP standard buttons, we need not add any functionality, but for user defined checkboxes add logic.

Thanks & regards,

Amit