2010 Sep 27 5:09 PM
Hi All,
I need to update the custom field bill type in table ERCH depending upon the bill transaction( if bill transaction is periodic,bill type will be updated as P and so on for other cases)
I am implementing a BADI ISU_DEF_BILL_PERIOD and i have used case statements(when abrvorg is P,bill type is P). While debugging i saw that the importing parameter bill document is generated but if i enter the same bill document number at that point in time in table ERCH, it shows no entries found. Thus sy-subrc is retrieved as not zero and hence the custom field bill type does not get updated.
I would like to know how do i go about this requirement since it seems that the bill document entry is made in table ERCH outside this BADI.I used x_new_billing_doc-erch-zbill_type = 'P' in the code but it says that it cannot be changed. Any structure which can be used to be filled here?
Thanks,
Shreeraj
2010 Sep 27 8:49 PM
Sheeraj,
You're using a wrong enhancement for your requirement. ISU_DEF_BILL_PERIOD is used to specify billing key date of a billing or print document depending on your requirements,.
SAP provides enhancement EBIA0001 for any custom enhancements to billing document. You can update the custom fields in the billing document before the document is updated.
Best,
Sai
2010 Sep 27 8:49 PM
Sheeraj,
You're using a wrong enhancement for your requirement. ISU_DEF_BILL_PERIOD is used to specify billing key date of a billing or print document depending on your requirements,.
SAP provides enhancement EBIA0001 for any custom enhancements to billing document. You can update the custom fields in the billing document before the document is updated.
Best,
Sai
2010 Sep 27 9:06 PM
Thanks for your reply,
I am updating the billing key date as well and basically the process is that depending upon the billing transaction(ABRVORG),the billing key date and the custom field bill type in table ERCH is updated.
Also,as per the requirement i have to pass this billing key date to invoice document and update the bill type field in table ERDK.
2010 Oct 04 4:14 PM
I have one more question in relation to this:
I am trying to run manual billing and update the billing key date.I have done the coding inside BADI ISU_DEF_BILL_PERIOD's method SET_BILLING_PERIOD_BILL for the other billing transactions( periodic,interim etc).For other cases it seems fine but for manual billing,i am unable to update the billing key date since during runtime it seems that this method isn't getting called.I am using EA16 to create manual bill,is there any other way to update the billing key date for manual bill?
Thanks,
Shreeraj
2010 Oct 04 4:40 PM
If you have implemented the BADI method set_billing_period_bill rightly, it should update the billing period for manual billing doc as well. Did you put a break point in this method and tried debugging?
2010 Oct 04 4:43 PM
2010 Oct 04 6:00 PM
Yes,i did try to put the breakpoint but it did not stop.I found that EA16 and the BADI belong to different packages(EE20 and EE21 respectively).
Thanks,
Shreeraj
2010 Oct 05 4:36 PM