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 Hristov
Hi 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.
Similar Messages
-
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 -
How can i copy and paste 100 item lines into Purchase order (ME21N) ?
hi,
Can anyone help me to use the copy and paste from Microsoft excel ?
1. i have 100 line items in excel for material item.
2. I copied the 100 lines in excel and paste into PO creation transaction code ME21n line items.
3. In one shot, i only successful copied 35 lines.
How can i manage to copied all line items into PO items in one shot ?
Is it possible to copied the excel line items into PO screen line item more than what we can see in the screen ?
thanksHi,
No, it can't! So far in the current version of mySAP Business Suite you can not do it when you create any document, you only can copy the line items as mush as the screen can display! you said you can copy 35 items, I thought your screen resolution must be bigger than 1024X768 (it's my screen resolution)!
So I hope maybe SAP AG can solve the problem in the future, then we can copy the items as mush as we want!
Good luck!
Z.T -
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. -
Get Linked Document info into Purchase Order
Hi,
There is a popup which comes up upon pressing the attachment key in ME21N. This is currently blank.
My requirement is to fill this popup with Linked Document Info from Material master into Purchase order at PO creation (ME21N).
The fields that I want are
DRAW-DOKVR (Document Version) or DRAD-DOKVR
DRAW-DOKNR (Document Number)
I found a BADI Document_main01 but how do I pass material number (EKPO-MATNR) to it as the OBJKEY in DRAD table.
Is there any other way to populate the document number and version which is stored in the material master.
Appecriate your help !Hi Shyam,
Thanks for your reply.
Could you please briefly explain your point.
I am stuck up at some point and unable to find exactly the place to insert the specified data in the BAPI.
Also note that I need to update data which I will take from Sales order in header text of PO. This data should automatically be picked up while Saving the PO.
Useful replies will be definitely rewarded.
Regards,
Daya. -
When added a single purchase order the order being duplicated..
In 2007A SP01 PL10
When added a single purchase order, the order being duplicated into two different orders numbers in the system..
the problem is Inconsistent and occurs several times a day.
Does anyone know \ heard about the problem??
Thank You!
MeitalAre the duplicated PO's created by the add on, or through the application?
We do have a customer who is getting duplicated SO / PO/ Cash sale invoices at the rate of a few per month. They have an add on running as well and we have been unable to solve the issue for them.
The rate did improve after upgrading to SP01, but the issue has not disappeared.
There was another thread a while ago about someone getting duplicated credit notes, they also had an add on running but the add on was unrelated to credit notes. -
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 -
Purchase Requisition conversion into Purchase Order
Hi,
We are developing an intercompany process and we have a problem with the purchase requisition conversion.
When we convert the PURCHASE REQUISITION into PURCHASE ORDER we need to mantain purchase requisition ITEM number/s.
For example:
PURCHASE REQUISITION: 10015720 / 50 / 60 ---> PURCHASE ORDER: 210515 / 50 / 60
We are trying to do it with some enhancements but we have not found any solution. Is posible to customize this requirement ?
Thanks in advance.
Regards,Hi Orion
I suggest you to translate it to english before somebody feels awful. Orion's customer wants mantain a kind of register to trace or manage the traceability for this flow from SO to PO in a cross company scenario.
If a understand you, you do this flow:
SO from a customer not cross company-> request from this SO to other company cross company -> PO with ME59 (is the third part customer if I'm right)
Do you check all flow in VBFA table? I suggest to see the SAP Note 627846 - AFS: Purchase order document flow for
sales order incorrect, although it's so older, it gave me ideas in the past. I suggest you to avoid 'handle' the fields related with key fields (number of documents, number of items, and so on). Create reports or create customer tables and populate records for this trace. After, you can create lists for your customer to know about this traceability.
If you are agree other possibilty is enhance SAP tables with customer fields and see them in the documents. There a lot of tools to do it (VOFM subroutines in the copy rules, BADI's and enhancemetns to see customer fields in new tabs in SO, PO and so on).
I hope this helps you
Regards
Eduardo
Edited by: E_Hinojosa on Sep 26, 2011 6:42 PM
Edited by: E_Hinojosa on Sep 26, 2011 6:42 PM
Edited by: E_Hinojosa on Sep 26, 2011 6:43 PM -
Adding prepack to purchase order causes DCI flag to be set on components
When a prepack is added to a purchase order, the prepack does not have the DCI flag set but the components have the DCI flag ticked. Is this normal functionality? Or is there an error with our configuration of prepacks?
I should think that the DCI flag should be unticked for not only the prepack but its components as well.Hi,
When you add the prepack to PO by default SAP puts the delivery completed indicator against the components, that's the stadard SAP behavior. However Prepack header should have delivery completed untick until you post the goods receipt. After the GR system puts tick mark against the prepack header as well.
hope this info will solve your query. -
INFO UPDATE in the purchase order ( ME21N)
Why the field INFO UPDATE in the purchase order ( ME21N) is not flaged when I create a purchase order?
I create a PO, and I flag it in ME21N, but it cancel it? WHY
I have already tried it in spro Default values for purchasing, and all seem good!!
Anybody could tell how can I tick this field?
Thanks a lot
KariHi
Info update indictor can be set by defualt if you maintain the same in the Purchase inforecord,
If no inforecord exists then this would not be flagged and if you flag it then the Purchase inforecord gets created with the update of with or wothout plant based on the default value assigned to the buyers.
Thanks & Regards
Kishore -
Copy Order Price into Purchase Order Price
Dear SAP Experts,
My client looking for third party ordering scenario where sales order pricing must forwarded to PO pricing condition value.
Sales order has price components like gross price, freight, tax, commission. Most of SO price components value must copied into PO pricing conditions created as third party sales. Do we have any standard configuration for this ? How can we copy order price into PO pricing condition?
Thks,Hi Diwakar,
Noted that no standard configuration available, how do we copy price sales pricing components into purchase order pricing components ? What would be other way to achieve this process ?
Thks, -
How to get Material Master Moving average price into Purchase Order
Hi,
How to get Material master moving average price into purchase order instead of Purchase Info record.
Thanks,
SridharHi,
I cannot understand whether it is necessary .
How about as following step?
1. create Purcahse requisition
Price come form moving average price in material master.
2. Create Purchase order reference Purchase requisition
There is a setting from the unit price of P/R onto the unit price of P/O.
Regards,
Gaito -
Does Anyone know how to add a new partner to purchase order created on VI01/VI02?
Does Anyone know how to add a new partner to purchase order created on VI01/VI02?
Please, anyone knows that?
Regards.
Rafael.Anyone?
-
BADI / User exit for Purchase order(ME21N) after saving the document
Hi expert,
I need the BADI / User exit for Purchase order(ME21N) after saving the document
This is for email sending after create the purchase order so PO document number will be the import parameter
pls help me
point will be reward
Regards,
GaneshHi Ganesh,
Could you please share your solution?
Thanks.
Hoops
Edited by: Hoops on Jun 13, 2011 10:51 PM
Maybe you are looking for
-
I just purchased ADOBE PHOTOSHOP CS2 'Classroom in a Book'
When I received the 'used' book yesterday in the mail, I was dismayed to discover that the lesson CD was missing. Anybody have any thoughts on how I can get a copy of the CD or download the lessons from someplace. Thus far I haven't heard back from t
-
Hi Everyone, I just finished rolling out Jabber to over 150 users for a Cisco Gold Partner ( internally we wanted to deploy and have "lessons learned" before rolling to customers ). We are all pretty much "power users" and we rolled it out to users
-
Open document in BO R 3.1 Issues
Hi Experts I have a issue that is: I can open child report via a hyperlink in BO 3.1 From parent report but problem is: If i use "sWindow=New" then the report is opened to another window not another tab.... In BO R 2.0 report opened in a new
-
when i press the start button on my laptop it went straight to a blue screen it didn't allow me to log in. I have tried to reinstall the mac os 10.4.5 and the start up bar was showing and when the clock finishes it brings me back to the blue scree an
-
On a Win7/64 with an Hp Laserjet P2055DN network printer, I get event 315 error 2114 (The print spooler failed to share printer Printername with shared resource name Printername . Error 2114. The printer cannot be used by others on the network) on al