Application Development 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: 

update the selection screen field

Former Member
0 Kudos

Hi ,

I have a requirement where these fields are there is in the selection screen.

company code

year

period

once these fields are entered by the user , there is another field file

which has to be populated with

/var/common_onep/<Company Code>/co/esprit/io/<year>/<period>.

here company code year and period should be populated from the other fields.

Regards,

4 REPLIES 4

Former Member
0 Kudos

Hello

Try like this:


PARAMETERS: P_BUKRS LIKE T001-BUKRS.
PARAMETERS: P_GJAHR LIKE BSEG-GJAHR.
PARAMETERS: P_PERIO LIKE SY-DATUM .
PARAMETERS: FILE LIKE RLGRAP-FILENAME.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.
IF SCREEN-NAME = 'FILE'.
  CONCATENATE '/var/common_onep/'
  P_BUKRS '/co/esprit/io/' P_GJAHR '/' P_PERIO INTO FILE.
ENDIF.
ENDLOOP.
MODIFY SCREEN.

After fill first 3 parameters set curcor on parameter FILE and pres Enter.

0 Kudos

Hi,

Can we update the p_file field without pressing enter because when i press enter some other field also gets updated which should not happen.

Rgds,

0 Kudos

Hi Sanjay, <li> To update FILE field with other field information without pressing, not possible. But you can get those fields information by pressing F4 on FILE field.

REPORT  ztest_notepad.

 DATA:it_dynpfields TYPE STANDARD TABLE OF dynpread WITH HEADER LINE.
 PARAMETERS: p_bukrs LIKE t001-bukrs.
 PARAMETERS: p_gjahr LIKE bseg-gjahr.
 PARAMETERS: p_perio LIKE sy-datum .
 PARAMETERS: file LIKE rlgrap-filename.

 AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
   it_dynpfields-fieldname = 'P_BUKRS'.
   APPEND it_dynpfields.
   CLEAR  it_dynpfields.
   it_dynpfields-fieldname = 'P_GJAHR'.
   APPEND it_dynpfields.
   CLEAR  it_dynpfields.
   it_dynpfields-fieldname = 'P_PERIO'.
   APPEND it_dynpfields.
   CLEAR  it_dynpfields.

   CALL FUNCTION 'DYNP_VALUES_READ'
     EXPORTING
       dyname     = sy-repid
       dynumb     = sy-dynnr
     TABLES
       dynpfields = it_dynpfields.
   READ TABLE it_dynpfields WITH KEY fieldname = 'P_BUKRS'.
   p_bukrs = it_dynpfields-fieldvalue.
   READ TABLE it_dynpfields WITH KEY fieldname = 'P_GJAHR'.
   p_gjahr = it_dynpfields-fieldvalue.
   READ TABLE it_dynpfields WITH KEY fieldname = 'P_PERIO'.
   p_perio = it_dynpfields-fieldvalue.
   CONCATENATE '/var/common_onep/'
               p_bukrs '/co/esprit/io/' p_gjahr '/' p_perio
          INTO file.
Thanks Venkat.O

Former Member
0 Kudos

This message was moderated.