Application Development and Automation 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: 
Read only

Problem with FM 'PRINCING' during purchase order creation

former_member196686
Participant
0 Kudos
595


Hello Gyus,

I've a tricky problem with the function-module 'PRICING' during the purchase order creation (ME21N).

I've granted the standard structure KOMP by adding the fields ZZPRODH1 to ZZPRODH5 thanks to inner include PRODH.

During the order creation process, I fill the field KOMP-ZZPRODH5 thanks to the user-exit EXIT_SAPLMEKO_002.

But, some thousands of lines later, the call of function module 'PRICING' clear all the values ZZPRODH1 to ZZPRODH5. (but not the other specific fields added with other standard include extensions of the structure KOMP !)

After debugging and looking for the reason of seach a phenomena, I found two strange lines, in the FORM xkomv_aufbauen_aus_komt1 (program LV61AA67)

"

* separate product hierarchy
  prodh = komp-prod.
  move-corresponding prodh to komp.

"

This lines delete the contents of my fields, and only them !

Have you a solution other that :

1) comment these damned lines (horrible solution)

2) put two standard enhancements in the FM PRICING in order to keep these values (bad, but...)

?

Thanks for your advices,

Pascal

4 REPLIES 4
Read only

kiran_k8
Active Contributor
0 Kudos
493

Pascal,

How ZZPRODH1 - ZZPRODH5 is getting cleared when used with move-corresponding because the field names differ.Don't you think this needs to be handled thorugh VOFM routine instead of a User exit ?

K.Kiran.

Read only

0 Kudos
493

Hello Kiran,

"PRODH" is a standard structure which can be granted by the user.

In my case, this structure contains the 6 fields ZZPRODHX, and the contents of this structure is really erased by this instruction.

The choice of the user-exit has been made by the functional team, in correlation with the need of the Customer, I can't change it.

Pascal

Read only

kumarrishav-1
Newcomer
0 Kudos
257

Hi

I am facing the exact same issue.

I update custom product hierarchy fields via BADI but this line "move-corresponding prodh to komp" is removing the data as you mentioned.

Could you please let me know how did you solved this ?