cancel
Showing results for 
Search instead for 
Did you mean: 

Partner function logic

Former Member
0 Kudos

Hi all,

my requiremnet is if user goes to item of sales order and if he changes ship-to-party(WE) in partner function then i want to pick its revelent partner ( SP) which is maintend in customer master, but i am totally confused where to change since if i cange any record in xvbpa in exit MV45AFZB it is reflecting in all ie in header also.

But i want to change this change only in item level partner how can i proceed.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member188685
Active Contributor
0 Kudos

if you want to apply only to item then you have to mention the item number also in the xvbpa, then only it will consider for item. if the item is space then it will treat it as header partner

Former Member
0 Kudos

Hi Vijay,

Thanks a lot for your replay,

but where can i change this changes in mv45afzz or mv45afzb.

but i am trying in mv45afzb is it correct.

former_member188685
Active Contributor
0 Kudos

it all depends , if you want that before save then you can write it in mv45afzz.

if you are doing some checks and then you can place it in mv45afzb

Former Member
0 Kudos

Hi,

If i am trying to modify XVBPA based on posnr in mv45afzb but also it is not reflecting in the sales order .

pls help me.

former_member188685
Active Contributor
0 Kudos

in the xvbpa after modification are you setting updkz to 'U' (this is applicable to va02)

show the code what you are doing..?

Former Member
0 Kudos

hi,

If user manually changes the sold-to-party in item level i have to pick its SP some xxxx from customer master.

here is the code

exit: MV45afzz

data : l_kunnr like vbpa-kunnr,

l_lifnr like vbpa-lifnr.

DATA: t_xvbpa LIKE vbpa.

loop at xvbpa into l_xvbpa where posnr NE '000000'.

IF l_xvbpa-kunnr <> vbpa-kunnr.

select single lifnr from knvp into L_lifnr

where kunnr = l_xvbpa-kunnr

and parvw = 'SP'.

if sy-subrc = 0.

delete xvbpa where parvw = 'SP'.

xvbpa-NRART = 'KU'.

xvbpa-updkz = 'I'.

xvbpa-lifnr = L_lifnr.

xvbpa-posnr = xvbap-posnr.

xvbpa-parvw = 'SP'.

  • modify xvbpa TRANSPORTING lifnr where parvw = 'SP'.

append xvbpa.

clear l_lifnr.

endif.

ENDIF.

endloop.

Former Member
0 Kudos

i am writing this code in

FORM userexit_new_pricing_vbap CHANGING new_pricing.

kindly advice.

former_member188685
Active Contributor
0 Kudos

this should be under mv45afzb include

in the routine userexit_check_vbap since you are checking for item so it should be under the mentioned form.

and also check in debug mode for yvbpa ..?

Former Member
0 Kudos

Hi but i tried in form form check_vbap.

i modifed in xvbap here also but also my changes is not reflecting in item partner.

kindly guide.

Former Member
0 Kudos

Pls can any one advice