Skip to Content
0
Former Member
Jan 04, 2008 at 07:09 AM

How to put char. valuation type (VBRP-BWTAR) to COPA?

410 Views

We use split valuation for materials and want transfer valuation type (VBRP-BWTAR) to COPA.

Step1. i use KEDR to set a derivation rule.

Source Field: (1) COPA KAUFN (Sales Order Number) (2) COPA KDPOS (Item Number in Sales Order)

Target Field: CO-PA WW003 (Valuation Type)- user defined char.

Condition: COPA KAUFN not blank

Attributes: User-defined step ID: C01

Step2. Insert Block in "INCLUDE ZXKKEU11"

if I_STEP_ID = 'C01'.

**Valuation Type

SELECT SINGLE * FROM VBRP WHERE VBELN = ce0_1000-RBELN

AND POSNR = ce0_1000-RPOSN.

if sy-subrc = 0.

ce0_1000-WW003 = VBRP-BWTAR.

endif.

endif.

Step3. Then, we use KE4ST to simulate. We debug KE4ST, and find sy-subrc = 4.This means ce0_1000-RBELN and ce0_1000-RPOSN is empty.So, the user exit does not work.

We also check SAP Note 70231, but we find VBAP-PAOBJNR is empty after sales order created.So, this note is invalid.

If some one knows the answer, pls tell me(tataki92@hotmail.com). Thanks in advance.

Edited by: Derak Lee on Jan 4, 2008 8:35 AM

Edited by: Derak Lee on Jan 4, 2008 8:35 AM