Application Development and Automation 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: 
Read only

Partner Functions dropping during PO Create

Former Member
0 Likes
1,819

We have created an implementation named ZGL_STP_PO_CUST_ENH for definition ME_PROCESS_PO_CUST. In PROCESS_HEADER we call a method to validate fields.

  • Validate/update foreign trade field values.

call method me->validate_fortrad_fields_header

exporting

im_header = im_header

importing

e_set_data = l_set_data

changing

cs_mepoheader = ls_mepoheader.

In VALIDATE_FORTRAD_FIELDS_HEADER we call the following function to get the partners in the PO.

DATA: l_xekpa TYPE ekpa.

DATA: li_xekpa TYPE TABLE OF ekpa.

CALL FUNCTION 'MM_READ_PARTNERS'

TABLES

x_ekpa = li_xekpa.

The problem is, when we call the MM_READ_PARTNERS function it causes partners to be dropped off the PO during PO create. I have commented out the call and the partners are not dropped.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,500

Hi

Try passing export parameter APPLICATION = 'P' ,

this should return partner in x_ekpa.

Regards

Kalpana

We have created an implementation named ZGL_STP_PO_CUST_ENH for definition ME_PROCESS_PO_CUST. In PROCESS_HEADER we call a method to validate fields.

  • Validate/update foreign trade field values.

call method me->validate_fortrad_fields_header

exporting

im_header = im_header

importing

e_set_data = l_set_data

changing

cs_mepoheader = ls_mepoheader.

In VALIDATE_FORTRAD_FIELDS_HEADER we call the following function to get the partners in the PO.

DATA: l_xekpa TYPE ekpa.

DATA: li_xekpa TYPE TABLE OF ekpa.

CALL FUNCTION 'MM_READ_PARTNERS'

TABLES

x_ekpa = li_xekpa.

The problem is, when we call the MM_READ_PARTNERS function it causes partners to be dropped off the PO during PO create. I have commented out the call and the partners are not dropped.

7 REPLIES 7
Read only

Former Member
0 Likes
1,501

Hi

Try passing export parameter APPLICATION = 'P' ,

this should return partner in x_ekpa.

Regards

Kalpana

Read only

Former Member
0 Likes
1,500

I have tried that but the partners are still dropped.

Read only

0 Likes
1,500

Hi,

I'm having The same problem with the MF MM_READ_PARTNERS.

Can you help me plz ??

Read only

0 Likes
1,500

Just had the same problem.

You have to pass parameter PARGR . Then it worked without dropping the partners.

   CALL FUNCTION 'MM_READ_PARTNERS'
      EXPORTING
        application               = 'P'
        PARGR                     = ls_t161-pargr
     TABLES
       x_ekpa                    = lt_xekpa.

Read only

0 Likes
1,500

Thank you so much Paul.  That worked perfectly in my case.  May I ask you how you found this out?

Read only

0 Likes
1,500

Well I think this was just a look into the where-used list. 3 years ago...

Read only

0 Likes
1,500

You can use FM "MM_DISPLAY_PARTNERS" instead of "MM_READ_PARTNERS" to avoid partner deletion problem.