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

Regarding Reports

Former Member
0 Likes
902

Hi gurus,

I am not an ABAP guy but due to absence of our ABAP staff I was assigned a small work to do. I created a report for purchase requisitions in SQVI. I was stuck at a point where the report needs to be viewed only by the user name who logged in, like there is a field for "Name of personnel who created it" on the initial screen of the report that needs to filled automatically by the name of the user logged in. I Got the program name of the report. After a bit of investigation I found that I have to assign

sy-uname to field ERNAM for that to happen.

But I dont know how to do it in SE38. I am not finding the field names like ERNAM in the source code. Can any one please assist me how to do this.

Let me know if i am not clear about anything.

Thanks in advance

Ravi Boppana

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
877

Hi kartik,

Actually when I am searching I found a place where ERNAM is found.


*----------------------------------------------------------------
*    include /1BCDWB/IQ000000000023SSCR
*----------------------------------------------------------------

selection-screen begin of block qsel
                          with frame title text-s02.
select-options SP$00003 for EBAN-WERKS memory id WRK.
select-options SP$00002 for EBAN-STATU.
select-options SP$00004 for EBAN-EBELN memory id BES.
select-options SP$00005 for EBAN-ERNAM.
selection-screen end of block qsel.
selection-screen begin of block stdsel with frame title text-s03.
parameters %layout type slis_vari modif id lay.
selection-screen end of block stdsel.

Is this what you are asking for or do you want me to paste the complete source code.

Let me know,

Thank you,

Ravi Boppana

Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:15 PM

Hi kartik,

Actually when I am searching I found a place where ERNAM is found.


*----------------------------------------------------------------
*    include /1BCDWB/IQ000000000023SSCR
*----------------------------------------------------------------

selection-screen begin of block qsel
                          with frame title text-s02.
select-options SP$00003 for EBAN-WERKS memory id WRK.
select-options SP$00002 for EBAN-STATU.
select-options SP$00004 for EBAN-EBELN memory id BES.
select-options SP$00005 for EBAN-ERNAM.
selection-screen end of block qsel.
selection-screen begin of block stdsel with frame title text-s03.
parameters %layout type slis_vari modif id lay.
selection-screen end of block stdsel.

Is this what you are asking for or do you want me to paste the complete source code.

Let me know,

Thank you,

Ravi Boppana

Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:15 PM

7 REPLIES 7
Read only

Former Member
0 Likes
877

the field ERNAM must be inside some work area or internal table there u assign it sy-uname.

it wud be better if u can provide us with the code we wud be in better position to help

Read only

Former Member
0 Likes
878

Hi kartik,

Actually when I am searching I found a place where ERNAM is found.


*----------------------------------------------------------------
*    include /1BCDWB/IQ000000000023SSCR
*----------------------------------------------------------------

selection-screen begin of block qsel
                          with frame title text-s02.
select-options SP$00003 for EBAN-WERKS memory id WRK.
select-options SP$00002 for EBAN-STATU.
select-options SP$00004 for EBAN-EBELN memory id BES.
select-options SP$00005 for EBAN-ERNAM.
selection-screen end of block qsel.
selection-screen begin of block stdsel with frame title text-s03.
parameters %layout type slis_vari modif id lay.
selection-screen end of block stdsel.

Is this what you are asking for or do you want me to paste the complete source code.

Let me know,

Thank you,

Ravi Boppana

Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 2:15 PM

Read only

0 Likes
877

>

> Hi kartik,

>

> Actually when I am searching I found a place where ERNAM is found.

>

>


> *----------------------------------------------------------------
> *    include /1BCDWB/IQ000000000023SSCR
> *----------------------------------------------------------------
> 
> selection-screen begin of block qsel
>                           with frame title text-s02.
> select-options SP$00003 for EBAN-WERKS memory id WRK.
> select-options SP$00002 for EBAN-STATU.
> select-options SP$00004 for EBAN-EBELN memory id BES.
> select-options SP$00005 for EBAN-ERNAM.
> selection-screen end of block qsel.
>SP$00005 = 'I'.
>SP$00005-option = 'EQ'.
>SP$00005-low    = sy-uname.
>append SP$00005
> selection-screen begin of block stdsel with frame title text-s03.
> parameters %layout type slis_vari modif id lay.
> selection-screen end of block stdsel.
> 

>

>

> Is this what you are asking for or do you want me to paste the complete source code.

>

> Let me know,

>

> Thank you,

>

> Ravi Boppana

>

i have added 4 line in between tell me if its working

Edited by: kartik tarla on Jan 8, 2009 12:59 AM

Edited by: kartik tarla on Jan 8, 2009 1:02 AM

Read only

faisalatsap
Active Contributor
0 Likes
877

Hi, Ravi

try in the following way,,

Data: ernam like sy-uname.

ernam = sy-uname.

write: ernam.

this may solve you problem.

and Please Replay if you are Still facing Problem.

Kind Regards,

Faisal

Edited by: Faisal Altaf on Jan 8, 2009 12:17 AM

Read only

Former Member
0 Likes
877

Hi,

Actually I am completely new to ABAP, So in which line should I include the values you gave me.

Ravi boppana

Read only

0 Likes
877

Hi,

Sorry, You want to display the user name some where in the report?

Regards,

Faisal

Read only

Former Member
0 Likes
877

Hi kartik,

That worked. Thank You very much.

Ravi boppana