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

Getting OK_CODE in LSMW

Former Member
0 Likes
902

Hi Expert,

I have some problem down here. I want to get value of SY-UCOMM when running LSMW with the options 'Display error only'.

Usually when I'm using foreground processing, The SY-UCOMM value is not empty, but when I using 'Display error only', THE sy-ucomm is empty.

do I have to add something in my code?

ok_code = SY-UCOMM.
IF ok_code = 'UPD'.
XXX
END IF.

Thank you

Rully

3 REPLIES 3
Read only

Former Member
0 Likes
681

>

> Hi Expert,

>

> I have some problem down here. I want to get value of SY-UCOMM when running LSMW with the options 'Display error only'.

-->its not a LSMW anymore , you are running/processing the session , so whats your requirement ?

> Usually when I'm using foreground processing, The SY-UCOMM value is not empty, but when I using 'Display error only', THE sy-ucomm is empty.

>

> do I have to add something in my code?

>

>

ok_code = SY-UCOMM.
> IF ok_code = 'UPD'.
> XXX
> END IF.

>

> Thank you

>

>

>

> Rully

Read only

0 Likes
681

Thanks for your comment..

As you said, I'm processing the session with the option 'Display error only'.

I need to get the value of SY-COMM, which is empty in 'Display error only' mode. But, in 'foreground' mode the SY-COMM filled with 'UPD'.

here's the different between the 2 option :

A) Foreground mode

OK_CODE = SY-COMM. -----------------> The value of OK_CODE is 'UPD'
IF OK_CODE = 'UPD'
   XXX                                     --------------------> this line got executed
END IF

B) Display error only mode

OK_CODE = SY-COMM. -----------------> The value of OK_CODE is empty
IF OK_CODE = 'UPD'
   XXX                                     --------------------> this line not executed.
END IF

thank you.

Rully

Read only

0 Likes
681

Anyone?