2014 Aug 22 1:13 PM
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.
2014 Aug 22 2:57 PM
2014 Aug 22 1:16 PM
2014 Aug 22 1:30 PM
2014 Aug 22 1:21 PM
Add description fields that are determined by the contents of the initial fields and display only.
Neal
2014 Aug 22 1:31 PM
Hi Neal,
Thanks for your reply.I did not get you exactly can you elaborate it.
Regards,
Chakradhar.
2014 Aug 22 1:37 PM
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
2014 Aug 22 2:08 PM
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.
2014 Aug 22 2:09 PM
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(12) FOR FIELD gl.
parameters gl TYPE ska1-saknr.
SELECTION-SCREEN COMMENT 30(12) 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.
Regards,
Venkat.
2014 Aug 22 2:57 PM
2014 Aug 22 4:23 PM
Hi Ashok,
Thanks for your reply. The link which you specified is unable to resolve my issue.
Regards,
Chakradhar.
2014 Aug 22 4:59 PM
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(12) text-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.
2014 Aug 23 6:20 AM
Hi Ashok,
Thanks for your reply.I will try it.Thinking that it will be working fine.
Chakradhar.