"In SAP for logging in to the system you need a user ID and a password. This user ID is created by the system administrator. The first time you login to the SAP system you need to change that password which has been assigned to you while creating the user ID. Every user ID will have certain roles assigned to it. The System Admin (Basis Administrator) is responsible for creating these roles after consulting the Functional team. Each user will typically have several roles assigned to their user ID. The user roles are predefined in the SAP system and each employee would have a combination of several roles which have been predefined in the SAP system. The roles are defined using the activity groups in the SAP system. A proper understating of the activity groups is necessary for creating and assigning Roles in the SAP system. Once a pre-defined user role is assigned to a user the system then automatically displays the appropriate User menu when the user logs on and provides the required authorization. An activity group can contain Transactions, Reports, Files, Web Links. Once the activity group has been assigned it defines the user specific menus. Once the user logs on to SAP a user specific menu is displayed this menu is controlled by the activity group that has been assigned to the user. To display a list of descriptions of the pre-defined user roles, select Tools---- Administration----User Maintenance--'Repository Infosys--' Activity Groups----' List of activity groups according to complex selection criterion---' Selection according to activity group name or call transaction S_BCE_68001418. The pre-defined user roles are delivered as templates and have names beginning with 'SAP_' and suffix _AG. Composite activity groups can be built with individual activity groups. A composite activity group does not contain any authorization."
"The flow of a program is determined by a sequence of screens in a dialog transaction. The screens that are called within a transaction, must belong to a single ABAP program, usually a module pool (Type M). You have to use the transaction maintenance transaction (SE93) to create a dialog transaction. Once you have entered a transaction code and a short description, chose transaction type program and screen. Then enter data on the next screen as required. The transaction code in a dialog program must be linked to the number of its initial screen. Finally enter this number in the screen number field."
SAP ABAP Function Module to place negative Sign Before a Number
In SAP the negative sign by default come after the number. In case if you wish to place the negative sign before the number the following function module should be used.
SAP ABAP Function Module to place the sign before a number.
CLOI_PUT_SIGN_IN_FRONT
The above mentioned function module has the following parameters.
VALUE
Note: This is a changing parameter and accepts the value with Data Type Character.
Find the code below.
REPORT ZEX_SIGN .
Parameter: p_num1 type i, p_num2 type i.
Data: d_sum type i, d_value(10).
d_sum = p_num1 + p_num2. d_value = d_sum.
Write: d_sum.
CALL FUNCTION 'CLOI_PUT_SIGN_IN_FRONT' CHANGING VALUE = d_value . SKIP. write:/ d_value RIGHT-JUSTIFIED.
If you wish to import the contents of the clipboard into SAP, then you can use the function module given below.
SAP ABAP function module to import the windows clipboard contents
CLPB_IMPORT
The above mentioned Function Module grabs the contents of the windows clipboard into an internal table. Once the contents are in the internal table they can be processed as desired.
Find the code below.
REPORT ZEX_CLIPBOARDIMP .
types: ty_tab(200) type c. Data: wa_tab type ty_tab, int_tab type table of ty_tab.
If you wish to copy the contents of the internal table to the Windows clipboard, you can do so by using the following function module.
SAP ABAP Function Module Copy to Clipboard
CLPB_EXPORT
If you use this function module, then the contents of the internal table can be copied to the Clipboard of the Presentation Server. Once the contents are copied to the clipboard they can be pasted into any windows application.
Find the code below.
REPORT ZEX_CLIPBOARDEXP .
types: ty_tab(200) type c. Data: wa_tab type ty_tab, int_tab type table of ty_tab.
Move: 'This is line 1 again' to wa_tab. append wa_tab to int_tab. clear wa_tab.
Move: 'This is line 2 again' to wa_tab. append wa_tab to int_tab. clear wa_tab.
CALL FUNCTION 'CLPB_EXPORT' TABLES DATA_TAB = int_tab EXCEPTIONS CLPB_ERROR = 1 OTHERS = 2. IF SY-SUBRC <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. ENDIF.
Always specify your conditions in the Where-clause instead of checking
them yourself with check statements. The database system can then use an index
(if possible) and the network load is considerably less.
Always use Pretty Printer and Extended Program Check before releasing the code.
Do not leave unused code in the program. Comment the code thoroughly. Align the comments and the Code. Follow the SAP Standards and SAP Best Practices guidelines. It’s a good practice to take a dump of the code on your local drive.