2009 Mar 02 1:23 PM
HI SAP,
i have requirment where i need to modify the sap standard report, where i need to add an extra column called AUTHGRP
The data lies in table :VICNCN -Field - authgrp.
i need to pull the data where authgrp = where authgrp = 'R700'
AND authgrp = 'R710'
AND authgrp = 'R720'
AND authgrp = 'R721'
AND authgrp = 'R730'
AND authgrp = 'R740'.
how can i pull the data through sql statement please help me out
2009 Mar 02 1:28 PM
To change the sap standars report you need access key!
In the report find out the authorization checking part (It may be in the event at selection screen)
and add ur selection creteria also in where condition.
Be careful while doing this one.
2009 Mar 02 2:02 PM
Hi,
Check if there is any enhancement point to insert the code for authorization group..
To check enhancement point -Program(SE38)->Menu->Edit->Enhancement Options->Show implicit enhancements...
If not, then you need to have the access key to modify...
Regards
Shiva
2009 Mar 02 2:20 PM
Hi Laya,
First define the ranges for Authgrp as below:
ranges:
r_authgrp for vicncn-authgrp.
* Set Authgrp RANGE
clear r_authgrp. refresh r_authgrp.
r_authgrp = 'IEQR700'. append r_authgrp. clear r_authgrp.
r_authgrp = 'IEQR710'. append r_authgrp. clear r_authgrp.
r_authgrp = 'IEQR720'. append r_authgrp. clear r_authgrp.
r_authgrp = 'IEQR721'. append r_authgrp. clear r_authgrp.
r_authgrp = 'IEQR730'. append r_authgrp. clear r_authgrp.
r_authgrp = 'IEQR740'. append r_authgrp. clear r_authgrp.
*select query
select single * from vicncn where authgrp in r_authgrp.
Regards,
SB.
2009 Mar 02 2:31 PM
Hi
If you are looking for the sql query to fetch data from VICNCN table based on the condition given by you then you can use the following code :
DATA : BEGIN OF itab OCCURS 0, " This could be any internal table which will hold your data.
intreno LIKE vicncn-intreno,
authgrp LIKE vicncn-authgrp,
END OF itab.
"You can select the fields according to your requirement.
SELECT intreno authgrp
INTO TABLE itab
FROM vicncn
WHERE
authgrp IN ('R700' , 'R710' , 'R720', 'R721', 'R730', 'R740' ).
This should give you all the records from VICNCN table which has got authgroup values as 'R700' , 'R710' , 'R720', 'R721', 'R730', 'R740' .
Now to display this data in your standard report you will have to find some enhancement spot / User Exit or you need a Access Key.
Hope this helps.
Ashwani
2009 Mar 03 12:24 PM
2009 Mar 03 1:15 PM
Great !! It would be good if you could share the correct solution with everyone.