I need to create a credit memo for an billing datset number.
I have used bapi - BAPI_ADMGMTSO_CHANGE now able to create an credit memo please go through the examples below.
structures of bapi filled are given below as in the below code.
CALL FUNCTION 'BAPI_ADMGMTSO_CHANGE'
EXPORTING
documentno = gw_exceldata-avm_nr
header = gw_bheader
headerx = gw_bheaderx
TABLES
return = gt_breturn
item = gt_bitem
itemx = gt_bitemx
item_ad = gt_bitem_ad
item_adx = gt_bitem_adx
booking_unit_*** = gt_bbooking_unit_***
booking_unit_assx = gt_bbooking_unit_assx
complaint = gt_bcomplaint
complaintx = gt_bcomplaintx
advertiser_*** = gt_badvertiser_***
advertiser_assx = gt_badvertiser_assx
text = gt_btext
textx = gt_btextx.
Sample example: 1 working fine
Order Item Billing Dataset Number Publication Date Amount
XXXX100000 010 001 01.12.2009 10
XXXX100000 010 002 02.12.2009 20
XXXX100000 010 003 03.12.2009 30
If you need to create auto credit memo for bds 3 the program will work perfectly as expected since billingdataset dates are different.
I am just passing the publication date in this structure bapibusism008_item_ad its creating the credit memo perfectly with amount 30 for that billing dataset.
Sample example: 2 I need solution for this senario like what data needs to be passed to bapi BAPI_ADMGMTSO_CHANGE
Order Item Billing Dataset Number Publication Date Amount
XXXX100000 010 001 01.12.2009 10
XXXX100000 010 002 01.12.2009 20
XXXX100000 010 003 01.12.2009 30
In this case it will create credit memo but 3 billing datasets are created and amount for which credit memo is created is with 60.
I need to create credit memo for billing dataset number 3 then it should create with amount 30 and only one billing dataset to be created.