Showing posts with label Interface Programming. Show all posts
Showing posts with label Interface Programming. Show all posts

SAP Internet Transaction Application Components

IACs are ready-to-use functions-for example, the SAP On-line Retailer-based on the ITS.SAP has outlined a variety of transactions in R/3 with an easier person interface and the corresponding HTML templates within the ITS. For instance, there are IACs for purchase requisition and buy release so that occasional customers can execute the purchasing transactions from their Net browser. That is included now in an necessary intranet IAC known as ESS where the employee may access personal information like holidays, salaries, tackle modification, event and training registration, and so on.

There are more than 90 IACs within the 4.6 release; they're used for intranets but are mainly for Web use by an organization’s vendors, prospects, applicants, and so on. The IACs are a fast solution to join your system to the Internet. You just have to customize the IAC if crucial and modify the templates provided by SAP with your feel and look requirements. If you wish to connect your SAP system to the Internet or an intranet, first have a look on the available IACs, because you may save money and time by using them.

If there are not any IACs for a buyer situation or the client needs to develop her personal application, SAP offers the SAP@Internet Studio in order to generate the HTML templates routinely from a buyer R/three transaction. Alternatively, with the SAPGUI for HTML, you can give access to almost any mySAP transaction from a browser.Why do you've to use IACs then? As a end result of for external users or occasional customers, you do not want to use the same SAP performance and look as to your professional SAP users. The SAPGUI for HTML is a very quick option to expose your whole R/3 system to the Web however with the SAPGUI look, and this is not the case in many of the Web scenarios you want to define. You'll in all probability desire extra flexibility to customize templates for occasional and external users.

Working ITSOperating an ITS means installation of the ITS software program first, however it also means administration and tuning of a running system.



Installation

The set up course of relies on the working system (Windows NT or Linux) and is described in the installation guide. Here we're going to clarify the internals of this process.Initially, the Setup program is executed. This program calls the ITSinstall program. ITSinstall installs the software on the host. It then calls ITSVinstall. With ITSVinstall, you create completely different subdirectories (templates, services, MIMEs, and so forth) for each A-Gate put in on the identical machine. In this manner, you could, for example, install the A-Gate for improvement and high quality assurance techniques on the identical machine.Setup is an intelligent program that can be executed more than once. If it discovers that the software has already been installed, it solely calls ITSVinstall in order to put in another virtual ITS with the identical software.

Then the Setup program calls ITSprotect, which asks you which permissions you wish to assign to the directories and shares generated by the ITS. As already mentioned, the advice is to assign them to the developers group in your Windows NT area in order to use the SAP@Net Studio later. ITSprotect may very nicely be referred to as as a standalone later if you need to change the permissions or use native instruments to do the same. Different applications are ITSuninstall and ITSVuninstall ITS software program and virtual ITS.

Each digital ITS is assigned a name utilized in directory technology later and in TCP/IP companies naming convention. In a Home windows NT atmosphere, ITS installs the A-Gate as a Windows NT service with the title “ITS Supervisor - XXX” where XXX is the ITS name.

After the installation, two community shares are created: one for the graphics, the MIME share, and another one for the service and template files. In the ITS installation, you additionally assign permissions to these shares. The ITS installation asks you if the permissions ought to be created for directors solely, a Home windows NT group, or everybody. The conventional means is to assign the shares to a Home windows NT group that your builders are also assigned to.

Administration

Administration of the ITS may be accomplished in several locations. It's a must to configure the W-Gate or the A-Gate, which might be done either within the configuration recordsdata, the registry, the service files, or with console commands. The following part describes the completely different prospects of configuring the ITS.

ITS Administration Device

From release 4.5, it is attainable to put in an extra digital ITS known as Administration ITS. This ITS has the service admin.srvc that lets you manage different ITS from the Web browser.With the Administration ITS, you can see performance indicators and start/stop ITS instances, view log files, or change configuration settings with a browser-based mostly Administration Tool. The Administration Tool affords you entry to almost any configuration parameter of the A-Gate. Most often, it is the most convenient way to make configuration changes with the Administration ITS.


ITS Remote Diagnostics isn't used very incessantly, but it's helpful if you want to have a look on the ITS log files from a distant location.

ITS Console Commands

