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

SAPSQL_ARRAY_INSERT_DUPREC error with BAPI_NETWORK_CONF_ADD

Former Member
0 Likes
1,966

Hi,

I am using BAPI_NETWORK_CONF_ADD to confirm network activity.

Issue: If I don't pass actual work and unit of work, the activity status changes to 'CNF'. no issues. But, if I pass these 2 values to BAPI, BAPI does not return any error. But, status of the activity is not changed. And in ST22, it shows following error.

SAPSQL_ARRAY_INSERT_DUPREC :

Termination occurred in the ABAP program "SAPLKAUP" - in "INSERT_TABLES".
The main program was "RSM13000 ".

In the source code you have the termination point in line 464
of the (Include) program "LKAUPF01".
The program "SAPLKAUP" was started in the update system.
The termination is caused because exception "CX_SY_OPEN_SQL_DB" occurred in
procedure "INSERT_TABLES" "(FORM)", but it was neither handled locally nor
  declared
in the RAISING clause of its signature.

The procedure is in program "SAPLKAUP "; its source code begins in line
397 of the (Include program "LKAUPF01 ".

Thanks and Regards,

Sneha Nikam

11 REPLIES 11
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,847

Hi Sneha

Can you please sahre your sample code how are you calling the BAPI's ..? Do you call it inside loop?

Thanks

Nabheet

Read only

0 Likes
1,847

Hi,

I am not calling it inside any loop.

lwa_confirmations-exec_start_date = actual_start_date.
  lwa_confirmations-exec_fin_date = actual_end_date.
  lwa_confirmations-act_work = actual_work.
  lwa_confirmations-activity = activity_number.
  lwa_confirmations-un_act_work = unit_of_work.
  lwa_confirmations-FIN_CONF = 'X'.
  APPEND lwa_confirmations TO i_confirmations.



  CALL FUNCTION 'BAPI_NETWORK_CONF_ADD'
    EXPORTING
      number          = network_number
    IMPORTING
      return          = return
    TABLES
      i_confirmations = i_confirmations
      e_message_table = e_message_table.

READ TABLE e_message_table WITH KEY type = 'A' TRANSPORTING NO FIELDS.
  IF sy-subrc NE 0.
    READ TABLE e_message_table WITH KEY type = 'E' TRANSPORTING NO FIELDS.
    IF sy-subrc NE 0.
  

        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

    
    ENDIF.
  ENDIF.

Note:  Also the dump is coming only when I pass actual work and unit of work.Otherwise it is fine.

Read only

former_member201275
Active Contributor
0 Likes
1,847

Are you doing a COMMIT WORK?

Read only

Former Member
0 Likes
1,847

Also, to add this error was not there unless my funcational consultant made an entry in KP26 transaction for activity type and cost center. Before this configuration, BAPI was returing error ' A master record for 8100/1000 exists only in 2011'. So, he made the configuration and I started getting dumps.

Regards,

Sneha

Read only

0 Likes
1,847

Can you post full short dump information?

Read only

former_member585060
Active Contributor
0 Likes
1,847

Hi Sneha,

First call the Bapi "BAPI_NETWORK_CONF_GETDETAIL" and then populate I_CONFIRMATIONS from the values returned from the above Bapi. Then call the Bapi "BAPI_NETWORK_CONF_ADD", see if the dump occurs again.

Thanks & Regards

Bala Krishna

Read only

Former Member
0 Likes
1,847

Hi,

The problem is not with BAPI, I guess. Because, thorugh transaction CN25 also, I am unable to create confirmation. Getting same error. Something wrong in KP26 configuration.

Regards,

Sneha Nikam

Read only

0 Likes
1,847

Then you should ask your functional consultant to check

Read only

0 Likes
1,847

Hi,

Kepp breakpoint in the Include 'LKAUPF01' line number 464, Execute same process again in Transaction CN25. It will stop at the break point. See the entries in the internal table  COBK_INS.

Open SE11 in another session, give the table name 'COBK' and search this table with any same entry which are in internal table COBK.

Thanks & Regards

Bala Krishna

Read only

Former Member
0 Likes
1,847

Hi,

Deleted the configuration from KP26 and maintaining it again solved the issue. Not sure what was wrong with the previous entry.

Thanks,

Sneha

Read only

0 Likes
1,847

Hi Sneha,

Which release are you working on?

Please check out : OSS : 634938 - Confirmation BAPI: Unit is not taken into account

Regards,

Remi