|
||||||||||
|
COMMUNICATION ( ABAP Keyword)
COMMUNICATION ( ABAP Keyword) introduction & details
COMMUNICATIONVariants1. COMMUNICATION INIT DESTINATION dest ID id. 2. COMMUNICATION ALLOCATE ID id. 3. COMMUNICATION ACCEPT ID id. 4. COMMUNICATION SEND ID id BUFFER f. 5. COMMUNICATION RECEIVE ID id ...BUFFER f ...DATAINFO d ...STATUSINFO s. 6. COMMUNICATION DEALLOCATE ID id. The COMMUNICATION statement allows you to develop applications which perform direct program-to-program communication. The basis for this is CPI-C (Common Programming Interface - Coummunication), defined by IBM within the context of SAA standards as a standardized communications interface. The COMMUNICATION statement provides the essential parameters for implementing simple communication. Its starter set covers the following functionality: Establishing a connection Accepting a communication Sending data Receiving data Closing a connection The other essential part of such a communication is an ABAP/4 program containing a FORM routine which is executed when the connection has been established. This program may be in an R/3 System or an R/2> System. Here, you should be aware that the application programs themselves declare a protocol. In particular, logon to the partner SAP System must be performed in the calling program. The partner programs must also manage different character sets, e.g. ASCII - EBCDIC themselves. A facility known as the Remote Function Call ( RFC ) has now been developed to save users from having to deal with these problems. External programs (e.g. a program written in C on a UNIX workstation) can also be used as partner programs. For this purpose, SAP provides a platform-specific development library. For more detailed information about communication in the SAP System, you can refer to the manual SAP Communication: Programming Further information about communication can be found in any of the following literature: IBM SAA Common Programming Interface Communication Reference SC 26-4399 X/Open Developers' Specification CPI-C X/Open Company Ltd. ISBN 1 872630 02 2 Variant 1COMMUNICATION INIT DESTINATION dest ID id.Addition... RETURNCODE rcEffectInitializes a program-to-program connection.The partner system is specified in the dest field. You can use any name you like, but it must be entered in the connection table TXCOM and can be no more than 8 characters long. This entry in TXCOM determines to which physical system a connection is established using the symbolic name of the target system. In the field id , the system assigns an eight-character ID number of type C to the connection. The system field SY-SUBRC contains an appropriate return code value. All return codes can be read using their symbolic names. For this purpose, you can use the program RSCPICDF which contains these names and can be included, if required. Addition... RETURNCODE rcEffectStores the return code in the field rc .Example
Variant 2COMMUNICATION ALLOCATE ID id.AdditionAs for variant 1.EffectSets up a program-to-program connection. The call must immediately follow COMMUNICATION INIT .Example
Variant 3COMMUNICATION ACCEPT ID id.AdditionAs for variant 1.EffectAccepts a connection requested by the partner program. id is a field of type C which is 8 characters long and contains the ID of the accepted connection after a successful call.Example
Variant 4COMMUNICATION SEND ID id BUFFER f.Additions1. ... RETURNCODE rc2. ... LENGTH len EffectSends data to the partner program. The data is stored in the field f which follows the key word parameter BUFFER . It is sent in the full length of the field f . If the partner program is part of a system which has a different character set, you must perform an appropriate conversion yourself. To do this, use the TRANSLATE statement.Addition 1... RETURNCODE rcEffectStores the return code in the field rc .Addition 2... LENGTH lengEffectSends the contents of the field f to the partner program in the specified length.Example
Since the length is specified explicitly in this example, only the part ' The quick brown fox ' is transferred from the contents of the field RECORD . Variant 5COMMUNICATION RECEIVE ID id ...BUFFER f ...DATAINFO d ...STATUSINFO s.Additions1. ... RETURNCODE rc2. ... LENGTH leng 3. ... RECEIVED m 4. ... HOLD EffectReceives data in the field f . If no length is explicitly defined, the amount of data accepted depends on the length of the field. The fields d and s contain information about the receive process. You can address the contents of these using symbolic names in the include program RSCPICDF . The field d indicates whether the data was received in its entirety. The status field s informs the RECEIVE user of the status of the program. Here, it is important to know whether the program is in receive status or send status. It is, for example, not possible to send data if the program is in receive status.For more detailed information about these protocol questions, refer to the manuals listed above. Addition 1... RETURNCODE rcEffectStores the return code in the field rc .Addition 2... LENGTH lengEffectReceives data only in the specified length leng .Addition 3... RECEIVED mEffectAfter the call, m contains the number of bytes received by the partner program.Addition 4... HOLDEffectNormally, data is received asynchronously, i.e. the system performs a rollout. However, this may not be desirable if, for example, the data is received in a SELECT loop, the database cursor is lost due to the rollout and the loop is terminated. To prevent a rollout, you can use the addition HOLD . Then, the SAP process waits until the data has been received and is thus available for use by other users.NoteThe fields d , s and m which contain information about the outcome of the call must be of type X with length 4.Example
Variant 6COMMUNICATION DEALLOCATE ID id.AdditionAs for variant 1 EffectSevers connection and releases all resources.Example
NoteThe above examples illustrate the basic functionality of the key words. However, the example program can only have an external system as partner. If the partner is an SAP System, the calling program must first logon to the SAP System and receive an acknowledgement. Only then can you begin to transmit the actual data. When logging on to an R2 System and an R3 System, the logon data must be converted to EBCDIC . All user data should be converted according to the partner system. This is in the concluding example of an R/3 - R/2 connection.Example
Latest Added TutorialsSAP PRE-SALE(very urgent requirement) - SAP JOBS INDIA SAP PRE-SALE(very urgent requirement) - SAP JOBS INDIA Experiense Required for this job: 6-9 years exp Job Locations: Mumbai Apply for this SAP Job in INDIA SAP ABAP Professionals - SAP JOBS INDIA SAP ABAP Professionals - SAP JOBS INDIA Experiense Required for this job: 5 - 7 years exp Job Locations: Bengaluru / Bangalore, Chennai, Others Apply for this SAP Job in INDIA Junior SAP Consultants - SAP JOBS INDIA Junior SAP Consultants - SAP JOBS INDIA Experiense Required for this job: 0-5 years exp Job Locations: Bengaluru/Bangalore Apply for this SAP Job in INDIA SAP Plant Maintanence with ETM module - SAP JOBS INDIA SAP Plant Maintanence with ETM module - SAP JOBS INDIA Experiense Required for this job: 2-7 years exp Job Locations: Pune Apply for this SAP Job in INDIA SAP Plant Maintainence /PM Consultant/Sr.consultant/TL - SAP JOBS INDIA SAP Plant Maintainence /PM Consultant/Sr.consultant/TL - SAP JOBS INDIA Experiense Required for this job: 3-8 years exp Job Locations: Gurgaon, Kolkata Apply for this SAP Job in INDIA Immediate position for SAP ABAP Professionals. - SAP JOBS INDIA Immediate position for SAP ABAP Professionals. - SAP JOBS INDIA Experiense Required for this job: 5-9 years exp Job Locations: Bengaluru/Bangalore, Chennai, Gurgaon Apply for this SAP Job in INDIA SAP - IS Retail (SRS) Consultant - SAP JOBS INDIA SAP - IS Retail (SRS) Consultant - SAP JOBS INDIA Experiense Required for this job: 5-8 years exp Job Locations: Bengaluru/Bangalore Apply for this SAP Job in INDIA SAP BPC/EPM - SAP JOBS INDIA SAP BPC/EPM - SAP JOBS INDIA Experiense Required for this job: 4-9 years exp Job Locations: Bengaluru/Bangalore, Hyderabad / Secunderabad, Pune Apply for this SAP Job in INDIA LOOKING FOR TECHNICAL AND FUNCTIONAL LEADS AND MANAGERS(SAP) - SAP JOBS INDIA LOOKING FOR TECHNICAL AND FUNCTIONAL LEADS AND MANAGERS(SAP) - SAP JOBS INDIA Experiense Required for this job: 3-8 years exp Job Locations: Bengaluru/Bangalore, Chennai Apply for this SAP Job in INDIA SAP FICO Consultant - SAP JOBS INDIA
SAP FICO Consultant - SAP JOBS INDIA Experiense Required for this job: 5-10 years exp Job Locations: Hyderabad / Secunderabad Apply for this SAP Job in INDIA Most readed 5 TutorialsList of SAP MM Transaction codes This documentation covers the details of SAP MM Transaction codes WRITE - Output to a list ( SAP ABAP Keyword) WRITE ( Output to a list ) is a keyword used in SAP ABAP programming.This tutorial covers its introduction & syntax details. FI Accounts Receivable and Accounts Payable | SAP FI PDF manual The following topics are an introduction to the Accounts Receivable and Accounts Payable application components. List of SAP HR TABLES and Infotypes tables Detailed full list of tables and infotypes used in SAP HR module. Report Programming in HR | SAP PDF study material )
This document is intended for all persons who would like to program their own reports in SAP HR or customize standard ones. The documentation is not intended to be an introduction to programming. It contains just the special features that form part of programming in SAP HR.A general knowledge of ABAP programming and HR applications is a prerequisite. This can be acquired by reading the relevant documentation and attending the courses.This document provides information which enables programmers to become acquainted with the special features of programming in HR. |
ABAP SAP Functional PDF Tutorials FI (Financial) SAP References transaction codes TOOLS SQL Trace tool SAP Emerging Technologies
SAP
Advanced Planner and Optimizer (APO)
|
|||||||||||||||||
Custom Search
|
||
|
site contact sapbrain.support@gmail.com All of the product names here are trademarks of their respective companies. The site www.sapbrainsonline.com no way affiliated with SAP AG. Use information on this site at your own risk. Information furnished in the site is collected from various sites and posts from users. This site does not host any files on its server. If any compliants about the posts please contact us at sapbrain.support@gmail.com, we are ready to move the posts. Complete SAP Study materials | SAP JOBS | PDF Tutorials |
||