SAP Knowledge Base Article - Preview

3134252 - PUST: Dump when creating a new process

Symptom

  • Category ABAP programming error
    Runtime Errors DBSQL_DUPLICATE_KEY_ERROR
    Except. CX_SY_OPEN_SQL_DB
    ABAP Program SAPMPUST

  • Short Text
    Open SQL array insert produces duplicate records in the database.

  • Error analysis
    An exception has occurred in class "CX_SY_OPEN_SQL_DB". This exception was not
    caught
    in procedure "NEW_PROCESS" "(FORM)" or propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated this
    exception, the current program was terminated.
    The reason for the exception occurring was:
    The reason for the exception is:
    When an Open SQL array insert is performed, trying to insert a record
    into the database table "T52BA" causes the function to terminate if a
    record with the same key already exists.

    (When an Open SQL individual record insert is performed, this situation
    does not cause the function to terminate. SY-SUBRC is set to 4 instead.)

  • Source Code Extract

    Line Code

    1433 READ TABLE p_nodes ASSIGNING <node> INDEX 1.
    1434 <node>-relatkey = '000001'.
    1435 <node>-relatship = treev_relat_first_child.
    1436
    1437 CALL METHOD tree_control->add_nodes_and_items
    1438 EXPORTING
    1439 node_table = p_nodes
    1440 item_table = p_items
    1441 item_table_structure_name = 'PAY_TREEITEM'
    1442 EXCEPTIONS
    1443 OTHERS = 0.
    1444
    1445 APPEND LINES OF p_nodes TO cntr_tree_info-nodes.
    1446 APPEND LINES OF p_items TO cntr_tree_info-items.
    1447 SORT cntr_tree_info-nodes BY node_key.
    1448 SORT cntr_tree_info-items BY node_key.
    1449
    1450 SELECT DISTINCT ponam FROM t52ba INTO TABLE p_ponam_tab
    1451 WHERE potyp = 'PMRE' AND
    1452 pattr = 'VAL'."#EC CI_BYPASS
    1453
    1454 LOOP AT p_ponam_tab INTO p_ponam.
    1455 p_52ba-potyp = 'PMRE'.
    1456 p_52ba-ponam = p_ponam.
    1457 p_52ba-pattr = 'VAL'.
    1458 p_52ba-pwert = p_processid.
    1459 p_52ba-nused = 'X'.
    1460 APPEND p_52ba TO p_52ba_tab.
    1461 ENDLOOP.
    1462
    >>>>> INSERT t52ba FROM TABLE p_52ba_tab.
    1464 COMMIT WORK.


Read more...

Environment

  • Human Capital Management (HCM)
  • SAP R/3
  • SAP ERP Core Component
  • SAP ERP
  • SAP enhancement package for SAP ERP
  • SAP enhancement package for SAP ERP, version for SAP HANA

Product

SAP ERP Central Component all versions ; SAP ERP all versions ; SAP R/3 Enterprise all versions ; SAP R/3 all versions ; SAP enhancement package for SAP ERP all versions ; SAP enhancement package for SAP ERP, version for SAP HANA all versions

Keywords

KBA , PY-XX-TL , Tools , PY-XX , Payroll: General Parts , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.