Skip to Content

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

Jun 18, 2017 at 06:47 AM


avatar image
Former Member


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



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

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

10 |10000 characters needed characters left characters exceeded
Pras Venkat Jun 19, 2017 at 06:23 AM


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

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

its an implementation of action badi EXEC_METHODCALL_PPF