Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Updating custom field in standard table ERCH

Former Member
0 Kudos

Hi All,

I'm trying to update a custom field bill type in table ERCH.I could not find any function for ERCH table and hence i am using enqueue dequeue with update statement.During debugging,the field BELNR(bill doc) is seen with a value for bill document but if at that moment i take that bill doc and put in table ERCH,it shows no entries found.Because of this reason,sy-subrc is not zero and bill type does not get updated.Any suggestions here are welcome.

Thanks,

Shreeraj

5 REPLIES 5

Former Member
0 Kudos

Hi Shreeraj,

U can use the exit EXIT_REAARCH_ANALYSE_HEAD_001 for populating the custom field in table ERCH table.

Or for direct update u can use ISU_DB_ERCHC_UPDATE_BILL.

U can also search FM using ISU_DB_ERCH*

Regards,

Amitava

0 Kudos

Thanks for your replies,

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.How do i update the bill type in table ERCH based on the billing transaction?

Thanks,

Shreeraj

0 Kudos

Hi Sreeraj,

U just populate the ERCH structure or internal table. At the time of posting it will update that fld.

Regards,

Amitava

0 Kudos

I tried to use x_new_billing_doc-erch-zbill_type = 'P' but while doing syntax check it says that it cannot be changed. Which structure should i use so that the value gets reflected.

Thanks,

Shreeraj

Edited by: shreeraj pawar on Sep 27, 2010 6:05 PM

former_member404244
Active Contributor
0 Kudos

Hi,

Use modify statement and see if it works out.

Regards,

Nagaraj