Tuesday, July 18, 2017

BADI Searching Techniques

Badi Searching Techniques

Definition:BADI (Business Add-In) is a new SAP Object Oriented enhancement technique which is used to add our own business functionality to the existing SAP standard functionality. 

Now we will see different ways of identifying BADI's.

1st Searching technique using package name: 
   Go to transaction code se93 give tcode for which we need to find Badis.
   Suppose if we want to know Badi’s in customer master transaction (XD01).
  Click on display and get the package name 


     Now go to SE84 Tcode and in below path give package name and execute the transaction
 



    It gives the list of BADI’s available for the particular transaction




     2nd searching technique using cl_exithandler:


     Identify the main program of transaction(XD03) using below path or as mentioned in 1st searching technique 

   
 Go to Report transaction and give program name SAPMF02D and click on Display                                                                                                                                                           


Go to main program and search for string CL_EXITHANDLER and it gives BADI’s existed  in program.


3rd searching technique using debugging:
  • ·    Go to required transaction (in our scenario XD03),· 
  •       Start debugger option using /H, and put a break point at all the instances of a method GET_INSTANCE of a class CL_EXITHANDLER and then execute/save the transaction.
  • ·     Then the program will stops at all BADI’s. Check the BADI name and go to documentation for appropriate  BADI.


4th Searching technique using function modules:
  • Go to SE37 transaction and give function module name “SXV_GET_CLIF_BY_NAME”
  • Click on display
  • Put a break point at ‘ end function ‘ statement.

 

  • ·         Now execute required transaction to find BADI’s(In our scenario XD03-Customer master)


 

  • ·     Using NAME and CLIF, we will get the exit/BADI name.
  • ·     By using this technique we can get both exits and Badis. So to identify we can check the PREFIX  parameter.
  • ·      If Prefix = CL_EX then it is BADI otherwise it is an exit.

Thursday, July 13, 2017

Workflow containers and Bindings

Workflow containers and Bindings

                   In general programming,variables are used to assign the data and some times we are storing the result of different set of operations .these variables are declared at the top of the program.

                       In the same way,in workflows,variables(we called as elements) are declared in Container.So Container is a place where the required element are declared.
SAP Definition for Container: 
A basic common data structure of the various definition components and execution components of SAP Business Workflow. 
There are 5 different containers and based on requirement we can create Elements in any one of them.
·         Workflow container
·         Task container
·         Method container
·         Rule container
·         Event container
jl             we can exchange the data between containers during workflow execution and this can be done using Binding .
        What is binding?
In workflow terms, the word binding represents, assignment between elements of two different containers. Binding editor is used to define binding between elements of different containers. Binding editor looks like below screen shot.
 


Points to be noted while defining binding between elements of different containers
  ·         Elements should belong to same data type.
  ·         Binding can be defined between compatible data types. 
·         Possible Binding Definitions between Containers:  
Workflow Container:
  ·         Binding can be defined from Workflow to Event Container.
  ·         Binding can be defined from Workflow to Task Container.
  ·         Binding can be defined from Workflow to Rule Container. 
Event Container:
  ·         Binding can be defined from Event container to Workflow Container.
  ·         Binding can be defined from Event container to Task container.

Task Container:  
  ·         Binding can be defined from Task to Workflow container.
  ·         Binding can be defined from Task to Rule container.
  ·         Binding can be defined from Task to Method container.  
Method Container:  Binding can be defined from Method to Task container and method container.
Rule Container: Binding can be defined from Rule container to Workflow container. 
Possible Binding Matrix:
Container Type
Workflow
Task
Rule
Event
Method
Workflow
No
Yes
Yes
Yes
No
Task
Yes
No
Yes
No
Yes
Rule
Yes
No
No
No
No
Event
Yes
Yes
No
No
No
Method
No
Yes
No
No
No

Yes:  Represents that only you can export a Business object which should belong to type AAGENT.
Yes:  This binding definition is only possible for the step EVENT CREATOR.
Possible Binding Picture







k


Custom routine creation in SAP

                              Sales order pricing   Requirement : In sales order, for one of the condition type, value is populating ...