Skip to Content
avatar image
-2
Former Member

Document creation fails sometimes for FM 'SD_SALESDCOUMENT_CREATE' when being called from a BAdI

Hello

There is requirement to create ECC document from an action BAdI in CRM and I am confronted with a peculiar behavior that sometimes document is created and sometimes it does not resulting in error "No customer Master record exist for Sold to party" but in fact the sold to party does exist and partner determination, account group assignment and everything about partner is in place.

upon further probing into the issue i found out that XVBPA[ ] is getting initialized in FM 'SD_SALES_HEADER_MAINTAIN' after coming out of the the perform statement at line 373

'XVBPA_AUFBAUEN_VBPAKOM' and eventually the document is not created with the above mentioned error...

but in successful case the data about XVBPA[ ] is still intact after coming out of perform statement

Regards

Sanguine

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jun 23, 2017 at 02:00 AM

    Isssue resolved...The rfc connection was established while creating a CRM transaction with ref to ERP transaction.

    just need to call FM 'RFC_CONNECTION_CLOSE' prior to calling the 'SD_SALESDOCUMENT_CREATE' .Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 19, 2017 at 06:23 AM

    hello,

    which badi you are using . can you let us know. pls check if the badi in internal

    Add comment
    10|10000 characters needed characters exceeded