cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a partner in sales order item by enhancement?

Former Member
0 Kudos

Hi expert,

Sales order item's bill-to and payer will be same with header if you do not change it manually. now I want to modify some item's bill-to and payer which different from the header automatically. Is there any enhancement for this function?

Thanks and best regards

Lance

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello,

The Z Table where the cross reference partner can be maintained seems like the solution that you might have to implement.

Regards

Edited by: SD.... on Oct 28, 2010 5:54 PM

Former Member
0 Kudos

Hi Lance,

You can do this kind of "item-level" partner determination based on a Z-table.

At SalesOrder creation you can modify XVBPA at USEREXIT_SAVE_DOCUMENT_PREPARE.

For mass SalesOrder modification you can use BAPI_SALESORDER_CHANGE.

BR,

Barna

Former Member
0 Kudos

Hi Barna,

Thanks for your reply, modify internal table XVBPA is a good idea. is there any function to modify the XVBPA,

because when I modify the the customer ID, other value(address info) in XVBPA can't be changed automatically, so I need modify all the filed in XVBPA?

Best regards,

Lance

Former Member
0 Kudos

Hi Lance,

You can populate the XVBPA structure with function module "VIEW_XVBPA_FILL".

You have to pass the following values to the FM:

COMWA-KUNNR <- the changed partner code

COMWA-PARVW <- parter role

COMWA-VBELN, COMWA-POSNR <- Salesorder and item: just fill it with VBAK-VBELN,VBAP-POSNR

You'll get the result in parameter XVBPA, which can be used for append the internal

table XVBPA in the userexit.

BR,

Barna

Former Member
0 Kudos

thanks so much

Former Member
0 Kudos

HI

Please have your ABAPer help to get the appropriate BAPI in SAP standard which can change the Sales order data i.e Partne data as you desired.

Regards,

Ram,