Skip to Content

C4C PDI Create opportunity with reference - How to?

Dear gurus,

I am currently trying to create a new opportunity with reference to an existing opportunity. I am doing this in the after modify event. But I seem to be doing something wrong. Every time the coding line is reached the C4C runs into this short dump:

500 SAP Internal Server Error
ERROR: The current application triggered a termination with a short dump. (termination: RABAX_STATE)
    at new a (
    at constructor._fireErrorOnDispatch (
    at constructor. (
UI components and application support components of current request:

I have tried all of the following commands (each on its own of course) but somehow I seem to be calling them wrong. They all cause the shortdump above:

foreach ( var oppi in this ){ 
//create follow-up oppi, I tried all of these lines - none of them works
var child = Opportunity.CreateChildOpportunity( oppi ); //try create child 

Opportunity.CreateChildOpportunity( oppi ); //maybe without return parameter?

var child = Opportunity.CreateWithReference( oppi ); //try create with ref.

var child = Opportunity.CreateWithReference( Opportunity.Retrieve(oppi.ID) ); //maybe try to cast it again?

var child = Opportunity.Copy( oppi ); 

As I can find no documentation on these methods or their interfaces, maybe someone here can throw some light on this?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    May 04, 2018 at 11:31 AM

    Dear Anant,

    Thank you very much for sending me this link I could copy some things!

    As there seems to be no better option I now went with this workaround of creating a new opportunity

    foreach ( var oppi in this ){
        var child = Opportunity.Create();
    /* Now copy all the data from the original oppi as described in the link and adjust what needs to be adjusted */

    after maintaining all the data fields, I set the relationship between the child opportunity and the original one:

    var ref : elementsof Opportunity.BusinessTransactionDocumentReference;
    ref.BusinessTransactionDocumentReference.ID.content = oppi.ID.content; //ID content of parent oppi
    ref.BusinessTransactionDocumentReference.TypeCode = "72"; //Oppi type code
    ref.BusinessTransactionDocumentRelationshipRoleCode = "1"; //Predecessor
    child.BusinessTransactionDocumentReference.Create( ref );

    It's not nice, but for now it seems to work.

    Add comment
    10|10000 characters needed characters exceeded

  • May 03, 2018 at 01:29 PM

    Dear Dominik,

    Were you able to find something in View -> Dump Analysis tool ?

    Also please right click on affected after modify absl and check performance tips. You might get some more insight on error message.

    If still you cannot identify then, i would suggest to create an incident to SAP.



    Add comment
    10|10000 characters needed characters exceeded