Within the set up directory of the ITS yow will discover the folder Admin, the place some command-line tools for the administration of the ITS are stored.? ITSVcontrol is a command device that lets you start, stop, and change trace degree to the ITS. The same can be achieved by starting or stopping the Home windows NT service from the Management Panel.

  1. ITSprotect is used to vary the permissions on the directories and shares generated by the ITS.
  2. ITSVinstall and ITSVuninstall are used to put in or take away single ITS situations on the machine. On the whole, it is extra convenient to make use of the ITS Setup Device for set up and the Control Panel/Add/Remove Applications for uninstallation of ITS instances.
  3. ITSinstall and ITSuninstall are used to put in or remove the ITS bodily on the machine. On the whole, it is extra handy to make use of the ITS Setup Tool for set up and the Control Panel/Add/Take away Applications for uninstallation of ITS instances.

Configuration on Windows NT/2000 OS Degree

In Home windows NT/2000, an ITS occasion seems as an entry within the Management Panel/Services dialog box. You can use this dialog field to start or cease single ITS instances. Starting and stopping of cases has no impact on different situations running on the same machine.This dialog box can be used for disabling single instances or to switch the behavior of the service at startup, for instance, if you want to change the service to be began manually.

W-Gate Configuration

ITS releases prior to release 4.6D stored configuration data for the W-Gate component within the Home windows registry; since launch 4.6D, the configuration of the W-Gate is made with the XML-file wgate.conf. The file is stored in the same directory where the wgate.dll is saved: usually .../SAP/ITS/2.0/SAP-WGate-Scripts/.

You have to use the wgate.conf file to configure safety settings and connection parameters to the A-Gate. Additionally, you probably can configure the W-Gate to join with different A-Gates, depending on the hostname that was used to join to the Net server; for example, workplace.company.com determines that the W-Gate ought to connect to the ITS occasion for the Workplace system, and hr1.company.com determines the same W-Gate to connect with the ITS instance of the HR system HR1.On Home windows platforms, the set up of the W-Gate robotically installs a plug-in for the Microsoft Administration Console (MMC) that can be utilized for the configuration.

ITS is very scalable. You'll have the ability to select completely different configurations and set up totally different machines for Net servers, A-Gates, and totally different utility servers and blend them. The next concerns needs to be observed:

  1. Every W-Gate factors to one or more A-Gates utilizing load balancing. But a number of W-Gates may level to the same A-Gate.
  2. An ITS occasion can use a couple of application server through the use of load balancing to hook up with the R/three server. One ITS can hook up with extra than one R/three system. A number of ITSs can connect with the same R/three system. A quantity of A-Gates will be put in on the identical server.
  3. Virtual ITS allows for installing totally different ITS environments utilizing one software set up and has been available since launch 2.0 of ITS.

The number of worker threads and session reminiscence created for an ITS occasion determine the reminiscence required for that instance. Each work process consumes about 1MB, and each session approximately 250KB. For example, should you count on 1,000 session users and 20 simultaneous hits, you need 20 * 1MB 1,000 * 250KB 270MB RAMfor the ITS .

In the course of the set up, you'll have the ability to choose totally different configurations, but you'll find a way to change the variety of processes and periods within the registry or with the graphical administration utility later.

You could as well set up several Web situations on the identical machine with totally different W-Gates, or in the newest releases, one W-Gate set up may even serve a number of A-Gates. All this gives you with a very excessive diploma of scalability, and you can choose just one machine to put in several ITSs or a pool of machines, relying on your needs.

ITS Safety

Once you discuss Internet access, security is at all times an issue. ITS has to access R/3, so that you need a user and password in R/3; ITS can ask for the R/3 consumer or can use a generic R/three consumer for access. In this case, the IAC ought to ask for a socalled Web consumer (you outline Internet users with transaction SU05). Internet customers are pseudo-users in R/3 (like customer, vendor, financial institution, or applicant) that you simply outline for your external users with restricted authorization in that particular IAC.

ITS also supports standard safety measures like HTTPS (HTTP over Secure Socket Layer), firewall assist ( you can arrange a firewall between the Web Server and W-Gate, as nicely as from the W-Gate to the A-Gate), saprouter and likewise SNC (Secure Community Communication) with information encryption between ITS and the appliance servers. ITS also helps X.509 certifications for user authentication from SAP 4.5B on and Single Sign-On scenarios based on cookies or logon tickets for the Workplace.

Improvement with the ITS

Growing Internet pages to work together with SAP methods could be based on HTML or Business HTML, that are introduced within the following sections.

Introduction to HTML

