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

Passing value as parameter to 'call function'

Former Member
0 Likes
646

Hi,

CALL FUNCTION 'TH_POPUP'

EXPORTING

client = '100'

user = 'XXXXXX'

MESSAGE = 'Hello! u got END SESSION'

  • MESSAGE_LEN = 0

  • CUT_BLANKS = ' '

EXCEPTIONS

user_not_found = 1

OTHERS = 2.

The above program pops up a new window in another user system from a user system. xxxxx is that particular userID.

I want to enter the userID after executing and userID should be passed to call function 'TH_POPUP' and show the result.

I tried using 'PARAMETER' statement. It did not work.

Thanks,

vbsigate.

3 REPLIES 3
Read only

Former Member
0 Likes
567

Hi,

What i understand is you want to enter the user name on selection screen.

This is the program and it works fine.

(May be in your program the parameter was not defined correctly as type sy-uname).



report abc.

PARAMETERS : p_user type sy-uname obligatory.

CALL FUNCTION 'TH_POPUP'
  EXPORTING
    CLIENT               = sy-mandt
    USER                 = p_user
    MESSAGE              = 'Hello! u got END SESSION'
*   MESSAGE_LEN          = 0
*   CUT_BLANKS           = ' '
 EXCEPTIONS
   USER_NOT_FOUND       = 1
   OTHERS               = 2
          .

regards,

amit m.

Read only

Former Member
0 Likes
567

Hi vbsigate ,

The way you have called function module is perfect. Whats the Issue ?

Regards,

nikhil

Read only

Former Member
0 Likes
567

Hi,

Thanks a lot Amit....its working fine.

Nikhil... the point is I want to enter the userID of my choice on screen and at same time learn how to pass parameters to function.

Regards,

VBS