‎2006 Nov 22 2:26 AM
I have to pass the parameter to the orther t-code, and initialize some select option. i use the
" SET PARAMETER ID 'WRK' FIELD it_list-werks.", but it just can do the single selct option. who can tell me how to do it.
the code i write is
"FORM process_user_command USING in_ucomm LIKE sy-ucomm
in_selfield TYPE slis_selfield.
CLEAR it_list.
CASE in_ucomm.
WHEN '&IC1' OR '\&IC1'.
READ TABLE it_list INDEX in_selfield-tabindex INTO it_list.
SET PARAMETER ID 'BWA' FIELD 's_bwart'.
SET PARAMETER ID 'MAT' FIELD it_list-matnr.
SET PARAMETER ID 'WRK' FIELD it_list-werks.
SET PARAMETER ID 'LAG' FIELD it_list-lgort.
CALL TRANSACTION 'MB51' ." AND SKIP FIRST SCREEN .
ENDCASE.
CLEAR it_list.
ENDFORM. "process_user_command
‎2006 Nov 22 2:29 AM
Change the statement SET PARAMETER ID 'BWA' FIELD 's_bwart'. to
SET PARAMETER ID 'BWA' FIELD 'S_BWART-LOW'.
~Suresh
‎2006 Nov 22 2:29 AM
Change the statement SET PARAMETER ID 'BWA' FIELD 's_bwart'. to
SET PARAMETER ID 'BWA' FIELD 'S_BWART-LOW'.
~Suresh
‎2006 Nov 22 2:36 AM
I guess we have to remove the quotes as well.
SET PARAMETER ID 'BWA' FIELD <b>S_BWART-LOW</b>.
Kind Regards
Eswar
‎2006 Nov 22 2:51 AM
thanks
i have get the right answer
"
INITIALIZATION.
MOVE: 'I' TO s_bwart-sign,
'BT' TO s_bwart-option,
'321' TO s_bwart-low,
'322' TO s_bwart-high.
APPEND s_bwart.
FORM process_user_command USING in_ucomm LIKE sy-ucomm
in_selfield TYPE slis_selfield.
RANGES: r_werks FOR mard-werks,
r_matnr FOR mara-matnr,
r_lgort FOR mard-lgort.
CLEAR it_list.
CASE in_ucomm.
WHEN '&IC1' OR '\&IC1'.
CLEAR: wa_list.
REFRESH:r_werks,r_matnr,r_lgort.
READ TABLE it_list INDEX in_selfield-tabindex INTO wa_list.
r_werks-sign = 'I'.
r_werks-option = 'EQ'.
r_werks-low = wa_list-werks.
APPEND r_werks.
r_matnr-sign = 'I'.
r_matnr-option = 'EQ'.
r_matnr-low = wa_list-matnr.
APPEND r_matnr.
r_lgort-sign = 'I'.
r_lgort-option = 'EQ'.
r_lgort-low = wa_list-lgort.
APPEND r_lgort.
SUBMIT rm07docs
WITH werks IN r_werks
WITH matnr IN r_matnr
WITH bwart IN s_bwart
WITH lgort IN r_lgort
AND RETURN .
ENDCASE.
CLEAR it_list.
ENDFORM. "process_user_command
Message was edited by:
luo liuqiang
‎2006 Nov 22 3:09 AM
Hi Luo
For your info, whether you are using SUBMIT or CALL Transaction by populating Parameter-ID's, Please make sure that you are clearing the data for other fields which have parameter-id's orelse the data extracted can be restricted.
Eg: Customer, Vendor, Batch...
Kind Regards
Eswar
‎2006 Nov 22 3:19 AM