Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

[Help] - How to create BP many times.

Dear all,

Pls help..

i created Business Partners(BP) many times (use FM: COM_BPUS_BUPA_CREATE)

This is the code:

LOOP AT lt_mstcust INTO ls_mstcust.

  • i FILL data cust that want to be created.

CALL FUNCTION 'COM_BPUS_BUPA_CREATE'

EXPORTING

IV_PARTNERCATEGORY = partner_cat

IV_BUSINESSPARTNERGROUP = lv_bpgroup

IS_CENTRALDATA = ls_central

IS_CENTRALDATAORGANIZATION = ls_organ

IS_ADDRESSDATA = ls_address

IV_ACCEPT_ERROR = 'X'

IV_BUSINESSPARTNERROLE = lv_bprole

IMPORTING

EV_BUSINESSPARTNER = lv_bpnumber

TABLES

IT_TELEFONDATA = lt_telephone

IT_FAXDATA = lt_fax

ET_RETURN = lt_return.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = ''

IMPORTING

RETURN = lt_return.

ENDLOOP.

-


end of code.

The strange problems:

Not all BP that i created saved in table BUT000, although all BP number was generated after running that FM.

So i can say after i run the LOOP, i got all bp number. BUT, some of bp numbers were not found in table BUT000. It means when i run TCODE: BP and i entered BP number that were not found in BUT000, error message (bp is not found) would be raised.

Do u have any solutions for it?

Or are there others creating BP FM that can be run in LOOP (can create BP in many times)?

Please help y..

Ur help is very important for me.

Regards.

Daniel N.

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question