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: 

Add Partner functions data in PO header via ME59N

Former Member
0 Kudos
1,026

Hi

I'm trying to add the partner functions in the 'Partners' tab of the PO header, at the time of PO creation with reference to PR through ME59N. I have added my code in the 'Process_Header' method of the Badi 'Me_process_po_cust'. I have called the FM 'MM_READ_PARTNERS' . Copied all the data from EKPA and appended the new partner functions data and then called the FM 'MM_MAINTAIN_PARTNERS' by passing the parameters 'Application', 'BSTYP', EKORG', 'LIFNR', 'PARGR' and the MMPA . PO number will be blank at this stage.

But couldn't see the new partner function details in the Partners tab. Can you pls tell me where i have gone wrong

Regards

Shekhar

4 REPLIES 4

JL23
Active Contributor
0 Kudos
325

First thing you should test is to do this manually in ME21N, if that is successful then we can focus on your program, otherwise we have to check your customizing of partner functions

Former Member
0 Kudos
325

I tried creating the PO manually by giving the Purchase Requisition in ME21N. My code is getting executed and the "Maintain Partner" screen is being displayed and also my entry is also being displayed in the 'Maintain Partner' screen. But when i go back and checked in the 'Partners' tab in the header, entry not getting displayed.

But if I enter new entry manually in the "Maintain Partner" screen, this and the new one( from my custom code) is being displayed in the "Partners' tab. Is this some thing to do with the customization?

Regards

Shekhar

JL23
Active Contributor
0 Kudos
325

At least it is an evidence that the customizing allows to add the partner, so the customizing seems to be okay.

From data migration I know that partner functions are not easy to work with, as it is not possible to just add a single partner, we always have to submit all partner roles with their partner number together, which means you have to include the existing partners as well.

former_member491087
Discoverer
0 Kudos
325

Hi Jurgen

I was able to do it manually in ME21N. Through code, The partner function is not being added in the 'Partners' tab in ME21n. I have tried checking removing the 'screen_invisible' flag. Partner function is appearing in the 'Maintain Partner when i pass the vendor no to the FM parameter 'I_LLIEF'. But not appearing in the partners tab when i go back.

After lot of debugging, i found that a function 'MM_FILL_EKKO_PARTNER_FIELDS' is being called from the FM 'MM_MAINTAIN_PARTNERS' where its checking the importing parameter I_LLIEF. After clicking the Partners tab, inside this FM, the value of I_LLIEF is becoming initial because of which and some other condition, record is getting deleted from the XMMPA table.

Can you please let me know your thoughts what needs to be done in this case