on 04-03-2009 9:43 AM
Hi all,
I want to display user name using subroutines in script..my code is not working.. pls check and let me know the correct way.
/: PERFORM get_user IN PROGRAM ZTEST USING &UNAME&
/: ENDPERFORM.
/: &UNAME&.
REPORT ZTEST.
FORM GET_USER USING UNAME.
UNAME = SY-UNAME.
ENDFORM.
thanks
mallika
Hi,
If FROM_OBJ is the form being called then it should look like:
FORM get_obj TABLES in_tab STRUCTURE itcsy
out_tab STRUCTURE itcsy.
Since you know the parameters you are passing, use that as an index to retrieve/update the corresponding value of the variable.
e..g READ TABLE in_tab Index 1.
Similarly use 'Modify' to update the value of the variable you are interested in out_tab.
I hope this helps,
Regards
Raju Chitale
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try like below in FORM and PROGRAM...
/: PERFORM get_user IN PROGRAM ZTEST
/: CHANGING &UNAME&
/: ENDPERFORM.
/: &UNAME&.
In Program:
FORM get_user outtab STRUCTURE itcsy.
READ TABLE outtab with key name = 'UNAME'.
outtab-value = sy-uname.
MODIFY OUTTAB transporting ...
ENDFORM.
Hope it helps!!
Regards,
Pavan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
the is a problem with the syntax, the correct syntax is
/: PERFORM get_user IN PROGRAM ZTEST
/: USING &UNAME&
/: ENDPERFORM.
/: &UNAME&.
this will resolve your problem
Regard,
Jaya ramkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.