HTML (Hypertext Markup Language) was created at CERN (Conseil Europeen pour le Recherche Nucleaire, or European Laboratory for Particle Physics) with the aim of sharing up-to-date information between analysis centers. On this manner, a Net server in Europe may host the paperwork in textual content files that could hyperlink to other documents saved in different Net server (in Australia, for example) in a clear technique to the user.

HTML is a tag language based on SGML . SGML is a normal for learn how to specify a document markup language or tag set. SGML is a proper description of how you can define languages based on tags. HTML is a very particular implementation with a closed number of tags designed to format and present graphical and text info and the hyperlink tags. HTML and the Net know-how has turn into so widespread that new standards have also arrived, like XML (Extensible Markup Language), to define paperwork based mostly on .The fact is, the latest HTML specification known as XHTML, and it is an HTML definition with the XML’s extra rigorous standards.

Step Loops

Step loops are extensively utilized in SAP display screen programming to level out a listing of records with the identical definition. SAP@Net Studio is prepared to map the display screen step loop to an HTML table if the transaction has normal paging implemented. This means that the transaction should have PF21 to go to the start of the step loop and at least PF23 to go one web page ahead in the step loop. In this case, the ITS is ready to ship these instructions to the SAP system till the display screen doesn’t change and it detects that the step loop is finished. This is a straightforward way to map step loops in ITS. It isn't as quick as desired as a consequence of the ITS has to send a number of requests to SAP to get the whole loop. For this and for other conditions, it is also potential to send an ABAP internal desk to the ITS in one step.

Debugging

ABAP programmers are used to executing debugging within the SAP system from the menu in the development transactions or with the /h OK-CODE.When debugging, the programmer can see step by step the execution of the ABAP, in addition to displaying the values in the fields or replacing them. Typically the transaction works in R/three but the HTML template gives completely different information. You can begin debugging additionally from any HTML page in R/3. First of all, it is finest to allow the performance in the A-Gate:

HKEY_LOCAL_MACHINE->SOFTWARE->SAP->ITS->2.0->VITS->Packages->Agate->AdminEnabled 1

Then you'll give you the option to execute the HTML scenario.Once you need to start debugging, just start a SAPGUI towards the ITS host, system number 00. A SAPGUI display screen will pop up with the R/3 display screen where your HTML browser is. Then you may enter /h within the OK-CODE and start debugging in R/3, take a look at the fields and inside tables, set breakpoints, and so on.

Frames

Subscreens are very useful in the Screen Painter in R/3. They allow the developer to separate an SAP display into completely different subscreens, every of them with its own processing logic.SAP subscreens are mapped to HTML frames with SAP@Web Studio.Nearly all the IACs in SAP are programmed with subscreen frames. The one restriction if you program with frames is that HTML allows you to change one body at one time, so the ABAP developer ought to change both just one subscreen at one time, or the whole screen.

Related Posts:


MySAP CRM architecture and E procurement introduction
MySAP CRM E procurement
MySAP CRM business intelligence at work
CRM data administration in mysap and business intelligence
sap internet transaction server introduction
sap internet transaction architecture

COMMUNICATION INTERFACE IN ABAP COMPLETE

COMMUNICATION INTERFACE 6 ASYNCHRONOUS DATA TRANSFER

ASYNCHRONOUS DATA TRANSFER:

One of the prerequisites of CPI-C communication is that the recipient system is available.Asynchronous data transmission (or buffered data transmission) is useful for cases where the recipient system is unavailable or overloaded (and so unable to receive and process data).

The data that is to be sent is first placed in a queue. Then a job is automatically scheduled that starts an active CPI-C send program (driver program) at the set time to read and send the queue data.You specify the recipient passive program in the queue attributes, which is then called at the appropriate time to receive and process the data.

The system only schedules the transmission job for queues with the value 'A' (automatic transmission) in the 'Start mode' attribute.

The job has the same name as the queue, and is scheduled for the time and date specified in the 'Transmission date/time' attribute. The only step in the job is to call the active CPI-C program specified in the 'Driver program' attribute of the queue.

The specified driver program is started automatically at the chosen start time. This active CPI-C program calls the relevant recipient program and sends the queue to it. The driver program reads the relevant parameters for the CPI-C communication from the corresponding queue attributes.

The SAP standard driver program, RSQAPI20, has the following properties:
- If the connection to the remote system cannot be established, the driver program schedules itself again (-> new job). You can set the interval between attempts using the constant DELAYTIME in the driver program. (300 sec.) .

