‎2008 May 15 9:45 AM
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
‎2008 May 15 9:54 AM
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.
‎2008 May 15 9:56 AM
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'.
‎2008 May 15 9:59 AM
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
‎2008 May 15 10:11 AM
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?
‎2008 May 15 10:39 AM
Hi Wojciech,
Try by sending export parameter 'WAIT' also like
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
.....
Regards,
Suresh
‎2008 May 15 10:46 AM
‎2008 May 15 10:50 AM
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).
‎2008 May 15 2:09 PM
Hi,
maybe just try with commit work.
And you should read about fm. 'BUS_BAPI_CLEARBUFFER'.
best regards, Robert
‎2008 May 15 2:17 PM
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 ?
‎2008 May 15 2:36 PM
As I can see in fm parameters VALIDFROMDATE and VALIDUNTILDATE has the default value ()
So you may just do not use them at all ?
‎2008 May 15 2:41 PM
‎2010 Sep 03 3:32 PM
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