Three months proficient in ABAP (3)

Source: Internet
Author: User
14. Use user authorization

15. Call external programs and programs for dynamic production 16. Select the screen 17. Use the program running Variant

18. Create a tcode

Ii. Enhanced article. 1. catt

2. BDC
3. Create a program's background job 4. sapscript
5. smartform
6. SAP Query
7. ALV programming 8.ale/ IDOC
9. Report painter and Drilldown report 10.rfc/ bapi
11. Write user enhancements

12. Go to the ABAP workbench.

This chapter introduces the operations of various ABAP objects.

13. transmission request

This section does not focus on how to configure the transmission request and its running mechanism. This is usually because basis is not related to abaper. In other words, it is necessary to understand it.

Generally, an enterprise has at least two systems: the Development (TEST) system and the production system (some enterprises have fewer development tasks, and the development and testing use the same server or even the same client, both development and testing are completed by abaper. If you need to strictly develop the process and develop the test, the test must be separated (to save money, you can use the same server, different clients even use different system number logic into two servers.

Familiar with several terms:

1
Development(Development class ).

The development class can be simply understood as a logically related group of ABAP objects. In the future, the same transmission layer will be used for transmission. In fact, the development class itself can also be considered as an ABAP object and can be created using se80.

$ TMP is a local development class. Any ABAP objects (including Custom tables and programs) of this development class can only be tested on the client and cannot be transmitted to other clients.

The package is now used for development replacement.

2.
Package(Package)

Related ABAP objects are combined in a package. SE16: tadir can see all the ABAP objects allocated to a package. The package determines the transmission layer of these objects.

All packages exist in the tdevc table. You can use se80 or sm30: v_tdevc to create a package.

The development package as a replacement and predecessor of the Development class has such several enhanced features.

1. packages can be nested (similar to Java package)

2. The package class can contain the most visible objects in this package. These objects are not visible outside the package.

This is similar to private object, which is also common in OOP.

3. The package can define access authorization for the package interface.

4. generally, the custom package must fall before Y or Z, which is the same as other ABAP objects (the package can also be seen as an ABAP object ). other pack pre-fall A-S, U-X represents SAP standard pack, t private test pack, $ local temporary pack,/*** namespace pre-fall.

3.
Transport Layer(Transport Layer)

The Transport Layer determines whether the objects in the package are allocated to the local device or can generate transmission requests.

Generally, a standard transmission layer is allocated to the development system ,. it is assigned a standard transport layer. the objects in the package also automatically obtain the relevant transmission attributes.

The relevant IMG configuration uses the standard transport layer.

Generally, basis uses tcode STMs to configure the transmission management system to maintain the transmission and routing.

Figure 2.13-1 shows the transmission route from a program developed by DVU to QAS and PRD, in the figure, the program is transmitted to QAS client 210,100 for test after the client 310 development of the DVU server. After the test is successful, the program is transferred to PRD client 800,810 and 820 respectively.

4.
Transfer Request

Where is the program stored on the server? How does a program transmit data between different clients and servers? To understand this problem, let's first look at what transmission programs and transmission control programs are.

Transmission Control Program Tp and r3trans Transmission program, r3trans is used to achieve data transmission and different version migration between SAP clients, TP transmission control program according to the transmission parameters (Transport profile) call the r3trans transmitter.

14. Interaction with other languages

VB, Delphi, and Java are actually easy to use development tools. Other people have developed the development environment. Will it be difficult to learn how to use them?

Iii. Practice

This article will introduce common enterprise module development instances, which may also involve some auxiliary background configurations. The eight instances of each module are carefully selected and representative, due to the length of the article and the actual needs of various enterprises may be different, some may only describe the design ideas and part of the source code in this book, and hope that readers can improve and put it apart. unless necessary, use SAP standard reports for less self-development. If possible, use the information structure.

1. MM module development instance. 1. Common mm tables and Their Relationship Diagrams

Ii. Development Instance

The following is a list of enterprise development requirements (excluding user export) based on MM ).

Supplier List
|
Information record
| PR, Po
Print
(Scrip
Or
Smartform) | MRB
Material List
|
Material decommission report
|
Material Warehouse receiving report
|
Material Transportation Application Form
|
Material master data query report
|
Bill of lading Printing
| Iqc
Reports
| Pull list |
Material issuance ticket
(
Production Order
) |
Material transfer ticket
| Delivery notes | packing list | RMA
Material issuance ticket
|
Inventory Analysis Report
| Po
Analysis Report
| Gr/IR
Analysis Report
|
Material check ticket
|
Check material report, etc.
.

For example, if the project is urgent and developers are insufficient (some small and medium-sized enterprises have only one full-time abaper or each module's sap internal support consultant and Development), development priorities must be prioritized, in addition to the development tasks that must be completed before the project is officially launched, such as printing Po sets and receiving orders, the query reports can be developed after the project is launched.

If you are dedicated to development, you still need to understand the business well. It is best to communicate with the responsible business support team, one of the most effective methods is to repeat the business processes of the relevant modules (usually there will be very detailed information in the business blueprint phase) in the testing system, this will be of great benefit to future development.

1. Print mm-Related Documents

Development of Po and receipt printing

NACE, mb04 external Po.

2. Po enhanced programming

Po change history

*&---------------------------------------------------------------------*

* & Include zxm06u42 *

*&---------------------------------------------------------------------*

Data: zwatekpo like bekpo,

Zieinfo like einfo occurs 0 with header line,

Zermsg (73) type C.

Tables ekbe.

* ** Tekpo records all the old PO Item Date.

* ** I _ekpo records currently processed Po item.

Read Table tekpo into zwatekpo with key ebelp = I _EKPO-EBELP.

* ** It takes effect only for me22n.

Check SY-TCODE = 'me22n '.

* ** Ekbe is a po history table. If Q exists, r indicates that there is a history of invoice verification, and the price cannot be changed ##

Select single * From ekbe

Where ebeln = I _EKPO-EBELn

& Ebelp = I _EKPO-EBELP

And (bewtp = 'q' or bewtp = 'R ').

Check SY-SUBRC = 0.

* ** If SY-SUBRC = 0 indicates that the invoice has been verified and the price cannot be changed, otherwise the price can still be changed ##

If I _EKPO-NETPR <> ZWATEKPO-NETPR.

* ** Change e017 (zfimsg) accordingly

* Message e017 (zfimsg). "Use the following function instead.

Call function 'read _ mizmized_message'

Exporting

I _arbgb = 'zfimsg'

I _dtype =''

I _msgnr = '017'

Importing

E_msgty = SY-MSGTY.

Check SY-MSGTY ne '-'.

Refresh zieinfo.

ZIEINFO-MSGID = 'zfimsg '.

ZIEINFO-MSGNO = '017 '.

ZIEINFO-MSGV1 = 'var1 '.

ZIEINFO-MSGV2 = 'var2 '.

Append zieinfo.

Call function 'message _ get_text'

Exporting

Ieinfo = zieinfo

Ilangu = SY-LANGU

Importing

Etext = zermsg.

Message zermsg type SY-MSGTY.

Endif.

Automatically create Po and so

I. SE11 create a record table zposo... 1

2. Use Po user_exit 1

* ** The idea of this program is also suitable for automatically setting up Po when a sales order is created. Only the function called is bapi_create_po and user_exit when creating so is used.

I. SE11 create a record table zposo

Create a table named zposo,

1. Save the po-to-so contact for future Query

2. Determine whether the Po is create or change (for example, me22n update Po qty, or delete po Line .)

3. Judgment

* ** Note that the combination of ebeln and ebelp is the key fields equivalent to the primary key in the DB layer.

2. Use Po user_exit

Exit_sapmm06e_001 (002,004,006,007,009) 006 is checked before po is created.

Exit_sapmm06e_016 and 017 although there is po item data, the Po no. Is not provided yet.

Exit_sapmm06e_009. The Po has been created and the data has been refresh.

Therefore, use exit_sapmm06e_013

Before use, you must update the tfdir table to set the mand to "C". The program is as follows:

Report zupdate.

Data ztfdir like tfdir occurs 0 with header line.

Select * From tfdir into Table ztfdir where funcname =

'Exit _ sapmm06e_013 '.

Loop at ztfdir.

Ztfdir-Mand = 'C '.

Modify ztfdir index sy-tabix transporting mand.

Endloop.

Update tfdir from ztfdir.

* ** The work area can be used only once, so the Overlord cannot find the configuration.

Report ztest11.

Data ztfdir like tfdir.

Select single * From tfdir into ztfdir where funcname =

'Exit _ sapmm06e_013 '.

Ztfdir-Mand = 'C '.

Update tfdir from ztfdir.

* ** Run the following command in lsmodu23 (function:Modx_function_active_checkSet the breakpoint to easily find the user_exit with the Po)

Se37:Modx_function_active_check

Set the breakpoint in the example.

You will find that the tfdir (function module table) mand must be = aktiv_flag (the value is C) to call the corresponding user_exit function.

Related Article

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.