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: 

Sales Order Created - COndition Table KONV-KWERT value not updated

0 Kudos

Hello Experts,

I am stuck with Sales Order Create using FM "SD_SALESDOCUMENT_CREATE". It's working fine with all conditions. i am creating Sales Oder and Credit Memo Request.

While Creating Sales Order, I am passing the header conditions as line item '000000', it's updating the table KONV, but not the feilds values of KAWRT and KWERT. it's spliting the lines at item level and i am having the values of both of the fields at item level in KONV table.

Like below : -

KNUMV--


KPOSN-KSCHL-KAWRT -


KBETR--


WAERS---KWERT

0000040795-000000-ZGT2


0.00---1,650.00
USD4
--


0.00

0000040795-000010-- ZGT2---161.47---1,650.00


USD4--


4.07

0000040795-000020-- ZGT2---493.88---1,650.00


USD4-----12.43

I have debuged the function module and found the place where it is updating the KONV-KWERT and KAWRT fields values.

it's in the FM - SD_SALES_CONDITION_MAINTAIN

INCLUDE - LV45AU41, It's checking the Line Item Number - IF NOT FKONVKOM-KPOSN IS INITIAL.

and while it's initial, it's not doing the perform "PERFORM VBAP_BEARBEITEN_ENDE(SAPFV45P)." ( Which update the above fields KAWRT and KWERT in the table KONV. )

I tried to find out the SAP Notes also, I found one SAP note 212721 and 1464531, Implemented the Note 1464531 But it seems it is not working.

Note - 212721 is not for release of SAP 6.0.

Please help me to understand how can i update these two fields values at Condition Header level in the table KONV .

NOTE : - after creation of the sales order, when i do VA02, goto- Header - Condition and save the sale order, it update the fields with values Like below --

KNUMV--


KPOSN-KSCHL-KAWRT -


KBETR--


WAERS---KWERT

0000040795-000000-ZGT2--655.35---1,650.00


USD4-----16.50

0000040795-000010-- ZGT2---161.47---1,650.00


USD4--


4.07

0000040795-000020-- ZGT2---493.88---1,650.00


USD4-----12.43

I need the above result without going to VA02.

Any Positive Help will be appriciated and Rewarded.

Thanks and Regards!!

Suryakant Baranwal

1 ACCEPTED SOLUTION

former_member404244
Active Contributor
0 Kudos

Hi,

Please go through the below link

http://www.sapfans.com/forums/viewtopic.php?f=5&t=5228&start=0&st=0&sk=t&sd=a

Regards,

Nagaraj

9 REPLIES 9

former_member404244
Active Contributor
0 Kudos

Hi,

Please go through the below link

http://www.sapfans.com/forums/viewtopic.php?f=5&t=5228&start=0&st=0&sk=t&sd=a

Regards,

Nagaraj

Former Member
0 Kudos

Hi Suryakanth,

Condition values for prices (ZGT2 in your case) gets stored w.r.t Document Condition No of an SO, only after any operation is done.

Plz look thru the sapfans link given above.

0 Kudos

Hello Nagraj and Mallikaarjuna,

Thanks for your reply, BUT this is not the compelte solution, I need how can i resolve this,

If it's an customization thing, What needs to do to get the result ?

Regards!!

Suryakant

0 Kudos

Hello Experts,

I need your help to understand this issue, How it is working in VA02, while changing the Same sales order.

Why am I not able to update the fields values of KAWRT and KWERT in table KONV through FM SD_SALESDOCUMENT_CREATE for header condition type.

Please let me know if there is any SAP Note or any other enahancement, corrections are for this above error.

Regards!!

Suryakant

former_member191735
Active Contributor
0 Kudos

First things first... Is your condition type Manual? if not, can you update that ?

Second, what are you passing in the X parameter of the condition (SALES_CONDITIONS_INX STRUCTURE BAPICONDX OPTIONAL) ?

What is the update flag in SALES_CONDITIONS_INX?

Last but not least, are you committing after return from the Function module?

0 Kudos

Yes, It's Manual Condition Type..

As i have mentioned, it's working fine for all the conditions, i have passed X flag in conditionsx table for Header condition it's also same as item conditions.. Please refer the below code.

wa_conditionsx-itm_number = wa_lineno-sap_posnr.

wa_conditionsx-cond_count = 01.

wa_conditionsx-cond_type = ls_par_valu-value2.

wa_conditionsx-cond_value = 'X' .

wa_conditionsx-currency = 'X' .

in header condition wa_lineno-sap_posnr will be '000000' everytime. and con_type will be header cond_type ZGT1 ( in my case ).

I am doing commit also.

Please let me know if any other thing needs to check.

Regards!!

Suryakant

0 Kudos

SALES_CONDITIONS_INX-UPDKZ = 'U' for update and 'I' for new. So go ahead and pass I to it apart from X to all other fields where required as well as the required info like posnr and condition number and all...

0 Kudos

Hello Team,

Thanks for your quick replies, I got the answer forthis query, we need to pass value at condition record level

for KWERT, populate the CONDVALUE value same as base value with lineitem number 000000.

it is updating the KONV-KWERT at the time of creation of Sales Order.

Regards!!

Suryakant

0 Kudos

I too have recently faced similar problem.

After brief analysis it is understood that if the user is entering Header conditions first and later entering the item price, the header condition is unable to rollup the values. Hence when user open VA02, the calculations are triggered to rollup the values and the final value is reflected in 000000.

Hence users first enter the item level details first before entering Header level conditions. SO the rollup can be properly triggered.

Thanks