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 not creating condition records

former_member206439
Contributor
0 Kudos
143

I am using the FM - BAPI_SALESORDER_CREATEFROMDAT2 to create the sales order from Work order.

The program was working fine for all the document types.

Now we have a requirment to create the sales order for existing document type where i am not passing any condition values to the BAPI.

if we create the sales order for that worder with material in the item level it is creating by default condition values GT03 condition type.

If I am not passing to BAPI any condition values it should also create the default Condition values with GTO3 with refernece to the material.

Could any one help what could be the wrong with BAPI why it's not creating the condition values same way as VA01 transaction .

The BAPI description says it works same as VA01.

My BAPI code.

        CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
        EXPORTING
          order_header_in     = wa_head
        IMPORTING
          salesdocument       = lv_vbeln
        TABLES
          return                            = li_return
          order_items_in           = li_item
          order_partners            = li_ptnr
          order_schedules_in   = li_sched
          *order_conditions_in   = li_condition
          order_text                    = li_texts.

1 REPLY 1

former_member206439
Contributor
0 Kudos
42

Any help please.