You are on page 1of 15

第 例.

Coding Block
什么是 coding block?请先看下图(即 ME21N 建立费用类 K 类型的 PO 画面)

[1]K- Account Assignment 选 Cost center 就是一般所谓的费用类 PO.


[2]Material group 可根据它对应的非物料 Valuation class 得到会计科目,
这个科目就是下图 PO Account assignemt category 中在 OBYC 中定义的 GBB-
>VBR 对应的科目.关于如何对应请看往下看.
[3]PO Account assignment tab 页显示出的字段.
问题是现在用户觉得这些信息还不够,如下希望能在 Create PO 自动在 Account
assinment tab 子屏看到 2-9 字段,就可使用所谓的 subscree for coding block
用一句话概况,就是在 Account assignment 时你配置好了 coding block subscreen 就
自动显示 account assignment subscreen 不用用户手工根据弹出一 dialog screen 去选
而已.
如下图就是选择了上面根据 coding block subscreen 出现的效果.

为了理解什么是 coding block subscreen, OXK1 后如下图


[1]将 SAP default 的 coding block subscreen 全部取消,即将 active X 去掉.
再看上面 PO Account Assignment tab 的画面,因 PO Account assignment category 设置
中设置了一些字段特别是 cost center 字段在 Account assignment 子屏上没有
(根据 coding block 没抓取到上图将它全失效了, 这样用户不得不手工按下图[1] more
然后弹出一所谓的 dialog screen window [2]让您选择.)

再回到 OXK1, 做个 coding block screen 吧,根据 PO account assignment category 设置


的字段(自定义的 coding block subscreen 的编号范围是 9000-9998,允许最多 9 个字
段,SAP 标准的可允许更多).就不说了,用户自己搞定.

如果用户有兴趣,可研究读取 coding block subscreen 的 source code ,


程序 name 忘了.

下面是 PO Account Assignment 的例子.

Background:.........................................................................................................................1
1.Related IMG.....................................................................................................................1
Step 1.Define valuation class for those non-material..................................................1
Step 2.Define PO Account Assignment Categories.....................................................3
Step 3. Assign account to VBR....................................................................................5
Step 4.Where we define valuation class......................................................................5
2.Q&A.................................................................................................................................6
1...................................................................................................................................6
2...................................................................................................................................6
3...................................................................................................................................6

Background:

For these so-called charge or consumption PO, When creating a PO, we choose account
assignment category ‘K’ and input a material group .

1.Related IMG

Step 1.Define valuation class for those non-material

We can define additional valuation class (difference from material master data) for assets
or charge(service) PO (Non-material )
Step 2.Define PO Account Assignment Categories
Step 3. Assign account to VBR

Step 4.Where we define valuation class


2.Q&A

1.How to Activate Direct Posting to G/L Accounts and Material Account

In PRD800, The Entry had been deleted.

After clicking New Entries button, the 2 lines shown as below will be seen .

After that , you can see 3 tabs being added while using MIRO.
And then you can directly post G/L account for vendor invoice verification .
We can get the result as you require.
Dr: XXX Charge
Cr: Vendor AP
2.What will Happen?

And when you use ME2N (or other related t-code to check), you will find
Still to be delivered(invoiced) qty will always have data , that means the PO is always in
open status .

3.Mark delv. Completed

We can mark Delv. Completed to avoid the open PO

After marking delv. Complelted, It shows OK.


So,Here is my questions, For the purpose of financial control , Enterprises often use PO
for any payment (Otherwise, For the aboved mentioned charge PO, we needn’t use PO
but use FB60 directly make invoice verification, I think it will be more simply).

Why we donn’t make a GR action which may mean we have got the service, receipt the
consumption goods etc ? (Even if it might be a virtual GR—Service GR) ?