Purchase order ME21N ,ME22N Cost center validation against GL
HI,
I'm validating the purchase order cost center against the G/L , if a particular entry is not found against G/L in a custom table
the BADI -ME_PROCESS_CUST_PO Method -->PROCESS_ACCOUNT should raise error message and append in the collector.
i was able to append the error message in the collector and still PO is able to save , but when re-open the PO the error message is cleared from the message collector.
any idea why the message is disappearing from the PO error message collector?
here is my code:
INCLUDE mm_messages_mac.
DATA: ls_acct TYPE mepoaccounting,
lt_zgl_cc TYPE zgl_cc,
ls_customer TYPE mepo_badi_exampl,
ls_tbsg TYPE tbsg.
ls_acct = im_account->get_data( ).
IF NOT ls_acct-kostl IS INITIAL.
SELECT SINGLE * FROM zgl_cc INTO lt_zgl_cc WHERE
glacc = ls_acct-sakto AND
costcenter = ls_acct-kostl.
IF sy-subrc NE 0 AND ls_acct-sakto GE '0000500000'.
mmpur_message_forced 'E' 'ZM' '048' TEXT-003 ' ' ' ' ' ' .
CALL METHOD im_account->invalidate( ).
ENDIF.
else.
mmpur_remove_messages_by_id ls_acct-id.
ENDIF.
Hi,
have you tried to invalidate item instead of account assignment? You can get a reference to item with method GET_ITEM. I can see only one class which implements interface IF_PURCHASE_ORDER_ACCOUNT_MM. It is CL_PO_ACCOUNTING_HANDLE_MM and this class has no code for this method.
Cheers
Similar Messages
-
Is there a way to limit Purchase Order Display by Cost Center?
We want to limit who can view specific purchases. Has anyone done this before? Thanks!
Chris LintnerOh sorry I completely mistook your question- I dont think we have a auhroization object for Cost center to restrict it in viewing the PO.
But please have it confirmed from some basis people and ofcourse if you have a Plant or purchasing org associated with the cost centers you can restrict then definately you can. Please check with your basis team.
thanks -
Adding Partner into Purchase Order (ME21N, ME22N)
Hi,
I want to add a parnter into purchase order. Logic of determining of partner is very complex and I have to write a program for this purpose.
Are there any user exit where I can include this program and add additional line into EKPA?
Thanks in advise,
Hristo HristovHi Sanjay,
All parameters of method POSTED of this BADI are "importing" - I can't add parntner into IM_EKPA
I need to add partner into PO and then use this partner role into output determination of same purchase order. -
Purchase Order Field and Cost Center Field Non Editable In F-48
Hi Friends,
I have a cretain requirmnet to make the PO and cost centre field non editable.I tried through shd0 bt it says i can only cretae Transcation variats for Dialiog tran.Please help
Regards,Hi,
You can speak to your functional people. I think through SPRO "Maintain Field Status Variant' under Financial Accounting ->........
we can control this. -
Purchase Order - ME21N/ME22N - Defaulting custom field in EKPO table
Hi,
I checked the forum for answers but couldnt find any relevant ones.
We have a custom field in one of the custom screens at Item level. This date field needs to be defaulted with the delivery date during create/change if the value is blank.
Problem occurs when user blanks out the existing value in this field and it is supposed to get defaulted to delivery date again.
I am capturing the PAI value (blank) in method Transport_to_model and exporting it to the customer exit EXIT_SAPMM06E_018 which sets the user entered value in structure E_CI_EKPO.
Then, i try to default the value of this field back to delivery date in method PROCESS_ITEM by using set_data.
Whenever the user blanks out the value in the screen, it goes for an infinite loop and finally times out.
I see that the method PROCESS_ITEM is getting called afresh infinitely. The set values is gone, ie, the default value set in set_data is also blanked out when it arrives in PROCESS_ITEM again.
Before debugging further, i thought i will post this in case anyone has faced the same issue.
Appreciate your time.
Regards,
BikashHi Savitha,
Not sure if this is going to help much..but heres wat i put in PROCESS_ITEM
wl_mepoitem-yyreqdate = wl_mepoitem-eindt.
CALL METHOD im_item->set_data
EXPORTING
im_data = wl_mepoitem.
wl_mepoitem contains the po data fetched using get_data in the initial part of the code.
I have also done a workaround such that now, in method Transport_to_model, i dont pass the blank value to the user exit when a user blanks out the value, instead i default it in this method itself to the delivery date and the user exit sets the value for me. Now, PROCESS_ITEM doesnt go into the infinite loop. This surely hints towards something to do with me setting the value blank in the user exit and then trying to default it in the BADI.. somewhere the system is getting confused here..
Regards,
Bikash -
What is the BADI while SAVING purchase order using me22n?
what is the BADI while SAVING purchase order using me22n?
while i will save purchase order through me22n, badi should be fire what is badi for that?
regards,
dushyant.Dushyant,
Hopefully you know how to implement the BADI ME_PROCESS_PO_CUST now.
The following are the codes that you can put in the method "Post".
DATA: LW_HEADER TYPE MEPOHEADER,
LW_POSTED_HEADER TYPE MEPOHEADER,
LW_VALID TYPE MMPUR_BOOL,
ITAB_ITEM TYPE PURCHASE_ORDER_ITEMS,
LW_ITEM TYPE MEPOITEM,
ITEM_INTERFACE TYPE PURCHASE_ORDER_ITEM,
ITAB_ACCT TYPE PURCHASE_ORDER_ACCOUNTINGS,
ACCT_INTERFACE TYPE PURCHASE_ORDER_ACCOUNTING,
LW_ACCT TYPE MEPOACCOUNTING,
LW_POSTED_ACCT TYPE MEPOACCOUNTING,
W_ACCT_CHANGED TYPE C,
W_GRANT_AMT TYPE EKPO-NETWR,
W_FINANCE_AMT TYPE EKPO-NETWR,
W_FLAG TYPE C.
Check if PO header data is valid
CLEAR LW_VALID.
CALL METHOD IM_HEADER->IS_VALID
RECEIVING
RE_VALID = LW_VALID.
CHECK LW_VALID = 'X'.
PO header data is valid
Get the newly updated PO header data
CLEAR LW_HEADER.
CALL METHOD IM_HEADER->GET_DATA
RECEIVING
RE_DATA = LW_HEADER.
Get the posted PO header data
CLEAR LW_POSTED_HEADER.
CALL METHOD IM_HEADER->GET_PERSISTENT_DATA
IMPORTING
EX_DATA = LW_POSTED_HEADER
EXCEPTIONS
NO_DATA = 1.
IF SY-SUBRC <> 0.
CLEAR LW_POSTED_HEADER.
ENDIF.
Get PO line items
REFRESH ITAB_ITEM.
CALL METHOD IM_HEADER->GET_ITEMS
RECEIVING
RE_ITEMS = ITAB_ITEM.
LOOP AT ITAB_ITEM INTO ITEM_INTERFACE.
Check if PO line item is valid
CLEAR LW_VALID.
CALL METHOD ITEM_INTERFACE-ITEM->IS_VALID
RECEIVING
RE_VALID = LW_VALID.
IF LW_VALID <> 'X'.
This PO line item is not valid
CLEAR W_ACCT_CHANGED.
EXIT.
ENDIF.
CLEAR LW_ITEM.
CALL METHOD ITEM_INTERFACE-ITEM->GET_DATA
RECEIVING
RE_DATA = LW_ITEM.
Get the account interface
REFRESH ITAB_ACCT.
CALL METHOD ITEM_INTERFACE-ITEM->GET_ACCOUNTINGS
RECEIVING
RE_ACCOUNTINGS = ITAB_ACCT.
LOOP AT ITAB_ACCT INTO ACCT_INTERFACE.
CLEAR LW_ACCT.
Get the newly updated PO item data
CALL METHOD ACCT_INTERFACE-ACCOUNTING->GET_DATA
RECEIVING
RE_DATA = LW_ACCT.
CLEAR LW_POSTED_ACCT.
Get the posted PO item data
CALL METHOD ACCT_INTERFACE-ACCOUNTING->GET_PERSISTENT_DATA
IMPORTING
EX_DATA = LW_POSTED_ACCT
EXCEPTIONS
NO_DATA = 1.
IF SY-SUBRC > 0.
CLEAR LW_POSTED_ACCT.
ENDIF.
IF LW_ACCT-LOEKZ <> LW_POSTED_ACCT-LOEKZ OR
LW_ACCT-KOSTL <> LW_POSTED_ACCT-KOSTL OR
LW_ACCT-PRCTR <> LW_POSTED_ACCT-PRCTR OR
LW_ACCT-PS_PSP_PNR <> LW_POSTED_ACCT-PS_PSP_PNR.
Account assignment was changed
We will force this PO to go through workflow
W_ACCT_CHANGED = 'Y'.
ENDIF.
ENDLOOP.
ENDLOOP. -
Cost center validation while creating PO
Hi,
How can we put a cost center validation in PO.
we are experiencing issues with PO's created for a different company code at the time of posting invoices.
how can we put a check while creating a PO to validate the cost center.
Can we put a check on User authorization to input only come cost centers at the time of PO creation?
Highly appreciate your thoughts as it is very important.
Thanks
MadhuHey Madhu,
I believe certain error messages have been deactivated in you system, as the cost center master data wouldd have a company code in it and it is supposed to validate it.
go to OBA5 and enter application are KI and activate message 113 to an error
KI113 would not allow you to purchase across company codes -
Hi, In purhcase order(me21n) ,Me22n,Me23n
Hi,
In Purchase order(me21n), payment terms(Invoice tab) should be filled on 'Z511'. pls can u sent me right exit.
Regards
senthilHi Senthil,
As the payment terms are derived from the vendor master you can enter the payment term Z511 vendor master, it will automatically filled in Invoice tab of Purchase order.
Regards,
Manish -
Internal order posting vs cost center
HI,
I have a requirement like this; in our company we have allowed the posting to be made only through internal orders no
direct cost center postings are allowed. Is there any report to carry out a comparison between internal order posting and cost center postings? I just want to check the transaction which directly posted to cost center instead of internal order.
please help.
thanks
best regards
gayaniHi,
Do you want to trace postings which were done only on cost centres without I/O? You can go to KSB1 and select the line where Auxiliary account assignment is blank - this will mean that these lines were posted only to cost centre.
Also, if your I/O are real one, you can select in KSB1 postigns with '4' value type, which will mean that the posting on cost centre is real and not statistical; therefore, no postings on I/O happened.
Regards,
Eli -
How implement Auto Purchase Order in Transportation Cost Settlement
Hi,Experts,
When Settling the Transportation Cost,I must create PO manually.Can anybody tell me How implement Auto Purchase Order in Transportation Cost Settlement?
Thanks for a lot.
Donald LoDear Donald,
Please go through this SAP link it will help you about Shipment cost settlement process in the transportation.
http://help.sap.com/saphelp_47x200/helpdata/en/93/74413b546011d1a7020000e829fd11/frameset.htm
I hope it will help you,
Regards,
Murali. -
Costs to be recorded to Internal Order instead of Cost Center
Hi,
My client has created a new Personnel Area and has started hiring people for it. They did not create a cost center for this. Meanwhile, if any costs are to be recorded for the employees in this Personnel Area, the client wants them record to an Internal Order (instead of Cost Center). Later, when they create a cost center, they may transfer the costs from Internal Order to the Cost Center.
What needs to be done to satisfy this scenario.
Best Regards,
Veerahi
create internal order through kO01, which is of type real order, and post all the expenses by keeping this internal order as cost object. later as you want to settle this internal order to cost centre, you should have settlement profile attached to the internal order to settle that. please update settlement profile while creating the internal order
krishna -
How to see Planned Purchase Order in Buyer Work Center
Hello,
I need to see Planned Purchase Order
(created in Purchasing Super User(responsibility) => Purchase Order -> Purchase Order , Type (Planned Purchase Order))
in Buyer Work Centre.
I can see Standard Purchase Order in Buyer Work Center (under Orders Tab).
I can see Contract Purchase Agreement in Buyer Work Center (under Agreement Tab).
I can see Blanket Purchase Agreement in Buyer Work Center (under Agreement Tab).
But can not see Planned purchase Order in "Buyer Work Center".
Is this intentional ? If yes, then why.
if no, then where we can see Planned Purchase Order in HTML pages.
Thanks,
Vishal Garg
Mb: 9985803224
Email: [email protected]hi
there is no standard report which shows the expenditure/conditional value in po. you have to develop your customs report./ -
Integrate Employe with internal order other than cost center
Dear Experts,
Integrate Employe with internal order other than cost center
Thanks & Regards,
Mythili
Edited by: Mythili.R on Jan 10, 2012 1:45 PM
Edited by: Sikindar on Jan 10, 2012 6:23 PMCan use IT0027 at employee level or IT1018 at OM level
-
Internal orders/networks and Cost center
is it correct to say, all internal orders and process orders will roll into a cost center at the end.
SriHello Ganga,
You can settle the costs collected on an internal order to one cost center, one G/L account, or one business process using one settlement cost element.
Hene, it is not necessary that all internal orders will roll in to a cost centre at the end.
Rgds
manish -
Cost center validity change and assign it to new company code
Hello
We are having 10 Cost centers in 1000 Company code, And validity of these cost centers is .01.01.2001 to 31.12.9999.
Now business want to create one more company code 2000. and wants to extend these same cost centers to 2000 company code also. But as per SAP std Cost center extention is not possible , bcz cost center can use by only one company code.
Now Company is saying that..they wants the same number for new company code from 23.09.2010 to 31.12.9999..
system is not allow me to change validity period of these cost centers, bcz these saying that the cost center is already defined for given period.
Beacuse new company code will start working from 24.09.2010. so i,e the reason , we want to make example "2561 cost center validity 01.01.2001 to 22.09.2010 for company code 1000. then after words 23.09.2010 to 31.12.9999 the same cost center 2561 will for 2000 company code.
but system is not allowing me to change the validity
Regards
MaheshHi Mangesh
What you wish is not possible.. You will have to create new cost center and assign to the new company code...
may be for simplicity sake, you can add a prefix or suffix to the existing cost center no i.e Cost Ctr 2356 can become N2356 in new comp code
Regards
Ajay M
Maybe you are looking for
-
Error while importing a table with BLOB column
Hi, I am having a table with BLOB column. When I export such a table it gets exported correctly, but when I import the same in different schema having different tablespace it throws error IMP-00017: following statement failed with ORACLE error 959: "
-
ITunes music library will not update on iPod after syncing
I did a computer swipe a number of months ago and was only just recently able to recover my iTunes account. So fortunately I have all my music still (well most of it. Some of my file locations are missing but that is user error). Now, yesterday I s
-
Hello friends, The Report with tcode S_ahr_61016359 was persent in sap 4.6 c but now this tcode gives the message that this report was deleted use adhoc query instead in version ECC 6.0. can you tell what does this means. Regards, Vidya.
-
How do you unfreeze a frozen top and left command in the printing position command?
The top and left option of the printing position command is frozen at 0. The error message states that a value between 0.000 and 0.000 is required. How do I change this? This happens will unedited and edited pictures. I have just installed a xero
-
I have two "after insert ...for each row" triggers on the same table. Can I ensure that one will always run before the other? I have put DBMS_OUTPUT.PUT_LINE statements in the triggers to see which one runs first. But when the table and triggers are