Monday, June 20, 2022

TRANSACTION CODES IN ALE IN SAP ABAP.

TRANSACTION CODES IN ALE IN SAP ABAP. 


1. BD54     Create logical systems

2. SCC4     Assign logical systems to client

3. SM59     Create RFC

4. WE21     Create Port

5. WE20     Create partner Profiles

6.  BD64     To create Distribution Model view 

All these T-codes should be run in the same order. All these T-codes should be run in both source and destination systems. If it is needed to transfer the data from one client to another client run steps 1 to 5 in source system, run 5th step in destination system and run 6th step in source system. The order should also be same.


To view the idocs use either WE02 or WE05 T-codes. T-code WE19 is the 

testing tool for Idoc. T-code BD87 for mass processing of Idocs.

STRUCTURE OF IDOC IN SAP ABAP.

STRUCTURE OF IDOC IN SAP ABAP. 


Every Idoc contains three types of records.

Control Record (EDIDC)

Data Records (EDIDD)

3.   Status Records (EDIDS)


CONTROL RECORD:- It is like address on the post card which gives the information about sender, receiver and type of data the idoc is holding. It will be always single record.


DATA RECORDS:- The actual data that is to be transferred is contained by data records. It can be single or multiple records. Actually the data records internally contain the segments and segments contain fields and fields contain values.


STATUS RECORDS:- It specifies about the actual position of the idoc. As idoc travels different mile stones system gives different statuses. Using the status of the idoc we can find out the position of the idoc.


1 to 49 statuses are used for out bound idoc

50 to 99 statuses are used for inbound idoc.


Important statuses are.

---    outbound idoc just created

30  ---    ALE settings are ok

03  ---    Idoc reached port

50  ---    Inbound Idoc just created

51  ---    Error in posting the document into data base

53  ---    Document successfully posted in to data base


There are 2 types of Idocs.

Master Idoc

Communication Idoc


MASTER IDOC: - The data that is to be transferred is fetched from data base and formatted into Idoc format. This Idoc is called master Idoc. This Idoc is not stored in data base. This Idoc is not transferred. Its life span is until communication Idocs are created.

COMMUNICATION IDOCS:- The recipient specific Idocs are called communication Idocs. These Idocs are stored in data base. These Idocs are moved from source system to destination system. 


MESSAGE TYPE:- This specifies about the type of data the Idoc is holding. The standard message types are 

1. MATMAS         Material master data

2. CREMAS          Vendor master data

3.  DEBMAS         Customer master data


PORT:- it specifies about how the data should be transferred from source system to destination system. Transaction code for Port creation is WE21.Two important ports are..

T-RFC Port (Transactional RFC Port)

File Port


In T-RFC port the data will be moved in the form of memory buffers. In file port the data will be transferred in the form of files.


REMOTE FUNCTION CALL (RFC):-  It is used to define the character of communication link between two system where the remote enabled function module is intended to be executed. In ALE this RFC will be used to connect to the remote system.

Transaction for RFC is SM59.


For generation of Idocs SAP has given standard T-codes based on the type of data you are going to transfer. The important T-codes are.

1. BD10      Material master push

2. BD11      Material master pull

3. BD12      Customer master push

4. BD13      Customer master pull

5. BD14       Vendor master push

6. BD15       Vendor master pull   


  You have to either run push or pull T-code. No need to run both the programs. If you want to send the data from source system run push T-code. If you want to get the data from destination system run pull T-code.


STEPS IN CMOD IN SAP ABAP.

STEPS IN CMOD IN SAP ABAP. 

T-code CMOD

Give project name

Press create button

Give description

Press enhancement Assignments button

Give the exit name you have found in SMOD

Press components button

Double click exit

Double click include starting with Z

Press enter

Write the logic

check for errors and  activate

Come back to the first screen of CMOD and activate the project.

STEPS IN SMOD IN SAP ABAP.

STEPS IN SMOD IN SAP ABAP. 

T-code SMOD

Press F4

Press information system

Give the package name found out previously

Press enter

Based on the description choose the relevant Exit

STEPS IN FINDING THE PACAKGE IN SAP ABAP.

STEPS IN FINDING THE PACAKGE IN SAP ABAP. 

Go to the T-code to be enhanced

System ( status

Double click program

Go to attributes

There you can find the package

ENHANCEMENTS In SAP ABAP

ENHANCEMENTS In SAP ABAP

These are used to add extra intelligence to SAP standard programs to suit the business requirements. If we want to add extra code to SAP standard programs, if we go for change mode system asks for access key. Instead of this, SAP has provided hooks where we can write the code. These hooks are enhancement spots. If a code is written in theses spots along with the normal program the code written in these spots is also executed. There are two ways to enhance the SAP standard code.

User Exits

BADIS (Business Addins)


If user exits are used one time in any project it can not be reused. But Badis can 

be used any no of times.



There are 4 types user exits.

Function module exit

Field exit

screen exit

Menu exit


Exits are defined at package level. So we want to enhance any T-code first we 

have to find out the package for that T-code. Then we have to find out the exits present in that package. For finding the exits present in a package we have to use SMOD T-code. After finding the suitable exit for writing the code we have to use CMOD T-code.

CREATION OF STANDARD TEXT in SAP ABAP.

STEPS IN CREATION OF STANDARD TEXT in SAP ABAP. 


T-code SO10

Give name and press create

Give the text

Press save

UPLOADING LOGO INTO SAP

STEPS IN UPLOADING LOGO INTO SAP

Prepare a Bitmap Image

T-Code SE78

Expand graphics

Double click BMP.

Press import button

Give the path where image is present in you system

Give name to logo

Give description

Specify color image or Black and white image

Press enter


The image will be uploaded into SAP with the name you have given in 7th step.

If the image is of  .TIF format we have to run the standard program RSTXLDMC to upload the image into SAP. The image will be stored on document server. All the images will be stored in STXBITMAPS table.


Now my requirement is to insert the logo in one of the windows of the form that I have designed .