cancel
Showing results for 
Search instead for 
Did you mean: 

Update value fields for posted copa document

Former Member
0 Kudos

Hi,

We want to update Transportation Cost Value Field from Z table logic to posted co-pa document at the end of the month. I know that we need to use BAPI_COPAACTUALS_POSTCOSTDATA but for that do we also need to use T.code to update the field.

Please advise.

Regards,

Varsha

Accepted Solutions (1)

Accepted Solutions (1)

ajaycwa1981
Active Contributor
0 Kudos

Hi Varsha

If your requirement is to update the Transportation cost based on Qty Sold, you can do it using Standard functionality itself.. You don't need to develop the program

You have the option of COPA costing sheet. Set up a COPA costing sheet and your Val Strategy in KE4U to use the costing sheet.. The costing sheet is nothing but a replica of SD pricing procedure.

You can also use COPA exit COPA0002, to do the calculation and update the desired value field. In order to trigger the exit, you need to add a line in Val Strategy KE4U, to use the user exit..You can read SAP help for the same

With this, you can update trans cost at the time of original COPA doc itself

Br, Ajay M

Former Member
0 Kudos

Thanks Ajay for the detailed clarification....

I have one more doubt. Transportation Cost Calculation is developed in Z report say for e.g. 4rs/litre that we need to multiply with Billing Qty. So will this requirement be fulfilled from the above solution which you provided.

Regards,

Varsha

ajaycwa1981
Active Contributor
0 Kudos

Hi

You can make a condition type in COPA and maintain the cond record to capture the transportation cost (4 rs/lt) in COPA..Then costing sheet can take over from here

However, if you feel that its not possible to maintain this as a cond record, then the BAPI is the solution so that it can calculate the value and upload

Br, Ajay M


Former Member
0 Kudos

Hi,

We tried BAPI but how to edit existing CO-PA Document & upload the transportation cost.

Our requirement is to multiply sales qty from billing document with Zreport cost.

How to achieve this from BAPI_COPAACTUALS_POSTCOST DATA. Here we are unable to edit existing CO-PA document. Is there any other way of editing document.

Regards,

Varsha

ajaycwa1981
Active Contributor
0 Kudos

Hi varsha

Existing doc can't b modified. You need to post fresh doc using the Bapi

Ajay M

Former Member
0 Kudos

Hi Ajay,

Okay...But if I want to see Product wise transportation cost against the billing document then how could I see that. How would the report show against this billing document what is the transportation cost. Client want to see transportation cost delivery wise.

Regards,

Varsha

ajaycwa1981
Active Contributor
0 Kudos

Hi Varsha

You will only burden your system. COPA is not meant for that.. If you want to analyze each billing doc wise trans cost in COPA, you need to use line item reports and COPA will be burdened

For analyzing delivery wise trans cost, you should ideally use Transport mngt or Shipment cost document feature.. COPA is not meant for that

You should be using COPA to analyze trans cost at Product level or Customer level, but not at delivery level

For docs which are posted, you cant modify them, thats for sure. In future, if you can populate this trans cost during billing doc itself, that would help you

Br, Ajay M

Former Member
0 Kudos

Hi Ajay,

Thanks for the explaination. One more query, Can you just elaborate how I can use BAPI to populate transportation cost in COPA document. I tried but was not able to understand. Do we need to write some logic in that with respect to Z report from where we are getting cost per litre as per delivery & multiply it with sales qty in COPA. Please advise as it would be helpful to me for further analysis.

Regards,

Varsha

ajaycwa1981
Active Contributor
0 Kudos

Hi

You need to have the same logic inside the BAPI to calculate the trans cost.. You cant read values from the report, but need to calculate it inside the BAPI itself

Br, Ajay M

Former Member
0 Kudos

Hi Ajay,

Okay...will try that but will there be double posting of billing document if we use BAPI to post transportation cost.

Regards,

Varsha

former_member188028
Active Contributor
0 Kudos

No,there won't be, you are entering only transporation cost in the relevant value field and remaining fields would be blank.

Former Member
0 Kudos

Hi,

But If I want to see KE30 report product wise or region wise how would I be able to see transportation cost related to particular product or region. Pls suggest.

Also is there any possibility to update the field directly in CO-PA table CE1XXXX. If yes then what are the pros and cons. Please advice as the requirement is uegent.


Regards,

Varsha

Former Member
0 Kudos

Any updates on this

ajaycwa1981
Active Contributor
0 Kudos

Hi

When you post the trans cost related doc in COPA, update all the chars that you want.. They will appear in COPA report then

You cant do a  direct table update...

Br, Ajay M

Former Member
0 Kudos

Hi,

Thanks. One more clarification, if I want to update all the fields then Should I use BAPI or BDC using t.code KE21N. As in BAPI we are not able to see all the characteristics. Please advice.

Regards,

Varsha

ajaycwa1981
Active Contributor
0 Kudos

Always BAPI

I am not sure why cant you see all chars.. You need to analyze that with ABAP.. I think all should be possible

Br, Ajay M

Former Member
0 Kudos

Ok..will check & let you know. But this is the only BAPI"BAPI_COPAACTUALS_POSTCOSTDATA" to be used. Please let me know or anyother is available.

Also If I want to see profitability at Product level or sales region level, is it possible to see all the values i.e. revenue, material cost & transportation cost together in drill down & arrive at profit. I still have doubt in this. Also for other expenses when they are distributed, will I be able to see profitability at product level with all the value fields. Please explain.

Thanks for your help so far. Please clarify above points also.

Regards,

Varsha

Former Member
0 Kudos

Hi Ajay,

Thanks a lot for your inputs & detailed explaination. Issue Resolved through BAPI.

Regards,

Varsha

Answers (2)

Answers (2)

former_member312411
Active Participant
0 Kudos

Hello Varsha,

1. Set up the flow for new value field - Config, Valuation Table, User Exit

2. Reverse the source document and re-post it, which should lead to updation of value field.

In case document cannot be reversed at this stage, then also recommend to drop the idea of updating the value field now.

Thanks.

Former Member
0 Kudos

Hi,

I don't think you have to use BAPI for that.

You can use transaction KE27 - Periodic Revaluation.

If the logic is simple you can utilise CO-PA Costing Sheet (you define your Z table values as conditions)

If more complex you can use user exit EXIT_SAPLKEAB_001.

Config transaction KE4U.

Regards,

Szymon

Former Member
0 Kudos

Hi,

We want to update Transportation Cost which is maintained in Ztable that cost we want to populate in co-pa value field by multiplying tht per litre cost with CO-PA qty. This we will update on month basis. So is there any workaround available or the above exit will serve the purpose.


Regards,

Varsha

Former Member
0 Kudos

Hi..

If transportation cost is maintained in ztable before you create billing document  like standard cost, you use exit EXIT_SAPLKEAB_001.

If transportation cost is set through closing job, you use z-program using BAPI.

Former Member
0 Kudos

Hi,

We have checked the above Exit but its not useful. We want to edit existing CO-PA document & input the field Transportation Cost. We tried BAPI_COPAACTUALS_POSTCOSTDATA. However, we are unable to see CO-PA document. Is there any way for workaround or how to use above BAPI. Pls suggest as the requirement is urgent.


Regards,

Varsha

Former Member
0 Kudos

Hi Varsha,

Just out of interest, why you need to update existing CO-PA document?

I'm afraid SAP as a rule does not allow to change already posted actual documents (with the exception of some text fields).

If you post additional document with freights costs only you can always combine them in a report.

Thnaks,

Szymon