条件技术中需求公式的 kobed和kobev的不同之处



KOBEV is for header  --> called by the KONDITIONSVORSTEP – which is pre-step

KOBED is for line items.


form Kobed is called on item level based on information of header and item
form Kobev is called on header level based on information of the header
 
SAP is doing price determination in several steps. in an early step form KOBEV is called. during this time of execution only header fields are available. If this information is sufficent to exclude the condition from pricing, you can save performance later on.
If KOBEV was succsessful (Sy-subrc = 0) SAP checks later on the form routine KOBED with header and item information. Only if Kobed is successful (sy-subrc = 0) pricing will be executed for this condition type. If there is no requirement entered for a condition type in pricing procedure, SAP will always try to determine a value for this condition type.
 
Long text

Symptom
This note describes how you can change the sourcecode in the requirements of pricing. In particular at the moment not all fields are  filled with current values so that, when you check for certain conditions, you have to be carful.


1. Implementation in the source code

With the maintenance of Requirements & Formulas (Transaction VOFM), menu option 'Requirement -> Pricing', button 'Source text', you get tothe ABAP editor. Every requirement is represented by a three-digit number xxx (001 to 999). Note that  for formulas and requirements, the customer name range starts  with 600.

Every requirement xxx in pricing consists of two FORM routines:
- The precondition (FORM name KOBEV_xxx)
This is checked on header level and therefore is only a necessary requirement that the condition type or the access is taken intoaccount at all.

- And the actual requirement (FORM name KOBED_xxx)
This is checked during processing on item level and it finally determines whether condition type or access is taken into account.

The (pre)conditions are contained in Include LV61Axxx (SAP name range) or in Include RV61Axxx (customer name range). Since these Includes are contained in program SAPLV61A, here you can basically (that is, from the technical point of view) access all fields and tables which the pricing can also access. For restrictions see further down below.

In a (pre)condition, set system field SY-SUBRC to zero if the testresult is correct. The system interprets an SY-SUBRC unequal to zero asif the requirement does not apply.


2. Storing in the pricing procedure or in the access sequence

At two different positions you can use the requirements:
- In the Customizing of the pricing procedure, for every condition typeyou can store a requirement which determines whether or not this condition type should be used in the
document.

- You can also store a requirement in the Customizing of the access sequence for every access (that is, for every condition table or key combination).

3. Program flow and restrictions
The (pre)conditions are checked when you set up the internal tables from the Customizing tables of the pricing procedure (table T683S, Transaction V/08) and the accesses (table T682I,

Transaction V/07). There are four different callup points.

a) Header: Precondition from pricing procedure
During the line by line processing of the pricing procedure, the systemchecks the precondition first (T683S-KOBED). This is a preselection whether or not this condition type may generally occur for the document items. If SY-SUBRC equals zero here, this condition type is included in internal table KOMT1. Here only header fields (structure KOMK) may be checked. Note that the headers of tables T685 and T685A are not yet filled here, thus no checks for the Customizing of the condition type may be carried
out.
Also note that the check of the precondition at this time is carried out to improve the performance. However, this 'buffer mechanism' is only available in certain constellations and depends on the calling application as well as on the pricing type. For this reason it is not sufficient to implement a certain check logic only in the precondition. The identical checks must also be a part of the main requirement. Example: see SAP R/3standard requirements 001, 008, etc.

b) Header: Precondition from access sequence
Next, the precondition from the access is checked(T682I-KOBED). If SY-SUBRC equals zero here, this access is included in internal table KOMT2. Otherwise, when the condition records are accessed later, the corresponding condition table is not taken into account at all. Here also only header fields (structure KOMK) can
be checked.
The precondition from the access sequence is always checked if the field assignment for the access sequence only contains header fields (structure KOMK). However, if the field assignment contains at least one item field, the precondition is only carried outif in Customizing the access was optimized (in the IMG with the suboption 'Define access sequences' -> 'Optimize accesses', TransactionOVU0), that is, if a corresponding entry exists in table T682V.

c) Item: Requirement from pricing procedure
The requirement from the pricing procedure (T683S-KOBED) is checked for every document item. Thus, in addition to header fields (structure KOMK), item fields can also be checked here (structure KOMP).

