Skip to Content
0

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

Apr 07, 2017 at 08:59 AM

118

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

John Vo Apr 07, 2017 at 09:34 AM
0

Try to call BAPI_TRANSACTION_COMMIT after the bapi is called

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

Show 7 Share
10 |10000 characters needed characters left characters exceeded

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.

0

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).

1

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.

0

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

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

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.

0

Vikram,

Check the logs in SM13, if any.

K.Kiran.

0