- If the 'CLIENT' attribute (client in remote SAP system) is set; the corresponding CPI-C connect string is constructed and sent automatically after establishing the connection with the remote system.

The queue records are then read and sent in ping pong mode.
LUWs that have been sent successfully are deleted from the queue (an LUW is a set of records that belong together). (LUW = records that belong together)

- If the connection is terminated when the data is transmitted, the current LUW in the queue is rolled back, the queue status is set to 'E' and an express mail is sent to the queue creator.

(In this error case the recipient program must roll back the current LUW in the remote system itself.). If required, you can adapt the driver program to your own needs, or write your own driver program for use in queue transmission.

You must create a passive recipient program in the remote system that can receive and process the queue data.

CREATE A QUEUE.

OPENING QUEUE:

When you open a queue using the function module QUEUE_OPEN, you must supply the following parameters:

NAME Name of queue to be opened

This parameter is not specified when opening a new queue.The queue therefore the queue receives the current time stamp as its name, which you receive from the
export parameter NAME of the function module.)

OPENMODE 'W' Write ; ' R ' : Read

ERASE ' X ' : Deletes the queue shell when the queue is empty


TYPE ' U ' : Unique (Queue can only be filled with data once,

cannot subsequently be extended) Appendable (Queue may be extended, even during transmission)

START ' A ' : Automatic (queue data is automatically sent via an internally scheduled job at the specified send time (DATE / TIME).

' M ' : Manual (queue must be sent manually using Transaction SM38) -> internal scheduling of an immediate job)


'E' : Event controlled (Used to start transmission immediately once the queue has been created.) To do this, you must manually create an appendable queue from the start mode 'E' first using Transaction SM38. When the queue is activated, a job is created internally that is executed at the event SAP-QEVENT / parameter . If you place data from this program in this queue, the accompanying event is triggered automatically at QUEUE_CLOSE. The scheduled job for sending data begins running.

DATE/TIME Transmission start time and date (only applies to start type 'A').

The function module QUEUE_PUT requires the following input parameters:
NAME Name of the queue into which you want to place the record.
SATE Position of the current record within its LUW:
' S ' : Current record is the only record in the LUW
'F': Current record is the first (but not only) record in the LUW
SAPCE: Current record is neither the first nor the last record in the LUW
'L': Current record is the last of several records in the LUW
BUFFER Current record
LENGTH Length of current record

The function module QUEUE_CLOSE requires the following input parameters:
NAME Name queue to be closed

OPENMODE Open mode used when queue was opened

If you created the queue with start mode 'A' (automatic transmission), the corresponding job is scheduled automatically when you call QUEUE_CLOSE. The job name is the same as the queue name.

If you modify driver program RSQAPI20 or write your own driver program, you can use the above function modules to read or delete queues. For further information about their use, refer to their documentation in the Function Builder.

You can administrate queues in the queue pool using Transaction SM38.

The standard R/3 System contains the following demonstration programs, which show how to create a queue and send and receive data:
Creating a queue: SAPBC415D_CREATE_QUEUE or RSQAPI10
Sending data: RSQAPI20 (Standard driver program)
Receiving data: RCVQDATP (Passive recipient program in the remote system)

You can also use asynchronous (buffered) data transmission from an R/2 System. For more information, refer to the online documentation on CPI-C / Asynchronous data transmission.

FOR RELATED POSTS SEE BELOW.

COMMUNICATION INTERFACE PART 5
COMMUNICATION INTERFACE PART 4
COMMUNICATION INTERFACE PART 3
COMMUNICATION INTERFACE PART 2
COMMUNICATION INTERFACE PART 1

COMMUNICATION INTERFACE 5

CALLING AN ABAP PROGRAM REMOTELY :

You can call ABAP programs (or more precisely, ABAP form routines) in an R/2 or an R/3 System remotely using CPI-C. However, you cannot communicate with them directly.Instead, the connection must be made via the SAP Basis System of the passive program.

In the R/2 System, the SAP Basis System is the task handler, called using X1SA. In the R/3 System, it is the dispatcher which you address using sapdpxx.




The above procedure for calling a remote ABAP routine is the same, regardless of whether the active program is an ABAP program in an R/2 or an R/3 System, or a C program in an external system.The valid format for a connect string is contained in the ABAP Dictionary structure CPICCONN. Refining a structure with reference to it is the easiest way to create your own connect string.

