‎2014 Mar 26 10:59 AM
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
‎2014 Mar 26 11:19 AM
Hi Sneha
Can you please sahre your sample code how are you calling the BAPI's ..? Do you call it inside loop?
Thanks
Nabheet
‎2014 Mar 26 11:58 AM
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.
‎2014 Mar 26 11:54 AM
‎2014 Mar 26 12:10 PM
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
‎2014 Mar 26 4:08 PM
‎2014 Mar 26 5:23 PM
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
‎2014 Mar 26 5:52 PM
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
‎2014 Mar 27 2:16 AM
‎2014 Mar 27 3:45 AM
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
‎2014 Mar 27 4:06 AM
Hi,
Deleted the configuration from KP26 and maintaining it again solved the issue. Not sure what was wrong with the previous entry.
Thanks,
Sneha
‎2014 Mar 27 4:59 AM
Hi Sneha,
Which release are you working on?
Please check out : OSS : 634938 - Confirmation BAPI: Unit is not taken into account
Regards,
Remi