3 months proficient in ABAP (5)

Source: Internet
Author: User

The following is an example of using VB call bapi_create_po to create a po. First, use se37 to test the Po. Basically, you only need the following parameters to create a po. note that the value of vendor must be 10 digits. If the length is insufficient, add 0.

Tvendor = mid ("0000000000", 1, 10-len (TRIM (vendor. Text) + trim (vendor. Text)

'Ensure that if the vendor length is <10 to 10 digits, otherwise an error will occur.

Poheader. Value ("vendor") = tvendor

Poheader. Value ("purch_org") = "1000" 'trim (text2.text)

Poheader. Value ("pur_group") = "111" 'trim (text3.text)

Poheader. Value ("doc_type") = "Nb" 'trim (text4.text)

Poitems. Rows. Add

Poitems. Value (1, "pur_mat") = "C-010" 'trim (text5.text)

Poitems. Value (1, "plant") = "1100" 'trim (text6.text)

Poitems. Value (1, "net_price") = "222" 'trim (text7.text)

Poitemschedule. Rows. Add

Poitemschedule. Value (1, "deliv_date") = "2005/08/16" 'text8. Text

Poitemschedule. Value (1, "quantity") = "888" 'text9.text

3. material master data programming

Use material master data

4. Supplier List Analysis 5. Goods receiving inspection Enhancement

Material Movement Report

6. Inventory Analysis Report 7.gr/ IR report 8. Enhanced decommission Process

Lis System Overview

2. SD module development instance.

General Process summary of Enterprise SD:

Typical sdks are available (excluding SD module enhancements ).

Invoice Printing |Sales Analysis Report | credit note Application Form | shipping note | sales forecast | dunning letter | shipment status | packing list | product batch and serial number reports.

Because SD may have a large number of user enhancements, there are several typical cases in the instance.

1. Read sales text

2. sales order approval

3.

4.

5.

6.

7.

8.

3. PP module development instance.

General Process summary of Enterprise PP:

Typical sdks are available (excluding SD module enhancements ).

Invoice Printing |Sales Analysis Report | credit note Application Form | shipping note | sales forecast | dunning letter | shipment status | packing list | product batch and serial number reports.

Because SD may have a large number of user enhancements, there are several typical cases in the instance.

1. The md04 save prod is extremely plain PR

2.

3.

4.

5.

6.

7.

8.

4. Fi module development instance.

1. prepare financial statements 2. Confirmation of Financial creden( (validation)

The validity check can be found in multiple modes such as HR, AP, AP, GL, physical lidation, real estate, and special purpose ledger (Validation) Configuration, the so-calledValidationHowever, before saving the creden, determine whether the creden are valid Based on the setting conditions, and then determine whether the creden are valid Based on the message type (For more information about messages, see section 1 message control.) Determine whether the creden can be saved (saved smoothly). It is easy to understand for users who have a little knowledge about ABAP development basics.

Credential validation, substitution, and user exit ensure that credenvaliare successfully verified by some enterprises and stored in the database.

***
Available
Validation
Detect some
Cost center
Only corresponding to a specific
Functional area (
Above
Functional Area
Words
),
Certain expense subjects can only be recorded in a specific

Cost center
And so on
.

The more practical validation img t-code includes:Ob28: AP/AR/GL Doc. |Oaz1: Am posting |

Gcvw: Global validation (in SPL, company level) |Gcvv: Local validation (in SPL,

Company code level ).

The following uses ob28 as an example to describe the usage of validation in detail. (IMG Path7-1 label 1)

[1] define accounting confirmation.

[2] define the return of Accounting creden.

CreateValidationProcedure:

The following uses line validation stline as an example to describe how to configure validation.

* ** Of course, other configurations can achieve the same effect.

1.
SelectCallup pointCreateValidation name (7-2 ).

[1] 1. Trigger the credential header 2. Trigger the credential line project 3. Trigger the entire credential, usually when you press enter and save.

[2] Press F2 To Go To The details page when the validation is created (7-3)

[3] 1 indicates activation. Validation takes effect only after activation is selected.

2. Validation
Detailed steps(7-3 ).

[1] Create a New validation. If you create a validation here, return to Figure 7-2 and press new entries to activate it.

[2] Create a step. A step contains the prerequisite, check, and message. Figure 7-3 step001 indicates

If the user in company code 5100 (local currency HKD) is stonef, an error message zfimsg 017 is displayed if the current account bitcoin exceeds 1000hkd (for Message analysis, seeExample Message Control).

* ** ValidationThe trigger condition is that the prerequisite conditions are met but the check conditions are not met..

[3] rule can be used in validation, substitution, report write selection, and even ATP check. It is easy to understand. Some frequently used judgment conditions can be set to rule, create two Rule-ZRULE1 (Fig 7-4) and zrule2 (FIG) for prerequisite and check. BSEG-DMBTR <= '100. 00 '), and the effect is the same as that of Figure 7-2. The difference is that the two rules are still available in substitution (seeThe
8
Instance credential replacement), Which can be reused.

The advantage of repeatability is that you only need to modify rule (for example, the maximum charge allowed by stonef is

2000), all the validation and substitution that use this rule take effect.

Figure 7-5 uses rule and Figure 7-3 directly uses ABAP code.

* ** Rule
As a condition, other rule can be defined,For example, zrule3 contains zrule1 and other conditions.

[4] header validation is only available for bkpf fields and is triggered only when the credential header is hit or saved.

[5] bkpf and bseg are optional for item validation, but check can only select bseg fields; otherwise, it is not triggered.

***
For example, the prerequisite is a BKPF-BUKRS, checkIs the BKPF-USNAM, it is obvious that this is invalid validation.

Another problem is that multiple messages will pop up if multiple row projects meet the conditions.

[6] the entire credential is valid, that is, it is triggered in the doc header, item carriage return and save.

[7] prerequisites (refer to [2]).

[8] Check (refer to [2]).

[9] sap messages are used in many places. For example, to print a fax Po, you need to create a message, and the message is also used in the exception of the processing program, here it refers to the latter (for more details, referExample Message Control).

For example, 7-6.

[1] e indicates that the message is defined as an error type. creden, are not guaranteed at this time. I and W only provide information and warnings. The creden can be saved. If a is selected, the current tcode operation is exited.

[2] Message class defined by tcode: se91 (Figure 7-7 ).

[3]. The message number 017 is selected here and the two parameters (&) are used. & indicates that the actual value can be replaced in the actual pop-up message &.

[4]. Use message variables.

Figure 7-8 shows the local currency amount> 1000 when stonef uses fb50 for manual accounting

Error message that occurs because both the credential line amount is> 1000, this message is displayed twice.

1. zstline is clearly valid for any accounting credential generated for the user stonef operation, for example, to restrict stone to use fb50 accounting but allow more than 1000hkd for F-53 payment, if you add tcode fb50 to the prerequisites, validationi is only valid for fb50.

2. if you want to use tcode, such as fb50, to test the creation of validation, you must exit the current operation before entering it. Otherwise, SAP reads data from the buffer and considers it as the previous configuration, the most secure method is to use/o fb50 (or other tcode) from the validation IMG window ).

3. This method also applies to any other tests in the same situation.

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.