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: 

How to change a comment text in a screen without press ENTER automatically ?

0 Kudos

Dear ABAPers,

Could you kindly advice how can I change automatically and without pressing ENTER a selection screen comment when a select-option is changed with the F4 help ?

Here is my code:

TABLES: knvv.

SELECTION-SCREEN BEGIN OF BLOCK b1.

SELECT-OPTIONS: so_kdgrp FOR knvv-kdgrp NO INTERVALS.
SELECTION-SCREEN : COMMENT /1(79) comm5 FOR FIELD so_kdgrp MODIF ID m1.

SELECTION-SCREEN END OF BLOCK bl1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.
IF screen-group1 = 'M1'.
CLEAR comm5.
CLEAR gv_comm5.
CLEAR gt_comm5[].
IF so_kdgrp[] IS NOT INITIAL.
SELECT ktext FROM t151t
INTO TABLE gt_comm5 WHERE kdgrp IN so_kdgrp[] AND spras EQ '4'.
ENDIF.
LOOP AT gt_comm5 INTO gs_comm5.
CONCATENATE gv_comm5 gs_comm5 INTO comm5 SEPARATED BY space.
ENDLOOP.
MODIFY SCREEN.
ENDIF.
ENDLOOP.

This code is setting the text for the customer type which I have chosen at F4 help ONLY when I press ENTER . 😞

Thank you very much .

Kind regards,

Andreea

3 REPLIES 3

former_member226519
Active Contributor

Try function module DYNP_VALUES_UPDATE

0 Kudos

hello Volker,

Thanks for the answer.

I've seen this in other conversations, but i don't know when to trigger this FM. I have tried already in AT SELECTION SCREEN OUTPUT for comment COMM5 as a dynpro field, but nothing did happen unfortunately. This FM does not update values at ENTER neither.

regards,

Andreea

Have you search for some working examples, to see how it is done? It is the right way.