"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."
Transferring Data from ABAP Internal Table to Excel Sheet
If you wish to transfer data from ABAP internal table to EXCEL you can use the following function module.
MS_EXCEL_OLE_STANDARD_DAT
This function module populates an existing excel sheet with the data from the ABAP internal table. Please find below code which shows hwo to declare and populate the import and important parameters. In the next section we will see in depth how this function module operates.
REPORT ZEX_DATATOEXCEL .
Parameters: P_file like RLGRAP-FILENAME.
data : begin of int_head occurs 0, Filed1(20) type c, " Header Data end of int_head.
data : begin of int_data occurs 0, Field1(20) type c, " Data Field2(20) type c, Field3(20) type c, Field4(20) type c, end of int_data.
If you wish to transfer Purchase Order related Data to SAP, you can do so by using the following BAPI.
BAPI_PO_CREATE
Many a times there is a requirement to transfer purchase order data from a third party to SAP, it can be done by the following methods.
1) BAPI 3) BDC 3) EDI
This this tutorial we will see how to create a Purchase Order using the above mentioned BAPI.
Please note that if you wish to create Real Time Purchase Orders from an external system into SAP R/3 then you need to use either the JCO connector, .NET connector or XI. The example below shows creation of a single purchase order, if you have data required to create purchase orders then you first need to upload it into an internal table and then pass the table to the BAPI.
Please find the code below to create a Purchase order using the BAPI BAPI_PO_CREATE
REPORT ZEX_POCREATE .
Data: int_pohead like BAPIEKKOC, int_poitem like BAPIEKPOC occurs 0 with header line, int_posched like BAPIEKET occurs 0 with header line, int_ret like BAPIRETURN occurs 0 with header line. Data: d_purchord like BAPIEKKOC-PO_NUMBER.
Move: 'NB' to int_pohead-DOC_TYPE, '1000' to int_pohead-PURCH_ORG, '001' to int_pohead-PUR_GROUP, '0000001234' to int_pohead-vendor,
'00010' to int_poitem-po_item, 'Material' to int_poitem-material, 'Material' to int_poitem-pur_mat, '1000' to int_poitem-plant,
'00010' to int_posched-PO_ITEM, '20080531' to int_posched-DELIV_DATE, '2' to int_posched-QUANTITY.
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.