Skip to Content
0
Former Member
Apr 10, 2007 at 02:16 PM

Populating Quantity field in BAPI : "BAPI_OPPORTUNITY_CREATEMULTI"

29 Views

I want to populate quantity field for an Item while creating Opportunity using BAPI_OPPORTUNITY_CREATEMULTI.

along with other data, I am populating BAPI internal table required for quantity as below, opportunity is being created with item. But quantity field is blank. Can anyone advise what I have been doing wrong or what’s right way of populating this table parameter.

Appreciate help on this.

-


s_scheduleline-item_handle = ‘0000000002’.

s_scheduleline-handle = ‘0000000001’.

s_scheduleline-quantity = s_valid-est_qty. " Quantity

APPEND s_scheduleline TO it_scheduleline.

s_input-ref_handle = ‘0000000002’

s_input-ref_kind = 'B'.

s_input-objectname = 'SCHEDLIN'.

s_input-fieldname = 'QUANTITY'.

APPEND s_input TO it_input.

CALL FUNCTION 'BAPI_OPPORTUNITY_CREATEMULTI'

TABLES

header = it_header

opportunity = it_opp

partner = it_partner

appointment = it_appointment

status = it_status

customer_head = it_cust_h

text = it_text

item = it_item

product = it_product

scheduleline = it_scheduleline

pricing_item = it_price_i

input_fields = it_input

saved_process = it_saved

return = it_return.