Sunteți pe pagina 1din 7

29th MAY CA Introduction

Cross Applications : is a module in sap.


In CA :
SAP to SAP Communications
1. RFC ( Remote Function Call )
2. IDOC ( Intermediate Documents)
3. EDI ( Electronic data Interchange)
4. ALE ( Application Link enabling)
SAP to Internet Communications
ITS ( Internet Transaction Services ) : Is used before 4.6B version of SAP (Right Now is
not used)
JCO : Java Connector
Netweaver : is the Tool created By SAP for Internet communication.
( Creating Web Applications and Performing transaction between web customer and R/3
System ).
Here Requirements are
* SAP ABAP
* HTML
* JSP/Servlets
SAP to Non SAP Communications

BAPI : Business Application programming Interface.


BAPI is an Active-x control for VB applications.
BAPI is a java bean for java applications.
Using this Concept we can communicate the SAP with Non SAP system like VB or Java
etc.

CA :
What is a client in SAP?
If the data of One Client to be acessed from Another Client, is also cross
Applications.

By default select statement can get the data of the table only from the current client.

* client specified is the option used in Select statement to use criteria based on field
"MANDT" to specify the other client of SAME r/3 for fetching data.
Syntax:
Select <fields_list> from <tab> client specified where mandt = <req_client>.
abap statements.
endselect.

* DEMO EXAMPLE

TABLES KNA1.
SELECT * FROM KNA1 CLIENT SPECIFIED WHERE MANDT = '800'.
WRITE : / KNA1-MANDT , KNA1-KUNNR , KNA1-LAND1 , KNA1-ORT01.
ENDSELECT.
WRITE : / SY-DBCNT.

Note : This query can be used only between Same R/3 For fetching data from other
clients.

When ever we need to Access the data from Other R/3 then we need to depend on RFC
( Remote Function Call ).

Any Function Module added with a remote Enable Property is called as Remote Function
Call.

This function Module can be accessed by SAME r/3 networks , other R/3 networks and
even Non R/3 systems also.

29th MAY chain end chain in MPP

How to add a search help to MPP input fields?

Search help as Dictionary Object can be assigned as a property to Parameter fields using
"match code object" option.

It can be assigned to Data Elements to add Search Help Functionality for I/O Fields.

CHAIN - ENDCHAIN. IS A a statement in Flow Logic editor to make statements to be


executed one after another in sequential Order.

Under this statement we can use Module Statement or Field Statement of Flow logic
editor to invoke the ABAp code or to provide search help functionality.
By default all statements in Flow logic editor are executed based on Type of action and
type of event. But This chain - endchain statement executes all statements in one after
another.
example code in Flow logic editor.

PROCESS AFTER INPUT.


MODULE USER_COMMAND_0123.
CHAIN.
FIELD IO1 SELECT * FROM KNA1 WHERE KUNNR = IO1.
FIELD IO2 SELECT * FROM MARA WHERE MATNR = IO2.
FIELD IO3 SELECT * FROM LFA1 WHERE LIFNR = IO3.
ENDCHAIN.
30TH MAY RFC R3 2 R3

IF SAPCLASS IS THE SOURCE SYSTEM (192.3.3.1), CREATE A FUNCTION


MODULE USING FOLLOWING NAVIGATIONS.

* STEP #1.

* connect to SAP Class ( 800/sapuser/money )


* Create FM using SE37
SE37 -> NAME THE FM ( ZRFCGET ) -> CREATE -> ASSIGN THE FUNCTION
GROUP ( ZFUNGRP9301 ) -> ENTER DESCRIPTION FOR FM ( ANY ) -> CLICK
ON CONTINUE ( ENTER ) -> CLICK ON "ATTRIBUTES" TAB BUTTON , SET THE
FUNCTION MODULE AS "REMOTE ENABLED" -> CLICK ON TABLES TAB
BUTTON -> DEFINE AN INTERNAL TABLE ( KTAB LIKE VBAK) -> CLICK ON
SOURCE CODE -> DEFINE THE CODE IN FUNCTION MODULE AS
FUNCTION ZRFCGET.
SELECT * FROM VBAK INTO TABLE KTAB.
ENDFUNCTION.
-> SAVE THE FUNCTION MODULE -> ACTIVATE THE FUNCTION MODULE.

