"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."
"SAP has provided two different types of methods for BDC to do its work. Among these the first one is called the classical method. This method is also called as the session method. Through this method the data can be read by the BDC program from a sequential dataset file. This sequential dataset file is stored in batch-input sessions. In order to run the transaction in this session, What you need is to execute the session. For this follow these few steps. YOu an start and subsequently monitor the sessions firstly from System----> Service---->Batch input or have the sessions run in the background."
SAP ABAP Function Module to Run an Executable Program with Parameters
If you wish to run an executable program from SAP it can be done by using the following Function Module.
GUI_RUN
These function modules are useful when you want to create an interface with SAP. Many a times it may be required to call an executable program from SAP and pass some Parameters to it. The called user program can then process the data and return back parameters to SAP. Function modules similar to GUI_RUN can be used to build such interfaces.
We will see a simple example of opening a Notepad file from SAP and another example by opening a website through a browser.
Example 1
REPORT ZEX_GUIRUN .
CALL FUNCTION 'GUI_RUN' EXPORTING COMMAND = 'NOTEPAD.EXE' PARAMETER = 'c:\TEST.TXT' * CD = ' * IMPORTING * RETURNCODE = .
Example 2
REPORT ZEX_GUIRUN .
CALL FUNCTION 'GUI_RUN' EXPORTING COMMAND = 'FIREFOX.EXE' PARAMETER = 'GOOGLE.COM' * CD = ' * IMPORTING * RETURNCODE = .
So if you want to open a browser you can use the function module GUI_RUN.
Some other function modules that open a browser from within SAP are as follows.
This is a customized version of the SAP menu. Basically this menu would be specific to a user. If you are working in a Particular area say for example in ABAP then the Basis Administrator would add a menu specific to your tasks.
If a separate user menu has not been designed for you, then you can create a Favorites list consisting of the transactions, files, and Web addresses you use most frequently. This can be done by selecting the transaction from the SAP Menu and then clicking on the add to Favorites.
SAP MENU
This is the complete list of menus items available in SAP. You can add items to the Favorites list from this menu.
SAP BUSINESS WORKPLACE
SAP Business Workplace gives access to SAP Inbox, Outbox, Folders and other items. Here you also get an Appointment Calender where you can maintain your appointments and reminders. You can also set up meetings and send mails to the participants.
To check the validity of a date field you can use the following function module.
DATE_CHECK_PLAUSIBILITY
Please see the example given below.
REPORT ZEX_DATEVALIDATE .
Parameters p_date like sy-datum.
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY' EXPORTING DATE = p_date EXCEPTIONS PLAUSIBILITY_CHECK_FAILED = 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.
Write:/ sy-subrc.
If the value of Sy-subrc is 0 that means the date field has a valid value.
If the input is 01/01/2008 then the output of the above program is as follows.
Validate the date 0
If the input is 31/31/2008 then the output is as follows.
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.