Profit Center message display in MV45AFZZ

In include MV45AFZZ  USEREXIT_SAVE_DOCUMENT_PREPARE I have added code to display information message if profit centre is initial/blank for any line item.
Suppose there are 3 line items for a sales order with line item 20 & 30 having profit centers as initial/blank. I get my information message displayed as Profit centre not maintained for line items: 20, 30. Then I press enter and it allows me to add profit centers for the missing line items.
I assign profit centre for line item 20 only and for line item 30 I want it to be blank. Then I save it.
Here comes my issue :
Again information message displays as u201C Profit centre not maintained for line item 30u201D. Unless I enter profit center value in line item 30 the message displays. If I enter some value and save it then document is saved.
I need the message to be displayed only once and user can enter missing profit centre for any line item & save it. Now its mandatory to enter profit center for all line items.
IF FLAG IS INITIAL.
LOOP AT xvbap.
  IF xvbap-prctr IS INITIAL.
     lv_posnr = xvbap-posnr.
     CONDENSE lv_posnr.
     CALL FUNCTION 'BKK_DELETE_LEADING_ZERO'
        CHANGING
          c_field       = lv_posnr.
      IF lv_text IS NOT INITIAL.
        CONCATENATE  lv_text lv_posnr into lv_text SEPARATED BY ','.
      ELSE.
        lv_text = lv_posnr.
      ENDIF.
  ENDIF.
  CLEAR lv_posnr .
ENDLOOP.
IF lv_text IS NOT INITIAL.
      fcode = 'ENT1'.
      CONCATENATE zmsg_txt lv_text INTO zmsg.
      message i000(ZZ) WITH zmsg.
         FLAG = 1.
         fcode = 'ENT1'.
         LEAVE TO SCREEN 4001.
   ENDIF.
ENDIF.
~Arya
Edited by: arya soumya on Feb 1, 2012 10:36 AM

Hi Soumya,
Giving a thought about the scenario you have explained, you need Message if profit centre is initial/blank for any line item.
I would suggest you another approach i do not know how far will it suffice your requirement,
Taking your example Suppose there are 3 line items for a sales order with line item 10, 20 & 30 having profit centers as initial/blank.
You want to assign profit centre for line item 20 only but not for line item 30 since you want it to be blank.
When you code anything with respect to the Profit Center of the Line Item, it will check for
if PC is not initial immaterial whether you want it to be blank or not and in all cases it will give you the message
Instead, create a program which will capture the Line Item number.
1) Give the Line Item numbers to the new Z program, and inside the program export the values to a memory id.
2) Import the same value in MV45AFZZ and then in XVBAP you already have the POSNR for which you want to SAVE inspite it is BLANK
3) if xvbap-posnr = g_import_posnr
    then dont give the error message.
    else.
    give the error message.
    endif
Revert for further clarification or is there any mistake in my understanding.
Thanks
Sri
endif.

