[ZT] Enhancement-01

Source: Internet
Author: User

Enhancement (1)--btes

Recently a colleague came across a fi enhancement, to be implemented with Btes, and I was first exposed to this enhancement, so I followed him along. Write a section in this area.

Btes (Business Transaction Events) is an enhanced approach to SAP, technically a product of customer exits and Badis. It has two main types of interfaces: Publish and Subscribe Interface Process Interface Its core philosophy is to make one interface reusable, multiple implementations, and non-interfering with each other.   When the technology is implemented, it uses a functioin called fixed in the standard program, and then uses this function to dynamically invoke its own defined enhancement function to achieve the desired goal. Such an interface, in standard programs, is often the function that begins with Open_fi_perform_ or Outbound_call_.   Thanks to this technology architecture, SAP has made these interfaces into made by SAP, made by SAP's Partner, made by SAP's Customer, and three parties can take the required. As for the difference between publish and Subscribe interface and process interface, it is mainly used. The former, which provides information to external software, while the latter is mainly used for R/3 processes.   However, the former can also generate or modify some additional data.   Btes is mainly used for General ledger, receivables and sales distribution modules.   I do that is the process Interface, said is also very simple, is in the billing posting time, the head of the text to get rid of. Next, let me take a look at the process.
    1. T-CODE:FIBF into the Btes interface
    2. Environment->infosystem (Processes), run the->process 00001120->sample function module, Then copy this function into your own z or y program, edit the newly copied program, and add your own code
    3. Go back to the FIFB interface, settings->products->...of customer->new entries Add your own product, and activate
    4. Back to the FIFB interface, Settings->process Modules->, ... of the customer-> new primary key is 00001120 Process, and the function you just created module and product are written to the corresponding fields.

After that, run the appropriate posting program, such as T-code VF01 or FB01, to generate financial vouchers to see if the document's head text has been modified.

The original code is not easy to paste, put some key code.

SPAN {font-family: "Courier New"; font-size:10pt; color: #000000; background: #FFFFFF;}. l1s33 {color: #4DA619;}.   l1s52 {color: #0000FF;} LOOP at T_bkpfsub.
T_bkpfsub-bktxt = ' KEVIN btes '.
MODIFY t_bkpfsub INDEX Sy-tabix.
Endloop.

Enhancement (2)--dictionary Elements

There are two main types of transparent table and structure enhancement. One is the append Structure, and the other is the include form.

    Append structure can extend the original table structure, but not add a field to the original table, but instead build an additional structure, physically, the data exists in two places. Moreover, a append structure can only have one table structure. If a table with a append structure structure is copied, then in the new table, the original append structure becomes a fixed field, and the physical table becomes a sheet.     include format, often seen in the form of enhanced and automatically generated table fields, such as screen enhancement. Of course, you can define it yourself. The include can contain multiple table structures compared to append Structure (the Include data elements can append Structure). It does not have the ' copy ' performance of append structure, even if it is replicated, it will exist in the new table with the original structure. When you finish the enhancement, if you want to add the field in the SM30 table maintenance also appears, then you need to generate table maintenance program through the following path:se11-> into the corresponding table, and finish the enhanced->utilities->table maintenance Generator     If you want to change the enhancements over and over again, such as changing the length of a field. Then, when the field is reduced, it is necessary to modify the physical table with SE14, otherwise it cannot be activated.     There is a case to note that when data is present in the original data table, the Append structure or include enhancement does not affect the original data, only the corresponding blank fields are added to the original data. If you reduce the length of a field, the data is lost, typically from the tail. Therefore, it is not recommended to reduce the field length in the case of existing data.     Below is a practical example of what I'm going to encounter below.     due to business needs, a standard table of standard field length is not enough, it is necessary to enhance the field length. I thought about 3 sets of options.     1. Increase the field length directly.     (because this field has a certain naming rules, the program will intercept characters to judge, directly increase the length of the field, the cost of direct modification is relatively large)     2.Apend an additional field, in the logical judgment, Combine additional fields and existing fields to make judgments.   &nbsP (To modify the corresponding program)     3. Since this field is used for mapping, there are certain naming rules for it. Change the original naming rules to extend the service life of this field.      hasn't decided which to use yet. Personally, however, the probability of encountering such a situation can be greatly reduced if you have a more reliable estimate of business growth at the start of the architecture. After all, after the on-line modification and enhancement, already belongs to the laborious project.        for dictionary document enhancements, you can do:     Cmod->goto->text in the following paths enhancements- >data elements/keywords   Enhancement (3)--user ExitsUser exits is the first generation of SAP technology, and the technical principle is to pre-build a form in the program ... EndForm the subroutine and call this form when the thing is running. Of course, if the form is empty, then no action is taken and the corresponding action is performed instead. The User exits is written in the same way as the standard procedure, and you need to apply access key to SAP to modify these programs.    And the difference between the modification of the standard is that when the upgrade of SAP, the User exits will be automatically retained, the change of the standard process will be overwritten without special processing. In making this enhancement, make a habit of writing the code you want to add in the function that starts with Z, and then invoking the function in the form. For example: SPAN {font-family: "Courier New"; font-size:10pt; color: #000000; background: #FFFFFF;}. l1s31 {font-style:italic; color: #808080;}. l1s33 {color: #4DA619;}. l1s52 {color: #0000FF;} FORM Add.
Call FUNCTION ' Zgdtest '
Exporting
I_char =
I_float =
* Importing
* E_date =
* E_char =
* E_var =
.
EndForm. Here's how to find this type of exit:

Method 1:

SPRO---SAP Reference IMG, press, search term fill in ' USER exit ' can find each module corresponding export, each export SAP will have corresponding instructions.

Example:

User Exits in Sales Document processing

Program: MV45AFZZ

Export Name: userexit_save_document

Instructions for use:

Use the This user exit to fill user-specific statistics update tables.

The user exit is called to the FORM routine beleg-sichern before the COMMIT command.

Note

If a standard field is changed, the field R185d-dataloss are set to X. The system queries this indicator at the beginning of the safety routine. This is what this indicator must also was set during the maintenance of user-specific tables that was also to be saved.

Method Two

Enter the screen you want to do the enhancement, find the corresponding program name, for example: Va01 The following screens is the program sapmv45a

[ZT] Enhancement-01

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.