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

BAPI_TRANSACTION_COMMIT gives short dump

Former Member
0 Likes
2,158

Hi

in my report i make something like this


CALL FUNCTION 'BAPI_BUPR_RELATIONSHIP_CREATE'
      EXPORTING
        businesspartner1     = lv_destination_partner
        businesspartner2     = lv_source_parnter
        relationshipcategory = lv_rel_category
        validfromdate        = sy-datum
        validuntildate       = '99990101'
      TABLES
        return               = gt_ret_table.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    IMPORTING
      return = gs_ret_elem.

After performing first function table gt_ret_table returns no errors (messages type I and S) and after BAPI_TRANSACTION_COMMIT i have short dump (MESSAGE TRANSACTION X):

Program CL_CRM_CHM_PDM_COMHUB=========CP

INCLUDE CL_CRM_CHM_PDM_COMHUB=========CM001

Line 10

Module type (METHOD)

Module name CONSTRUCTOR


*=======================================================================
METHOD constructor .
*=======================================================================

*  DATA:
*    lt_return TYPE bapiret2_t.

* precondition check
  IF iv_partner_guid IS INITIAL.
   MESSAGE x000(crm_chm_bp_cch)
      WITH 'PROGRAM ERROR: Precondition Failed'.            "#EC *
  ENDIF.

*  CALL FUNCTION 'BUPA_NUMBERS_GET'
*    EXPORTING
*      iv_partner_guid = iv_partner_guid
*    TABLES
*      et_return       = lt_return.
*  IF NOT lt_return IS INITIAL.
*    MESSAGE x000(crm_chm_bp_cch)
*      WITH 'PROGRAM ERROR: Precondition Failed'.            "#EC *
*  ENDIF.

  mv_partner_guid = iv_partner_guid.
  mv_xsave        = iv_xsave.

ENDMETHOD.

What can be wrong?

Any sugestions?

reg.

Wojciech

Edited by: Wojciech Moroz on May 15, 2008 10:48 AM

Edited by: Wojciech Moroz on May 15, 2008 10:50 AM

Edited by: Wojciech Moroz on May 15, 2008 10:50 AM

12 REPLIES 12
Read only

Former Member
0 Likes
1,352

Hi, have you done the check after using the BAPI_ function module?

Like this...

CALL FUNCTION 'BAPI_BUPR_RELATIONSHIP_CREATE'

EXPORTING

businesspartner1 = lv_destination_partner

businesspartner2 = lv_source_parnter

relationshipcategory = lv_rel_category

validfromdate = sy-datum

validuntildate = '99990101'

TABLES

return = gt_ret_table.

if sy-subrc = 0.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

IMPORTING

return = gs_ret_elem.

endif.

I Think in your 'BAPI_BUPR_RELATIONSHIP_CREATE'

function module having some problem. PLease check the return table from this FM.

And then proceed.

Hope it will help you.

Regards,

Madan.

Read only

former_member156446
Active Contributor
0 Likes
1,352

Check this :

CALL FUNCTION 'BAPI_BUPR_RELATIONSHIP_CREATE'
      EXPORTING
        businesspartner1     = lv_destination_partner
        businesspartner2     = lv_source_parnter
        relationshipcategory = lv_rel_category
        validfromdate        = sy-datum
        validuntildate       = '99990101'
      TABLES
        return               = gt_ret_table.
 
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

Read only

Former Member
0 Likes
1,352

before calling the fm bapi_transaction_commit

read table gt_ret_table with key type = 'S'.

if sy-subrc eq 0.

then call bapi transaction commit

Read only

Former Member
0 Likes
1,352

Thanks for tips but my problem is still unsolved. I did check sy-subrc = 0 after frist FM and tried BAPI_TRANSACTION_COMMIT without return and still i get the same crash

any further ideas?

Read only

Former Member
0 Likes
1,352

Hi Wojciech,

Try by sending export parameter 'WAIT' also like

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'

IMPORTING

.....

Regards,

Suresh

Read only

Former Member
0 Likes
1,352

I tried this before - still nothing

regards

Wojciech

Read only

0 Likes
1,352

Like already mentioned before, the problem probably is not the BAPI_TRANSACTION_COMMIT but rather the first BAPI you are calling. One thing you can and should do is set a break point at point where short dump occurs and via the call stack try to determine, why the BP guid is not available. My guess it that one of your BP's has no BP guid created (yet).

Read only

Former Member
0 Likes
1,352

Hi,

maybe just try with commit work.

And you should read about fm. 'BUS_BAPI_CLEARBUFFER'.

best regards, Robert

Read only

Former Member
0 Likes
1,352

tried with commit_work, with fm BUPR_RELATIONSHIP_CREATE. I Also tried to create a new partner with filling all data. Still nothing.

Maybe it's some kind of bug i CRM 5.0 ?

Read only

0 Likes
1,352

As I can see in fm parameters VALIDFROMDATE and VALIDUNTILDATE has the default value ()

So you may just do not use them at all ?

Read only

Former Member
0 Likes
1,352

already tried. Without success

regards

Wojciech

Read only

Former Member
0 Likes
1,352

Hi, Have u managed to sloved the problem? I'm having same problem. can you please share you solution for this issue?

Kind regards,

Anil