Similar Messages

  • Problems in creating Profit Center : Message KM019

    Hi All,
    Please suggest the tcode for viewing the sap messages.
    I am creating profit center but system shows an error while assigning it profit center group. System shows an error that this profit center group cannot be assigned. I tried to assign another profit center group to the same profit center, but then also i receive the same reply.
    Then i tried to make a new profit center & assign another group then also systems the same error with the message no. KMO19 or KM019
    Please let me know where i am doing mistake due to which system shows me this error, so that i can rectify the same.
    There is a sap tcode where we can see message details which we receive when shows an error. That tcode shows the detail of that messages, which will help to solve the problem there & that. Or please let me know how should I correct it.
    Thanks & Best Regards,

    Thank you very much Pradeep and Ley for your replies. By typing KCH3 I can see the Profit center group. But by typing KCH6N, it says you have not created the profit center hierarchy for my company code. While creating Profit Center it says that it can't take the Profit Center Group. And the error message is KM019. The message has no details attached to it. I am stuck over here and because of this error, I am not able to movie forward.
    I would really appreciate If you could please guide me.
    Thank you so much.
    Edited by: mohitg7 on Feb 10, 2010 3:24 PM

  • Profit Center Field (Display Mode) During Asset Postings

    We are using document splitting functionality with profit center mandatory for any kind of posting.
    Scenario-Asset purchase through PO:
    1.Purchase Order -created
    2.At goods receipt error is coming balancing filed is not filled (bcoz asset is not a material), for materials we are giving profit center. in the asset master i assigned cost center, still profit center is not deriving.
    Scenario-Asset Purchase from vendor
    purchasing asset directly from vendor through F-90, against asset line item we have to assign profit center. Cost center & profit center is coming in display mode. in the asset master i already maintained cost center, still profit is not deriving.
    I already done config for field status [asset account number (G067) andPosting Keys (70,75)]. I also checked note no.684659.
    how profit center will be derived for any kind of asset postings.
    Thanks
    Sai

    Hi
    Guess - Check settings in ACSET
    Thank You,

  • Profit Center Not Displaying in FBL5N

    FI Experts,
    We are implementing SD, we enter a profit center in the sales order, which it carried all the thru to the billing document. However when I go into FBL5N to run list of open items and bring the Profit Center fields they are all blank. If I double click on the document and click on document overview i can see profit center. Anyone knows as to why Profit Center does not get populated in FBL5N?
    Thank You, for your help,

    I beleive you would be on ECC  and have activated new GL with document splitting. The profit center would be displayed for the revenue line items in entry view when you display the document and not for customer account. If you go to general ledger view you will should see the profit center there even in the Receivables GL account. This is standard behviour for ECC 6 or ECC 5.0 the profit center value is not there in BSEG table for customer line item
    One option is to go to FAGLL03 report and select it for General ledger view (mostly defaulted) and then run it for the reconciliation account for customers. In the display layout you can change to include customer field also and get the relevant details with profit center.
    Thanks and regards
    Kedar

  • Expanded Profit Center Hierarhcy display in Report Painter.

    Hello,
    We have built a report painter based P&L report with variation on company code and profit center.  The profit center hierarchy has multiple levels.  User requirement is  -  The report output should show the profit center hierarchy fully expanded till the lowest level at the first instance itself.  They do want execute the report and then manually expand the profit center hierarchy.   Please suggest some ideas to achieve this requirement.
    Regards
    Jayesh.

    You can check the available reports in GRR3.
    Have you created any report in GRR1 till now?
    If yes, explian the structure.
    If not, just give us the basic structure how you want. So that will try to give the inputs create the report
    Thanks

  • Profit Center Display Unnormal  IN  Production Order

    If I choose Special as type for  Production Order, Profit Center wont display normally, it'll display nothing or something from the previous/next  Production Order .
    And I'm using the DI to create Production Order , but there's only one field availble that is  ProductionOrders.DistributionRule .In this way , full  DistributionRule  (2 dimenssions) cant be displayed.
    thanks.

    yes, Im gonna use ui to cover that place and make the value as same as the field OcrCode
    Is Profit Center has something to do with the accounts? there should be , I'm not aware of it .

  • Vendor Profit Center wise balances

    Dear friends,
    Here is the requirement to provide details of vendor wise profit center wise balances. As report required to run for all vendors for a certain period it is consuming a lot time to calculate opening balances from line items.
    Is there any table like LFC3 which will store vendor wise, profit center wise balances. Kindly suggest.
    Regards,
    Praveen Lobo

    Dear
    Use T.code FBL1N - Display/Change Line Items.
    when you execute the report , select changelayout and select the field profit center, vendor balance and profit center are displayed.
    when the profit center is displayed, select filter and enter the profit centers and profit center wise vendor balances will be displayed.
    Alternately, use dynamic selections in T.code FBL1N selection screen.
    Please let me know if you need more information.
    Assign points if useful.
    Regards
    MSReddy

  • Profit center actual line item report for new GL

    Hi,
    We are using New GL functionality. I have posted one document as follows
    One line item with PC P0101 (Debit side) and second line item without PC (Credit side)
    Second line item also inherited to PC P0101.
    When checking profit line actual item report at KE5Z only one line item profit center displaying (debit side ), inherited line profit center not displaying (Credit side).
    I would like to see the both line items at CO report. Can any one suggest which report I need to refer at CO?
    At FI GL report I can able to see the both line item profit centers report (FAGLL03)
    Thanks

    Hi
    I think you have already got the answer to your question....
    You should refer FAGLL03 / FGI3 reports and not Ke5Z.. KE5Z is for Classical PCA where as the inherited PC in the 2nd LIne item is a New GL Feature
    More over, you should not have used Classical and New GL PCA together... Refer Note 702854 and 826357 which explains this
    Br, Ajay M

  • Profit Center issue when executing GR55

    Hi Experts,
       I was reported by the business users that they see transactions with the Dummy Profit Centers when they run report for Balance Sheet and P&L Statements. They dont want to see any Dummy Profit Center Report Transactions in their financial statementsin both BSand P&LStatements. 
    For example a number of Documents posted against same G/L account and few of them have dummy profit centers, users doesn't want to see them.
    I already checked in tables BSAD,BSID, BSIS,BSAD, BKPF,BSEG
    TCodes: FAGL3KEH (No default profit centers allocated to anyone of the company codes), FBL3N, FBL5N, VF03
    So we know that there is issue but I need to know the process to find it.
    Can anyone help me out the procedure to find out the issue. This is very high priority issue.
    Thanks,
    Andy Roger

    Refer to the IMG Activity Documentation for the following IMG Node.
    Financial Accounting (New) -> General Ledger Accounting (New) -> Master Data -> Profit Center -> Create Dummy Profit Center
    Here is the documentation:
    Create Dummy Profit Center
    This function lets you create the dummy profit center for the current controlling area.
    The dummy profit center is updated in data transfers whenever the object to which the data was originally posted (cost center, order, and so on) is not assigned to a profit center. This ensures that the data in Profit Center Accounting is complete. You can later send the data on the dummy profit center to the other profit centers using assessment or distribution.
    You create the master record for the dummy profit center using this special transaction. To change or display it, use the normal profit center maintenance functions.
    The name of the dummy profit center is displayed in the controlling area settings for Profit Center Accounting.
    Prerequisites
    The standard hierarchy must exist for the current controlling area.
    Actions
    Enter the name of the dummy profit center. The rest of the steps are the same as when you create a normal profit center.
    Choose the function Extras -> Set controlling area first to make sure that the correct controlling area is set.
    I am guessing this is where your dummy profit center postings are coming from (a cost center / order or some other account assignment object that is not assigned to a profit center).  It should be mandatory (in your month-end close) to run reports on dummy profit center(s) and move balances, if any, to the real profit center, before you pull financial statements.

  • Wrong Profit Center on Material document (Goods Receipt PO for Asset)

    Dear SAP Expert,
    When our company upgrade our SAP version from 4.6C to ECC6, all Profit Center on Material document (Goods Receipt on Purchase Order for Asset) is filled by profit center DUMMY.
    This condition not happend in our previous version (4.6C). Is there any new configuration on ECC6 for Asset Accounting?
    Many Thanks
    Maickel P

    Hi, Maickel:
    There is a setting for Dummy Profit Center, you can check in SPRO: Controlling->Profit Center Accounting->Master Data->Create Dummy Profit Center.
    And you can refer to the help of this IMG activity:
    Create Dummy Profit Center
    This function lets you create the dummy profit center for the current controlling area.
    The dummy profit center is updated in data transfers whenever the object to which the data was originally posted (cost center, order, and so on) is not assigned to a profit center. This ensures that the data in Profit Center Accounting is complete. You can later send the data on the dummy profit center to the other profit centers using assessment or distribution.
    You create the master record for the dummy profit center using this special transaction. To change or display it, use the normal profit center maintenance functions.
    The name of the dummy profit center is displayed in the controlling area settings for Profit Center Accounting.
    Prerequisites
    The standard hierarchy must exist for the current controlling area.
    Actions
    Enter the name of the dummy profit center. The rest of the steps are the same as when you create a normal profit center.
    Choose the function Extras -> Set controlling area first to make sure that the correct controlling area is set.
    Notes on transporting
    You can transport the Customizing settings for Profit Center Accounting under Transport Connection.

  • Grey out profit center when line item is entered in VA01

    hi all,
    i have to set profit center in display mode when line item is entered in sales order processing, please tell me the exist where i can put my code.
    please reply
    with regards,
    bala

    hi bala,
    Please check this,
    u can create enhance point in that routine.
    first click on enhancement button (shift+F4) then
    use menu path edit->enhancement operation->show implicit enhancement operation
    after that it start showing line like that in USEREXIT_PRICING_PREPARE_TKOMP
    -> """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    right click on the line and enhancement implimentation and create, it will create enhancement point at that particular place.
    use this coding in ur enhancement spot
    IF  (   SCREEN-GROUP2  = 'LOO'
       AND SCREEN-NAME    = 'VBAP-PRCTR' ).
      SCREEN-INPUT = 0.
    ENDIF.
    it will solve ur problem.
    let me know, if solved
    Yogesh

  • Profit center wise vendor balances

    Hi guys,
    My client want to vendor balances with profit center wise. I know t.code s_ac0_52000888 it displays reconsilation account wise balances I want to  profit center wise balances not reconsilation account wise balances its urgent please help me
    thanks
    syam

    Dear
    Use T.code FBL1N - Display/Change Line Items.
    when you execute the report , select changelayout and select the field profit center, vendor balance and profit center are displayed.
    when the profit center is displayed, select filter and enter the profit centers and profit center wise vendor balances will be displayed.
    Alternately, use dynamic selections in T.code FBL1N selection screen.
    Please let me know if you need more information.
    Assign points if useful.
    Regards
    MSReddy

  • Profit center actual line item report in new GL

    Hi,
    We are using New GL functionality. I have posted one document as follows
    One line item with PC P0101 (Debit side) and second line item without PC (Credit side)
    Second line item also inherited to PC P0101.
    When checking profit line actual item report at KE5Z only one line item profit center displaying (debit side ), inherited line profit center not displaying (Credit side).
    I would like to see the both line items at CO report. Can any one suggest which report I need to refer at CO?
    At FI GL report I can able to see the both line item profit centers report (FAGLL03)
    Thanks
    Govin

    Hi Ajay\
        But FAGLL03 does not let me run the report by profit centers. I mean i dont see profit center as an input field. Are there any other reports in newGL which can be run with profit center as input field (like profict center balances, line items)?
    Thanks
    Vamsi

  • Regarding getting Profit Center

    Hi,
    I have a requirement on Vendor Outstanding and Inventory report,Here i have checked tcode ' S_AC0_52000888 ' with Vendor and Company Code as input and selecting Open Items and Display as Drill Down List.Can anyone tell me from which table Profit Center is displaying in this tcode.I have checked in BSIS table based on Document Number,But it is item table,For one document number it takes more time.Is there any other table?
    Thanks

    Hi Dhirav,
             To get the profit center as a selection criteria, please follow the following steps:
    i) We can take a T_Code as an example say, F-32. In this T_Code enter all the selection criteria and press enter which will lead you to a screen where you will get all the open items listed. In this screen goto <b>Settings --> Change Line Layout</b>
    ii) You will get a screen listing all line layouts. Place the cursor on the one you want to change and press <b>F2.</b>
    iii) Click onto the <b>Insert After</b> Tab. You will get the <b>Field List</b> Displayed. From this list, choose the <b>Profit Center</b> Field. Click Save.
    Now you will get the Profit Centre as one of the selection criteria.
    Kindly do let me know if this useful.

  • Error message for profit center

    Hello,
    The requirement is that the user should not be able to save the sales order without entering the profit center at the item level.
    I have tried to make the profit center mandatory for a particualr company code:-
    1.Sales - Item and double click on Procedures. There select Standard Item and click on Fields. There maintain the following:-
       Table::::Fld name::::::Description::::::::Screen:::Status
        VBAP::::::PRCTR::::::::Profit Center::::::::PKNT:::::00
       But the system allows to save the sales order.
    2.Tried to use transaction varaint, but these changes would be at client level.
    3. Through system enhancement:-
        Program name:- SAPMV45A
        Include:- MV45AFZZ
        Coding done in enhancement:- USEREXIT_MOVE_FIELD_TO_VBAP.
        The system displays an error message but allows to save the document.
    Please suggest .
    Regards
    Aadesh Kamat

    Hi,
    Use the same user exit and try writing the same logic in
    FORM USEREXIT_SAVE_DOCUMENT_PREPARE
    The logic should be somthing like:
    if company code = 'XXXX'
    if vbap-prctr = ''.
    message e000 with 'Profit Center is mandatory'
    endif.
    endif.
    Regards,
    Amit
    Edited by: Amit Iyer on Jun 17, 2011 2:36 PM

Maybe you are looking for

  • How do I save a movie and send it  to Facebook?

    My version of iMovie is 10.0.6 and I have Yosemite 10.10.1.  I saved my Imovie to the Theatre but it seemed that in order to make a DVD of it I had to use Toast Titanium.  Would that be correct?  I tried to use iDVD but it would not let me access the

  • Get iViews from Role

    Hi I want to find out on which page a specific iViews is used, that means, where in the (user specific) navigation the iView will be displayed. When I traverse the navigation nodes, I get with getName() something like "ROLES://portal_content/folder/p

  • MacBook Slo! help!

    my macbook pro is suddenly very slow. I thought it may have abeen a bad p2p file i downlaoded but i did a virus scan and a spyware scan. I do not no mac malwareveyr well but this *****. Maybe its somethign else though i dont know. Icons bounce in the

  • IMPORT into Development server using 10g data dump

    Hello, I need to import(refresh) a number of schemas from Production into Development. Do I have to drop the schemas in Developement frist prior to doing an impdp into Development from Production? What would be the steps to refresh(impdp) from a Prod

  • How to resize a selection of vectors by numerically resizing a segment ?

    I have a problem with illustrator that i've never been able to resolve (in on cs3 by the way - don't tell me it's something that's only on cs5!) goes as follows.... i create accurate forms in a 3d modelling package , i export it in either an ai, eps,