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: 

user exit USEREXIT_CUST_MATERIAL_READ

Former Member
0 Kudos

In transaction va03 sales order picking customer material number(KDMAT) using sold to party,its standard.I want to change it to ship to party.They provided user exit for sold to party fuctionality USEREXIT_CUST_MATERIAL_READ.When i keep a breakpoint ,it is not triggering.Please help on how to change to ship to party.

1 ACCEPTED SOLUTION

atul_mohanty
Active Contributor
0 Kudos

Hi Mohan -

Try to check it in VA01 / VA02. Enter some value in customer material tab (before the put a break point
USEREXIT_CUST_MATERIAL_READ) and press enter . It should stop there.

This user exit is used for material determination. You can use your own logic to determine VBAP-MATNR based VBAP-KDMAT (entered in the customer material number).

Regarding Ship to party and sold to party . Check the it in the internal table XVBPA[]. You will have both.

Let us know, if it helps.

7 REPLIES 7

atul_mohanty
Active Contributor
0 Kudos

Hi Mohan -

Try to check it in VA01 / VA02. Enter some value in customer material tab (before the put a break point
USEREXIT_CUST_MATERIAL_READ) and press enter . It should stop there.

This user exit is used for material determination. You can use your own logic to determine VBAP-MATNR based VBAP-KDMAT (entered in the customer material number).

Regarding Ship to party and sold to party . Check the it in the internal table XVBPA[]. You will have both.

Let us know, if it helps.

0 Kudos

Hi Atul Mohanty

Thanks for the reply.As you suggested breakpoint is triggering and i am able to change the kunnr value but i want to  change the customer material number.

How to determine VBAP-MATNR ,KDMAT because matnr and sales doc number are same.Is there any criteria to fetch ship to party custome number.

Thanks

Vamsi

0 Kudos

Not sure exactly what you are trying but you should have access to both:

KUWEV-kunnr

kuagv-kunnr

in this exit that provides the sold to party and the ship to party

0 Kudos

Hi Mohan -

You wrote 'How to determine VBAP-MATNR ,KDMAT because matnr and sales doc number are same.Is there any criteria to fetch ship to party custome number.'

I am not sure how material and sales document number is same in your case.

When you reach, USEREXIT_CUST_MATERIAL_READ

You can check the internal table XVBPA[]. You will have the ship to party where PARVW = 'WE'

OR KUWEV-KUNNR

Please check.

0 Kudos

Hi Atul

I am getting ship to party where parvw = 'WE' and taking kunner and passing into us_kunnr ,but xvbpa table will not have customer material number.I am fetching customer material number from knmt table using matnr,vkorg and passing into vbap-kdmat.But when cursor comes to RV_CUSTOMER_MATERIAL_READ vbpa-kdmat was not relaced with knmt-kdmat.Please help on this

Thanks

Vamsi

0 Kudos

Hi Noel

Currently va03 transaction picks the custmer material number based on sold to party.Now i need to change to ship to party.

Thanks

Vamsi

0 Kudos

Hi Mohan -

Is your objective to change VBAP-KDMAT or KNMT-KDMAT  or derive VBAP-MATNR ?

The user exit is used in the reading customer-material in the process of material determination (VBAP-MATNR).

The FM module RV_CUSTOMER_MATERIAL_READ takes the inputs like customer material (VBAP-KDMAT), customer , Material etc and return you KNMT structure.

Now based on your input values it will return you KNMT based on logic of this function module. Please check the logic inside the FM in debug mode.