This website is not affiliated with, sponsored by, or approved by SAP AG.

customer material info record issue

Logistics : SD and its sub-modules (Inquires, Quotes, Order Entry, SIS, Sales Contacts, Dist. & Billing)

Moderators: Snowy, thx4allthefish, mike_ac, Lost Identity

customer material info record issue

Postby vipinshash » Thu Jun 12, 2014 5:02 pm

Dear SAP Gurus,

I have an issue where any help will be highly appreciated. We are using VD51 to maintain customer material info record. we have 2 records in table KNMT where customer number is different and customer material number is same.
Example: customer number = 099999-191, customer material number = G1234, material number = A100
customer number = 099998-100, customer material number = G1234, material number = A101

I am using below stated code in user exit userexit_cust_material_read:
loop at xvbpa where parvw = 'WE'.
if sy-subrc = 0.
if xvbpa-kunnr NE kuagv-kunnr.
US_KUNNR = xvbpa-kunnr.
endif.
endif.
endloop
I am using this so that I can get material number based on ship_to party

On VA01- when I enter sold to as 0999999-191 and ship_to as 0999999-191 and on the ordering party tab I enter G1234, I get material A100.
and I should get that.

Issue is when I try to change the ship_to from 0999999-191 TO 099998-100 and on the order party tab I still have G1234, it does not change
the material from A100 to A101. Rather it does not even redetermine this or go to the user exit.

Please advice what should I do to resolve this issue.

Appreciate very much.
vipinshash
 
Posts: 83
Joined: Mon Oct 20, 2003 9:13 am

Re: customer material info record issue

Postby Frank Lai » Wed Jun 18, 2014 9:09 am

Hi

The customer info record user exit is entered when you change sold to or ship to. I am taking a guess here... you mentioned ordering party tab. VA01 has partner tab where you can change the partner function assignments. Are you doing this using something of front end and then calling something like BAPI_SALES_ORDER_CREATE rather than running VA01?

By the way, you need to tighten up your code a bit more. Partner functions can be assigned both at the item and header level. So you should first look for partner function WE for that specific item and if the search failed, then look for WE at the header level (item number = 000).

Frank
Frank Lai
 
Posts: 1702
Joined: Mon Oct 21, 2002 8:03 am
Location: Canada

Re: customer material info record issue

Postby vipinshash » Wed Jun 18, 2014 9:44 am

Dear Frank,

Thanks for the reply. We are not using BAPI and we are using VA01 on the front end. Under Overview there is a tab called "Ordering Party" and that is where we are inputting Customer Material Number. When the number is entered here, the user exit "userexit_cust_material_read" is called and the underlying code is executed.

Also along with changing the exit, I have to make change to another user exit "userexit_check_vbap" and redetermine when the ship to is changed on the order screen.

Thanks
vipinshash
 
Posts: 83
Joined: Mon Oct 20, 2003 9:13 am


Return to Logistics SD

Who is online

Users browsing this forum: No registered users and 7 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.