Skip to Content
0

Adding PI vendor in the partner tab in ME21N

Sep 26, 2017 at 12:39 PM

194

avatar image
Former Member

Hi,

i have a requirement to add PI vendor at PO creation time in the partners tab.

Add using the BADI 'ME_PROCESS_PO_CUST' i am bale to add the PI vendor to the partners tab.

But when i saving the PO i am getting a message 'Following mandatory roles missing in partner maintenance: PI' and the PI vendor which was added is not getting saved.

thanks in advance.

Please help me out.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Raymond Giuseppi
Sep 26, 2017 at 02:25 PM
0

'i am able to add the PI vendor to the partners tab' and the text of the error message don't seem consistant?

So, first, how did you actually add the partner: in PROCESS HEADER the old way with some call of MM_READ_PARTNERS followed by MM_MAINTAIN_PARTNERS with correct use of CONVERSION_EXIT_PARVW_INPUT and OUTPUT /or/ with some assignment to CL_PO_PARTNER_HANDLE_MM with or without usage of mmpur_dynamic_cast macro?

Show 12 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello,

I am using the same process as you mentioned. Using the FM 'MM_MAINTAIN_PARTNERS' to maintain the new partners. Those are appearing on the screen but when i saved then newly added partner details are not saving.

0

Yes but how did you fill (or not) some parameters like appication, y_mmpa or screen_invisible, etc. Seems SAP didn't detect that data were changed, information was not sent back from function group EKPA to main dialog and save was not triggered ?

Provide more information or perform some tests changing some parameters.

As your first test, I suggest you update also lifre in the header

ls_header = im_header->get_data( ).
ls_header-lifre = rs_partner. " PI partner
im_header->set_data( ls_header ).
1
Former Member

Hello,

Many Thanks for the code. Now it is working fine and able to save the PI vendor data.

0
Former Member

Hello,

Thanks in advance,

I am getting the PI vendor data in partners tab and field is disabled for the input. Client is asking for field should enable for edit so that they can change if required.

PO is not able to edit partners tab from ME22n also.

Please help me in doing that.

0
  • Field is disabled for the input -> PO Customizing, look for Materials Management, Purchasing, Partner Determination, Partner Settings in Purchasing Documents, unckeck some 'No Chnge' flag for PI partner.
  • Also add in your current BAdI implementation some code to not update PI partner automatically if already exists.
0
Former Member

Hello,

As suggested by you it is config issue only and it is working fine for now and field is ready for editable. This functionality is working fine PO creation.

Can you please suggest, how to implement same for the ME22n, as process header method is not triggering in change mode. Do we have any other badi for ME22n or the same.

This is bcoz, when user want to change the existing PO to update with PI vendor.

Thanks in advance.

0

process_header is triggered as soon as any header data is changed, another method to use is check which is always triggered before save (if any data was changed)

0
Former Member

Hello,

IF_EX_ME_PROCESS_PO_CUST~CHECK is triggering but when i tried to update with the below code.

gs_header-lifre = "'0040012710'." PI patner
im_header->set_data( gs_header ).

But PI is not getting updated in check method.

I am trying to change the Vendor address in the ME22n, but process_header is not triggering for address change.

Please help me.

0

I can only suppose you must change a value actually in EKKO/EKPO not only in the address data. What is the actual 'trigger', why do you want to change the partner, what is your actual business requirement?

0
Former Member

Hello,

Now we added code to auto populate the PI vendor at the time of PO creation and it is working fine.

But user also want to update the PI vendor data for the PO which is created before(Old data). So the requirement is they will open the PO in ME22N and by doing check then PI vendor should auto populate using new logic and then they will save the PO.

0

Better create a small report with BAPI_PO_CHANGE for mass update of open PO?

0
Former Member

Hello,

Thanks for your support.

Now they don't want for older PO they changed that for only new PO's and it is working fine.

0
Jürgen L
Sep 26, 2017 at 02:32 PM
1

Roles have an internal and external name, PI is shown to the user but may not be PI within a program, here it is probably the German abbreviation RS

Share
10 |10000 characters needed characters left characters exceeded
Nic Teunckens Sep 26, 2017 at 01:49 PM
0

Check your Partner Determination in SAP IMG for "IMG -> MM -> Purchasing -> Partner Determination" ...

If your PI-Role is Maintained, check SAP ONE Support for additional info ...

Share
10 |10000 characters needed characters left characters exceeded