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_CREATEFROMDAT2

Former Member
0 Kudos

I'm using BAPI_SALESORDER_CREATEFROMDAT2 to create the sales order.However, I can't get the fields for billing plan tab into this BAPI.

What internal table in the BAPI carries this information.

I've read Note 93091 and it doesn't cover this topic.

Any help is appreciated.

Thanks.

JB.

7 REPLIES 7

Former Member
0 Kudos

Hi ,

To be honest I have not tested this. I tried doing it but sales order in my projects doesnt hold any value so basically no billing plans.

You can try using structure "ORDER_CONDITIONS_IN" of type

BAPICOND.

Thanks

Amit

Former Member
0 Kudos

In my project I worked with the Billing Plan tab. I believe that the data in the Billing Plan comes from the configuration done in SPRO. I think the BAPI for sales order creation BAPI_SALESORDER_CREATEFROMDAT2 doesn't have this functionality to include the Billing Plan tab data.

Former Member
0 Kudos

You can pass the billing plan information via EXTENSIONIN. Be sure to read Note 143580 for information on how to implement the enhancement correctly.

Best Regards,

James Gaddis

0 Kudos

I opened a SAP message and their response was that it wasn't possible with BAPI. Now, having said that if you have done this pls. let me know.

Thanks.

JB.

0 Kudos

Did SAP's reply say that using EXTENSIONIN for this BAPI wasn't possible? You should be able to use the normal extension of the BAPI parameters per my earlier post. This technique is not the most ideal solution since it has certain limitations on how to pass the data, but if you have no other alternatives (besides copying the standard BAPI and making your own custom version) this may work out for you. Give it a look...

Best Regards,

James G.

0 Kudos

James, can you expand on how you would do this? The only structures I see for the EXTENSIONIN parm is the BAPE_VBAP....types. Nothing for BAPE_FPLT where I would find the percentage field, FPROZ. Any additional info. would be appreciated.

Thanks

Jesse

0 Kudos

Hi Jesse,

I see what you mean. Since the existing EXTENSIONIN coding within the BAPI does not handle the billing plan data, you cannot use the standard BAPI_SALESORDER_CREATEFROMDAT2 in the normal way.

I have not tried this, so take it for what it is worth (maybe worth nothing), but I wonder if the following trick might work:

(1) Prior to calling the BAPI, export the billing plan data to memory. [You may want to investigate function 'BILLING_SCHEDULE_PUSH_DATA' to see if it can be used instead.]

(2) Within the appropriate sales order user exit (<u>maybe</u> USEREXIT_SAVE_DOCUMENT_PREPARE) import the billing plan data that you exported in step 1 and use it to fill XFPLA and XFPLT. [Note: You may also need to fill XVBKD-FPLNR(1) with '$' so that VBKD-FPLNR will get subsequently filled by function 'BILLING_SCHEDULE_GET_NUMBER'.]

If filling XFPLA and XFPLT is all that is needed to get the billing plan data into the sales order that is being created, then perhaps this will work. Please let me know if this works or if you figure out some other way to create the sales order with billing plan data.

Regards,

James G.