Quantcast
Channel: SCN : Popular Discussions - SAP for Media
Viewing all articles
Browse latest Browse all 3232

Creation of Sales Order using condition records

$
0
0

Dear Experts,

 

I am creating a sales order using a Function Module : ISM_SALESORDER_CREATEFROMDAT2

In this function module I want to pass the conditon records with which the sales orders needs to be created.

 

My code is as follows:

 

----


LOOP AT it_knumh INTO wa_knumh.

 

        lwa_bapicondsb-itm_number = wa_knumh-kposn.

        lwa_bapicondsb-cond_type  = wa_knumh-kschl.

        lwa_bapicondsb-applicatio = wa_knumh-kappl.

        lwa_bapicondsb-conpricdat = price_date.

        lwa_bapicondsb-cond_no    = wa_knumh-knumh.

 

        APPEND lwa_bapicondsb TO  lit_bapicondsb.

 

      ENDLOOP.

 

 

      CALL FUNCTION 'ISM_SALESORDER_CREATEFROMDAT2'

        EXPORTING

          order_header_in     = lw_bapiheaderb

        IMPORTING

          salesdocument       = lw_docnob

        TABLES

          return              = lit_returnb

          order_items_in      = lit_bapiitemsb

          order_partners      = lit_bapiparnrb

          order_schedules_in  = lit_bapischdl

          order_conditions_in = lit_bapicondsb.

----


 

 

I am getting an error as follows:

 

V4     233     SALES_HEADER_IN has been processed successfully

V4     233     SALES_ITEM_IN has been processed successfully

V4     233     SALES_CONDITIONS_IN has been processed successfully

V1     213     Condition ZMDD is not allowed as header condition

V4     219     Sales document  was not changed

 

 

where ZMDD -  is Discount in Paisa.

 

 

please suggest......

 

 

Regards,

Abhijit


Viewing all articles
Browse latest Browse all 3232

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>