cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create BuPa with Customer , Customer FI , Knvv, knvi, knb1 and knb5 with one commit.

k_sood
Active Participant
0 Kudos
2,081

Hello All,

My Requirement is as written above to create BuPa with Roles Customer and Customer FI and also create relevant data for the tables knvv,knvi,knb1, knb5.

I have Implemented it as follows:

1. Create BuPa with 'BAPI_BUPA_CREATE_FROM_DATA'

2. Added roles customer and Customer FI with 'BAPI_BUPA_ROLE_ADD_2'

3. Commit with 'BAPI_TRANSACTION_COMMIT' -> kna1 record is now created.

4. Read kna1 from database for this business partner. because next FuMo needs address number.

5. Create knvv,knvi,knb1,knb5 with 'FLBPD_MAINTAIN_CUSTOMER_SAVE2'

In case some problem occur at step 5 and the knvv,knvi etc records are not created. I have an inconsistent state , because either want to create complete set or nothing. Is there a possibility to do this with One Commit ? So that either Everything is created or nothing is created .

Br,

Ketan

View Entire Topic
k_sood
Active Participant
0 Kudos

I used the function Module CUSTOMER_INSERT in order to create the records in all the customer related tables after the BuPa is created and its working fine. Basicall it directly inserts the records in the corresponding tables.

Br,

Ketan