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

Change system field value

Former Member
0 Likes
2,160

Hi all,

Can we change the system field value's. i want to change the user name field

(sy-uname).

Rajesh.

1 ACCEPTED SOLUTION
Read only

SantoshKallem
Active Contributor
0 Likes
1,435

u can do it in debugging mode

Hi all,

Can we change the system field value's. i want to change the user name field

(sy-uname).

Rajesh.

8 REPLIES 8
Read only

SantoshKallem
Active Contributor
0 Likes
1,436

u can do it in debugging mode

Read only

Former Member
0 Likes
1,435

Hi,

U can change in ur program. But if u call any standard program after changing the value, it may reset it original user name.

Rgds,

Prakash

Read only

Former Member
0 Likes
1,435

you can change by programming for your internal session only if any other internal session opens means sy-uname will take the default value.

regards

shiba dutta

Read only

Former Member
0 Likes
1,435

U can change it in Debugging .. but only for a single step ..

If U press F5 , F6 , F7 or F8 the value changes/refreshed with the original value .

Even if U hardcode the value in the program

say

SY-UNAME = 'RAJ'.

After this step is passed it will be again assigned to the original/initial value .

Read only

Former Member
0 Likes
1,435

Iam changing the value before i pass the value to a standard BAPI, which is not possible.

Thanks to all,

Rajesh.

Read only

Former Member
0 Likes
1,435

Iam changing the value before i pass the value to a standard BAPI, which is not possible.

Read only

0 Likes
1,435

u can not adn u shud not change the system field values..

if u will change the sy fields in debug mode like say sy-uname then it wil get chnaged but when the processing will come to very next line ,it will automatically change the sy-uname value to the current value..

wht u can do is u can create a variable like sy-uname and in that variable assign the required unam value and pass this variable to the BApi ..instead of sy-uname.

amit

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,435

Look at this thread