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: 

Selection Screen

Former Member
0 Kudos
280

Hi All,

I have an issue regarding the selection screen.My screen consists of four fields they are plant,sales organization, condition type and  condition table all the four fields are provided with f4 help request.Whenever user selects the particular plant,sales org,cond type or cond table after applying  f4 help on those respective fields as shown in screen shot 2 and clicks on enter along with the selected value into the field of selection screen the user wants the description of the selected field as shown below in screen shot 3.The text should be changing upon the selection of the value.

screen shot 1.

screen shot 2.

screen shot 3.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
220

Hi Chakri,

Use function module DYNP_VALUES_UPDATE under on vales-request event.

Refer below link.

Thanks,

Ashok.

11 REPLIES 11

VenkatRamesh_V
Active Contributor
0 Kudos
220

Hi Chakri,

Are you using  Module pool ?.

Regards,

Venkat.

0 Kudos
220

Hi Venkat,

No it is Executable Program.

Regards,

Chakradhar.

Former Member
0 Kudos
220

Add description fields that are determined by the contents of the initial fields and display only.

Neal

0 Kudos
220

Hi Neal,

Thanks for your reply.I did not get you exactly can you elaborate it.

Regards,

Chakradhar.

Former Member
0 Kudos
220

Hi

Add comments to you selection screen:

SELECTION-SCREEN BEGIN OF LINE.

PARAMETER: p_so TYPE vkorg.

SELECTION-SCREEN COMMENT (32) comm1.

SELECTION-SCREEN END OF LINE.

Then, in the SELECTION-SCREEN OUTPUT event update the comments with the text value of the selected F4 values.

regards

0 Kudos
220

Hi Mateusz,

Thanks for your reply.I changed the my selection screen as you mentioned above.while apllying f4 help I am getting the only field value yet but not text.Can you provide the sample code regarding how to slove my issue.Thanks in Advance.

Chakradhar.

VenkatRamesh_V
Active Contributor
0 Kudos
220

Hi Chakri,

Try this, hope it will helpful.

TABLES: ska1,
         skat.


SELECTION-SCREEN BEGIN OF BLOCK b5 WITH FRAME TITLE text-001 .
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(12FOR FIELD gl.
parameters gl TYPE ska1-saknr.
SELECTION-SCREEN COMMENT 30(12FOR FIELD txt.
PARAMETERS txt TYPE skat-txt20.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b5.


AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'TXT'.
SCREEN-INPUT = 0.
SCREEN-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.


AT SELECTION-SCREEN ON  GL.
SELECT SINGLE TXT20 FROM SKAT INTO TXT WHERE SAKNR = GL.



Regards,

Venkat.

Former Member
0 Kudos
221

Hi Chakri,

Use function module DYNP_VALUES_UPDATE under on vales-request event.

Refer below link.

Thanks,

Ashok.

0 Kudos
220

Hi Ashok,

Thanks for your reply. The link which you specified is unable to resolve my issue.

Regards,

Chakradhar.

0 Kudos
220

Hi Chakri,

Can you please try this sample code once.

data : lt_skat like table of skat,
         ls_skat like skat,
        S_RETURN_TAB  TYPE DDSHRETVAL,
        I_RETURN_TAB TYPE STANDARD TABLE OF DDSHRETVAL.

DATA:W_DYNPFIELDS TYPE DYNPREAD,
         I_DYNPFIELDS LIKE STANDARD TABLE OF DYNPREAD.

SELECTION-SCREEN BEGIN OF BLOCK b5 WITH FRAME TITLE text-001 .
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(12) text-002." FOR FIELD gl.
parameters gl TYPE ska1-saknr.
SELECTION-SCREEN COMMENT 30(12text-003."FOR FIELD txt.
PARAMETERS txt TYPE skat-txt20.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b5.


AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-NAME = 'TXT'.
SCREEN-INPUT = 0.
SCREEN-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.


*AT SELECTION-SCREEN ON  GL.
*SELECT SINGLE TXT20 FROM SKAT INTO TXT WHERE SAKNR = GL.

at selection-screen on value-request for GL.

   select * from skat into table lt_skat up to 100 rows.

   CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      RETFIELD    = 'SAKNR'   "field name on f4 help window
      DYNPPROG    = SY-REPID
      DYNPNR      = SY-DYNNR
      DYNPROFIELD = 'GL' "Screen field name
      VALUE_ORG   = 'S'
    TABLES
      VALUE_TAB   = lt_skat
      RETURN_TAB  = I_RETURN_TAB.

   READ TABLE I_RETURN_TAB INTO S_RETURN_TAB  INDEX 1.

   if sy-subrc eq 0.
      gl = S_RETURN_TAB-FIELDVAL.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input         gl
       IMPORTING
         OUTPUT        = gl
                .

     read table lt_skat into  ls_skat  with key SAKNR = gl.

  IF SY-SUBRC = 0.
    W_DYNPFIELDS-FIELDNAME    = 'TXT'.
    W_DYNPFIELDS-FIELDVALUE   = ls_skat-TXT20.
    APPEND W_DYNPFIELDS TO I_DYNPFIELDS.
    CLEAR W_DYNPFIELDS.
    "DYNP_VALUES_UPDATE
    CALL FUNCTION 'DYNP_VALUES_UPDATE'
      EXPORTING
        DYNAME     = SY-REPID
        DYNUMB     = SY-DYNNR
      TABLES
        DYNPFIELDS = I_DYNPFIELDS.
  ENDIF.

   endif.


Hopes this helps you.



Thanks,

Ashok.

0 Kudos
220

Hi Ashok,

Thanks for your reply.I will try it.Thinking that it will be working fine.

Chakradhar.