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

MODIFY MULTIPLE SCREEN VALUES IN --> 'AT SELECTION SCREEN ON VALUE REQUEST'

Former Member
0 Likes
815

dear all,

i have created a F4-Help for a filename with


SELECTION-SCREEN BEGIN OF BLOCK 001 WITH FRAME TITLE text-001.
  PARAMETERS: pa_filename(1024) TYPE C,
              pa_filepath(1024) TYPE C.
SELECTION-SCREEN END OF BLOCK 001.

...

AT SELECTION-SCREEN OUTPUT.

...

AT SELECTION SCREEN ON VALUE REQUEST pa_filename.

..
Finally i am splitting the full path into 

lv_filename
lv_filepath

and assigning the values to the screen value
...

MOVE lv_filename TO pa_filename.
MOVE lv_filepath TO pa_filepath.

The problem is that pa_filepath gets not updated on the screen.

What is going wrong?

Thanks a lot in advance.

Regards,

Addi

dear all,

i have created a F4-Help for a filename with


SELECTION-SCREEN BEGIN OF BLOCK 001 WITH FRAME TITLE text-001.
  PARAMETERS: pa_filename(1024) TYPE C,
              pa_filepath(1024) TYPE C.
SELECTION-SCREEN END OF BLOCK 001.

...

AT SELECTION-SCREEN OUTPUT.

...

AT SELECTION SCREEN ON VALUE REQUEST pa_filename.

..
Finally i am splitting the full path into 

lv_filename
lv_filepath

and assigning the values to the screen value
...

MOVE lv_filename TO pa_filename.
MOVE lv_filepath TO pa_filepath.

The problem is that pa_filepath gets not updated on the screen.

What is going wrong?

Thanks a lot in advance.

Regards,

Addi

4 REPLIES 4
Read only

Former Member
0 Likes
661

hi,

AT SELECTION SCREEN ON VALUE REQUEST pa_filename.

use the FM F4_FILENAME after calling that

start-of-selection.

f_name = p_file.

write:/ f_name.

Read only

Former Member
0 Likes
661

You have to use the fm: dynp_values_update.

Regards,

ravi

Read only

Former Member
0 Likes
661

Hi Addi,

Check this link out...This also has the same requirement... You can solve the problem using the FM

DYNP_VALUES_UPDATE.

http://www.sap-img.com/abap/value-request-for-parameter.htm

<b>Close the thread once the problem is solved.</b>

Regards,

SP

Read only

0 Likes
661

Please see this sample program.



report zrich_0001 .


data: dynfields type table of dynpread with header line.
data: return type table of ddshretval with header line.

selection-screen begin of block 001 with frame title text-001.
parameters: pa_fname type localfile,
            pa_fpath type localfile.
selection-screen end of block 001.

at selection-screen output.


at selection-screen on value-request for pa_fname.


  call function 'KD_GET_FILENAME_ON_F4'
       exporting
            static    = 'X'
       changing
            file_name = pa_fname.



  data: lv_filename type rlgrap-filename,
        lv_filepath type rlgrap-filename.

  call function 'SO_SPLIT_FILE_AND_PATH'
       exporting
            full_name     = pa_fname
       importing
            stripped_name = lv_filename
            file_path     = lv_filepath.


  dynfields-fieldname = 'PA_FNAME'.
  dynfields-fieldvalue = lv_filename.
  append dynfields.

  dynfields-fieldname = 'PA_FPATH'.
  dynfields-fieldvalue = lv_filepath.
  append dynfields.

* Update the dynpro values.
  call function 'DYNP_VALUES_UPDATE'
       exporting
            dyname     = sy-cprog
            dynumb     = sy-dynnr
       tables
            dynpfields = dynfields
       exceptions
            others     = 8.

start-of-selection.

Regards,

Rich Heilman