‎2007 Sep 24 7:35 AM
HI EXPERTS,
IN MY PROGRAM I AM USING MATCHCODE OBJECT h_t042z WHICH IS FOR PAYMENT METHOD, PROBLEM IS THE HUGE LIST COMES WHEN I PRESS F4. I WANT TO MAKE COUNTRY 'IN' AS DEFAULT AND LET THE USERS TO VIEW ONLY PAYMENT METHOD OF 'IN'.
HOW TO DO THAT IN ABAP PROGRAM BECAUSE THIS IS A SAP STANDARD HELP.
PLS REPLY.
‎2007 Sep 24 7:42 AM
hi
sonali
parameters: matnr like mara-matnr match code object zobj
just double click on zobj u will get corresponding search help window
and give the parameters according to ur requirement
regards
Nagesh.Paruchuri
‎2007 Sep 24 7:48 AM
HI NAGESH,
BUT THIS IS SAP STANDARD HELP, CHANGES DONE IN THIS HELP WILL REFLECT EVERYWHERE IN TRANSACTIONS WHERE IT IS ATTACHED. I DONT WANT TO DO THAT.
IS THERE ANY SYNTAX BY WHICH I CAN CODE IN MY PROGRAM.
‎2007 Sep 24 8:42 AM
Sonali,
If u don't want to create a new search help, please make use of the following code
REPORT ztest.
PARAMETERS: p_zlsch type t042z-ZLSCH.
DATA:
begin of fs_pay_method,
zlsch type t042z-zlsch,
text1 type t042z-text1,
end of fs_pay_method,
t_pay_method LIKE STANDARD TABLE OF fs_pay_method,
w_repid TYPE sy-repid,
w_dynnr TYPE sy-dynnr.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_zlsch.
SELECT zlsch
text1
from t042z
into table t_pay_method
where land1 = 'IN'.
IF sy-subrc EQ 0.
w_repid = sy-repid.
w_dynnr = sy-dynnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'ZLSCH'
PVALKEY = ' '
DYNPPROG = w_repid
DYNPNR = w_dynnr
DYNPROFIELD = 'P_ZLSCH'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
tables
value_tab = t_pay_method
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
‎2007 Sep 24 8:34 AM
Sonali,
copy the standard search help h_t042z as zh_t042z and assign the default value(extreme right column) to the field <b>'LAND1</b>' as <b>'IN'</b> and remove the Import check box for the same field and declare the payment method in ur program with the reference to the new search help created.
<b>PARAMETERS: p_zlsch type t042z-ZLSCH matchcode object zh_t042z.</b>