cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error while updating ET_ITEM in BBP_DOC_CHANGE_BADI

Former Member
0 Likes
336

Hi All,

I am working on some development, where we are updating the company code and location in shopping cart through BBP_DOC_CHANGE_BADI. This would update based on some logic when the user clicks on order button in the shopping cart.

We could able to update the location in E_PARTNER table of that badi and it is working fine. But if we tried to update the company code field in E_ITEM table, then it is giving the below 4 errors:

Enter the company code (item 0001)

Enter rate / USD rate type M for 08/13/2010 in the system settings

Required field COMP_CODE was not transferred in parameter PURCHASEORDER

Plant for follow-on document missing (Item 00001 )

We are passing the company code in a work area and we are updating the same in the E_ITEM output of the badi. But somewhere the company code is not getting passed.

Have anyone come across this issue? Can you please guide me to fix this issue?

Thanks.

Arun

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Obviously I meant

 e_item[] = i_item[]. 

Forgot the markup earlier.

Regards,

Dave,

Former Member
0 Likes

Hi. Have you moved all of i_item to e_item first? E_ITEM[] = I_ITEM[].

Also move all the other i_ tables to the e_ tables else you get errors in this BADI.

Regards,

Dave.

Former Member
0 Likes

Hi David,

Thank for your reply.

Already we are doing this with IT_ITEMS and all ther internal tables. We are trying to modify IT_ITEM[] and IT_ACCOUNT[]. Problem is occuring only when we are modifying values in ET_ITEM[]. If we modify only in ET_ACCOUNT[], then there are no issues.

Do you have any other suggestions, kindly advise?

Thanks,

Arun

Former Member
0 Likes

Hi Arun,

If you are SRM 7.0,

Try to put a break point in the method /SAPSRM/IF_PDO_BO_SC~UPDATE_ITEMS and check what exactly is causing the issue.

There is a validation around company code before the update.

Check it out. It might help you.

You can also look into the note 538605 if you are on SRM 5.0.

Regards

Lavanya

Former Member
0 Likes

Hi Lavanya

I am in SRM 4.0 (SP12). Moreover the note which you have suggested is for SRM 2.0 or 3.0, I believe. You mentioned about one validation pertaining to company code field. Do you have any more details about that validation? If yes, kindly share with me.

Thanks,

Arun

Former Member
0 Likes

Hi. Are you just trying to change the field ET_ITEM-BE_COMP_CODE?

I can't check at the moment but I think you will have to change ET_ORGDATA as well.

Also, the exchange rate / M thing normally means there is no currency defined in PPOMA_BBP, although it could be a side effect of the company code not changing.

Regards,

Dave.

Former Member
0 Likes

Hi Arun,

Yes , As Dave mentioned, the validation around company code also checks for the plant and organizational unit.

I think you might need to modify that data as well.

Regards

Lavanya

Former Member
0 Likes

Hi,

Thank you everyone for your reply.

SAP support has helped us in identifying the issue. When we are ordering a shopping cart, BBP_DOC_CHANGE_BADI will be called more than one time. All the import parameters are getting filled only during the first time. From the next time onwards, only the IT_ITEM table is having value. Other tables are blank. It is also mentioned in the SAP note 538605 suggested by Lavanya.

We are modifying the BE_CO_CODE in IT_ITEM. As per the logic, value for this field will come from IT_ACCOUNT. Since IT_ACCOUNT is blank when the BADI is being called for second time, BE_CO_CODE is also blank. Hence that error occurs.

We modified our logic and it is working now.

Thanks,

Arun

Edited by: Arun on Aug 18, 2010 11:47 PM