cancel
Showing results for 
Search instead for 
Did you mean: 

Profit Center was not maintained during order n billing creation.

former_member232834
Active Participant
0 Kudos

Dear, Gurus

I'm facing a problem of Profit Center. User created a service material, maintenance contract. They created a Billing Document as it is order related billing. Accounting document was not generated when saving invoice. When I got to the bottom of this I realized no costing tabs were ever maintained for material type services. (Henceforth no Profit Center in Sales Order n Invoice).

I have done the necessary config n assignments but question now is what should I do as in billing doc the field is greyed out it will not allow me to assign Pr Center now. I am thinking that this may work if I cancel the billing document and then go back to sales order and try and changing the field, then re-create the invoice. I'm trying to avoid canceling. Is there any program, bapi, user exit I may use to re assign or make system re check the MM while saving invoice to allow accounting document to be created? This is one scenario.

2nd scenario is similar but in the case of this contract everything was made. Accounting document was cleared even but with some dummy weird Profit Center. (No proft center in Order nor invoice.) Whole problem at first in this scenario is User saying everything is complete so status in doc flow should show maintenance contract as complete but wasn't. it showed being processed. I discovered no completion rule was maintained. I maintained E Full target value referenced but status still has not changed any idea guys? (New config not showing on old existing data only show on new document, concept?) Is there a program or anything to make system update status doc flow? aside from this Profit center incompletion log is coming in Contract. Not maintained in order or invoice.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi ali,

you have two ways of updating PRCTR into tables.

1. goto to SE11 - VBRP & UTILITIES - table maintaince generator it will ask you for function group there - give it and proceed and it will ask you an access key - give it and it will allow you to maintain the PRCTR or which ever fiedl you want to maintain you can maintain here.

in your case PRCTR is requried to maintain.

2. same case SM30 - VBRP - MAINTAIN - double click on the error - follow 1.

hope this clears your issue.

balajia

former_member232834
Active Participant
0 Kudos

Balaji thats an awesome reply Is it possible to give me the function Group as there are many?

As for SM30 I am getting error:

The maintenance dialog for VBRP is incomplete or not defined

Diagnosis

The called function with the view/table VBRP needs a special maintenance dialog which, however, either does not exist at all, or does not exist completely.

System Response

The called function cannot be performed.

I guess we have to create it?

Former Member
0 Kudos

hi ali,

ask your ABAPER how to do it.

other wise i will explain you further.

please check and update the forum

balajia

Lakshmipathi
Active Contributor
0 Kudos

Check Note 42563 - Special authorization check in SM31

thanks

G. Lakshmipathi

former_member232834
Active Participant
0 Kudos

Guys I have asked my Abap Consultant to see if he can create a small program for me to allow the change in table and field. He consulted with the Abap Track Lead. Abap track Lead said this is not a good practice and is very dangerous to the system. As one never always knows what can be affected if doing it this way. So I'm stuck up here. He told me first consult my track lead to see what he would suggest. And to be honest i'm sure our track lead won't know. (unfortunately)

If I do it the functional way of canceling the invoice then going back to the order to enter profit center i'm facing another hiccup and that is because the order type is debit memo request and in VA02 the profit center field is also not changeable or modifiable it shows greyed out. What to do?

Lakshmipathi
Active Contributor
0 Kudos

In one of my earlier projects, a similar requirement was putforth by users and we had developed a zee tcode to change the profit center in billing document via SM30 which can be done only by FI authorised users.

I am reproducing the said program as under:-

REPORT  "ZPROFIT_CHG"

TABLES : VBRP.

SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME.
 SELECT-OPTIONS : SO_VBELN FOR VBRP-VBELN OBLIGATORY.
 PARAMETERS:      P_PRO LIKE VBRP-PRCTR OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.

DATA : BEGIN OF IT_VBRP OCCURS 0,

        VBELN LIKE VBRP-VBELN,
        POSNR LIKE VBRP-POSNR,
        PRCTR LIKE VBRP-PRCTR,

      END OF IT_VBRP.