* STEP #2.
* come back to Invoking system (192.8.8.3)
* Create a Logical System.
i) DEFINE LOGICAL SYSTEM
SALE -> ALE -> SENDING AND RECEIVING SYSTEM -> LOGICAL
SYSTEMS -> DEFINE LOGICAL SYSTEMS ( CLICK ON CLOCK ICON) -> OPENS
AN INTERFACE WITH LIST OF ALL LOGICAL SYSTEMS -> CLICK ON NEW
ENTRIES FROM APPLICATION TOOLBAR -> OPENS ANOTHER INTERFACE ->
NAME THE LOGICAL SYSTEM (SAPCLASS ) -> ENTER DESCRIPTION (ANY) ->
SAVE THE ENTRIES -> ASSIGN WITH A REQUEST NUMBER -> COME BACK.
ii) Assign Client To Logical System
This step is used in Logical system, to activate the object. When ever Logical system
is assigned to any Client is activated.

SALE -> ALE -> SENDING AND RECEIVING SYSTEMS -> LOGICAL SYSTEMS ->
ASSIGN CLIENT TO LOGICAL SYSTEM ( CLICK ON CLOCK ICON ) -> Open the
List of Clients in SAP -> Double click on Required Client ( 800) -> Opens an interface ->
replace the logical system name with created ( SAPCLASS ) -> save the Entries -> come
back.

iii) Assign network To logical system.

SALE -> ALE -> SENDING AND RECEIVING SYSTEM -> SYSTEMS IN
NETWORK -> DEFINE TARGET SYSTEM FOR RFC CALL (CLICK ON CLOCK
ICON) -> SELECT R/3 CONNECTIONS FROM THE LIST -> CLICK ON CREATE
FROM APPLICATION TOOLBAR -> SPECIFY LOGICAL SYSTEM NAME AS RFC
DESTINATION (SAPCLASS) -> SET THE CONNECTION TYPE AS "3" -> ENTER
THE DESCRIPTION ( ANY ) -> CLICK ON LOGON SECURITY TAB -> SPECIFY
LANGUAGE AS "EN" -> CLIENT (800) -> SET THE USERNAME (SAPUSER) ->
PASSWORD ( MONEY ) -> Press Enter -> Click on Technical Settings -> Specify target
host as ( 192.3.3.1 ) -> Save the Entries -> Click On Remote Logon to test the connection
-> Come back.
* STEP #3. Create ABAP code and Invoke remote Function Module.
REPORT ZDEMO_RFC2 .
DATA : ITAB LIKE VBAK OCCURS 1 WITH HEADER LINE.
CALL FUNCTION 'ZRFCGET'
DESTINATION 'SAPCLASS'
TABLES
KTAB = ITAB.
LOOP AT ITAB.
WRITE : / ITAB-VBELN ,ITAB-ERDAT , ITAB-ERNAM , ITAB-KUNNR.
ENDLOOP.

31st may RFC asynchronus

WHY PASS BY REFRENCE IS NOT ALLOWED IN RFC?

In RFC Pass by Reference is Not Allowed. As in Function Module sending arguments


are called as Actual Parameters and Receiving Parameters are called as "Formal"
parameters.
In RFC Actual Parameters are in One R/3 System, and "Formal" parameters are in
another R/3 System. practically One R/3 variable address can't be accessed by Another
R/3 System. So pass by reference parameters are not allowed in RFC.

When ever we use arguments as Pass by value , variable value is send as argument and
Formal parameters are allocated with New memory in Remote R/3, and values are
manipulated in Function module code and Returned to Invoking R/3.

When ever we are executing RFC code, By default there are two processes are executed
in invoking and Remote R/3 Networks. For the current program executed, the memory
allocated in Current R/3 is internally executed with a name called as "main thread". Using
Function Module destination option if the request is redirected to remote R/3, in second
server a new process will be created to execute the Function Module , Second process
created in Remote system is called as "Child Thread" Process.

By default When ever Main thread is passing a request to Child thread, Main thread
process will be suspended till Child thread process is completed , as the response
received by the main thread executes the remainging statements.
This type of execution is called as "Synchronus process" execution. Due to this effiency
of the program code reduces.

