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: 

Call transaction through ALV

Former Member
0 Kudos

Dear All,

when i am calling transaction VA32 then it is taking same number again and again.

please chk code below:

*******************************************************************************

form sub_user_command1 using V_UCOMM1 like sy-ucomm

v_selfield1 type slis_selfield.

case V_UCOMM1.

when '&IC1'.

if v_selfield1-fieldname = 'VBELN'.

clear it_kun.

clear wa_kun.

read table it_kun into wa_kun index v_selfield1-tabindex.

if sy-subrc = 0.

set parameter id 'AUN' field wa_kun-vbeln.

call transaction 'VA32' AND SKIP FIRST SCREEN.

endif.

clear V_UCOMM1.

clear wa_kun.

endif.

endcase.

*clear V_UCOMM1.

*set parameter id: 'AUN' field SPACE.

*Clear 'AUN' with space in byte mode. "id 'AUN'.

endform.

Thanks in Advance,

Ashish Gautam

2 REPLIES 2

Former Member
0 Kudos

hi,

u using internal table without header line?

otherwise u can try like this

FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.

CLEAR fcat1.

CASE u_com.

WHEN '&IC1'.

<b> READ TABLE itab INDEX sel_field-tabindex.</b>

IF sy-subrc = 0.

t_mat = itab-matnr.

SET PARAMETER ID 'MAT' FIELD t_mat.

CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.

ENDIF.

ENDCASE.

ENDFORM. "user_command

Former Member
0 Kudos

it's working now.

Thanks.