cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Cost object and Values from FITE_VC_RECEIPTS to FITV_VC_COST_ASSIGNMEN

Former Member
0 Kudos

Hi,

Currently i'm doing enhancement in FITE_VC_RECEIPTS -> RECEIPTS_VIEW to put the Cost Objects like Cost Center, WBS element as two separate columns in the table control. I have declared thest two fields in the RECEIPTS Node.

The user has to choose the values from this columns.

Then later it has to copy over to FITV_VC_COST_ASSIGNMENT ->COSTASSIGNMENTVIEW.

I already checked there is a interface node COSTASSIGNMENT in FITE_VC_RECEIPTS -> Properties.

After that what should i do and in which action or methods, in FITE_VC_RECEIPTS, i need to pass the values to FITV_VC_COST_ASSIGNMENT?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I dont understand why you want a separte column for Cost Object.

There is already this functionality provided at each Recipt Level.

For Every receipt there is a button, Change Cost Assignment . You can click on that and change cost objects for every receipt.

Former Member
0 Kudos

Hi,

Yes i know about that.

But for the user point of view, it is too many screens they need to browse to enter the cost object values.

So to simplify we want to add the cost objects in the Receipts Table itself.

So can you give me some inputs on this?

Former Member
0 Kudos

Hi,

I dont think you have to pass your values to VC_cost_assignment component.

Just you have to check the standard functionality and check from VC_cost_assignment where the data is getting passed

for each receipt and add your data to that particular place.

You could use Badi interface : IF_EX_TRIP_WEB_CHECK . MEthod :USER_CHECK_LINE_OF_RECEIPTS

This method gets triggered for each receipt so you can write your code here.

Former Member
0 Kudos

Hi,

Thanks for your reply.

The table control is in the FITE_VC_RECEIPTS component.

So from there i need to pass values to FITV_VC_COST_ASSIGNMENT component.

when i checked the Badi TRIP_WEB_CHECK -> USER_CHECK_LINE_OF_RECEIPTS, the table COSTDISTRIBUTION_RECEIPTS doesn't store any values initially if it goes first via FITE_VC_RECEIPTS.

Then after the values are filled up in the FITV_VC_COST_ASSIGNMENT, then only above table stores values.

And more over, my enhanced fields are in the FITE_VC_RECEIPTS->RECEIPTS_VIEW->Node COSTASSIGNMENT. So how to pass these values to BADI and populate in COSTDISTRIBUTION_RECEIPTS table?

Former Member
0 Kudos

Hi,

Try this one.

1. Have the new column's attribute in Node Receipts of Receipts View.

2. Now user will see new columns and will fill the values in this.

3. When you accept, then Badi TRIP_WEB_CHECK will trigger.

4. In the method , USER_CHECK_LINE_OF_RECEIPTS you have the value of receipts and also new columns in Receipts work area.

5. From Receipts , you can transfer the values to costdistribution_receipts[] table and thus new values are appended.

6. when all receipts are entered , you have all the values in costdistribution_receipts[] table.

I hope it would help you.

Former Member
0 Kudos

Hi,

When it goes to USER_CHECK_LINE_OF_RECEIPTS, the RECEIPT table doesn't store the custom fields. Here where i'm struck.

Because in the RECEIPTS_VIEW-> RECEIPTS node, i have these new fields. How it can be referred in the BADI?

Am i missing anything in the web dynpro part? I have done the following:

- In the Component Controller, added the new attributes in the RECEIPTS Node

- In the RECEIPTS_VIEW, context mapped with the component controller

- In the RECEIPTS_VIEW, created the new fields in the RECEIPTS table control and referring the context

Former Member
0 Kudos

Custom fields will automatically be transferred to BADI.

Please add the custom fields in Custom controller - RECEIPTS.

I have added the same and it is working fine.

Please check with Custom Controller.

Former Member
0 Kudos

Hi,

Oh i missed that part. but still after adding in the custom controllers, not able to see. Please highlight some more suggestions and may be some codes i need to do in web dynpro part or in badi?

Former Member
0 Kudos

hi,

Please add your custom fields in the structure : PTRV_UTIL_BELEG using append Structure .

Now you will be able to have all the custom field's value inside the BAPI method also.

I hope now your issue would be solved.