To increase Coding Effiency between R/3 Communication we can use a concept called
"RFC asynchronus process".
* EXAMPLE CODE FOR ASYNCHRONUS PROCESS RFC.
REPORT ZTEST_F.
PARAMETERS : NUM1 TYPE I,
NUM2 TYPE I.
DATA : RES TYPE I.
DATA : AAA TYPE I.
WRITE : / 'ABAP STATEMENT 1'.
WRITE : / 'ABAP STATEMENT 2'.
WRITE : / 'ABAP STATEMENT 3'.
WRITE : / 'ABAP STATEMENT 4'.
CALL FUNCTION 'ZRFC_ARG'
DESTINATION 'PO800'
STARTING NEW TASK 'TSK1'
PERFORMING SUB1 ON END OF TASK
EXPORTING
A = NUM1
B = NUM2.
WRITE : / 'ABAP STATEMENT 9'.
WRITE : / 'ABAP STATEMENT 10'.
WRITE : / 'ABAP STATEMENT 11'.
WRITE : / 'ABAP STATEMENT 12'.
WRITE : / 'ABAP STATEMENT 13'.
WAIT UNTIL AAA = 100.
WRITE : / 'RESULT ', RES.
FORM SUB1 USING T1.
RECEIVE RESULTS FROM FUNCTION 'ZRFC_ARG'
IMPORTING
C = RES.
AAA = 100.
ENDFORM.

31st MAY RFC Types

RFC:
Any Function Module added with Remote Enabled property is called as "RFC".
These can be invoked by Same R/3 Systems, Other R/3 system and even Non R/3
systems.
To invoke these Function Modules From Remote R/3 Networks we require a concept
called as "logical system".
Logical System Is a network which reprents One R/3.
SALE is the TCODE used to Create the Logical System.
1st JUNE EDI architecture

RFC :
using RFC we can fetch data from remote System to Current System. But current
system data can't be sent to Remote System.

Port is the Service ID of the application In the Server.


Normally Oracle Server is Identified with a service name as "SID" ( By default).
Weblogic Server is identified with a Service name as "7001" ( By default ).
IIS ( Internet Information Services ) : is identified using a Service name as "80".
The application Identity or Service Identity is called as Port Number.

EDI is a sub system in SAP at Application Server as collection of Different Ports.

TRFC : is a port in sap EDI SUB System uses a logical system to identify the remore R/3
where data to be populated.

File Port: Is a collection Two SUB Services.


i) OUTBOUND Process
Is the sub service in EDI to collect data from Current R/3 in the form of IDOC
data and Assigned to TRFC to send the data to Required Remote System.
Outbound process is collection of IDOC's assigned to a TRFC.
This service can send the data from Current System to Remote System.

ii) Inbound Process.


Is the sub service in EDI sub system to collect the data send from Remote R/3 into
Current R/3 in the form of IDOC's. These idoc are Internally assigned to "Process Codes"
to insert the data into Current System.

Process code: is a technique To execute the Function module in SAP for EDI Sub
system. By default Function modules can be executed with Help of "CALL FUNCTION"
Statement only.

CPI-C (COMMON PROGRAMMING INTERFACE for Communications)


Is the Service in EDI Sub system with Collection of Drivers Created Using CORBA
Programming.
Using These Drivers we can communicate between different Object Oriented
Programming Languages.
All Object oriented programming Languages are Created using "IDL" (Interface
Definition Language). C++ , java , abap etc are created using IDL itself. So each
language request can be sent to IDL and IDL converts the request into Other Language so
that Object oriented Language communication is possible.
ABAP-PI : ABAP Programming Interface is a Service in EDI sub system used to
Communicate the between SAP to SAP or SAP To NON SAP systems. These Drivers are
created using ABAP itself. These used in Practical applications in the Form of BAPI's
( Business Application programming Interfaces) .

XML-File : The port supports physical Transactions between SAP to Internet.


XML-HTTP: The port support Logical Transaction between SAP To Internet.

XML is a collection of User Defined Tags.


XML acts as data base
XML is secured
XML tags can be restricted using "DTD" ( Document Type Defintion ) concepts.
XML by default has Parsers concepts ( XML to Other Programing Conversions are
parsers).

S-ar putea să vă placă și