WISHSAP

Wish SAP was easy.. As here

Tuesday, April 15, 2014

Standard ALE-IDOC In 6 STEPS

Standard ALE-IDOC 

This document Explain Standard IDOC configuration for MATERIAL MASTER (MATMAS) between two clients of a system in simple 6 steps.

Source system: SOU 700 (sender system)
Destination System: SOU 005   (target system or receiver system)

STEP 1 :   All the below steps are done in Source system SOU CLIENT 700.

Go to T-code: BD54 and Click on "New Entries" and provide the Logical System for both Source system and Destination system and click on SAVELogical system will be created.
STEP 2 : Go to T-code: SCC4 and go to Change mode 
Select the Destination system client (SOU CLIENT 005) and Click Details.
Provide the Logical system created for Destination system and click on SAVE.
Repeat the same for Source system.

Select the Source system client (SOU CLIENT 700) and Click Details.
Provide the Logical system created for source system and click on SAVE.
STEP 3 : 
Important: RFC Destination is case sensitive, Which will usually mislead or cause error, So use UPPER CASE always to be on safer side.

Go to T-code: SM59 and Select RFC connection type "ABAP Connection" Click on Create.
Provide RFC Destination for destination system and provide IP Address of the system.
click on "Logon & Security" TAB.
provide client, logon username and password for system SOU 005 and click on "Save".
provide Client, log-on username and password for system SOU 005 and click on "Save".

Click on Remote Logon to check the system connection and correctness of RFC creation.

Repeat STEP 3 and create RFC for Source system.
Provide RFC Destination for source system and provide IP Address of the system.
click on "Logon & Security" TAB.
provide Client, log-on username and password for system SOU 700 and click on "Save".
STEP 4 : 
Go to T-code: BD64 and go to Change mode and click on "Create Model View" from Technical name in the Pop-up and Click on enter.
Then select the model view created and click On "Add message type".
Provide Sender and Receiver Logical system and message type and click on Enter.
Then click SAVE.
Once you Expand Model view it should look like below screen shot.
Then click on Environment and Select "Generate Partner Profiles".
then click on Execute.
Partner profile and Port will be created automatically, Otherwise which should be created in T-code WE20 and WE21 respectively.
Then Click on Back.

Click on Edit and select Model View and Distribute.
Then select Destination logical system in the pop-up window and click on Enter.
In this step we are distributing the Model view created in source system to destination system.
Partner profile generated can be checked in T-code WE20.
Step 5:   Below steps is to done in Destination system SOU CLIENT 005.

 

Log-in to destination system SOU 005


Go to T-code: BD64
Find the Model view distribute from source system.
Select the Model view and Then click on Environment and Select "Generate Partner Profiles".
Click on Execute on next screen and Partner profile and Port will created automatically in Destination system as done in source system.
Step 6:  Below step is to done in Destination system SOU CLIENT 005.
Go to T-code:  WE20 
Select Source logical system and select the Inbound message type and then click on Details
In next screen change PROCESS CODE  from  AFSA to MATM and click on SAVE.
We have completed the ALE-IDOC configuration for Standard IDOC Material master for transferring material from one client to other client of a system.

Now we can test IDOC Configuration done.
Create a Material in source system SOU 700 using T-CODE MM01.
Material 2942  is created in Source SOU 700 SYSTEM.

Log-in to destination system SOU 005 and try to display the material 2942 using T-code MM03.
 
Material 2942 is not created in SOU 005 system.

To transfer material from SOU 700 to SOU 005.
In SOU 700 system go to t-code BD10

Note: BD10 program, In Application Link Enabling, this program is used to distribute material master data to other systems by sending it direct.
Enter the material details and Execute.
One Master Idoc and One communication Idoc will be created.
Go to T-code WE02 to check the status of outbound Idoc.
IDOC No. 555031
Material transfer: 2942
OUTBOUND IDoc Status: 03 (indicates  Idoc is passed to destination system successfully).
To Check transfered material from SOU 700 to SOU 005.
In SOU 005 system go to t-code MM03
 Material 2942 is created in SOU 005.
Go to T-code WE02 to check the status of Inbound Idoc.
Inbound IDoc Status: 53 (indicates  Document created in destination system successfully).
 Cheers !!  Standard IDOC for material master in successfully completed J








