04-24-2019 1:24 PM
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
04-24-2019 1:51 PM
04-24-2019 2:48 PM
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
04-24-2019 5:57 PM
Have you search for some working examples, to see how it is done? It is the right way.