d) Item: Requirement from access sequence
The requirement from the access (T682I-KOBED) is also checked for everydocument item. Here you can also use KOMP fields in addition to KOMK fields.

Only if all four (pre)conditions are fulfilled (SY-SUBRC = zero),
forthis condition type the system searches for condition records. This makes clear that in the requirements you cannot use fields from the found condition records (for example, STFKZ, KZNEP).

Only after the search for condition records has been carried outfor all conditions, the pricing with the valuation starts. Here also fields  KOMP-KZWI1, XWORKA, and so on are filled. This in particular means thatin the (pre)conditions there may also be no check for these fields. In addition, only at this time important data from the document or the
document item are available in the pricing fields, for example the quantity. Thesemay also not be called in the (pre)conditions.


4. Programming details
When you call up pricing (for example, with function module PRICING),the requirements are called as follows:

CONDITION PRELIMINARY STEP
Loop over the pricing procedure (T683S)
Call KOBEV_{T683S-KOBED} and check SY-SUBRC EQ 0
Derivation of KOMT1 with fields from T685 and T685A
KOMT2_AUFBAUEN
Loop over the accesses (T682I)
Check table T682V (if item fields in access)
Call KOBEV_{T682V-KOBED} and check SY-SUBRC EQ 0
APPEND KOMT2
APPEND KOMT1
XKOMV_AUFBAUEN_AUS_KOMT1
Loop over KOMT1
Call KOBED_{KOMT1-KOBED} and check SY-SUBRC EQ 0
KONDITIONEN_LESEN
Call KOBED_{KOMT2-KOBED} and check SY-SUBRC EQ 0

Additional key words
VOFM

Cause and prerequisites
Consulting.

Solution
Consulting.

Source code corrections
________________________________________________________________________


Note is release independent
________________________________________________________________________
Page 4


Reference to related Notes

Number Short text
____________________________________________________________
449546 Access requirement in account determination does not work
410579 FAQ: Rebate processing
381348 Using user exit, customer exit, VOFM in SD
130416 Requirements in the condition preliminary step
41119 Q&A - Explanation of req. & formulas for pricing

 OSS Note 156230 contains a very clear and thorough description of this function.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 在LaTeX排版,不同的公式具有不同的上下间距。这是因为在LaTeX公式的上下间距是根据公式的组成部分来确定的。具体来说,公式的上下间距受以下因素的影响: 1. 公式使用的符号类型和大小。 2. 公式的子公式和上下标的高度和深度。 3. 公式使用的命令或环境的属性(例如,displaymath环境公式会比inline math环境公式具有更大的间距)。 4. 公式前后的文本或其他对象的高度和深度。 因此,在排版LaTeX公式时,需要注意不同公式之间的上下间距。在一些情况下,可能需要手动调整公式之间的间距,以获得更好的排版效果。可以使用一些LaTeX命令(例如\vspace和\bigskip)来调整公式的间距。同时,也可以通过修改LaTeX模板或使用其他第三方工具来完全控制公式的排版效果。 ### 回答2: 在LaTeX排版,不同公式上下间距不同是由于LaTeX采用了自动间距控制的方式。对于不同类型的公式和符号,LaTeX会自动调整它们之间的间距,使得排版效果更加美观和合适。 具体来说,LaTeX公式间的上下间距由多个因素决定,其包括公式的大小、行间距、上下标的位置等等。在默认情况下,LaTeX会根据公式大小和上下标位置等因素自动调整公式间的上下间距,以保证排版效果的美观和准确。 不过,有时我们可能需要对公式的间距进行手动调整。这时可以通过一些命令和环境来实现。例如,可以使用\setlength命令来修改公式间的默认间距,也可以使用一些自定义的环境来对特定类型的公式进行间距的控制。 总之,LaTeX排版不同公式上下间距不同,这也正是LaTeX排版的精髓所在,能够让我们在快速、高效地排版数学公式和科技文献时,无需手动调整间距,而得以专注于内容表达和排版效果的美观与精确。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值