DATA COUNT(3).
DATA W_MESSAGE(30).

START-OF-SELECTION.

  LOOP AT SO_VBELN.

       IF SO_VBELN-LOW CA '~`!@#$%^&*()_+|\=-><,.;":' OR SO_VBELN-HIGH CA '~`!@#$%^&*()_+|\=-><,.;":'.
           MESSAGE 'Special character not allowed' type 'S'.
           LEAVE LIST-PROCESSING.
           STOP.
       ENDIF.
  ENDLOOP.

  IF P_PRO CA '~`!@#$%^&*()_+|\=-><,.;":'.

           MESSAGE 'Special character not allowed' type 'S'.
           LEAVE LIST-PROCESSING.
           STOP.
  ENDIF.

  SELECT B~VBELN B~POSNR B~PRCTR FROM VBRK AS A  INNER JOIN VBRP AS B ON A~VBELN EQ B~VBELN INTO CORRESPONDING FIELDS OF TABLE IT_VBRP
                            WHERE A~VBELN IN SO_VBELN
                            AND   A~FKART EQ 'ZFF2'
                            AND   A~FKSTO NE 'X'.

  IF SY-DBCNT EQ 0.

      MESSAGE 'NO DATA FOUND' TYPE 'S'.
      LEAVE LIST-PROCESSING.

  ENDIF.

  SORT IT_VBRP BY VBELN.

  DELETE ADJACENT DUPLICATES FROM IT_VBRP COMPARING VBELN.

  CLEAR COUNT.
  IF IT_VBRP[] IS NOT INITIAL AND P_PRO IS NOT INITIAL..

      LOOP AT IT_VBRP.
          UPDATE VBRP SET PRCTR = P_PRO  WHERE VBELN = IT_VBRP-VBELN AND POSNR = IT_VBRP-POSNR.
          IF SY-SUBRC = 0.
             COUNT = COUNT + 1.
          ENDIF.
          COMMIT WORK.
          CLEAR IT_VBRP.
      ENDLOOP.

 ENDIF.

 IF COUNT IS NOT INITIAL.
    CONCATENATE 'No Of Records Updated Is - ' COUNT INTO W_MESSAGE.
    MESSAGE I000(ZSFL) WITH W_MESSAGE.
 ELSE.
    MESSAGE 'No Records Updated' TYPE 'S'.
 ENDIF.

Since I am so weak in ABAP coding, not sure whether the above coding is correct. You need to check with your ABAPers and develop this logic. This should work.

thanks

G. Lakshmipathi

former_member232834
Active Participant
0 Kudos

Guys we managed to solve this issue. Please do note this is not a best practice or way of doing it. We did it thru SE16n. We entered the table then at the top in command box and we used &SAP_EDIT and executed it and we changed that specific invoice profit center this way. This will not be allowed in PRD on your user name or rights. You would have to log in from Basis or get the authorization to do so.

Thanks to all of the above mentioned solutions that is indeed the way to do it, but my Abap team were giving me a hard time.

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear Ali

The order type configurstion , must have document category I. ( check all the categories)

Then, cost center/profit center field will be present in the sales order.

Check & revert

Rgds

Sumanth.G

Consultant/Systems Analyst - SAP SD/MM

former_member232834
Active Participant
0 Kudos

It's a maintenance Contract so it needs to be G.

Former Member
0 Kudos

Go directly to the necessary table & enter the data.

Take the help of an ABAPer,if you are not sure on this.

Rgds

Sumanth.G

Former Member
0 Kudos

hi mohammad,

please check whether PROFIT CENTRE is there in the MMR or not.

that would the problem while creating a sales order.

please check and confirm

balajia

former_member232834
Active Participant
0 Kudos

Dear, I have already pointed out that in MMR it was never maintained. Thats why not in Sales Order or Billing. I have now maintained it in MMR but how to update it in my Invoice without Canceling the billing document and reversing the steps until Sales Order to manually enter at Sales Order level? Any other possible way to enter the profit center in VF02?