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: 

How to Insert new partner details in partners tab while creating PO through ME21N?

sandeep_gvv2
Participant
0 Kudos

Hello Everyone,

I am facing an issue like EXIT_SAPMM06E_008when i am creating po in ME21N in the partners tab at the header level i need to add new row.Through BADI ME_PROCESS_PO_CUST I have tried to update its not working nad i have used user exit EXIT_SAPMM06E_012,13 Here what happening is i am getting new partner details into structure XEKPA[] But at the time of posting PO the structure is getting cleared through some standard include and i also have tried to update partners tab through F.M'S MM_MAINTAIN_PARTNERS,MM_UPDATE_PARTNERS but no use.

I know its bit long Can you Please provide some suggestions to fulfill it.

Thank You..

6 REPLIES 6

sandeep_gvv2
Participant
0 Kudos

Thanks but i have gone through this document the thing is i am getting data in ekpa and mmpa structures but at the time of posting the PO that relevant structures are getting cleared because of this the new partners are not reflecting in partners tab.

In the below image the first row of Partner func 'VN' is default by SAP.My scenario is to add second row at the time of PO Creation.

More Over Acc to link u have mentioned all badi(ME_PROCESS_PO_CUST) Methods trigger before save.I am using POST method it will trigger when we click on save button at that time i am calling BADI and i have written logic.

Can You Pls help me on this.

0 Kudos

Hi All,

Was this problem resolved? Even I have received similar requirement.

SimoneMilesi
Active Contributor
0 Kudos
Through BADI ME_PROCESS_PO_CUST I have tried to update its not working

What did you implement? How does your code look like?

"Not working" without explaining the detail means all and nothing...

sandeep_gvv2
Participant
0 Kudos

Hello Simone,

I have used BADI ME_PROCESS_PO_CUST and i have written code in POST method because only this method will be triggered at time of saving PO.

I am getting partner details from custom table i am reading partner details by F.M MM_READ_PARTNERS like below.But here in internal table gt_ekpa is empty because when we are Creating PO it is not reading.This is first issue...

CALL FUNCTION 'MM_READ_PARTNERS'
EXPORTING
APPLICATION = 'P'
EBELN = IM_EBELN
BSTYP = 'F'
PARGR = lv_pargr
TABLES
X_EKPA = GT_EKPA[].

*****************************************

My requirement is After reading partners like above i need to pass partner details( That i mentioned in 2nd row) from custom table to gt_ekpa and i am appending that details to gt_mmpa[] table and using above F.M MM_MAINTAIN_PARTNERS.

CALL FUNCTION 'MM_MAINTAIN_PARTNERS'
EXPORTING
application = 'P'
EBELN = lw_header-ebeln
BSTYP = lw_header-bstyp
EKORG = lw_header-ekorg
LIFNR = lw_header-lifnr
pargr = lv_pargr
SCREEN_INVISIBLE = 'X'
TABLES
X_MMPA = gt_mmpa.
ENDIF.

***********************************************************

But what i come to know is at runtime when PO is posting there is some standard form is triggering inside that form all structures like X_MMPA[],X_EKPA[] related structures are refreshing..

But to fulfill this scenario is there any other alternative as i tried using user exit and badi also.

I hope it's clear for you now.

jothiragavim
Discoverer
0 Kudos

Hi,

Is there any answer to sandeep.gvv2 query?