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

Problem with BAPI_BUS2001_PARTNER_GETDETAIL.

Former Member
0 Likes
711

All,

I am having a problem with the bapi function BAPI_BUS2001_PARTNER_GETDETAIL.

I am calling this bapi within a loop and am passing a different project-definition number as the input parameter.

The problem is that the ET_PARTNER_DETAIL table is not clearing for different project numbers.

It is appending the previous partner details to the new project number rather than just giving me the new partner details.

I am clearing both the ET_PARTNER_DETAIL and RETURN table BEFORE each bapi call.

Here is the code:

loop at it_project_output into wa_project_output.

clear: e_project_definition.

clear: it_partner_detail.

refresh: it_partner_detail.

free: it_partner_detail.

clear: it_return2.

refresh: it_return2.

free: it_return2.

e_project_definition = wa_project_output-pspid.

CALL FUNCTION 'BAPI_BUS2001_PARTNER_GETDETAIL'

EXPORTING

I_PROJECT_DEFINITION = e_project_definition

TABLES

ET_PARTNER_DETAIL = it_partner_detail

ET_RETURN = it_return2.

endloop.

Any suggestions?? Thanks.

1 ACCEPTED SOLUTION
Read only

prasenjit_sharma
Active Contributor
0 Likes
641

Hi,

What is the system version that you are using? As I could understand this is an issue with SAP Code and you should raise a message with SAP. Alternatively, you may enhance the BAPI BAPI_BUS2001_PARTNER_GETDETAIL to clear the parameters if you have enhancement framework active in your system.

Regards

Prasenjit

3 REPLIES 3
Read only

prasenjit_sharma
Active Contributor
0 Likes
642

Hi,

What is the system version that you are using? As I could understand this is an issue with SAP Code and you should raise a message with SAP. Alternatively, you may enhance the BAPI BAPI_BUS2001_PARTNER_GETDETAIL to clear the parameters if you have enhancement framework active in your system.

Regards

Prasenjit

Read only

0 Likes
641

It looks like it is a SAP std. code issue. Yes. The enhancement framework is active but did not want to make changes it will affect all the calls to this BAPI.

To solve this issue, I copied the std. BAPI code into an include and modified it to make it work as per the customer requirments.

Read only

Former Member
0 Likes
641

Hi,

It might be a bit late for a useful answer, but we had the same issue and solved it without changing any standard coding of copying it.

If you call this additional function module, some internal buffer in an underlying function module is cleared. And so also the result-table of the BAPI.

call function 'PM_PARTNER_REFRESH_ALL'.

call function 'BAPI_BUS2001_PARTNER_GETDETAIL'
     exporting
        i_project_definition = lv_pspid
      tables
        et_partner_detail    = lt_results
*       et_return            =

      .

Just in case.

Greetings.

Kris