cancel
Showing results for 
Search instead for 
Did you mean: 

Include add-on field to condition table for Outbound Delivery Access sequen

ttsuboi1106
Explorer
0 Kudos

Hi,

I need to setup a new access sequence for output type in delivery document, but the key I want to include is add-on field (ZZxxxx).

Can anyone tell me how I can add Z-field into condition table?

Thanks,

Tak

View Entire Topic
Former Member
0 Kudos

I believe you'll need to add it to KOMB structure (it has append structures I believe)

You'll need to add it to KOMKBV2 structure, and then in one of userexits KOMKBV2_FILL populate your field.

ttsuboi1106
Explorer
0 Kudos

Hi,

Thank you for your response.

I have no idea about KONB and user exit.

Could you tell me a step-by-step procedures?

Tak

Former Member
0 Kudos

well, you may not need to add your field to all these tables it really depends on whether you want to use it in output itself or just as a key field in your condition table.

Here is some info form SAP help which is good enough.

Basics of modification in output control

  • The following communication structures are relevant for output control:

o KOMKBK1 (Output Determination Communication Area CAS Appl. K1)

o KOMKBV1 (Output Determination Communication Area Header Appl. V1)

o KOMKBV2 (Output Determination Communication Area Header Appl. V2)

o KOMKBV3 (Output Determination Communication Area Header Appl. V3)

o KOMKBV5 (Communication Structure for Output Control Groups Appl. V5)

o KOMPBV1 (Output Determination Communication Area Item Appl. V1)

o KOMPBV2 (Output Determination Communication Area Item Appl. V2)

o KOMPBV3 (Output Determination Communication Area Item Appl. V3)

  • New fields for output control are entered in the following INCLUDEs:

o Sales activities: KOMKBZ1 (in KOMKBK1)

o Sales document header: KOMKBZ3 (in KOMKBV1)

o Delivery header: KOMKBZ4 (in KOMKBV2)

o Groups header: KOMKBZF (in KOMKBV5)

o Billing document header: KOMKBZ5 (in KOMKBV3)

o Sales document item: KOMPBZ1 (in KOMPBV1)

o Delivery item: KOMPBZ3 (in KOMPBV2)

o Billing document item: KOMKBZ5 (in KOMPBV3)

If you also want to use a new field for the setup of condition tables (key field) it must also be included in the structure KOMBZ (contained in KOMB).

  • The routines and user exits for assigning values to the new fields are found in the programs RVCOMFZZ, RVCOMFZ1 and RVCOMFZ4. It is also possible to copy partners here.

The following user exits exist in member RVCOMFZ1:

o USEREXIT_KOMPBV2_FILL (item fields in delivery)

o USEREXIT_KOMPBV2_PARTNER (item fields for partners in delivery)

o USEREXIT_KOMPBV3_FILL (item fields in billing document)

o USEREXIT_KOMPBV3_PARTNER (item fields for partners in billing document)

The following user exits exist in member RVCOMFZZ:

o USEREXIT_KOMKBK1_FILL (header fields in sales activities)

o USEREXIT_KOMKBK1_PARTNER (header fields for partners in sales activ.)

o USEREXIT_KOMKBV1_FILL (header fields for sales documents)

o USEREXIT_KOMKBV1_PARTNER (header fields for partners in sales documents)

o USEREXIT_KOMKBV2_FILL (header fields in delivery)

o USEREXIT_KOMKBV2_PARTNER (header fields for partners in delivery)

o USEREXIT_KOMKBV3_FILL (header fields in billing document)

o USEREXIT_KOMKBV3_PARTNER (header fields for partners in billing doc.)

The following user exit exists in member RVCOMFZ4:

o USEREXIT_KOMKBV5_FILL (header field for groups)

In output determination, communication table KOMB contains all key fields that can be used for conditions for output determination.

When you create new fields for output determination, you can distinguishbetween two types of fields:

  • Fields that are used in condition tables

  • Fields which are only used to query conditions.

Both types of field have to be included in KOMKBV1. Fields which are only used to query conditions do not have to be included in KOMB and T681F or in the field catalog.

Note concerning name assignment

There are two possibilities for naming the field:

o If the field is identical to the field in the communication table (e.g. VBAK), a value is assigned to it automatically by MOVE-CORRESPONDING. If SAP delivers the field in a subsequent system version, no generation errors will be caused.

o If the field is not identical with the field in the communication table,you have to assign a value to it using the MOVE command. Begin the field name with the letters ZZ. This will avoid generation errors if the field is later delivered by SAP in a subsequent system version.

Example 1: Creating a new key field in output control

If, for example, you want to use the field ERNAM (name of sales employee) from the sales order (table VBAK) for output determination, proceed as follows:

1. Enter the field ZZERNAM in communication structure KOMKBV1 in INCLUDE KOMKBZ3 in the Data Dictionary.

By entering the field in KOMKBZ3, you automatically include it in communication table KOMKBV1.

2. Enter ZZERNAM in the communication table KOMB (in KOMBZ).

3. Assign values to the fields

Values are assigned to the fields in function module KOMKBV1_FILL. You have to enter the field and assign value to it manually in user exit USEREXIT_KOMKBV1_FILL. You will find the statements that you can use as a reference in the user exits.

Copying partner numbers is a special case and will be explained in Example 3.

4. Include ZZERNAM in the field catalog for the condition table for sales documents. The field catalogs must contain all the fields which you want to use to structure condition tables.

Example 2: Entering a condition field in the communication block

If you want to use condition field VBAK-AUDAT for output determination, proceed as described in Example 1. Remember that it is not necessary to include the new field in KOMBZ (KOMB) or to maintain table T681F or the field catalog.

Example 3: Entering a partner number in the communication block

Example 3 presupposes that there is a new partner function for buyer ZY in the sales document and that the number of this partner is to be copied.

When entering partner numbers in the communication block, proceed as described in the examples above. Partner function ZY is assigned to partner type AP in this example.

Remember to use a different routine to assign values to the new fields. If, for example, you want to copy the partner function ZY into the new field ZZEINKA, for example, the statement is:

USEREXIT_KOMKBV1_PARTNER

WHEN'ZY'.COM_KBV1-ZZEINKA = COM_VBPA-PARNR.

The VBPA field used to assign a value to the new field depends on the partner function determined in the sales order. Each partner function is assigned to a partner type (e.g. partner function LF - partner type LI), which controls the assignment. Other source fields should be used for other partner types: COM_VBPA-KUNNR, COM_VBPA-LIFNR, COM_VBPA-PERNR and COM_VBPA-PARNR.

The following assignments exist:

  • KU => COM_VBPA-KUNNR

  • LI => COM_VBPA-LIFNR

  • PE => COM_VBPA-PERNR

  • AG => COM_VBPA-PARNR