12-11-2007 12:25 PM
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
12-11-2007 12:27 PM
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
01-31-2011 10:10 AM