‎2006 Sep 21 9:48 AM
i have to input fields
if i select value for one filed next filed value has to come automatically.
if i change any of the two input fileds changes also reflect.
please send me the sample code
thanks.
‎2006 Sep 21 2:40 PM
Hi,
Se11
locate cursor on Searchelp inputfield and press F1.
read!
Next press F4
Click on sap application (F6)
choose your application component for which your are familiar with.
And search for an understandable search help.
Kind regards, Rob Dielemans
‎2006 Sep 21 2:40 PM
Hi,
Se11
locate cursor on Searchelp inputfield and press F1.
read!
Next press F4
Click on sap application (F6)
choose your application component for which your are familiar with.
And search for an understandable search help.
Kind regards, Rob Dielemans
‎2006 Sep 21 2:55 PM
Hi Maheedhar,
I suppose your requirement is like this.
"After you have selected a value for the first input field ,when you click on second input field , only values corresponding to the first value selected should come".
If it is like this, you can go through the source code in this link.
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/content.htm
If you want to use listbox for this purpose, you can go through this link for source code.
<b>Award points if found useful.</b>
Regards,
SP.
‎2006 Sep 21 3:24 PM
HI Maheedhar,
check this code... after selecting matnr we need to press enter to get its description automatically...
hope this helps... reward if it helps...
-
tables: mara, makt.
data: begin of itab occurs 0,
matnr like mara-matnr,
end of itab.
data mak like makt-maktx.
DATA : return like ddshretval occurs 0 with header line.
parameters: p_matnr like mara-matnr,
p_maktx like makt-maktx.
Initialization.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.
REFRESH ITAB.
SELECT matnr FROM mara INTO TABLE ITAB.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'MATNR '
dynprofield = 'P_MATNR '
dynpprog = sy-REPID
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = ITAB
return_tab = return.
select single maktx from makt into mak where matnr = return-fieldval.
p_maktx = mak.
p_matnr = return-fieldval.
refresh return.
clear return.
‎2006 Sep 21 3:29 PM
Check the sample code:
&----
*& Module create_dropdown_pp INPUT
&----
text
----
MODULE create_dropdown_pp INPUT.
DATA : ws_valret_pp TYPE help_info-dynprofld ,
i_rettab_pp LIKE ddshretval OCCURS 0 WITH HEADER LINE.
CLEAR: ws_valret_pp, i_aa, i_rettab_pp.
REFRESH: i_aa, i_rettab_pp.
SELECT azrole abname bname_textc azteam
INTO TABLE i_aa
FROM zoroleuid AS a INNER JOIN user_addr AS b
ON abname = bbname
WHERE a~zrole EQ 'PA'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
dynprofield = ws_valret_pp
retfield = 'BNAME'
value_org = 'S'
TABLES
value_tab = i_aa
return_tab = i_rettab_pp
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ELSE.
READ TABLE i_rettab_pp INDEX 1.
READ TABLE i_aa INTO ty_aa WITH KEY
bname = i_rettab_pp-fieldval.
eanl-zzportanlst = ty_aa-bname.
ppdesc = ty_aa-name_textc.
CLEAR : i_dnpfld,
ws_dynpfld.
REFRESH : i_dnpfld.
ws_dyname = 'ZSRO_MASTER_DATA'.
ws_dynumb = '0301'.
ws_dynpfld-fieldname ='PPDESC'.
ws_dynpfld-fieldvalue = ty_aa-name_textc.
APPEND ws_dynpfld TO i_dnpfld.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = ws_dyname
dynumb = ws_dynumb
TABLES
dynpfields = i_dnpfld
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.
ENDIF.
ENDIF.
ENDMODULE. " create_dropdown_pp INPUT