‎2007 Sep 26 7:26 AM
Hi
i have a matnr and mtart in a selection screen
after selecting matnr i need to populate mtart automatically without pressing enter button
i tried this one
tables : mara.
parameter : p_matnr like mara-matnr.
parameter : p_mtart like mara-mtart.
at selection-screen output.
select single mtart from mara into p_mtart where matnr eq p_matnr.
but this need enter button, i tried through search helps it is executing in se11 perfectly but if i attach that one in program it is not comming
thanks,
‎2007 Sep 26 7:31 AM
hi,
instead of at selection-screen output you should choose initialization event for the same
‎2007 Sep 26 7:37 AM
hi
good
This is a sample program.
TABLES: trdir.
PARAMETERS: name TYPE trdir-name.
SELECT-OPTIONS: subc FOR trdir-subc NO INTERVALS.
AT SELECTION-SCREEN.
DATA: subc1 TYPE trdir-subc.
SELECT SINGLE subc FROM trdir INTO subc1 WHERE name = name.
subc-sign = 'I'.
subc-option = 'EQ'.
subc-low = subc1.
APPEND subc.
After entering a program name in parameter and press enter the value will be updated in the select-option.
thanks
mrutyun^
‎2007 Sep 26 7:42 AM
i dont want to press enter button
after selecting a value in a parameter then immediatley i want to populate second para value without any interaction
‎2007 Sep 26 7:53 AM
‎2007 Sep 26 7:53 AM
 Hi
 Maybe you can use the class of cl_gui_timer .
‎2007 Sep 26 8:02 AM
Hi,
this is my idea:
at selection-screen on value-request for NAME.
*Here you can use without PAI/PBO (Enter) the FMs:
*DYNP_VALUES_READ to read the NAME value from the screen
*and
*DYNP_VALUES_UPDATE to write your new values to the other field
Hope it can help a little bit..
Regards,
Gianpietro
‎2007 Sep 26 7:40 AM
Hi,
You can write your own F4 for the Material code field and when assigning the selected Material code back to the field, you can also select the material type for the selected material code and assign it back to the screen field.
‎2007 Sep 26 8:01 AM
Hi
AT SELECTION-SCREEN
events will be triggered after any action you do on the screen
so with out pressing enter it won't take any value
or elase you can do one thing
enter the values
and click on execute button then automatically that next field value will be inserted and executes perfectly
AT SELECTION-SCREEN events will be triggered only when some perticular action to be done on the selection screen
reward if usefull
‎2007 Sep 26 8:16 AM
REPORT ztest.
DATA:
t_ret_table LIKE STANDARD TABLE OF ddshretval,
fs_ret_table TYPE ddshretval,
t_dynp_fields LIKE STANDARD TABLE OF dynpread,
fs_dynp_fields TYPE dynpread.
PARAMETER : p_matnr LIKE mara-matnr.
PARAMETER : p_mtart LIKE mara-mtart MEMORY ID mta.
AT SELECTION-SCREEN OUTPUT.
*select single mtart from mara into p_mtart where matnr eq p_matnr.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'MARA'
fieldname = 'MATNR'
searchhelp = 'MAT1'
SHLPPARAM = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_MATNR'
STEPL = 0
VALUE = ' '
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
SUPPRESS_RECORDLIST = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
SELECTION_SCREEN = ' '
IMPORTING
USER_RESET =
TABLES
return_tab = t_ret_table
EXCEPTIONS
FIELD_NOT_FOUND = 1
NO_HELP_FOR_FIELD = 2
INCONSISTENT_HELP = 3
NO_VALUES_FOUND = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE t_ret_table INTO fs_ret_table INDEX 1.
CLEAR t_dynp_fields.
fs_dynp_fields-fieldname = 'P_MATNR'.
fs_dynp_fields-fieldvalue = fs_ret_table-fieldval.
APPEND fs_dynp_fields TO t_dynp_fields.
clear fs_dynp_fields.
fs_dynp_fields-fieldname = 'P_MTART'.
SELECT SINGLE mtart FROM mara INTO fs_dynp_fields-fieldvalue WHERE matnr EQ fs_ret_table-fieldval.
fs_dynp_fields-fieldvalue =
APPEND fs_dynp_fields TO t_dynp_fields.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = t_dynp_fields
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
UNDEFIND_ERROR = 7
OTHERS = 8
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
AT SELECTION-SCREEN.
START-OF-SELECTION.