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

Dynamic changed text on selection screen

Former Member
0 Likes
731

I wanna to implement on the selection screen (1000) such functionality as you can see in transaction SO10.

In this transaction when U select TextID and then press ENTER text relevant to TextID is changing.

How to implement this on selection screen?

Thanks in advance,

Tomek

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
658

This may give some idea.



REPORT ZRICH_0002 .


selection-screen begin of block b1 with frame title text-001 .
selection-screen begin of line.
<b>selection-screen comment 1(20) text_com for field p_expl.</b>selection-screen position 33.
parameters: p_expl as checkbox.
selection-screen end of line.
selection-screen end of block b1.


<b>at selection-screen output.

text_com = 'This is the text'.  " you can change this at runtime.</b>

Regards,

Rich Heilman

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
659

This may give some idea.



REPORT ZRICH_0002 .


selection-screen begin of block b1 with frame title text-001 .
selection-screen begin of line.
<b>selection-screen comment 1(20) text_com for field p_expl.</b>selection-screen position 33.
parameters: p_expl as checkbox.
selection-screen end of line.
selection-screen end of block b1.


<b>at selection-screen output.

text_com = 'This is the text'.  " you can change this at runtime.</b>

Regards,

Rich Heilman

Read only

Former Member
0 Likes
658

hi,

check this..

hope this helps..

Reward to all helpful answers.

tables: mara, makt.

data: begin of itab occurs 0,

matnr like mara-matnr,

end of itab.

data : begin of btab occurs 0,

maktx like makt-maktx,

end of btab.

data mak like makt-maktx.

DATA : return like ddshretval occurs 0 with header line.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(20) text FOR FIELD p_matnr.

parameters: p_matnr like mara-matnr.

SELECTION-SCREEN COMMENT 40(35) text1.

SELECTION-SCREEN END OF LINE.

Initialization.

text = 'Material Number'.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.

REFRESH ITAB.

SELECT matnr FROM mara INTO TABLE ITAB.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'MATNR '

dynprofield = 'P_MATNR '

dynpprog = sy-REPID

dynpnr = sy-dynnr

value_org = 'S'

TABLES

value_tab = ITAB

return_tab = return.

select single maktx from makt into mak where matnr = return-fieldval.

p_matnr = return-fieldval.

text1 = mak.

refresh return.

clear return.

Read only

Former Member
0 Likes
658

Hi,

Try this ..

TABLES: ttxit.

SELECTION-SCREEN BEGIN OF LINE.

SELECTION-SCREEN COMMENT 1(6) v_text FOR FIELD p_textid.

PARAMETERS: p_textid TYPE ttxit-tdid.

SELECTION-SCREEN COMMENT 13(35) v_text1.

SELECTION-SCREEN END OF LINE.

INITIALIZATION.

v_text = 'TextID'.

v_text1 = ' '.

AT SELECTION-SCREEN OUTPUT.

IF NOT p_textid IS INITIAL.

SELECT SINGLE * FROM ttxit

WHERE tdspras = sy-langu

AND tdobject = 'TEXT'

AND tdid = p_textid.

IF sy-subrc = 0.

v_text1 = ttxit-tdtext.

ENDIF.

ENDIF.

Thanks,

Naren

Read only

Former Member
0 Likes
658

hi,

When you give a material as input and press enter, we get the material description to the right of that parameter.

selection-screen begin of block b1.
selection-screen begin of line.
parameters: p_matnr like mara-matnr.
selection-screen comment  30(10) v_maktx.
selection-screen end of line.
selection-screen end of block b1.
at selection-screen output.

select single maktx from makt into v_maktx
         where matnr = p_matnr and spras = 'E'.
if sy-subrc <> 0.
 clear v_maktx.
endif.

at selection-screen.

Regards,

Sailaja.

Read only

Former Member
0 Likes
658

Hi,

use FM read_text,create_text,edit_text,save_text.

Regards

amole