03-29-2010 7:55 AM
Dear All,
I have to create credit memo using XL file.In XL file there are following fields:
1.order type
2.sales organization/division/distribution
3.sold to party
4.order refrence
5.Material code
6.Quantity
7.Price.
Is it possible to create Credit memo using BAPI?If yes then please reccomend any BAPI.
Regards,
AMAR
03-29-2010 8:05 AM
Hi,
{ Changing the Object Status to Approve
CALL FUNCTION 'I_CHANGE_STATUS'
EXPORTING
objnr = is_vbakch-objnr
estat_inactive = c_e0001
estat_active = c_e0002
EXCEPTIONS
cannot_update = 1
OTHERS = 2.
IF sy-subrc EQ 0.
is_billing-salesorg = is_vbakch-vkorg.
is_billing-distr_chan = is_vbakch-vtweg.
is_billing-division = is_vbakch-spart.
is_billing-doc_type = is_vbakch-auart.
is_billing-ref_doc = is_vbakch-vbeln.
is_billing-bill_date = sy-datum.
is_billing-sold_to = is_vbakch-kunnr.
is_billing-ref_doc_ca = c_x.
APPEND is_billing TO it_billing.
ENDIF.
ENDLOOP.
BAPI To create Billing for the Credit Memo.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
TABLES
billingdatain = it_billing
return = it_returncg
success = it_bilsuccess.
}
Please use these for Credit memo creation using upload .. If u want i can send the coding also ..
Regards,
Srinivas.
03-29-2010 8:05 AM
Hi,
{ Changing the Object Status to Approve
CALL FUNCTION 'I_CHANGE_STATUS'
EXPORTING
objnr = is_vbakch-objnr
estat_inactive = c_e0001
estat_active = c_e0002
EXCEPTIONS
cannot_update = 1
OTHERS = 2.
IF sy-subrc EQ 0.
is_billing-salesorg = is_vbakch-vkorg.
is_billing-distr_chan = is_vbakch-vtweg.
is_billing-division = is_vbakch-spart.
is_billing-doc_type = is_vbakch-auart.
is_billing-ref_doc = is_vbakch-vbeln.
is_billing-bill_date = sy-datum.
is_billing-sold_to = is_vbakch-kunnr.
is_billing-ref_doc_ca = c_x.
APPEND is_billing TO it_billing.
ENDIF.
ENDLOOP.
BAPI To create Billing for the Credit Memo.
CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'
TABLES
billingdatain = it_billing
return = it_returncg
success = it_bilsuccess.
}
Please use these for Credit memo creation using upload .. If u want i can send the coding also ..
Regards,
Srinivas.