If you are programming in C, use the call SAP_CMLOGON to create a connect string in EBCDIC.All of the values in a connect string must be entered in uppercase.In the NAME field, enter a user with type CPI-C that is already defined in the relevant client of the remote system.The one-character language key is converted into the corresponding two-character key by the remote Basis system. This must be made known to the remote system.

In the PROG field, enter the main program of the remote routine. The syntax must be correct. The name of this main program may have a maximum of 8 characters.

The form routine that you enter in the MODN field must exist within the specified main program.If the remote Basis system's check on the connect string is positive (valid logon data, main program and form routine syntactically correct, and both exist in the target system), the active program receives the 12 byte EBCDIC string 'APPCCPIC1' with the return code 0 and send permission. As of this point, the system can communicate directly with the called ABAP routine. The data format is completely open.

If the checks fail, the remote Basis system sends a corresponding error message with the 12 byte header 'FREECPIC1' in EBCDIC and terminates the connection.


DEVELOPMENT AND TEST ENVIRONMENT :

In R/3, the CPI-C calls are contained in the language scope of ABAP.

However, on external platforms you must install the CPI-C library (CPI-C-SDK). How to use the CPI-C calls is described in the text files and sample programs delivered with the SDK.

The standard system contains the CPI-C test programs ACPICT1 and ACPICT2 (in R/2 from Release 5.0G). ACPICT1 is an active CPI-C program, ACPICT2 is a passive CPI-C program. You can use them to test R/3 - R/3 and R/3 - R/2 CPI-C connections.

SAP also supplies the SAP CPI-C SDK (Software Development Kit) with every SAP R/3 System. This helps you to develop CPI-C programs in C. The SDK contains the C programs ccpict1t (active) and ccpict2t (passive).

You can use these to test connections between two external systems, but, above all, to test connections between external systems and an R/3 System. ccpict1 can call not only ccpict2t remotely, but also the passive ABAP program ACPICT2. Likewise, the active ABAP program ACPICT1 can call the passive C program ccpict2t.

When you run ACPICT1, you must specify:
- If ACPICT2 or ccpict2t should be called remotely (parameter 'ABAP') ,
- If test data should be converted from ASCII to EBCDIC (parameter 'CONVERT').

If you choose to call ACPICT2, you must also enter the logon data for the connect string on the selection screen of ACPICT1.

You can use the Debugger to analyze an active ABAP CPIC-C program in R/3. This does not apply in R/2, since screen changes are not allowed in R/2 during a CPI-C connection (Debugging involves screen changes). You cannot analyze passive programs in the Debugger.

you can use the Gateway monitor (Transaction SMGW) to monitor SAP Gateway activity (existing CPI-C connections) and generate and display gateway traces.

One of the tasks of the system log is to record failed CPI-C logons that have been sent from remote systems to the current system. You can display the system log using Transaction SM21.

FOR RELATED POSTS SEE BELOW.

COMMUNICATION INTERFACE 4

The COMMUNICATION RECEIVE statement causes the transmission of the send buffer along with the send permission, and waits for data.
Parameters:

ID Conversation ID

Length Use this parameter to specify which part of the specified receive buffer should be used. Optional; if you do not specify a length, the system uses the whole receive buffer. The field must have type P.

HOLD This addition (without a field) causes the work process to be stopped (no roll- out/roll-in) while it waits from the RECEIVE.
You would use this, for example, when using RECEIVE within a SELECT loop.

Output:

BUFFER Receiving buffer (contains data received)

RECEIVED Number of character received This field must have the type X4.

DATAINFO Information on whether the receive buffer was large enough for the

incoming SEND packet. This field must have the type X4.

STATUSINFO Information on the sender authorization. This field must have the type X4.

RETURNCODE

The return parameter DATAINFO specifies whether data has been received and whether the receive buffer (or section of the buffer) was large enough to receive the entire SEND packet.

DATAINFO can have the following values:

CM_NO_DATA_RECEIVED --> No data received
CM_COMPLETE_DATA_RECEIVED --> Data received and RECEIVE buffer is large enough
CM_INCOMPLETE_DATA_RECEIVED --> Data received but RECEIVE buffer to small to receive entire SEND packet. (In this case, the remaining segments must be transmitted as long as there are other RECEIVEs to be received, until DATAINFO has the value CM_COMPLETE_DATA_RECEIVED.)

The return parameter STATUSINFO indicates whether send permission has also been received. STATUSINFO may take the following values:
CM_NO_STATUS_RECEIVED --> No send permission received
CM_SEND_RECEIVED --> send permission received