Wednesday, April 9, 2014

Enhancement Section - Enhancement Framework

Enhancement Section

ENHANCEMENT TECHNIQUE allow to enhance SAP standard application program without actually modifying it i.e., add your own functionality to standard program.

Below Hierarchy tree show complete ENHANCEMENT TECHNIQUES used in sap.

This document is intended to explain Enhancement Section available under Enhancement Framework.

Basic concept of Enhancement Framework:

Enhancement Option:
Ø  Position in repository object where enhancement can be made.
Ø  These Options can be either defined explicitly or exist implicitly.
Ø  Types of Options available
1.       Implicit Enhancement Option -> Defined by  Framework itself
2.       Explicit Enhancement Option  -> Defined explicit by SAP developer

Enhancement Spot: 
   Ø       Container for explicit enhancement options.
                                    Ø       Carry information about position at which enhancement options are created.
                                    Ø Spot are required for creation of
·         New BADI
·         EnhancementPoint

Note: Implicit Enhancement Option does not need Enhancement spot.
Note: Composite Enhancement Spot are used for semantic grouping of Enhancement Spot.


ENHANCEMENT SECTION

Ø     Provides option to replace a piece source code in SAP standard program with custom code

Ø    Custom code inserted will be executed instead of standard source code at run-time.
     
Ø      We can have multiple implementations for single Enhancement Section but only one implementation can be active at given time and only that particular implementation will be executed at run-time.

Ø Nested enhancements are not supported, i.e., Enhancement section cannot be defined inside another Enhancement section definition.

Syntax:

ENHANCEMENT-SECTION S4 SPOTS ZES2 STATIC .    -> Static Enhancement
 ** Standard Source code to be replaced
END-ENHANCEMENT-SECTION.
                                              
ENHANCEMENT-SECTION S5 SPOTS ZES2 .         -> Dynamic Enhancement
** Standard Source code to be replaced
END-ENHANCEMENT-SECTION.      

Enhancement Section and Enhancement Point can be static or dynamic enhancement.

Static Enhancement Point:

Ø  Intended for data declaration in source code
Ø  Will be executed at runtime only if SWITCH (SWITCH FRAMEWORK) for which program is assigned, is in ACTIVE or STANDBY status.

Dynamic Enhancement Point:

Ø  Intended for Executable code
Ø  Will be executed at run-time only if SWITCH (Switch Framework) for which program is assigned, is in ACTIVE status
Ø  By default Enhancement options are dynamic (without STATIC addition)

NOTE:
SWITCH  is used to determine whether other components (Repository objects) are visible and used in system. It has three statuses ACTIVE, OFF, STANDBY MODE. Created in T-code SFW1 and status is set in t-code SFW5 using business function. It’s very useful in Enhancement concept.


Procedure to create and implement Enhancement Section:

Task can be divided into two parts:
  1.        Definition of Enhancement Section  -> done by SAP Developer
  2.         Implementation Section                  -> done by SAP Customer
Enhancement Section can be defined in any source code including Function Module, Reports, Classes and method etc.

This document explains definition and implementation of Enhancement Section in a Report.
  1.           Definition Part (defined by SAP Developer)
Create a report in T-code SE38.
Select a piece of code for which enhancement section has be defined and Click on Edit
Select Enhancement Operations -> Create Option
Provide Section name and Spot name and define it as dynamic Enhancement.
Enhancement section S4 definition created along with Enhancement Spot ZES2. 
Similar created Static Enhancement section.
Activate program.
New program with two Enhancement Section is created.

2. Implementation of  Enhancement Section. (By SAP Customer or Partner)
    
    Enhancement Section can implemented in Display mode of program
    Open program is display mode.
    Ø  Place your cursor on Section which is to be implemented and Right click -> Enhancement          Operations -> Create implementation
Ø Provide Implementation name.
  Ø  Within Implementation, required code can be written.
After Activation, Test the Report.
So Section S4 implementation successfully, Similar implement other section S5 also.
After Activation, Test the Report.

Cheers!! Enhancement sections are defined and implemented successfully J

Interested to know about Enhancement Point, Click on below Link.