Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

urgent ... help on selection screen

selvi1
Explorer
0 Likes
869

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.

6 REPLIES 6
Read only

Former Member
0 Likes
817

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

Read only

0 Likes
817

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
817

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

Read only

Former Member
0 Likes
817

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>

Read only

Former Member
0 Likes
817

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

Read only

Former Member
0 Likes
817

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