Friday, July 21, 2017

Add Programs/Transactions to SAP Menu Home screen


Requirement: Some times user wants to see his programs or transactions in SAP Home screen like below , for which user using frequently. So for that we need to perform some basic steps to achieve. 

1. Go to SE43 Transaction
2. Enter any name in Area menu field and click on 'Create area menu' button

3. It popups new window and we need to enter Description and click on 'Create Area menu' 

4. It shows below screen and We can create Separate folder for our required transactions.
5. Select the description and click on 'Add entry as Subnode'. 


6. We are creating Folder name as 'ABAP Custom programs' and here transaction code field should be empty.

7. Again select Our folder name and click on 'Add Entry as Subnode' and i am adding two transaction codes


8. If we don't have any transaction for our program then we can directly add our program name and variant by clicking on 'Report' Button and it popup below screen.
9. Maintain required fields like Report name and Variant(variant is not a mandatory).

10. This automatically creates Transaction which is starts with 'Y'.

11. After click on Enter,the screen will become like this.
12. Now go to ZABAP_MENU transaction to test how it is showing in SAP Menu and if you observe this is added as sub node.



13.  If we want to add transaction at the same level of Folder, then we need to select 'Add entry at same level' button. 

14. I have added like step 7.

15. Again repeat step12 to check the difference.


How to maintain translations for Transactions:
16. Go to SE43  and click on Edit button and go to Utiilities --> Translations and select the language 





How to Transport Custom area menu
17. Custom area menu should be assigned to Package then only we can transport.you can check Object directory entry in the 'Go To' of the 'Menu' Bar 






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 ...