You use this call to close the CPI-C connection. Any data in the local buffer that has not yet been sent is transmitted first.

The connection should always be closed by the program with send permission, otherwise, any data that has not yet been received is lost.

Data conversion is necessary when two systems that use different character sets communicate with each other.

To convert the character sets, you use the ABAP command
TRANSLATE FROM CODE PAGE '. . .' TO CODE PAGE '. . .'
This lets you convert between of different code pages. The contents of the field you specify is converted from the source code page representation to the target code representation.

You can display and/or maintain the codepages in R/3 using Transaction SPAD.

FOR RELATED POSTS SEE BELOW.

COMMUNICATION INTERFACE PART 6
COMMUNICATION INTERFACE PART 5
COMMUNICATION INTERFACE PART 3
COMMUNICATION INTERFACE PART 2
COMMUNICATION INTERFACE PART 1

COMMUNICATION INTERFACE 3

The COMMUNICATION RECEIVE statement causes the transmission of the send buffer along with the send permission, and waits for data.

Parameters:

ID Conversation ID
Length Use this parameter to specify which part of the specified receive buffer should be used. Optional; if you do not specify a length, the system uses the whole receive buffer. The field must have type P.

HOLD This addition (without a field) causes the work process to be stopped (no roll- out/roll-in) while it waits from the RECEIVE.
You would use this, for example, when using RECEIVE within a SELECT loop.

Output:

BUFFER Receiving buffer (contains data received)
RECEIVED Number of character received This field must have the type X4.
DATAINFO Information on whether the receive buffer was large enough for the incoming SEND packet. This field must have the type X4.
STATUSINFO Information on the sender authorization. This field must have the type X4.
RETURNCODE

buffer (or section of the buffer) was large enough to receive the entire SEND packet.

DATAINFO can have the following values:

CM_NO_DATA_RECEIVED --> No data received
CM_COMPLETE_DATA_RECEIVED --> Data received and RECEIVE buffer is large enough
CM_INCOMPLETE_DATA_RECEIVED --> Data received but RECEIVE buffer to small to receive entire SEND packet. (In this case, the remaining segments must be transmitted as long as there are other RECEIVEs to be received, until DATAINFO has the value CM_COMPLETE_DATA_RECEIVED.)

The return parameter DATAINFO specifies whether data has been received and whether the receive The return parameter STATUSINFO indicates whether send permission has also been received. STATUSINFO may take the following values:

CM_NO_STATUS_RECEIVED --> No send permission received
CM_SEND_RECEIVED --> send permission received

You use this call to close the CPI-C connection. Any data in the local buffer that has not yet been sent is transmitted first.

The connection should always be closed by the program with send permission, otherwise, any data that has not yet been received is lost.

Data conversion is necessary when two systems that use different character sets communicate with each other.

To convert the character sets, you use the ABAP command
TRANSLATE 

COMMUNICATION INTERFACE 2

The COMMUNICATION RECEIVE statement causes the transmission of the send buffer along with the send permission, and waits for data.

Parameters:

ID Conversation ID
Length Use this parameter to specify which part of the specified receive buffer should be used. Optional; if you do not specify a length, the system uses the whole receive buffer. The field must have type P.

HOLD This addition (without a field) causes the work process to be stopped (no roll- out/roll-in) while it waits from the RECEIVE.
You would use this, for example, when using RECEIVE within a SELECT loop.

Output:

BUFFER Receiving buffer (contains data received)
RECEIVED Number of character received This field must have the type X4.
DATAINFO Information on whether the receive buffer was large enough for the incoming SEND packet. This field must have the type X4.
STATUSINFO Information on the sender authorization. This field must have the type X4.
RETURNCODE

buffer (or section of the buffer) was large enough to receive the entire SEND packet.

DATAINFO can have the following values:

CM_NO_DATA_RECEIVED --> No data received
CM_COMPLETE_DATA_RECEIVED --> Data received and RECEIVE buffer is large enough
CM_INCOMPLETE_DATA_RECEIVED --> Data received but RECEIVE buffer to small to receive entire SEND packet. (In this case, the remaining segments must be transmitted as long as there are other RECEIVEs to be received, until DATAINFO has the value CM_COMPLETE_DATA_RECEIVED.)

The return parameter DATAINFO specifies whether data has been received and whether the receive The return parameter STATUSINFO indicates whether send permission has also been received. STATUSINFO may take the following values:

