2007 Apr 23 12:14 PM
hai all,
my requirement is that in the selection screen.
if i choses input data(f4 help for) one field.
automatically i want on other input fields to be filled with data.
how to do this.
please help me.
thanks in advance.
hai all,
my requirement is that in the selection screen.
if i choses input data(f4 help for) one field.
automatically i want on other input fields to be filled with data.
how to do this.
please help me.
thanks in advance.
2007 Apr 23 12:18 PM
hi,
chk out the sample program below
SELECTION-SCREEN BEGIN OF BLOCK process WITH FRAME TITLE text-001.
parameter: matnr like mara-matnr.
parameter: ernam like mara-ernam.
SELECTION-SCREEN END OF BLOCK process.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
if matnr is not initial.
select single ernam
from mara
into ernam
where matnr eq matnr.
endif.
MODIFY SCREEN.
ENDLOOP.
regards,
Navneeth.K
2007 Apr 23 12:24 PM
hi,
In the above code pasted base on the value selected for matnr using f4 help its corresponding ernam value is displayed in the folowing ernam select option.
key points:
1> at selection-screen event
2> loop at screen.
endloop.
just paste my above code in a new program.
hope it solves your query.
regards,
Navneeth.K
2007 Apr 23 12:21 PM
In the <b>AT SELECTION SCREEN OUTPUT ON VALUE REQUEST</b> selection, use the FM <b>F4IF_INT_TABLE_VALUE_REQUEST</b> to get the selected value, then using the result and FM <b>DYNP_VALUES_UPDATE</b> you can update other fields on screen.
Sample :
* Request for values
CALL function'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'ST_NAME'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'ST_NAME'
value_org = 'S'
tables
value_tab = temp_itab.
* Update the dynpro values.
field_value-fieldname = 'other field'.
field_value-fieldvalue = 'Some Value'.
APPEND field_value TO dynpro_values .
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
TABLES
dynpfields = dynpro_values
EXCEPTIONS
OTHERS = 8.Regards
2007 Apr 23 12:26 PM
Please check the <b>tables</b> parameter <b>DYNPFLD_MAPPING</b> of the function module <b>F4IF_INT_TABLE_VALUE_REQUEST</b>, u can achieve ur reqmt without using the fm <b>'DYNP_VALUES_UPDATE'</b>
2007 Apr 23 12:29 PM
Hi Selvi,
Did the above piece of code solve your problem. U want to fill the value of other fields from where internal table or database table..
regards,
Navneeth.K
2007 Apr 23 12:49 PM
Check this ..
TABLES: tstc.
SELECTION-SCREEN BEGIN OF BLOCK process.
SELECT-OPTIONS: tcode FOR tstc-tcode,
pgmna FOR tstc-pgmna,
dypno FOR tstc-dypno.
SELECTION-SCREEN END OF BLOCK process.
AT SELECTION-SCREEN OUTPUT.
LOOP AT tcode.
SELECT SINGLE pgmna dypno
FROM tstc
INTO CORRESPONDING FIELDS OF tstc
WHERE tcode = tcode-low.
pgmna-sign = 'I'.
pgmna-option = 'EQ'.
pgmna-low = tstc-pgmna.
APPEND pgmna.
dypno-sign = 'I'.
dypno-option = 'EQ'.
dypno-low = tstc-dypno.
APPEND dypno.
ENDLOOP.
This will work......
Message was edited by:
santhosh ds