Authentication or Security Checks for ABAP programs
Dear experts,
Please tell me where do we give the authentication or security checks to our ABAP programs and how do we do that. ( Do not allow all to execute our developed programs).
Regards,
Maanasa
If you know the authorization group u can use the following ways.
1. In the Attributes u can specify the authorization gourp name
2. AT SELECTION-SCREEN
AUTHORITY-CHECK OBJECT 'Z_TABU_DIS'
ID 'ACTVT' FIELD '03'
ID 'CUSTTYPE' FIELD v_class
ID 'TABLENAME' FIELD p_dbtble.
CASE SY-SUBRC.
WHEN 0.
WHEN OTHERS.
Error message
message I419(MO).
STOP.
ENDCASE.
Similar Messages
-
Using SSH as a secure channel for other programs
Hi,
I'm wondering if it's possible to use an SSH connection as a generic secure channel for other programs. I want to write a server-client program where I can open up an SSH channel first and then have the server and client communicate over it. If there is some other way to communicate via a secure channel and using SSH-like users and keys that would be great too.fukawi2 wrote:
Basu wrote:It's a simple message exchange system.
I've been looking into this... Best solution I've found is AMQP / RabbitMQ.
(I hate reinventing the wheel)
Well, reinventing the wheel can teach you a great deal IMO. That usally how I get to learn how stuff works -
Bypass check for this program only
Hi FI Masters,
i have a zprint prog ex : ZRFFOZA_H2H. i copied this prog and given a transaction(ZRFFOZA_H2H_FI tcode : ZFI_H2H ) and run to see the results where it works fine.
but....
payment method can be linked to only one print program and in this test case payment method M is linked to ZRFFOZA_H2H, so now the problem is that the new transaction code ZFI_H2H is built on program ZRFFOZA_H2H_FI and the system refuses to run.
when i see the message it shows like this...
The list of payment methods (M) may only be processed by other payment medium programs.
now how can i bypass this check for this program only?
can i have some info please....
Thanks,
pasala.hi FI masters,
to be more clear to the above quetion,
i have 2 zprog for the Payment run
for the Payment method 'M' i have z prog ZRFFOZA_H2H which is configued
again i have made a copy of above prog to ZRFFOZA_H2H_FI and run the payment run for the Payemnt method 'M'.
Now it gives me a message : Payment method(s) are not allowed for this program.
since below copy prog not configed we get this message.
NOW : What can i do to bypass this check for this program only
can i have some info pls?
thanks again,
pasala. -
Extended Program check for multipl programes in single run
Hello All,
I wan to do the syntax check for multiple programs at single execution run.
SAP has provided SLIN transaction for single program, Is there any SAP standard transaction similar as SLIN for multiple program check at single execution run?
Thanks,
Feroz.>
s feroz wrote:
> I need it in R/34.6b version.
I don't think you have much option there -
Syntax check for inactive programs(object)
I am having some program in internal table now i have to do syntax check for the programs, actually I can use SLIN but SLIN will not do Syntax check if the object is not active, is there any way that I can check for many programs one after the other.
Hi Vikram,
USe the transaction SAMT.
Please flooow the link below it will solve u r pblm.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40c62223-639e-2a10-dd9a-b1dd9af73aeb
Thanks -
Import issue for ABAP program in Production Server ?
Hi Experts,
I have an ABAP program which gets executed properly in BW Development server but getting the following error when I am trying to execute it in the BW Production while I could activate the program successfully.
Kindly help me to resolve this issue.
Thanks in advance !!!
Regards,
Gokulkumar RDHi Golkul,
Can you debug the program while execute?
I think there is some hardcoding in the program for checkiing the client and then raised a custom message in the program.
Can you share the coding of the prorgam if possible?
Try to check for any messages raised in the program. Also click on the on the message pop up and see the details on the message and let us know.
Thanks
Amit -
Authority check in ABAP program
Hello All
I am having some trouble with authority object in ABAP programming
This is the situation.
I have a field "plant" which is a select options in the selection screen.
I have to write an authority-check for this "plant" field in the program and display the report for only the plants for which the user is authorised. There is a select statement in the program which selects all the plants entered. If it is single plant entry and the user is not authorised or the user is not authorised to none of the plants entered for multiple plant entries, an error message should be displayed saying "no authority to display plants x, y, z"
How can I incorporate this logic in the report.
This the current coding
AT SELECTION-SCREEN.
AUTHORITY-CHECK OBJECT 'C_ROUT'
ID 'ACTVT' FIELD '03'
ID 'PLNTY' FIELD 'DUMMY'
ID 'WERKS' FIELD s_werks
ID 'STATU' FIELD 'DUMMY'
ID 'VERWE' FIELD 'DUMMY'.
START-OF-SELECTION.
SELECT amatnr aplnnr aplnal awerks aplnty bstlnr b~stlal INTO TABLE t_mapl FROM mapl AS a INNER JOIN mast AS b
ON amatnr = bmatnr
AND awerks = bwerks
WHERE a~matnr IN s_matnr
AND a~plnnr IN s_plnnr
AND a~plnal IN s_plnal
AND a~werks IN s_werks
AND a~plnty IN s_plnty
AND b~stlnr IN s_stlnr
AND b~stlal IN s_stlal. "(ALT BOM)
Thanks
RickyHi Ricky,
to check each individual plant in the selection, you can not use s_plant in the authority chek, here you need to give the value..
Code like this:
DATA : BEGIN of t_werks OCCURS 0,
werks TYPE t001w-werks,
END OF t_werks.
DATA : w_text(30) TYPE c.
AT SELECTION-SCREEN.
IF NOT s_werks[] IS INITIAL.
REFRESH t_werks.
SELECT werks
FROM t001w
INTO TABLE t_werks
WHERE werks IN s_werks.
IF sy-subrc EQ 0.
LOOP AT t_werks.
AUTHORITY CHECK...
ID 'WERKS' FIELD t_werks-werks.
IF sy-subrc EQ 0.
DELETE t_werks.
ENDIF.
ENDLOOP.
IF NOT t_werks[] IS INITIAL.
LOOP AT t_werks.
CONCATENATE t_werks-werks
w_text
INTO w_text.
ENDLOOP.
MESSAGE exxx WITH 'No authorisation for '
w_text.
ENDIF.
ENDIF.
ENDIF.
Thanks and Best Regards,
Vikas Bittera.
**Reward if useful** -
Authorization check for a program/table
Hi ,
Can anyone help me out in
How to do authorization check for an abap program and also a table.
I have no idea about the authorizations.
My requirement is that I need to do the authorization check in such a manner that only users having a certain profile
1. should be able to execute the program
2. View of the entries of the table.
Thanks & Regards,
KeerthiHello Keerhi ,
I got you wrong at first!
If you want to have only certain users to be able to do certain operations, then you need to assign the appropriate roles to those users!
First find the role
second add the user in the role ( PFCG T code---> USers tab)
Raj -
TCode for abap program performance testing
Hi
I have tuned a abap program which was consuming lot of time. I still have the old version with diff name. I would like to know the tcodes where in i could see the performance of the program.
regards
BalajiHi balaji,
This is kiran Kumar.G.I will give some steps.you better to follow those steps to get ur report performance.
If u r satisfy with my answer give me REWARD POINTS.
HAVE A NICE DAY.
STEPS:
1.OPEN UR REPORT IN SE38 TRANSACTION.
2.SELECT THE MENU PATH
UTILITIES-->MORE UTILITIES-->RUNTIME ANALYSIS
3.SELECT THE PROGRAM RADIO BUTTON AND GIVE UR REPORT NAME THERE.AND CLICK <b>EXECUTE</b> BUTTON
4.IT WILL TAKE U TO ANOTHER SCREEN THERE U CAN EXECUTE UR REPORT AND COME BACK.
5.CLICK ON ANALYZE BUTTON.(PRESENT IN BELOW OF THE SCREEN).
THEN U WILL GET ONE GRAPH
NOTE:
1.IF IT IS RED UR PROGRAM IS HAVING VERY POOR PERFORMANCE
2.IF IT IS GREEN IT IS OK.
ABAP GRAPH : TELLS UR CODING IN THE REPORT.
DATABASE GRAPH : U R RETREIVE DATA FROM DATABASE IN UR REPORT..
SOME STEPS USED TO IMPROVE UR PERFORMANCE:
1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
5. Avoid using nested SELECT statement, SELECT within LOOPs.
6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
7. Avoid using SELECT * and Select only the required fields from the table.
8. Avoid nested loops when working with large internal tables.
9. Use assign instead of into in LOOPs for table types with large work areas
10. When in doubt call transaction SE30 and use the examples and check your code
11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
12. Use "CHECK" instead of IF/ENDIF whenever possible.
13. Use "CASE" instead of IF/ENDIF whenever possible.
14. Use "MOVE" with individual variable/field moves instead of "MOVE-
CORRESPONDING", creates more coding but is more effcient.
Regards,
Kiran Kumar.G -
How do i create a header template for ABAP programs?
Hi all.
Need a little bit of help here. When you create a new program you get a template with space for comments at the top of the program and basic stuff. If I want to change this template to add areas that we want to have comments on for every program we make at work. How do I do that?
Instead of :
I want to have in a way similar to this:
* Author: *
* Function: *
And so on
I want the words to be there when our developers creates the program.
How can I do that?
BR
KalleAfter I create a new report program, I delete everything but the REPORT line. I then put this code in for my skeleton.
* Created By: Walter Industries (Paul Chapman)
* Created On: 02/29/2008
* Tran Code: ZLMxx
* Program Name: YPTC_REPORT_SKELETON " replace New Progam Name herer
* Program Descr: Configurable Leads Data Query
* Modification Log
* Programmer :Issue: Date : Chg Req. : Description
* Paul Chapman :00000:02/29/2008:DEVK000000:New Program
REPORT yptc_report_skeleton MESSAGE-ID zleads_msg. " replace New Progam Name herer
*_________________________________________________ Tables
TABLES: zpca, cepc, zlmlead.
*_________________________________________________ Constants
CONSTANTS:
line_length TYPE i VALUE 100,
c_tab TYPE x VALUE 9, " x'09'
c_crlf TYPE x VALUE 3338. " x'ODOA'
*_________________________________________________ Types
TYPES: BEGIN OF scr_text_line,
line(line_length) TYPE c,
END OF scr_text_line.
*_________________________________________________ DATA
DATA:
curr_screen_tab(4) TYPE n.
*_________________________________________________ ALV Area
*_________________________________________________ Ranges
RANGES:
r_branch FOR zpca-branch.
*_________________________________________________ Selection Screen
SELECTION-SCREEN:
BEGIN OF TABBED BLOCK tabs FOR 36 LINES,
TAB (20) tab1 USER-COMMAND push1 DEFAULT SCREEN 1010,
TAB (20) tab2 USER-COMMAND push2 DEFAULT SCREEN 1020,
END OF BLOCK tabs.
* Tab1 Options S E L E C T I O N S C R E E N S Tab 01 *
SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:
sdiv FOR cepc-prctr MATCHCODE OBJECT zdivjwh,
ssbrch FOR zlmlead-branch.
SELECTION-SCREEN: END OF BLOCK blk1.
SELECTION-SCREEN: BEGIN OF BLOCK bl10 WITH FRAME TITLE text-010.
PARAMETERS:
cparm1 AS CHECKBOX USER-COMMAND sel,
cparm2 AS CHECKBOX USER-COMMAND sel,
cparm3 AS CHECKBOX USER-COMMAND sel,
cparm4 AS CHECKBOX USER-COMMAND sel,
cparm5 AS CHECKBOX USER-COMMAND sel.
SELECTION-SCREEN: END OF BLOCK bl10.
SELECTION-SCREEN END OF SCREEN 1010.
* Tab 2 Options S E L E C T I O N S C R E E N S Tab 02 *
SELECTION-SCREEN BEGIN OF SCREEN 1020 AS SUBSCREEN.
SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
SELECT-OPTIONS:
sctype FOR zlmlead-ctype,
sprfcnt FOR zlmlead-prefcont.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) text-201.
SELECTION-SCREEN POSITION 30.
PARAMETERS: rb_opt1 RADIOBUTTON GROUP gr20.
SELECTION-SCREEN COMMENT 34(03) text-991. " Yes
SELECTION-SCREEN POSITION 40.
PARAMETERS: rb_opt2 RADIOBUTTON GROUP gr20.
SELECTION-SCREEN COMMENT 44(03) text-992. " No
SELECTION-SCREEN POSITION 50.
PARAMETERS: rb_opt3 RADIOBUTTON GROUP gr20.
SELECTION-SCREEN COMMENT 54(06) text-993. " Either
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK blk2.
SELECTION-SCREEN: BEGIN OF BLOCK bl20 WITH FRAME TITLE text-020.
PARAMETERS:
cb_opt1 AS CHECKBOX,
cb_opt2 AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN: END OF BLOCK bl20.
SELECTION-SCREEN END OF SCREEN 1020.
*____________________________________________ Screen Actions
AT SELECTION-SCREEN OUTPUT.
PERFORM what_tab_am_i_on.
CASE curr_screen_tab.
WHEN '1010'. " Tab 1
WHEN '1020'. " Tab 2
WHEN OTHERS.
ENDCASE.
PERFORM tab_hide_unhide.
*___________________________________________ Initialization
INITIALIZATION.
* Tab Text
tab1 = 'Tab 1'.
tab2 = 'Tab 2'.
*_________________________________________________ Load of Program
LOAD-OF-PROGRAM.
*_________________________________________________ Start of Selection
START-OF-SELECTION.
PERFORM set_up_branch_range.
*_________________________________________________ End of Selection
END-OF-SELECTION.
*& Form what_tab_am_i_on
FORM what_tab_am_i_on.
LOOP AT SCREEN.
IF screen-name CS 'BLOCK_1010'.
curr_screen_tab = '1010'.
ELSEIF screen-name CS 'BLOCK_1020'.
curr_screen_tab = '1020'.
ENDIF.
ENDLOOP.
ENDFORM. " what_tab_am_i_on
*& Form tab_hide_unhide
FORM tab_hide_unhide.
LOOP AT SCREEN.
CHECK screen-group3 = 'TAB'.
CASE screen-name.
WHEN 'TAB1'.
* IF
* screen-active = 1.
* screen-required = 1.
* screen-input = 1.
* screen-output = 1.
* screen-intensified = 1.
* screen-invisible = 1.
* ELSE.
* screen-active = 0.
* screen-required = 0.
* screen-input = 0.
* screen-output = 0.
* screen-intensified = 0.
* screen-invisible = 0.
* ENDIF.
WHEN 'TAB2'.
* IF
* screen-active = 1.
* ELSE.
* screen-active = 0.
* ENDIF.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
ENDFORM. " tab_hide_unhide
*& Form set_up_branch_range
FORM set_up_branch_range.
r_branch[] = ssbrch[].
CHECK NOT sdiv IS INITIAL.
r_branch = 'IEQ'.
SELECT branch INTO r_branch-low
FROM zpca
WHERE region = 'JWHCO'
AND division IN sdiv.
APPEND r_branch.
ENDSELECT.
SORT r_branch.
DELETE ADJACENT DUPLICATES FROM r_branch.
ENDFORM. " set_up_branch_range -
Hi all.
I've implemnted the following soultion for our SAP system.
Go to TCODE CMOD,
Create a new Project like ZSE38 as follows.
Check the 'Enhancements Assignments' Radio button, click create and add SEUED001 ( for Editor )
now SAVE, click on Components and select the User Exit that you want to use.
EXIT_SAPLS38E_001 <-- this is a function module.
inside this FM there is an INCLUDE program ZXSEUU08.
double click on it, when a warning message appears in the status bar below press ENTER
to create the program.
write the code you want inside this program. or add the following code.
code
DATA: it_code(256) TYPE c OCCURS 0.
DATA: wa_code like line of it_code.
DATA: it_new_code(256) TYPE c OCCURS 0.
DATA: lv_linecount TYPE i.
IF OPERATION = 'EDIT'.
read report program into it_code.
DESCRIBE TABLE it_code LINES lv_linecount.
IF lv_linecount LE 10.
read table it_code into wa_code index 5.
if wa_code(9) '*& Author'.
read table it_code into wa_code index 1.
append wa_code to it_new_code.
read table it_code into wa_code index 2.
append wa_code to it_new_code.
read table it_code into wa_code index 3.
append wa_code to it_new_code.
clear wa_code.
wa_code = '*&---------------------------------------------------------------------*'.
append wa_code to it_new_code.
clear wa_code.
wa_code = '*& Author :'.
append wa_code to it_new_code.
clear wa_code.
wa_code = '*& Date :' .
append wa_code to it_new_code.
clear wa_code.
wa_code = '*& Purpose :'.
append wa_code to it_new_code.
clear wa_code.
wa_code = '*&---------------------------------------------------------------------*'.
append wa_code to it_new_code.
clear wa_code.
wa_code = '*& Date Changed by Tag Description'.
append wa_code to it_new_code.
clear wa_code.
wa_code = '*&'.
append wa_code to it_new_code.
clear wa_code.
wa_code = '*&---------------------------------------------------------------------*'.
append wa_code to it_new_code.
data: lv_firstline type i.
loop at it_code into wa_code from 4 to 8.
if wa_code = ''.
lv_firstline = sy-tabix.
endif.
endloop.
loop at it_code into wa_code from lv_firstline.
append wa_code to it_new_code.
endloop.
insert report program from it_new_code.
ENDIF.
ENDIF.
ENDIF.
[/code]
After this, activate the include program.
then go back to CMOD transaction and activate the PROJECT that you've just created.
and you're ready to go........
Everything is working fine except that i do not want this template to be implemented when I do an include.
What changes do i need to do?
BR
AndreasHello Andreas
I the same include that you are creating your template(ZXSEUU08) check to see what type of program you are working with.
* Check to make sure program is type 1 before inserting template.
select single * from trdir where name = program.
check: sy-subrc = 0.
if trdir-subc = '1'
... some code here - only executed if program is type 1 (executeable)....
endif.
Of course you can excldue incldudes by checking for subc = 'I'.
Regards
Greg Kern -
Unicode complaincy check for ABAP included in Start Routines
Hi,
we are planning to run unicode conversion for BW and we have tried to analyze our system with UCCHECK transaction to make sure that ABAP would be complaint with unicode. It's mentioned in documentation that this transaction is only capable of executing the check for certain objects, but are we able to make sure that our ABAP routines are unicode complaint? Should would go them through one by on?
BR, GerdDeclare all the data you use inside form STARTUP at the top. It's really bad practice to define it in the middle of your logic. Use a SORTED table rather than a standard.
TYPES: BEGIN OF t_b05_o00200_ty,
h_callnr LIKE /bic/ab05_o00200-/bic/bcallnr,
h_callsts LIKE /bic/ab05_o00200-/bic/bcallsts,
h_sdate LIKE /bic/ab05_o00200-/bic/bstatd,
h_stime LIKE /bic/ab05_o00200-/bic/bstatt,
END OF t_b05_o00200.
DATA: t_b05_o00200 TYPE SORTED TABLE OF z_b05_o00200_ty WITH NON-UNIQUE KEY h_callnr h_callsts
READ TABLE t_b05_o00200 WITH TABLE KEY h_callnr = data_package-/bic/bcallnr
h_callsts = 'OPEN'
ASSIGNING <sla_record>.
READ TABLE t_b05_o00200 WITH TABLE KEY h_callnr = data_package-/bic/bcallnr
h_callsts = 'WORK IN PROGRESS'
ASSIGNING <sla_record>.
If you KNOW that the key h_callnr and h_callsts is UNIQUE, then define the table as
DATA: t_b05_o00200 TYPE HASHED TABLE OF z_b05_o00200_ty WITH UNIQUE KEY h_callnr h_callsts
The other code remains as above. This will give the biggest performance hike.
Please learn to use the tags to make your code readable. And also, offering points is against the rules of these forums.
matt -
PHYSICAL FILES FOR ABAP PROGRAM
hi friends
i would like to know are there any physical files on os level for the ABAP programs.for example, when we create a customized report for sales in ABAP does SAP also create a corresponding copy on os level. if yes then in which file system .?
we have ECC 5.0 on AIX & use oracle 9i.
thanks in advance.
regards.imran mohd wrote:
> hi friends
>
> i would like to know are there any physical files on os level for the ABAP programs.for example, when we create a customized report for sales in ABAP does SAP also create a corresponding copy on os level. if yes then in which file system .?
>
>
> we have ECC 5.0 on AIX & use oracle 9i.
>
> thanks in advance.
>
> regards.
The code you write in ABAP is not stored on OS-level (at least not in an ABAP-stack system) - it's contained in the database. As for the 'copies' your management wishes (for some ambigous reason) to have - there's no need. The code you write is versionised, so that every change made to the code is automatically documented when you press 'Save'.
That was answering a 'basic' question - but you have made me very curious now: would you mind to explain why you would want a 'copy' of your custom code on OS-level? Any special reason??
Edited by: Mylène Dorias on Jun 9, 2010 1:37 PM typo -
How to get Access key for ABAP Program development in HANA Studio
Hi,
I have got instance for ABAP on HANA development system.
But while creating new program it is asking me for Access key, since I do not have user id pwd for service market place I couldnt able to create the access key.
Can any one suggest the way to create ACCESS KEY??
Thanks,
RamDear Ram,
it seems that you need to follow the chapter 6.1 in the documentation...:
Kind regards, Stephan -
Hello,
Can anyone tell me how I can create a transport for and ABAP Program. It is currently in DEV but needs to go to test.
ThanksI think you must have created this object as a Local Object. You need to do 2 things here :
Reassign the Development Class to a Z Dev Class.
Use trx code SE38. On the first screen, specify the program name & click on Goto-->Object Directory Entry.
You will get a popup here, change the Dev Class to whatever you have on your side, this will prompt you for a Workbench Transport request. Follow up with Basis to get it to Test.
Maybe you are looking for
-
Cannot find backslash (\) on German keyboard anymore after upgrading to OS 10.6 from OS 10.5. It used to be at Alt-ß. Anyone can help please ?
-
When I click on the "Mail Icon" in my dock, mail opens and it says "Mail" in the top bar, however, no window opens. I cannot view any emails at all. If I right click on the "mail" icon, I can open a new message, but it does not send. Do you know how
-
I downloaded the iCloud app to my PC (Windows Vista with Service Pack 2). But when I try to launch the app from the start menu, I'm getting an error message that says "Unable to launch due to side-by-side configuration". What do I need to do?
-
Deauthentication at the "same time".
Hello guys. After collecting a lot of logs at the WLC , we can see that there is a problem: May 25 18:42:29 10.3.0.251 APContr-1: *dot1xMsgTask: May 25 18:42:26.613: %DOT1X-3-MAX_EAPOL_KEY_RETRANS: 1x_ptsm.c:444 Max EAPOL-key M1 retransmissions excee
-
Windows XP cannot see Airport Extreme SSID
I just bought a new Airport Extreme Base Station and connected it to my home router. My iMc was connected in minutes. But I am having a lot of trouble connecting my wife's Dell PC (XP SP2) using a Dell 1450 Wireless USB adapter (a/b/g). I have tried