CM_NO_STATUS_RECEIVED --> No send permission received
CM_SEND_RECEIVED --> send permission received

You use this call to close the CPI-C connection. Any data in the local buffer that has not yet been sent is transmitted first.

The connection should always be closed by the program with send permission, otherwise, any data that has not yet been received is lost.

Data conversion is necessary when two systems that use different character sets communicate with each other.

To convert the character sets, you use the ABAP command
TRANSLATE 

COMMUNICATION INTERFACE 1

The SAP R/3 System has a modular software architecture that follows the software-oriented client/server principle.The system distributes presentation, application logic, and data storage across hosts at different levels. This forms the basis of its scalability.

The lowest level is the database level. The data is administrated on this level using a relational database management system (RDBMS). As well as master and transaction data, it also stores programs and the metadata that describes the R/3 System and the structure of its data.

The second level is the application layer. This consists of ABAP programs. You can complement the existing SAP functions by writing your own programs using the ABAP Workbench.The third level is the presentation layer (SAPgui). It contains the user interface with which end users enter and display data. You can also use alternative front ends (AFEs) at this level.

Communication interfaces and data interfaces are different. In addition to the file I/O, the communication interfaces are the gate to external communication, while the data interfaces are used for read and write accesses to the R/3 database.

The following data interfaces are available:
Batch Input, Direct Input, CALL TRANSACTION USING, SAP-SQL (OpenSQL), Native SQL.

An instance is an administrative unit in an R/3 System. It describes which services (dialog, update, enqueue, background, spool gateway) are available . .) on the corresponding application server.

The dispatcher process on an application server coordinates tasks within an instance. It communicates with other instances in the same R/3 System via the message server, and with external systems via the gateway. As of Release 3.0, a gateway service (work process) belongs to each instance (application server). You can also install a gateway service on a non-R/3 host.

When an application server communicates (dispatcher) with external systems, it usually uses its own gateway work process. However, it may be more useful to use a gateway that runs on a dedicated host, for example, for communication with SNA, where a gateway with an add-on is required.

This is done to minimize the effort needed for configuration and maintenance (the gateway add-on is only on one host instead of each application server). You may have to use a remote gateway, for example, with remote Windows NT applications, because the remote program can only be started via this gateway.

R/3 communication always runs through the SAP gateway and is based on TCP/IP.

For R/3 communication with an IBM-R/2 System or other LU6.2 systems, where the LU6.2 transport protocol is used, you need an SAP gateway with additional SNA functions.

RFC is based on CPI-C, which means an RFC call is always transmitted in CPI-C calls.
CPI-C can be based on TCP/IP or LU6.2, depending on the platform.

FOR RELATED POSTS SEE BELOW.


ABAP Run Time Enviromemnt Lesson Ninteen

ABAP program contains the following components:

Source code ...containing the ABAP statements

Screens ...consist of the screen layout and associated flow logic . You normally create the layout of a screen using the Screen Painter. However, there are special kinds of screens, called selection screens and lists, whose layout and flow logic are designed exclusively using ABAP statements.Interface ...contains all of the entries in the menus, the standard toolbar, the application toolbar, and function key settings. It contains titles and statuses. A status is a collection of function key settings and menus.

Text elements ... are language-specific. They can be translated either directly from the text element maintenance tool, or using a special translation tool.

Documentation... is also language-specific. Always write documentation from the user's point of view. If you want to document the programming techniques you have used, use comments in the program code instead.

Variants... allow you to predefine the values of input fields on the selection screen of a program.

ABAP is an event-driven programming language, and as such is suited to processing user dialogs.

The source code of an ABAP program consists of two parts:

Declarations :Declarations include the statements for global data types and objects, selection screens, and (in ABAP Objects) local classes and interfaces within the program.Processing Blocks (indivisible program units):Each processing block must be programmed as a single entity. There are two basic kinds of processing blocks:

Event Blocks :

Event blocks are introduced by an event keyword. They are not concluded explicitly, but end when the next processing block starts.Dialog Modules and Procedures:Dialog modules and procedures are introduced and concluded using keywords.The contents of all processing blocks form the processing logic.

When you generate the program, these parts are compiled to form the load version. This is interpreted at run time.In the simplest case, your program will consist of a single source code unit that contains all of the relevant processing blocks. To make your programs easier to understand, and to increase the degree to which your programs can be reused, you should use include programs.When you create a program from the Object Navigator, the system proposes to create a TOP include for the pro gram. This option is particularly useful when you create module pools.When you create a processing block, the system always asks in which include program it should insert the relevant ABAP code.

