cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI_SALESORDERSIMULATE to return custom fields

isaadg
Discoverer
0 Kudos

Hi,

We're using BAPI_SALESORDERSIMULATE in order to simulate the creation of an order an retrieving data like conditions. We'd like, however, to get back from the simulation some calculated custom fields which are in VBAK/VBAP as well. We've debugged the BAPI and it has it on memory (FM SD_ORDER_CREATE has it but it does not return that info). We've explored the extension structure but it seems it's only for input fields. Is there any proper way to do this? We've considered calling directly SD_ORDER_CREATE but it's not a good solution.

Thanks in advance!

pjl
Participant
0 Kudos

Did you have a look at the BAPI_SALESORDER_CREATEFROMDAT2 function?

It as an EXTENSIONEX table as well as a TESTRUN parameter, which might do what you want? Eventually you have to look into the documentation, since the way the extensions are pouplated varies between ecc6 and s/4.

Cheers,

Peter

Accepted Solutions (0)

Answers (1)

Answers (1)

Jelena
Active Contributor
0 Kudos

To my knowledge, there is no such option in this BAPI and the documentation states that EXTENSIONIN is to pass data to BAPI, not the other way around, like you mentioned.

I guess you could use memory in a user exit if it's feasible in your scenario.

P.S. I'm assuming here you're using ECC or earlier since there should be a different sales order simulation API in S4.