I found a very interesting question on SAP SD Pricing from SDN. I quoted it below.
"Requirement: Packing fee to be charged to customers on sales orders. The way the condition type is configured is % based. The problem is when the value of the order goes up as the calculation is % basis there is no limitation for the packing fee to be charged for the order i.e. 30 $ (Max. Limit). I need to come up with a work around where in if the calculated value based on % is higher than 30 Dollars then the value should be restricted to 30 $ not more than that. If the value is below 30 then no changes are expected.
If there are two line items system should distribute the 30$ across two line items under Packing fee condition type."
I extended this requirement by define below rules to determine the packing fee.
| Value Portion of Total Sales Order($) |
Percentage |
Max Packing Fee($) |
| 0 – 100 |
2% |
2 |
| 100-1000 |
1.5% |
13.5 |
| >1000 |
1% |
14.5 |
For example, the customer place a sales order valued $2000. Use above matrix, the packing fee is 100 * 2% + 900 * 1.5 % + 1000 * 1% = $25.5.
Read more…
The business might decide to implement SAP ERP FI module as the company finance system. In this case many finance documents will be posted via external systems. SAP provides many BAPIs to fulfill such requirement.
Below scenario is to create a vendor invoice in SAP via BAPI – BAPI_ACC_DOCUMENT_POST. The business wants to create vendor invoices from incoming file from vendor which contains all the transactions in one week. Below code snip can be used to create a vendor invoice.
Read more…
In some cases, the business wants to store some constants in a custom table not hardcode in the program directly. This will be allow users to change the constants directly in QA or Prod system without changing the program. This posts try to give a tutorial on how to create such a custom table.
Step 1. Create a custom table with delivery class ‘C’.
Read more…
COGI is a powerful tool that help us detect the mistake happens in goods movement.
The user can delete the log of COGI as he like.Sometimes,the customer will require us to retrive the deletion log of COGI,and display it in ALV.
We can achieve this as below instruction.
System save the log in the table AFFWPRO.But the save function is closed in default settings.
For activing this function,we should adjust the standard function module
CO_FW_AFFW_POST,
Search “ CLEAR prot_del_is_active. “ in SE37.Comment the line contains “CLEAR prot_del_is_active.”,and then,we can get the deletion log in the table AFFWPRO.Next job is to display it in ALV.
I found some great posts about BADIs in SD module and summarized them in this post. Hope this can help you.
Read more…
Sometimes we need to configure the sap server to pop up a message to the users when they logon to the system. Generally, there are two methods to meet this requirement.
- Go to transaction SM02 – System Messages. You can maintain the system message here. If user refreshes or open the window, the system message will be displayed.
- But business wants only part of user will receive such messages when user logon, above method doesn’t work very well. Some enhancement needs to be done. Use customer exit ‘SUSR0001’. Below are the detail steps.
- Transaction SMOD, enter exit name ‘SUSR0001’.
Read more…
SAPLink is a great tool for ABAPer to share the ABAP development objects between programmers. It is quite easy to import and export custom objects.
This open source project is hosted in Google code and this is the project link: http://code.google.com/p/saplink/.
The core SAPLink only support report and class objects. For other objects like scripts, smartforms and function group, you can down load corresponding plug-ins from another project: SAPLink-plugins.
Here is the document about how to install SAPLink and the user manual. https://wiki.sdn.sap.com/wiki/display/ABAP/SAPlink+User+Documentation
I will share the program in the internet using this tool and I think it will become populate even be the standard of the program sharing for ABAP.

There are several ways to find BADIs in the program.
1. Set a beark-point in method ‘CL_EXITHANDLER=>GET_INSTANCE’. Because old BAID technology will always call this method to get the BADI instance.
2. Search string ‘CL_EXITHANDLER=>GET_INSTANCE’ in the program. This drawback of this method is that the program may call another program in the runtime. In this case, you will be able to find the BADI in another program.
3. You can also go the t-code SPRO, you can also find plenty of BADIs in the related area.
4. You can also find the BADI call using ST05. Below is the steps:
- Go to ST05, then choose ‘table buffer trace’ and activate the trace.
- Run the t-code from where you want to find the BADI.
- Deactive the trace and then display trace.
- using selection criteria object ‘V_EXT_IMP’ and ‘V_EXT_ACT’ and then you can get called BADI list.
This analyzing technique is based on the fact that all BAdIs are registrated in SAP database tables. So for each BAdI call these database tables will be accessed. The BAdI database tables are SXS_INTER, SXC_EXIT, SXC_CLASS and SXC_ATTR. These tables are always accessed by the views V_EXT_IMP and V_EXT_ACT. So these two ABAP views (T: SE11) will be the basis for the trace.
This post will list as many BADI in SAP SRM as I can. It will be updated once I encounter new one;-).
BBP_DET_TAXCODE_BADI Exit for Determination of Tax Code
You can extend the current determination (that occurs via the domestic/international indicator and category ID), deviating from the settings in table BBP_DET_TAX_CODE Determine Tax Code for Country/Product Category.
This article aims to give a brief introduction about the SAP Enhancement technologies. The standard deliveried sap programs do not always meet the requirement, so enhancment is an very importment part in the ABAP development. SAP provide several technologies to support developer to enhance the standard logic.
1. User exit.
Actually user exit is not part of enhancement technology, as it need us to enter access key to modify it. But sap delivery these user exit form routines in seperate include files and will not overwrite them in the upgrade version. So we can feel free to modify them.
Read more…