If the include program does not exist, the system creates it and inserts an INCLUDE statement for it in the main program.If you name your program according to the naming convention SAPM{Y|Z} and then create a new processing block, the system proposes the name of the new include using the following convention:{Y|Z}. When you create further processing blocks, thesystem automatically proposes the appropriate include program.In this way, the system helps you to create programs whose structures are easy to understand. The standardized naming convention will help you to find your way around other people's programs.

The R/3 System is based on a client/server architecture with the three tiers data base server, application server, and presentation server. It allows a large number of users with inexpensive and relatively slow machines to take advantage of a smaller number of faster, expensive application servers by occupying work processes on them.

Each work process on an application server is assigned to a work process on the (expensive, even more powerful) database server. User dispatching is the process by which the individual clients at presentation server level are assigned to a work process for a particular length of time. The work process in turn is linked to a work process in the database.

Once the user input from a dialog step has been processed, the user and program context is "rolled out" of the work process so that the work process can be used for another dialog step from another user while the first user is making entries on the next screen. This makes the best possible use of the resources available on the application server.

The three-tier architecture makes the system easily scalable . To add extra users, you merely have to install more inexpensive presentation servers. You can also increase the efficiency of the whole system by adding extra application servers with their associated work processes.

The work processes in the middle layer - often called the application server - are software components that are responsible for processing dialog steps. They are implemented as "virtual machines". This ensures that ABAP programs can run independently of the hardware platform on which the R/3 System is installed.
Work processes contain other software components that are responsible for various tasks within a dialog step:

Screen processor

The screen processor is responsib le for communication between the SAPgui and the work process (via the dispatcher). It processes the screen flow logic and passes field contents to the processing logic in the program.

ABAP processor

The ABAP processor executes the processing logic in the ABAP program and communicates with the database interface. The screen processor tells the ABAP processor which part of the program (module) needs to be processed (according to the screen flow logic).

Database interface

The database interface is responsible for the communication with the database. It allows access to tables and Repository objects (including ABAP Dictionary objects), controls transaction execution (COMMIT and ROLLBACK), and administers the table buffer on the application server.

The individual processing blocks are called in a predetermined sequence at runtime, regardless of the position in which they occur in the program. Once a processing block has been called, the statements within it are processed sequentially.

Event block

If the system program or a user triggers an event for which the corresponding event block has been written in the processing logic, that event block is processed. The program flow is controlled either by the system or the user.

Modularization unit

When the system encounters a modularization unit call within a processing block, it calls the corresponding processing block. In this case, the program flow is controlled by the programmer.

Assigning transaction codes

To allow a module pool to be executed, you must assign a transaction code to it. You can (but do not have to) assign a transaction code to an executable (type 1) program.You assign a dialog transaction to a module pool. The following steps occur when you run a dialog transaction:

First, the LOAD-OF-PROGRAM event is triggered. Once this event block has been executed, the ABAP processor passes control to the screen processor. For an example of how to use this new event, refer to the example in the Function Groups and Function Modules unit.

The screen processor processes the intial screen specified in the transaction definition. The initial screen can be a selection screen (regardless of the program type). The PROCESS BEFORE OUTPUT event is triggered and control passes to the ABAP processor, which processes the first PBO module.

The ABAP processor executes the processing block and returns control to the screen processor. Once all PBO modules have been processed, the contents of any ABAP fields with identically named corresponding fields on the screen are transported to the relevant screen fields. Then the screen is displayed (screen contents, active title, active status).

Once the user has chosen a dialog function (such as ENTER), the contents of the screen fields are transported back to the corresponding identically-named fields in the ABAP program, and the processing blocks that belong to the PROCESS AFTER INPUT event are processed. The system then continues by processing the next screen.

The only processing logic that is processed in a dialog transaction are the statements belonging to the LOAD-OF-PROGRAM event and those occurring in the various modules.However, you can also use the statement LEAVE TO LIST-PROCESSING. This makes all of the list processing events available to you.You can only assign a report transaction to an executable (type 1) program. In a report transaction, the system calls particular events in a fixed sequence, and calls a series of standard screens. The following steps occur when you run a report transaction:
ABAP PROGRAM INTERFACE
ABAP FAQ'S ON MODULIZATION
SAP project introduction in the best ERP
Authorization and implementation of SAP
DATA TYPES AND DATA OBJECTS DAY 20