Application Development 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: 

Drill Down functionality in ALV Report

Former Member
0 Kudos

Hi Experts,

Gud Afternoon..!!!

My Requirement: I have to display a report in ALV and if user click on vbeln the screen should go to transaction code VA43 for that particular contract.

I used the below code,

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

data: w_vbeln type vbak-vbeln.

IF r_ucomm EQ '&IC1' . " Click value of hot spot

CASE rs_selfield-fieldname.

WHEN 'VBELN'.

w_vbeln = rs_selfield-value.

SET PARAMETER ID 'AUN' FIELD w_vbeln.

CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.

ENDCASE.

ELSEIF r_ucomm EQ 'CANC'

OR r_ucomm EQ 'BACK'

OR r_ucomm EQ 'EXIT'.

LEAVE PROGRAM.

ENDIF.

ENDFORM. " user_command

I am getting error message in VA43 initial screen as "Enter the doc. no"

Plz help me in this. Thanks in Advance..!!!

Regards,

Vadhu...

3 REPLIES 3

Former Member
0 Kudos

hi,

in SE41 and copy the LISTE status of standard pogram RFWERE00 to your Z program.

check this link

thanks

Former Member
0 Kudos

hi

did u check this thread

hope this helps

regards

Aakash Banga

Former Member
0 Kudos

Hi,

Thanks Aakash Banga, Rimpa Abhishek..!!!

I got the solution with help of SDN. The Solution as follows,

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

DATA: w_vbeln TYPE vbak-vbeln.

IF r_ucomm EQ '&IC1' . " Click value of hot spot

CASE rs_selfield-fieldname.

WHEN 'VBELN'.

w_vbeln = rs_selfield-value.

REFRESH t_bdcdata.

CLEAR t_bdcdata.

t_bdcdata-program = 'SAPMV45A'.

t_bdcdata-dynpro = '102'.

t_bdcdata-dynbegin = 'X'.

APPEND t_bdcdata TO t_bdcdata.

CLEAR t_bdcdata.

t_bdcdata-fnam = 'BDC_CURSOR'.

t_bdcdata-fval = 'VBAK-VBELN'.

APPEND t_bdcdata TO t_bdcdata.

CLEAR t_bdcdata.

t_bdcdata-fnam = 'BDC_OKCODE'.

t_bdcdata-fval = '=SUCH'.

APPEND t_bdcdata TO t_bdcdata.

CLEAR t_bdcdata.

t_bdcdata-fnam = 'VBAK-VBELN'.

t_bdcdata-fval = w_vbeln.

APPEND t_bdcdata TO t_bdcdata.

CLEAR t_bdcdata.

t_bdcdata-program = 'SAPMV45A'.

t_bdcdata-dynpro = '4001'.

t_bdcdata-dynbegin = 'X'.

APPEND t_bdcdata TO t_bdcdata.

CALL TRANSACTION 'VA43' USING t_bdcdata MODE 'P' .

CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.

ENDCASE.

ELSEIF r_ucomm EQ 'CANC'

OR r_ucomm EQ 'BACK'

OR r_ucomm EQ 'EXIT'.

LEAVE PROGRAM.

ENDIF.

ENDFORM. " user_command

Thanks & Regards,

Vadhu Duraisami