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: 

FM popup_to_get_one_value - replacement

rainer_hbenthal
Active Contributor
0 Kudos

Hi,

i'm using fm popup_to_get_one_value to get a value from the user. Unfortunetaly, this fm does not offer a default value, which would make life easier. Is there any fm with the same functionality but offering a default value? Or do i have to write something for my own?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

'POPUP_TO_GET_VALUE' as aparna said this function module will solve your problem.

regards,

prakash reddy .s

5 REPLIES 5

former_member181995
Active Contributor
0 Kudos

POPUP_TO_CONFIRM

set parameter DEFAULT_BUTTON accordingly.

'1' is for the left pushbutton, '2' is for the second pushbutton from left.

0 Kudos

I cannot see how a user can enter a value in this fm

Former Member
0 Kudos

Use FM 'POPUP_TO_GET_VALUE'. This will allow you to display some default value.

Sample code-

CALL FUNCTION 'POPUP_TO_GET_VALUE'

EXPORTING

fieldname = 'ZLOGIN_ID'

tabname = 'ZP3019_LOGINID' ->> for F4 help

titel = 'Enter New Loginid'

valuein = sy-uname ->> Default value

IMPORTING

valueout = answer

EXCEPTIONS

fieldname_not_found = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Regards,

Aparna Gaikwad

Former Member
0 Kudos

'POPUP_TO_GET_VALUE' as aparna said this function module will solve your problem.

regards,

prakash reddy .s

Works only for fields in the data dictionary