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: 

Issue with Sales Orders

Former Member
0 Kudos

Hi all,

I have a requirement like this.

Sales Orders will be coming to SAP ECC 6.0 through EDI.

For each Item of these Sales Order,there will be pricing conditions.

Now,if there are pricing intolerances for any of the Items,I need to place a Billing Block.

I am using the Exit <b>EXIT_SAPLVEDC_003</b>.

In the Z include,I am writing my code.

I have an issue here.

As the data will be coming in the form of IDOCs,I am accessing the IDOC segments.

Using dint_edidd-segnam I am accessing each segment.

Segment e1edp01 gives me the current Item Number(POSEX).

Based on that, I wrote my code like this

*******************************************************

READ TABLE t_dxvbap WITH KEY vbeln = w_dxvbak-vbeln

posnr = lv_posex.

********************************************************

Now,I need to access the pricing conditions and values of each item.

Check them and place a Billing block if there is any pricing discrepancy.

Is there any segment for this ?

Please tell me how do I capture the pricing condition(KSCHL) and value(KBETR)

from an IDOC.

Regards,

Imran.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Not sure about the IDOC exits, but I have set billing blocks on Sales Orders using exits in the VA01 transaction (which are also called in the BAPI for salesorder create). Billing block field is just a field on the Sales Order header - so you should be able to set it if you have access to the VBAK fields. Pricing condition data is probably easier to access in the VA01 user exits.

Also - Can blocking due to price variance be set up in SD configuration? I had an idea that it could.

Andrew

5 REPLIES 5

Former Member
0 Kudos

Not sure about the IDOC exits, but I have set billing blocks on Sales Orders using exits in the VA01 transaction (which are also called in the BAPI for salesorder create). Billing block field is just a field on the Sales Order header - so you should be able to set it if you have access to the VBAK fields. Pricing condition data is probably easier to access in the VA01 user exits.

Also - Can blocking due to price variance be set up in SD configuration? I had an idea that it could.

Andrew

0 Kudos

Hi Andrew,

I have two approaches here.

Actually,my requirement is like this..

There is a Z pricing condition for each item.This Z pricing condition's value should be compared with another Pricing condition EDI1's value.

If there is any difference,a billing block should be placed.

Now,this is implied that EDI1 condition will be present on only EDI generated orders not for ordinary ones.Based on this,we can use User Exits in VA01 instead of EXIT_SAPLVEDC_003.Here we can directly access the VBAK,VBAP and

KOMV tables and a Block can be easily set.

If you have any better approach,let me know..

Regards,

Imran.

0 Kudos

Anyone...worked on IDOCs..Please help.

I need the IDOC segment which contains Pricing Details of a Sales Order Item.

Regards,

Imran.

Former Member
0 Kudos

Hello Masood,

The ORDERS02 IDOC contains the E1EDP01 segment. There are a couple of pricing fields in this segment that may work to capture the price of each line item. Try using ANETW or PREIS.

If you need to capture pricing conditions, consider the fields in the E1EDK05 segment.

You can view the structure and layout, including all the fields and values, of an IDOC by using transaction WE62. Check out an ORDERS02 and ORDERS04 basic types.

Regards,

Aaron

I would appreciate points if this is helpful

0 Kudos

Hi Aaron,

Thank you very much.Your answer was of great help to me.

<b>E1EDP05</b> segment fits my requirement.

But,I have a small doubt here.

****************************************

I can access the current Sales Order Item from <b> E1EDP01</b> - POSEX

and I can access the pricing conditions from <b>E1EDP05</b>.

In this segment,<b>KSCHL</b> is condition type.

Now,I need the field for condition value.

I am not sure whether it is <b>KPERC</b> or <b>KOBTR</b> or something else ?

-


See,the pricing conditions are present in <b>KOMV</b> table.

I need the corresponding IDOC fields for <b>KBETR</b> and <b>KWERT[/b

where can I get them from ?

I checked WE62,but was not able to find ?

Please help me..

Regards,

Imran.