2009 Jan 07 7:06 PM
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
2009 Jan 07 7:14 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
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
2009 Jan 07 7:11 PM
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
2009 Jan 07 7:14 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
2009 Jan 07 7:28 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. >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
2009 Jan 07 7:15 PM
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
2009 Jan 07 7:17 PM
Hi,
Actually I am completely new to ABAP, So in which line should I include the values you gave me.
Ravi boppana
2009 Jan 07 7:22 PM
Hi,
Sorry, You want to display the user name some where in the report?
Regards,
Faisal
2009 Jan 07 9:28 PM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |