Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

bapi_salesorder_simulate extension bape_vbap standard field

Former Member
0 Kudos

Dear All.

We'd like to use bapi_salesorder_simulate with a manually entered route. For example in VA01 we can enter a route on the item level if we do not want to accept the default route.

It looks like in bapi_salesorder_simulate the order_items_in does not have route. So we're looking at the extensionin to pass route via the bape_vbap.

The issue we're having though is route is a standard field on vbap. So we can add route to bape_vbap, but when we try and add it to vbapkoz we get the error that it's already defined as the include vbapkoz is in vbapkom which already has route.

What then happens is we pass route in the bapi_sales_order_simulate via the bape_vbap extensionin, but then bapi_salesorder_simulate calls sd_order_create_www and it never passes the route since the vbapkoz does not have route defined.

We checked and followed OSS note 0000143580, which pretty much matches the help. This seems to work ok for a custom field, but having issues when using a standard SAP field like route.

Has anyone hit this and come up with an alternative, or possibly we're just passing or defining incorrectly?

Many thanks!!!

4 REPLIES 4

brad_bohn
Active Contributor
0 Kudos

Use a field with a ZZ prefix in the extension structure (normal process) then use userexit_move_field_to_vbapkom in MV45AFZB to transfer the value from your ZZ extension field to the standard field or you can use the ZZ name in VBAPKOZ as well to auto-transfer to the ZZ VBAP field and then transfer the value to the ROUTE field in userexit_move_field_to_vbap.

Former Member
0 Kudos

Hi Brad

great suggestion. Thank you.

Also, do you know if a parameter id can be passedfrom the bapi to the user exit?

Thanks!

brad_bohn
Active Contributor
0 Kudos

Yes, of course. As an example, a common parameter ID you might see used across BAPI's & SD exits is FLAG_DIALOG_STATUS .

Former Member
0 Kudos

Awesome. Thanks again Brad. This will be very helpful.