cancel
Showing results for 
Search instead for 
Did you mean: 

Maintain_BAPI returns success but customer not created in SAP for Some account group.

0 Kudos

Dear Guru's ,

I am using maintain_bapi to create customer into SAP standard and it is working fine with account group 'JKLM' and successfully created customer into SAP. But the same BAPI with some account group like 'XYZZ' is not getting created into SAP. BAPI is successfully executed, no error messages no warnings everything returned success but still customer is not created into SAP standard. What might be the reason?????

Please help me out. Its emergency.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member200754
Participant
0 Kudos

Try to call BAPI_TRANSACTION_COMMIT after the bapi is called

Otherwise try to create customer by tcode XD01 also ...

0 Kudos

BAPI_TRANSACTION_COMMIT already called. With Same user created customer from XD01 as well and created successfully for both 'XYZ' and 'ABC' account group but from BAPI only 'XYZ' account group customers are getting created. 'ABC' account group customers are not getting created.

VeselinaPeykova
Active Contributor

Try comparing the settings between these account groups.

With the amount of information, which you have provided, I am afraid, it is next to impossible for an outsider to propose anything meaningful, without knowing at least what is the current configuration for these account groups, how you are calling the bapi (parameters), which bapi you are calling (there is no FM named 'Maintain_BAPI' in my system), were there any existing views for these customers, before you tried to create customer views - for each of these three cases (creating additional views is also creation process).

0 Kudos

Hi Veselina,

I am calling a Class method with below parameters,

CALL METHOD cmd_ei_api=>maintain_bapi
EXPORTING
is_master_data = ls_data
IMPORTING
es_master_data_correct = es_masterdata_corrct
es_message_correct = es_message_correct
es_master_data_defective = es_masterdata_defect
es_message_defective = es_message_defective.

IF es_message_defective IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .

If any errors are present, Like any mandatory field is missed then this method will return a proper error message into importing parameter - es_message_defective. I debugged and found everything is fine and success message is triggered and also number range is taken as per SAP standard. But the same customer is not getting created into Standard when i check using XD03. I checked with all possible ways by checking KNA1, KNB1 etc tables, t-codes which effect customer creation but the customer itself is not created, The account group being internal number range has taken the number as '103123' and showed success message,

and After above code we will call 'CUSTOMER_UPDATE' BAPI which also shows sy-subrc - 0. But still if i check same number in XD03 it shows customer not created. Please help me out.

0 Kudos

I checked with Account group settings, there is no major setting apart from SPRO, which is done by OBD2 tcode to make fields mandatory, visible/hide, read only etc. So i did not feel any account group settings changed or missed. any other way of checking the settings please suggest.

kiran_k8
Active Contributor
0 Kudos

Vikram,

Check the logs in SM13, if any.

K.Kiran.

VeselinaPeykova
Active Contributor
0 Kudos

I saw a few notes mentioning problems with field checks for cmd_ei_api. Maybe you can double-check with the consultant/key user exactly what information was entered, while creating the customer with the problematic account group (I assume that XD01 and the bapi tests were done in the same system)?

Did you try editing via the same method the customer of this problematic account group, which the user has created?

0 Kudos

Hi Veselina,

Yes, BAPI tests were done and created customer successfully with same account group. I used same data from key user and done the BAPI test and found that the same is getting created from XD01 but not from the maintain BAPI, But BAPI returns success as well as it creates the customer number if the account group takes Internal number range, but same will not be available in SAP.

Previously created customers are available but this problem is popping up from last 1 week and connected to BASIS as well to understand whether any patch or updation is done at SAP level or master level, but no such updation took place.