Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pricing field INCLUDE

Former Member
0 Kudos

Hi! all..

We are adding a new pricing field, DESTINATION CITY, field - ORT01 from table KNA1.

I am listing out the steps below. Please look for it's correctness and let me know the missing steps and mistakes.

1. Create a data element ZZORT01 and choose TEXT35 as its domain. Save, check and activate ZZORT01.

(ORT01_GP is the data element of ORT01 and it's domain is TEXT35.)

2. Extend structure KOMP by including ZZORT01 to KOMPAZ. Also allocate the data element ORT01_GP to ZZORT01. Again save, check and activate.

3. Assign a value to the new field in the FORM routines for sales order processing using the user exit.The code look like this:

FORM USEREXIT_PRICING_PREPARE_TKOMP.

MOVE KNA1-ORT01 TO TKOMP-ZZORT01.

ENDFORM.

4. Finally, allocate the specifications in table T681F.

I think if I do the above, then I must be able to get the value in SOrd. during pricing.

Let me know guys if what I am doing is right. I am a bit woried about the data element, domain part.

Please help me out.

Thanks a lot.

-Karthi.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello

your user-exit looks to me not correct. In pricing subroutines you'll have the partner table of sales order (VBPA), but not the KNA1 - because that's a master data table. And it's a decision of design, from which partner the location is used for pricing (sold-to party, bill-to party, ship-to party or payer may be different).

Next is, that you'll get from the VBPA-record the adress number to read the adress - and take the location from there ( at least in Rel.4.6c and higher).

Regards Wolfgang

6 REPLIES 6

former_member188685
Active Contributor
0 Kudos

Hi Adjust the Database and Activate.

Reagards

vijay

Former Member
0 Kudos

Hello

your user-exit looks to me not correct. In pricing subroutines you'll have the partner table of sales order (VBPA), but not the KNA1 - because that's a master data table. And it's a decision of design, from which partner the location is used for pricing (sold-to party, bill-to party, ship-to party or payer may be different).

Next is, that you'll get from the VBPA-record the adress number to read the adress - and take the location from there ( at least in Rel.4.6c and higher).

Regards Wolfgang

0 Kudos

Hi! there.

Thanks for the reply. Do you mean to say that I cannot move values from master data tables for pricing during SOrd. creation? Ok, let me go ahead and do what you've adviced. I need the address of the ship-to party. What special arrangements I've to do to move the SH city to KOMP? Please help me out.

Also, I have one more question, infact I've already mailed about it in the topic PRICING FIELD ERROR.

Anyways, we are trying to use the field TRAGR-transportation group(once again in our SOrd. pricing) but I don't see it anywhere in the SOrd. But it appears in LIKP, LIPS. So if I suppose that I can't move the value from a master data table (MARA for this field) and use the field in SOrd. pricing am I right? Again I would like to know how to get around this?

Thanks a lot.

-Sri.

0 Kudos

Hi Sri,

For the ship-to-party address, you will use the VBPA or may be XVBPA in your user exit. You will read the partner number of the ship-to party and then do a KNA1 select for that partner to get your address fields. If there are central address fields that you want to access, then use the VBPA-ADRNR or XVBPA-ADRNR and go to ADRC to get the address values. Using this value is always safe, if you allow changes to address within the sales order.

For getting the TRAGR, you will read your VBAP or XVBAP MATNR field and do a select from MARA to get the TRAGR value.

Hope this helps,

Srinivas

former_member181962
Active Contributor
0 Kudos

HI Keyan,

Try keeping a break point in the Form routine, and see if the control stops there.

If it doesn't, then I think you need to create a Project definition for the enhancement in cmod and activate the same.

REgards,

Ravi

Former Member
0 Kudos

Your are steps are right.

1) First create the dataelement and assign a domain to it.

2) Then create append structure or use the existing append structure for adding the field in it. Then activitate the dataeklement and the the structure KOMP.

Note: if it is table table activation and adjustment is required. It is done thrpugh SE14.