Автор | Сообщение | ||
---|---|---|---|
Заголовок сообщения: Изменение заказа на поставку после деблокирования
|
|||
|
Добрый день! Подскажите, пожалуйста. У одного вида заказа настроена стратегия деблокирования, индикатор деблокирования = 1 (неизменяем). После проведения ПМ и СчФ отмену деблокирования выполнить нельзя — и это правильно. При попытке отмены деблокирования в транзакции ME29N выводится сообщение «Деблокировать документ закупки невозможно. Номер сообщения MEPO823). Для другого вида заказа настроили аналогичную стратегию деблокирования, индикатор 1 (неизменяем), но после проводки акта выполненных работ и СчФ система разрешает снять деблокирование (в транзакции ME29N). В чем дело? Как запретить это снятие деблокирования?
|
||
Вернуться к началу |
|
||
Hierarchy
☛
BBPCRM (Software Component) BBPCRM
⤷
SRM-EBP (Application Component) Enterprise Buyer
⤷
BBP_APPLICATION (Package) Structure Package EBP
⤷
ME (Package) Application development R/3 Purchasing
Attribute
Message class | MEPO | ||
Short Description | New Purchase Order Dialog | ||
Message Number | |
823 | |
Documentation status | |||
Authorization check Error Message | |||
Changed On | 20130531 |
Message Text
Purchasing document & cannot be released
History
Last changed on/by | 20131127 | SAP | |
SAP Release Created in |
Symptom
Purchase Requisition has been created with release strategy, when you open this PR in ME54N, error MEPO822 ‘Purchase requisition XXX cannot be released’ is issued.
Read more…
Environment
- Materials Management (MM)
- SAP ERP Central Component
- SAP ERP
- SAP enhancement package for SAP ERP
- SAP enhancement package for SAP ERP, version for SAP HANA
- SAP S/4HANA
Product
SAP ERP Central Component all versions ; SAP ERP all versions ; SAP S/4HANA all versions ; SAP enhancement package for SAP ERP all versions ; SAP enhancement package for SAP ERP, version for SAP HANA all versions
Keywords
ECC, ME54N, Purchase requisition cannot be released, blocked, status, modify, change
, KBA , MM-PUR-GF-REL , Release (Approval) , How To
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login
required).
Search for additional results
Visit SAP Support Portal’s SAP Notes and KBA Search.
Hi All,
When i try to release a req (e.g. 1002001) by choosing ME54n screen, the ME54 screen is not opening. Instead it gives an error message «»purchase requistion 1003560 cannot be released»» and if i
click enter it takes me to the display req of 1003560.
1) I am trying to release 1002001, why is it taking me to 1003560.
Any solutions………
Thanks,
Nureya
Read these next…
Where are they in Windows 11?
Windows
Quick and I hope easy question, I have figured out ways to do this in W11 but just wondering if there is an easier way.Where are the following in «Windows 11″1. Map Network Drive2. Add PC to a Domain3. This PC (Option)Thank you.
Tape library
Data Storage, Backup & Recovery
HI I am trying to learn my self how to connect a Dell R720 server with a LTO 7 tape library. Can someone advise and guide me with the best practice? because to begin with I have these questions.1. Can I connect the tape Libary directly to the server? if …
Raspberry Pi uses? As a desktop?
Hardware
I saw this post:https://twitter.com/mysterybiscuit5/status/1663271923063685121I like the form factor. Got me thinking — are any of the Raspberry Pi offerings a viable replacement for a windows 10 PC? For general work — surfing, document writing? spreadsh…
Spark! Pro series – 2nd June 2023
Spiceworks Originals
Today in History marks the Passing of Lou Gehrig who died of
ALS or Lou Gehrig’s Disease. I have a
friend suffering from this affliction, so this hits close to home. If you get the opportunity, or are feeling
g…
Snap! — AI Camera, Android Malware, Space, and more Space
Spiceworks Originals
Your daily dose of tech news, in brief.
Welcome to the Snap!
Flashback: June 2, 1966: The US «Soft Lands» on Moon (Read more HERE.)
Bonus Flashback: June 2, 1961: IBM Releases 1301 Disk Storage System (Read more HERE.)
You need to hear…
Автор | Сообщение | ||
---|---|---|---|
Заголовок сообщения: Изменение заказа на поставку после деблокирования
|
|||
Зарегистрирован: |
Добрый день! Подскажите, пожалуйста. У одного вида заказа настроена стратегия деблокирования, индикатор деблокирования = 1 (неизменяем). После проведения ПМ и СчФ отмену деблокирования выполнить нельзя — и это правильно. При попытке отмены деблокирования в транзакции ME29N выводится сообщение «Деблокировать документ закупки невозможно. Номер сообщения MEPO823). Для другого вида заказа настроили аналогичную стратегию деблокирования, индикатор 1 (неизменяем), но после проводки акта выполненных работ и СчФ система разрешает снять деблокирование (в транзакции ME29N). В чем дело? Как запретить это снятие деблокирования?
|
||
Вернуться к началу |
|
||
Hierarchy
☛
BBPCRM (Software Component) BBPCRM
⤷
SRM-EBP (Application Component) Enterprise Buyer
⤷
BBP_APPLICATION (Package) Structure Package EBP
⤷
ME (Package) Application development R/3 Purchasing
Attribute
Message class | MEPO | ||
Short Description | New Purchase Order Dialog | ||
Message Number | |
822 | |
Documentation status | |||
Authorization check Error Message | |||
Changed On | 20130531 |
Message Text
Purchase requisition & cannot be released
History
Last changed on/by | 20131127 | SAP | |
SAP Release Created in |
SAP ME55 не может одобрить документ приложения покупки, содержащий элемент удаления
D Проекты, одобрение заявки на покупку осуществляется на весь единый уровень.
После того, как проект D находится в сети, он сообщил о проблеме в генеральном директоре клиента, заявив, что, когда он использует ME55, чтобы подать заявку на покупку документов приложений, существует несколько приложений закупок, которые не могут быть одобрены, и другие документы могут быть одобрены.
Как показано ниже:
выполненный,
PR Document 1000914, 3000000001 и 3000000070 не могут быть утверждены, в отличие от других приложений о покупкеИконка может нажать. На самом деле, текущее состояние одобрения этих PRS является одобрение, такое как PR 1000914,
В чем проблема?
Проблема SAP сообщила о высшем управлении клиента, автор, естественно, осмеливается пренебрегать! Как проблема, которая должна быть решена первым приоритетом.
Это проблема правой настройки? Это ничего плохого в сам документе? Автор провел много времени, не было результатов. Дрейк несколько дней, запросил руководитель клиента проекта, требующий причин и программ как можно скорее. Топ, сегодня я повторно изучаю эту проблему, пытаясь указать причины и программы. Автор сравнил ME55 для утверждения и не может быть утвержден и не может быть утвержден, и, наконец, обнаруживает, что они не могут быть удалены элементы в PRS в ME55.
Он включает в себя приложение для покупки, которое удаляет элементы, нельзя одобрить в ME55?
С помощью этого вопроса автор онлайн, чтобы проверить информацию, и это так. SAP Стандартная логика заключается в том, что PR, содержащий удаленный элемент, не распространяется на ME54N, чтобы одобрить в ME54N в ME55. Поскольку ME55 является коллективным выпуском, это означает централизованное одобрение. Для всех предметов в PR одобрено. Удаленный элемент нарушил всю целостность документов.
2018-05-14, написанные в районе Синьу, город Уси
MEPO is a standard message class available within your SAP system (depending on your versionand release level). Below is a list of all the messages available for within this class and a link to any long text associated with each message. These messages are very simple to use and can be implemented into your ABAP code using the MESSAGE statement and the following syntax.
MESSAGE I000(MEPO).
Note the value «I» represents an information messsage but can be replaced with E for error, W for warning, S for Status/Success, A for Abend/Termination and X for exit which does not display a message and causes a runtime error. Click here for more information about SAP Messages
Message class details can be viewed directly within your SAP system by entering the object name MEPO into the relevant SAP transaction such as SE91 or SE80.
000 Purchase order still contains faulty items
001 Purchase order item & still contains faulty schedule lines
002 PO header data still faulty
003 Pricing date category only allowed for items with invoice receipts
004 Subsequent settlement only allowed for items with invoice receipts
005 Incomplete purchase order only processable using new ordering transaction
006 Release order only possible against existing contract
007 Contract item & & does not exist
008 RFQ item & & does not exist
009 Purchase order item & & does not exist
010 RFQ item & & already deleted
011 RFQ item & & blocked
012 & & put on hold
013 &1 held under the number &2
014 Function will be started in new session
015 Please specify PO number
016 No quotation yet exists for RFQ item &1 &2
017 When referencing an RFQ, please also enter an RFQ item number
018 When referencing a contract, please also enter a contract item number
019 When referencing a requisition, please also enter a requisition item no.
020 Please also enter an item no. when adopting data from reference document
021 Item number cannot now be changed
022 Revision level only allowed in conjunction with material number
023 Indicator for GR used not allowed
024 Indicator for non-valuated GR used not allowed
025 Indicator for GR-based invoice verification used not allowed
026 Indicator for invoice receipt used not allowed
027 Enter a valuation type
028 No valuation type can be usd for this item
029 Valuation type entered (&) not allowed
030 Order price unit cannot now be changed
031 Confirmation control key cannot now be changed
032 Evaluated receipt settlement not defined for vendor &
033 Subsequent settlement (end-of-period rebates) not defined for vendor &
034 «Delivery completed» indicator can only be set for stock transfers
035 Use of points not allowed here
036 The PO cannot be put on hold
037 Purchase order & read from archive
038 Company code &1 not defined for purchasing organization &2
039 Goods receipt posted unvaluated due to multiple account assignment
040 Order unit &1 cannot be converted into base unit &2
041 Order unit & could not be used
042 Please enter a delivery date
043 Please enter an order quantity
044 No messages issued during check
045 Purchase order & still incomplete
046 Purchase order item & still contains faulty account assignments
047 Enter quantity, percentage, or value for account assignment
048 Not currently possible to release against contract & (being processed)
049 If only one account assignment item, choose «Single Account Assignment»
050 No home page defined
051 Max. 99 account assignment lines possible per item
052 Please enter either material or short text
053 Maximum LVA amount exceeded in the case of at least one asset
054 Enter a document type
055 Schedule line cannot be deleted
056 You cannot change main and sub-items &1 simultaneously
057 Enter a permitted rejection reason
058 Use a permissible value (field &)
059 Plant &2 closed on delivery date
060 You have no authorization to create with reference to a purchase order
061 You have no authorization to create with reference to an RFQ
062 You have no authorization to create with reference to a quotation
063 You have no authorization to create without reference to another document
064 Please maintain variant quantities
065 Sub-item category not allowed for main item
066 Generic material &1 has no variant &2 (Please check your input)
067 Sub-items of this category cannot be created manually
068 Higher-level (main) item number or sub-item category missing
069 Sub-item category and higher-level (main) item cannot be changed
070 Item &2 already includes a sub-item for material &1
071 Item & does not exist
072 Purchase requisition &1, item &2, has a different material group
073 Purchase requisition &1 &2 cannot be updated
074 Contract &1 item &2 has different material group
075 RFQ &1 item &2 has different material group
076 Purchase order &1, item, &2 has a different material group
077 Outline agreement still contains faulty items
078 Before processing components, please enter quantity for item &1
079 Object serialization (Technical)
080 Processing status & invalid
081 Creation indicator & invalid
082 Purchase requisition still contains items with errors
083 Choose a source of supply
084 Configuration blocked
085 Check item number &1 in table &2
086 Material can no longer be changed
087 Plant can no longer be changed
088 Indicator for returns item can no longer be changed
089 Text contains formatting -> SAPscript editor
090 Check the header texts (texts were redetermined by system)
091 Check the texts for item &1 (texts were redetermined by the system)
092 Assets cannot be created for this item
093 To be able to create assets, first complete the item data
094 To be able to create assets, first correct the item data
095 To be able to create assets, first select account assignment lines
096 Select max. 99 account assignment lines
097 No assets created
098 Ship. point &1 not allowed for ship. cond. &2, loading group &3, plant &4
099 Also specify a delivery type in case of shipping data relevance
100 Delivery type &1 not allowed in purchase orders
101 Contract rel. order not allowed in case of intra-co.-code stock transfer
102 Route &1 does not exist
103 Delivery priority &1 does not exist
104 Tax jurisdiction code could not be determined from delivery address
105 An error occured when numbering the items
106 Cross-company code stock transfer: Check the IR indicator
107 You cannot change the document type, because a PO history exists
108 Taxes on services and limits will be recalculated
109 No subitems are copied when you copy a purchase order
110 Scheduling agreement item & still contains faulty delivery schedule lines
111 No unique production version could be determined
112 Rule availability check &1 usable in Enjoy transactions only
113 Purchase requisition &1 read from archive
114 &1 &2 parked
115 &1 parked under the number &2
116 Purchase requisition &1 is on hold
117 Purchase requisition &1 is parked
118 No entries in table &1 needing to be adjusted
119 Test run: &1 entry/entries must be adjusted
120 General lock on table &1 not possible (No adjustment of table)
121 Lock could not be set for document &1
122 &1 entry/entries in table &2 changed
123 *** &1 ***
124 Not possible to lock table &1 (No adjustment of table)
125 Business function &1 is not active — report cannot be executed
126 Retention must be at least 0 and must not exceed 100%
127 Purchase requisition &1 &2 is incomplete (parked/on hold)
128 Indicator for GI-related goods receipt not allowed
129 User data is incomplete
130 Serialized purchase orders processable in new transaction only
131 Material ledger and retention cannot be used together
132 Serial number &1 could not be deleted for item &2
133 Faulty subcontracting in BAPI for item &1
134 Down payment category &1 does not exist
135 Down payment must be at least 0 and no more than 100%
136 Due date of down payment cannot be before the document date
137 Security retention must be at least 0 and no more than 100%
138 For stock transfer, do not set SC vendor indicator with storage location
139 For stock transfer subcontracting vendor ind. not tog. with returns item
140 T161W: Vendor+subcontracting vendor not allowed for 2-step stock transfer
141 One-step stock transfer with serial numbers is not supported
142 Delivery type &1 not allowed with sales doc. cat. &2 and predecessor &3
143 Valuated sales order stock is only allowed for single account assignment
144 Ship. pt &1 for ship. cond. &2, loading grp &3, plant/SL &4 not allowed
145 Not possible to determine shipping point for item &1
146 Consumption postings for item &1 not allowed
147 The proportion/product UoM & is not permitted, check price determination
148 &1 is a consumable material and is not allowed with SIT processes
149 Handover location &1 does not exist
150 PO deleted at header level. Add is not possible
151 Data from Business Add-In ME_PROCESS_PO_CUST not adopted
152 Configuration invalid
153 Vendor address could not be copied from reference document
155 Purchase order item was not confirmed or was only partially confirmed
156 Date/quantity fix set, although no confirmation found
157 Handover date is later than the delivery date
158 Handover date is earlier than or the same as the goods issue date
159 Handover time is later than the time of delivery
160 Handover time is earlier than the time of the goods issue
161 No handover location exists for the handover date
162 No handover location exists for the handover time
170 In parameter &1 the change indicator for &2 &3 is missing
189 Period-end data exists (valuation result / accrual document)
200 Error in document number assignment (Customer enhancement MM06E003)
206 Procuring plant &2 not allowed
207 You have no authorization for assignment of sources of plant &1
208 Missing authorization for procuring plant &1 : &2
300 Application cFolders not active
301 Purchase requisition &1 &2 is in external sourcing
302 Purchase requisition &1 &2: transfer to external sourcing not possible
303 Purchase req. &1 &2: follow-on document from external system not allowed
310 No time window assigned for plant &1 and storage location &2
311 Assignment of door/area data does not correspond to settings
312 Receiving point &1 and warehouse &2 blocked by user &3
400 Unit test: No data exists for test method &1 &2
401 Unit test: Error in &1 &2, case &3, purchase requisition no. &4
402 HOLDCOMPLETE &1 HOLDINCOMPLETE &2 PARKCOMPLETE &3 PARKINCOMPLETE &4
403 Unit test: Error in &1 &2, case &3
501 Import parameter(s) missing
502 Chargeable processing inactive
503 No purchasing organization found for &
504 No sales price found for &1 &2
600 SRM CCM: &1 &2 &3 &4
601 &1 &2 &3 &4
800 Processing state & does not allow release
801 Processing state & does not allow cancellation of release
802 Changes rejected
803 Rejection of changes cancelled
804 Release executed
805 Processing state & does not allow rejection
806 Processing status & does not allow cancellation of rejection
807 Processing state & does not allow buyer approval
808 Processing state & does not allow cancellation of buyer approval
809 Changes approved
810 Approval of changes revoked
811 Release will be cancelled despite processing status &
812 Release strategy will be changed despite processing status &
813 Version management of purchase order still faulty
814 Processing state & does not allow processing of this follow-on document
815 No suitable items selected
816 Not possible to select all items
817 Release refused
818 Refusal to release cancelled
819 This requisition can only be processed w. Enjoy requisition transactions
820 Purchase requisition &, item, & is blocked by requisitioner
821 Purchase requisition &, item &, is blocked by buyer
822 Purchase requisition & cannot be released
823 Purchasing document & cannot be released
824 Max. & requisitions can be processed simultaneously
825 Select just one line
826 Requisition &1/&2 not convertible due to status (&3)
827 Purchase requisition &1 cannot be converted because document incomplete
828 Selected items cannot be converted together
829 Purchase requisition put on hold under the number &
830 Stock transport order &1 cannot be used with transaction &2
831 Copying of ATP confirmation lines not allowed
832 ATP check not possible for item &
833 You cannot create a stock transport order with transaction &
834 Purchase requisition parked under the number &
835 Sum of amounts &1 less than total amount &2
836 Sum of amounts &1 exceeds total amount &2
837 Distribution by amount not allowed
838 Purch. requisition &1, item &2, has different remaining shelf life &3 &4
839 Maintain either value or percentage
840 Maintain down-payment amount for item &
841 PO history already exists (Multiple account assignment not possible)
842 Date of availability &1 later than best-before/shelf life expir. date &2
843 When referencing external document, enter document number and item number
844 Down payment percentage &3% does not match down payment amount &1
845 Down payment amount &1 does not match down payment percentage &3%
851 You cannot put purchase order for services on hold
852 You cannot put purchase order for volume rebate processing on hold
853 Put purchase order on hold not possible for third-party purchase orders
854 MRP relevance does not match other schedule line
855 Multiple account assignment not possible for item &1
856 Unaccepted service entry sheets exist: item cannot be deleted
857 Changing distribution indicator from/to 3 (value-based) not possible
858 Changing distribution ind. to SPACE (single acct assgmt) not possible
859 System changing distribution logic from percentage to quantity based
860 Final account assignment indicator only possible for valuated GR
861 Specify a final account assignment reason
862 Final AA indicator only possible if follow-on documents exist
863 Enter final acct. assigmt reason only for pos. with final acct.assgmt
864 Final AA quantity &1 is less than maximum delivery cost quantity &2
865 The returns indicator cannnot be set for the purchase order item
866 Cross-company-code purchasing with different local currency not possible
867 Cross-company-code purchasing is not possible
868 Differential invoicing is not possible for item category &1
869 Invoicing plan is not possible for differential invoicing
870 Differential invoicing is not possible
871 Differential invoicing is possible for the invoice receipt
872 Invoicing plan not possible for differential invoicing
873 Differential invoicing value cannot be changed
874 Pricing date category «GR Date» is not possible
Contribute (Add Comments)
Use the comments section below to add any links, information or screen shots that you feel are relevant to this message class or any of the messages within it. This could include issues you have found that cause the messages to appear incorrectly as well as any fixes you have found or relevant SAP OSS notes. This information can then be found quickly, simply by searching on the message class MEPO
.
Symptom
Purchase Requisition has been created with release strategy, when you open this PR in ME54N, error MEPO822 ‘Purchase requisition XXX cannot be released’ is issued.
Read more…
Environment
- Materials Management (MM)
- SAP ERP Central Component
- SAP ERP
- SAP enhancement package for SAP ERP
- SAP enhancement package for SAP ERP, version for SAP HANA
- SAP S/4HANA
Product
SAP ERP Central Component all versions ; SAP ERP all versions ; SAP S/4HANA all versions ; SAP enhancement package for SAP ERP all versions ; SAP enhancement package for SAP ERP, version for SAP HANA all versions
Keywords
ECC, ME54N, Purchase requisition cannot be released, blocked, status, modify, change
, KBA , MM-PUR-GF-REL , Release (Approval) , How To
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login
required).
Search for additional results
Visit SAP Support Portal’s SAP Notes and KBA Search.
Hi All,
When i try to release a req (e.g. 1002001) by choosing ME54n screen, the ME54 screen is not opening. Instead it gives an error message «»purchase requistion 1003560 cannot be released»» and if i
click enter it takes me to the display req of 1003560.
1) I am trying to release 1002001, why is it taking me to 1003560.
Any solutions………
Thanks,
Nureya
Read these next…
Intermittent pings on certain devices that are on same VLAN/subnet
Networking
Hi,I am working as a system admin at a company.We have a computer dedicated to monitoring the panels for the facility’s equipment. Let’s say that this computer is on VLAN 2001 and DHCP is disabled on this VLAN. So every device has a static IP on this VLAN…
Wipe IronKey
Hardware
My company is throwing away some Ironkey USB drives. I grabbed a couple and as far as I know they are still good. Is there anyway I can erase them and use them as regular USB drives? I don’t have the password to unlock them.
IT Adventures: Episode One — Mind Blank
Holidays
Tell a Story day is coming up on April 27th, and I was thinking about that and wondering if we could do an interactive story on the site. So, here’s the idea. Below, I am writing a story prompt which is sort of like a Choose Your Own Adventu…
Snap! — Flipper Zero ban, Refurbished AirPods, Dark Side of AI, ChatGPT Furby
Spiceworks Originals
Your daily dose of tech news, in brief.
Welcome to the Snap!
Flashback: April 7, 1969: RFC 1 Defines the Building Block of Internet Communication (Read more HERE.)
Bonus Flashback: April 7, 2001: Mars Odyssey Orbiter Launched (Read more H…
Public IPs showing up on internal devices
Security
Hello-I am operating on a network of 250+ devices. The majority of the devices on the network are IoT devices which connect to the WLAN using a Microchip-branded WiFi chip. There are also a handful of IoT devices that connect using hard wire. The rema…
Видимо проблема в данных передаваемых таблиц.
Для того, чтобы не было такого момента, что договор еще не создан, а мы к нему обращаемся, просто временно поставим договор как константу,
ибо и при этих условиях дамп возникает
FORM CREATE_DOC .
DATA: L_FROM_TABIX LIKE SY-TABIX.
FIELD-SYMBOLS <FS_LT_ALL_TAB> LIKE GT_ALL_TAB .
* для каждого прихода создается свой заказ
LOOP AT GT_ALL_TAB_ORD .
* создаем контракт
IF NOT GT_ALL_TAB_ORD-ID_CONTRACT IS INITIAL.
* по любой строке строим договор
READ TABLE GT_ALL_TAB WITH KEY P_ID_POS = GT_ALL_TAB_ORD-P_ID_POS.
CHECK SY-SUBRC = 0.
L_FROM_TABIX = SY-TABIX.
PERFORM CREATE_CONTRACT .
IF NOT GT_ALL_TAB_ORD-EVRTN IS INITIAL.
* создание заказа
PERFORM CREATE_ORDER USING L_FROM_TABIX .
ENDIF.
ELSE.
* создание заказа
* по любой строке строим заголовок заказа
READ TABLE GT_ALL_TAB WITH KEY P_ID_POS = GT_ALL_TAB_ORD-P_ID_POS.
CHECK SY-SUBRC = 0.
L_FROM_TABIX = SY-TABIX.
PERFORM CREATE_ORDER USING L_FROM_TABIX .
ENDIF.
IF NOT GT_ALL_TAB_ORD-EBELN IS INITIAL.
LOOP AT GT_ALL_TAB ASSIGNING <FS_LT_ALL_TAB> FROM L_FROM_TABIX.
IF <FS_LT_ALL_TAB>-P_ID_POS = GT_ALL_TAB_ORD-P_ID_POS.
<FS_LT_ALL_TAB>-P_SAP_EBELN = GT_ALL_TAB_ORD-EBELN.
<FS_LT_ALL_TAB>-P_SAP_EVRTN = GT_ALL_TAB_ORD-EVRTN.
ELSE.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
MODIFY GT_ALL_TAB_ORD .
ENDLOOP.
FORM CREATE_CONTRACT .
DATA: L_HEADER LIKE BAPIMEOUTHEADER,
L_HEADERX LIKE BAPIMEOUTHEADERX,
L_ITEM LIKE STANDARD TABLE OF BAPIMEOUTITEM WITH HEADER LINE,
L_ITEMX LIKE STANDARD TABLE OF BAPIMEOUTITEMX WITH HEADER LINE,
L_RETURN LIKE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
DATA: L_ERR. » флаг ошибок при создании договора
DATA: L_CHAR_NUM(15). » для сохранения чисел как символов
DATA: L_CONTRACT LIKE BAPIMEOUTHEADER-NUMBER.
DATA: NUM_TXT(30). » для перевода чисел в текст
CLEAR: L_HEADER, L_HEADERX, L_ITEM[],L_ITEMX[],L_RETURN[], L_CONTRACT.
* заголовок
L_HEADER-COMP_CODE = C_COMP_CODE_1000 . «Балансовая единица
L_HEADER-DOC_TYPE = C_DOC_TYPE_RP. «Вид документа закупки
* Номер счета поставщика
L_CHAR_NUM = GT_ALL_TAB-LEGAL_PERSON.
SHIFT L_CHAR_NUM LEFT DELETING LEADING SPACE.
SELECT SINGLE LIFNR FROM LFB1
INTO L_HEADER-VENDOR
WHERE ALTKN = L_CHAR_NUM AND BUKRS = C_COMP_CODE_1000.
IF SY-SUBRC <> 0.
L_HEADER-VENDOR = ‘0001000001’. «Номер счета поставщика
«Номер счета поставщика
CONCATENATE ‘Для поставщика’ L_CHAR_NUM ‘не создан поставщик’ INTO STRING1 SEPARATED BY SPACE.
PERFORM ADD_LOG_MSG_ADD_FREE_TEXT USING GF_LOG_HANDLE MSGTY_E PROBCLASS_HIGH STRING1.
L_ERR = ‘X’.
ENDIF.
L_HEADER-PURCH_ORG = C_PURCH_ORG_1000. «Закупочная организация
«Группа закупок
SELECT SINGLE PUR_GROUP
FROM ZMM_T_DIVIS_BKGR
INTO L_HEADER-PUR_GROUP
WHERE DIVISIONS = GT_ALL_TAB-P_DIVISIONS.
IF SY-SUBRC <> 0.
L_HEADER-PUR_GROUP = ‘001’. «Группа закупок
L_CHAR_NUM = GT_ALL_TAB-P_DIVISIONS.
CONCATENATE ‘Для подразделения’ L_CHAR_NUM ‘не создана группа закупок ‘ INTO STRING1 SEPARATED BY SPACE.
PERFORM ADD_LOG_MSG_ADD_FREE_TEXT USING GF_LOG_HANDLE MSGTY_E PROBCLASS_HIGH STRING1.
L_ERR = ‘X’.
ENDIF.
L_HEADER-CURRENCY = C_CURRENCY_RUB. «Код валюты
L_HEADER-VPER_END = C_VPER_END_99991231. «Конец времени выполнения
NUM_TXT = GT_ALL_TAB-I_CONTRACT.
L_HEADERX-COMP_CODE = ‘X’.»Балансовая единица
L_HEADERX-DOC_TYPE = ‘X’.»Вид документа закупки
L_HEADERX-VENDOR = ‘X’.»Номер счета поставщика
L_HEADERX-PURCH_ORG = ‘X’.»Закупочная организация
L_HEADERX-PUR_GROUP = ‘X’.»Группа закупок
L_HEADERX-CURRENCY = ‘X’.»Код валюты
L_HEADERX-VPER_END = ‘X’.»Конец времени выполнения
* позиции
L_ITEM-ITEM_NO = C_ITEM_NO_00010. «Номер позиции документа закупки
L_ITEM-ITEM_CAT = C_ITEM_CAT_W. «Тип позиции в документе закупки
L_ITEM-MATL_GROUP = C_MATL_GROUP. «Группа материалов
L_ITEM-SHORT_TEXT = C_SHORT_TEXT_SHORT_TXT. » Краткий текст
APPEND L_ITEM.
L_ITEMX-ITEM_NO = C_ITEM_NO_00010. «Номер позиции документа закупки
L_ITEMX-ITEM_CAT = ‘X’. «Тип позиции в документе закупки
L_ITEMX-MATL_GROUP =’X’. «Группа материалов
L_ITEMX-SHORT_TEXT = ‘X’. » Краткий текст
APPEND L_ITEMX.
IF L_ERR IS INITIAL.
CLEAR: L_CONTRACT, L_RETURN[].
* нет ошибок формирования, создаем договор
CALL FUNCTION ‘BAPI_CONTRACT_CREATE’
EXPORTING
HEADER = L_HEADER
HEADERX = L_HEADERX
IMPORTING
PURCHASINGDOCUMENT = L_CONTRACT
TABLES
RETURN = L_RETURN
ITEM = L_ITEM
ITEMX = L_ITEMX.
CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT’
EXPORTING
WAIT = ‘X’.
LOOP AT L_RETURN.
GT_ERR_POST-ID_TAB = GT_ALL_TAB-P_ID_POS.
GT_ERR_POST-ERR_NOTE = L_RETURN-MESSAGE.
APPEND GT_ERR_POST.
ENDLOOP.
GT_ALL_TAB_ORD-EVRTN = L_CONTRACT.
MODIFY GT_ALL_TAB_ORD.
* обработка ошибок создания
ELSE.
* ошибки формирования
GT_ALL_TAB_ORD-4_IC_ERR = ICON_DEFECT.
ENDIF.
ENDFORM. » CREATE_CONTRACT
FORM CREATE_ORDER USING P_FROM_TABIX LIKE SY-TABIX.
DATA:
LT_HEADER LIKE BAPIMEPOHEADER,
LT_HEADERX LIKE BAPIMEPOHEADERX,
LT_RETURN LIKE BAPIRET2 OCCURS 5 WITH HEADER LINE,
LT_ITEMS LIKE BAPIMEPOITEM OCCURS 5 WITH HEADER LINE,
LT_ITEMSX LIKE BAPIMEPOITEMX OCCURS 5 WITH HEADER LINE,
LT_POACCOUNT LIKE BAPIMEPOACCOUNT OCCURS 5 WITH HEADER LINE,
LT_POACCOUNTX LIKE BAPIMEPOACCOUNTX OCCURS 5 WITH HEADER LINE,
LT_SCHEDULE LIKE BAPIMEPOSCHEDULE OCCURS 5 WITH HEADER LINE,
LT_SCHEDULEX LIKE BAPIMEPOSCHEDULX OCCURS 5 WITH HEADER LINE,
LT_ACCOUNT LIKE BAPIMEPOACCOUNT OCCURS 5 WITH HEADER LINE,
LT_ACCOUNTX LIKE BAPIMEPOACCOUNTX OCCURS 5 WITH HEADER LINE,
L_BAPI_NUMBER LIKE BAPIMEPOHEADER-PO_NUMBER VALUE SPACE.
DATA: L_CHAR_NUM(15), » для сохранения чисел как символов
L_ERR, » флаг ошибок при создании договора
L_TABIX. » номер позиции для создания заказа
CLEAR:LT_HEADER,LT_HEADERX, LT_ITEMS[],LT_ITEMSX[], LT_POACCOUNT[], LT_POACCOUNTX[],L_BAPI_NUMBER.
* заголовок
CLEAR : LT_HEADER.
LT_HEADER-COMP_CODE = C_COMP_CODE_1000. » Балансовая единица
LT_HEADER-DOC_TYPE = C_DOC_TYPE_NB . «Вид документа закупки
LT_HEADER-CREAT_DATE = SY-DATUM. «Дата создания записи
LT_HEADER-CREATED_BY = SY-UNAME. «Имя исполнителя, создавшего объект
LT_HEADER-REF_1 = GT_ALL_TAB-P_POSTING_NUMBER.»Номер документа приходования
* если есть договор
IF NOT GT_ALL_TAB_ORD-EVRTN IS INITIAL.
LT_HEADER-AGREEMENT = ‘4600000077’.»GT_ALL_TAB_ORD-EVRTN.»Номер основного договора
ELSE.
* Номер счета поставщика
L_CHAR_NUM = GT_ALL_TAB-P_LEGAL_PERSON.
SHIFT L_CHAR_NUM LEFT DELETING LEADING SPACE.
SELECT SINGLE LIFNR FROM LFB1
INTO LT_HEADER-VENDOR
WHERE ALTKN = L_CHAR_NUM AND BUKRS = C_COMP_CODE_1000.
IF SY-SUBRC <> 0.
LT_HEADER-VENDOR = ‘0001000001’. «Номер счета поставщика
L_CHAR_NUM = GT_ALL_TAB-P_LEGAL_PERSON.
«Номер счета поставщика
CONCATENATE ‘Для поставшика’ L_CHAR_NUM ‘ не создан поставщик ‘ INTO STRING1 SEPARATED BY SPACE.
PERFORM ADD_LOG_MSG_ADD_FREE_TEXT USING GF_LOG_HANDLE MSGTY_E PROBCLASS_HIGH STRING1.
L_ERR = ‘X’.
ENDIF.
LT_HEADER-PURCH_ORG = C_PURCH_ORG_1000. «Закупочная организация
«Группа закупок
SELECT SINGLE PUR_GROUP
FROM ZMM_T_DIVIS_BKGR
INTO LT_HEADER-PUR_GROUP
WHERE DIVISIONS = GT_ALL_TAB-P_DIVISIONS.
IF SY-SUBRC <> 0.
LT_HEADER-PUR_GROUP = ‘001’. «Группа закупок
L_CHAR_NUM = GT_ALL_TAB-P_DIVISIONS.
CONCATENATE ‘Для подразделения’ L_CHAR_NUM ‘ не создана группа закупок в’ INTO STRING1 SEPARATED BY SPACE.
PERFORM ADD_LOG_MSG_ADD_FREE_TEXT USING GF_LOG_HANDLE MSGTY_E PROBCLASS_HIGH STRING1.
L_ERR = ‘X’.
ENDIF.
ENDIF.
LT_HEADER-CURRENCY = C_CURRENCY_RUB . «Код валюты
LT_HEADER-DOC_DATE = SY-DATUM. «Дата документа закупки
CLEAR : LT_HEADERX.
LT_HEADERX-REF_1 = ‘X’.»Номер документа приходования
LT_HEADERX-COMP_CODE = ‘X’.» Балансовая единица
LT_HEADERX-DOC_TYPE = ‘X’.»Вид документа закупки
LT_HEADERX-CREAT_DATE = ‘X’.»Дата создания записи
LT_HEADERX-CREATED_BY = ‘X’.»Имя исполнителя, создавшего объект
* если есть договор
IF NOT GT_ALL_TAB_ORD-EVRTN IS INITIAL.
LT_HEADERX-AGREEMENT = ‘X’. «Номер основного договора
ELSE.
* иначе
LT_HEADERX-VENDOR = ‘X’. «Номер счета поставщика
LT_HEADERX-PURCH_ORG = ‘X’. «Закупочная организация
LT_HEADERX-PUR_GROUP = ‘X’. «Группа закупок
ENDIF.
LT_HEADERX-CURRENCY = ‘X’.. «Код валюты
LT_HEADERX-DOC_DATE = ‘X’. «Дата документа закупки
FIELD-SYMBOLS <FS_LT_ALL_TAB> LIKE GT_ALL_TAB .
* элементы
L_TABIX = 1.
LOOP AT GT_ALL_TAB ASSIGNING <FS_LT_ALL_TAB> FROM P_FROM_TABIX.
CLEAR: LT_ITEMS,LT_ITEMSX, LT_POACCOUNT, LT_POACCOUNTX.
IF <FS_LT_ALL_TAB>-P_ID_POS = GT_ALL_TAB_ORD-P_ID_POS.
CLEAR: LT_ITEMS, LT_ITEMSX,LT_POACCOUNT,LT_POACCOUNTX.
LT_ITEMS-PO_ITEM = L_TABIX * 10.» «Номер позиции документа закупки
LT_ITEMSX-PO_ITEM = L_TABIX * 10.» «Номер позиции документа закупки
«Номер материала
LT_ITEMS-MATERIAL = ‘000000001000000000’.»Номер материала
LT_ITEMS-PLANT = C_PLANT_1000 . «Завод
LT_ITEMS-STGE_LOC = ». «Склад
LT_ITEMS-QUANTITY = <FS_LT_ALL_TAB>-IO_AMOUNT. «Объем заказа на поставку
«ЕИ заказа на поставку
L_CHAR_NUM = <FS_LT_ALL_TAB>-ID_UNITS.
SHIFT L_CHAR_NUM LEFT DELETING LEADING SPACE.
SELECT SINGLE MEINS
INTO LT_ITEMS-PO_UNIT
FROM ZMM_T_UNIT
WHERE ID = L_CHAR_NUM.
IF SY-SUBRC <> 0.
LT_ITEMS-PO_UNIT = ‘ST’. «ЕИ заказа на поставку
L_CHAR_NUM = <FS_LT_ALL_TAB>-ID_UNITS.
CONCATENATE ‘Для ЕИ’ L_CHAR_NUM ‘не созданы ЕИ’ INTO STRING1 SEPARATED BY SPACE.
PERFORM ADD_LOG_MSG_ADD_FREE_TEXT USING GF_LOG_HANDLE MSGTY_E PROBCLASS_HIGH STRING1.
L_ERR = ‘X’.
ENDIF.
LT_ITEMS-NET_PRICE = <FS_LT_ALL_TAB>-ID_PRICE. «Цена за единицу
IF NOT <FS_LT_ALL_TAB>-PO_PROJECT IS INITIAL.
* с контировкой
LT_ITEMS-ACCTASSCAT = C_ACCTASSCAT_Q .» Тип контировки
LT_ITEMSX-ACCTASSCAT = ‘X’.» Тип контировки
* контировка
LT_POACCOUNT-PO_ITEM = L_TABIX * 10.» «Номер позиции документа закупки
DATA: L_PSPNR LIKE PRPS-PSPNR.
CLEAR: L_PSPNR.
L_CHAR_NUM = GT_ALL_TAB-PO_PROJECT.
SHIFT L_CHAR_NUM LEFT DELETING LEADING SPACE.
SELECT SINGLE PSPNR FROM ZMM_T_ORDER_PRPS
INTO L_PSPNR
WHERE PROJECT = L_CHAR_NUM .
IF SY-SUBRC = 0.
SELECT SINGLE POSID FROM PRPS
INTO LT_POACCOUNT-WBS_ELEMENT
WHERE PSPNR = L_PSPNR .
ELSE.
LT_POACCOUNT-WBS_ELEMENT = ‘00001.01.001’.» ‘00000111’.» » Элемент структурного плана проекта (СПП-элемент)
«Номер счета поставщика
CONCATENATE ‘Для заказа’ L_CHAR_NUM ‘не создан СПП ‘ INTO STRING1 SEPARATED BY SPACE.
PERFORM ADD_LOG_MSG_ADD_FREE_TEXT USING GF_LOG_HANDLE MSGTY_E PROBCLASS_HIGH STRING1.
GT_ERR-ID_TAB = GT_ALL_TAB-ID_TAB.
GT_ERR-ERR_NOTE = STRING1.
APPEND GT_ERR.
L_ERR = ‘X’.
ENDIF.
* перекодировка
* <FS_LT_ALL_TAB>-IIO_PROJECT
LT_POACCOUNT-SERIAL_NO = C_SERIAL_NO_01.»Текущий номер контировки
APPEND LT_POACCOUNT.
LT_POACCOUNTX-PO_ITEM = L_TABIX * 10.» «Номер позиции документа закупки
LT_POACCOUNTX-WBS_ELEMENT = ‘X’.» Элемент структурного плана проекта (СПП-элемент)
LT_POACCOUNTX-SERIAL_NO = C_SERIAL_NO_01.»Текущий номер контировки
APPEND LT_POACCOUNTX.
ENDIF.
IF NOT GT_ALL_TAB_ORD-EVRTN IS INITIAL.
* с договором
LT_ITEMS-AGREEMENT = GT_ALL_TAB_ORD-EVRTN.»Номер основного договора
LT_ITEMSX-AGREEMENT = ‘X’.»Номер основного договора
ENDIF.
APPEND LT_ITEMS.
LT_ITEMSX-PO_ITEMX = ‘X’.
LT_ITEMSX-MATERIAL = ‘X’.»Номер материала
LT_ITEMSX-PLANT = ‘X’.»Завод
LT_ITEMSX-STGE_LOC = ‘X’.»Склад
LT_ITEMSX-QUANTITY = ‘X’.»Объем заказа на поставку
LT_ITEMSX-PO_UNIT = ‘X’.»ЕИ заказа на поставку
LT_ITEMSX-NET_PRICE = ‘X’.»Цена за единицу
APPEND LT_ITEMSX.
ELSE.
EXIT.
ENDIF.
L_TABIX = L_TABIX + 1.
ENDLOOP.
CLEAR: LT_RETURN[],L_BAPI_NUMBER.
IF L_ERR IS INITIAL.
CALL FUNCTION ‘BAPI_PO_CREATE1’
EXPORTING
POHEADER = LT_HEADER
POHEADERX = LT_HEADERX
IMPORTING
EXPPURCHASEORDER = L_BAPI_NUMBER
TABLES
RETURN = LT_RETURN
POITEM = LT_ITEMS
POITEMX = LT_ITEMSX
POACCOUNT = LT_POACCOUNT
POACCOUNTX = LT_POACCOUNTX
.
CALL FUNCTION ‘BAPI_TRANSACTION_COMMIT’
EXPORTING
WAIT = ‘X’.
GT_ALL_TAB_ORD-EBELN = L_BAPI_NUMBER.
PERFORM SAVE_EBELN_TAB.
* обработка ошибок создания
ELSE.
* ошибки формирования
GT_ALL_TAB_ORD-4_IC_ERR = ICON_DEFECT.
ENDIF.
.
ENDFORM. » CREATE_ORDER
Hierarchy
☛
BBPCRM (Software Component) BBPCRM
⤷
SRM-EBP (Application Component) Enterprise Buyer
⤷
BBP_APPLICATION (Package) Structure Package EBP
⤷
ME (Package) Application development R/3 Purchasing
Attribute
Message class | MEPO | ||
Short Description | New Purchase Order Dialog | ||
Message Number | |
822 | |
Documentation status | |||
Authorization check Error Message | |||
Changed On | 20130531 |
Message Text
Purchase requisition & cannot be released
History
Last changed on/by | 20131127 | SAP | |
SAP Release Created in |
Über uns
Ihr Partner für den digitalen Wandel
Wer wettbewerbsfähig bleiben will, muss den digitalen Wandel vorantreiben. Dafür braucht es eine klare Strategie und einen erfahrenen Partner wie consolut: Mit innovativen Lösungen, die einen technologischen Vorsprung verschaffen. Mit fundiertem Know-how, auch bei internationalen Großprojekten. Mutig, vorausschauend und umsichtig – so führen wir Ihre Vorhaben zum Erfolg.
Karriere
Wofür schlägt Dein Herz?
Du willst den digitalen Wandel mitgestalten? In einem Umfeld, in dem Du Deine Talente entfalten und Deinen Leidenschaften nachgehen kannst? Dann nichts wie los – bewirb Dich bei uns: Auf unseren Karriereseiten finden Berufseinsteigende genauso wie Erfahrene, was uns als Arbeitgeber ausmacht. Vorausdenkend. Zupackend. Mit Herz dabei.
If you have to adjust conditions for your purchase order line and if during the use of method if_purchase_order_item_mm~set_conditions in BADI ME_PROCESS_PO_CUST you receive an error MEPO151 «Data from Business Add-In ME_PROCESS_PO_CUST not adopted» then after you check SAP notes for that error and none of them help then you may try with solution which you can find bellow. The endless loop appears because set_conditions method force re-check of the item. To avoid running set_conditions more than once in one check of the item I used abap memory to store data about each line that was check. I’ve created simple structure with ebelp and «set» fields on a base which I know if I had to run setting of conditions or not. Maybe it’s not the nicest solution but it works quite well
The form which you can find bellow you have to run at the end of processing of method process_item of ME_PROCESS_PO_CUST to be sure that other form will not force SAP to re-check the item again.
form process_item using f_item type ref to if_purchase_order_item_mm. field-symbols: <ekko> type ekko. data: f_mepoitem type mepoitem.
data: fo_header type ref to if_purchase_order_mm.
data: f_checkheader type mepoheader.
data: f_checkheader_curr type mepoheader.
data: f_ekkotxt type string. data: begin of fs_condcheck,
set type c,
ebelp type ekpo—ebelp,
end of fs_condcheck. data: ft_condcheck like standard table of fs_condcheck. check f_item is not initial. f_mepoitem = f_item->get_data( ). f_ekkotxt = ‘(SAPLMEPO)EKKO’. «we’ll use ekko from me21n
assign (f_ekkotxt) to <ekko>. «do not do changes on that FS !!!
if sy—subrc eq 0.
«we only do changes for new purchase order and requisitioner ‘TESTONE’
«of course you should put your own codding here
if <ekko>—ebeln+0(2) ne ’45’ and f_mepoitem—afnam eq ‘TESTONE’.
«we’re importing data from memory
import ft_condcheck = ft_condcheck
f_checkheader = f_checkheader
from memory id ‘CONDADJUST’. «get header object
fo_header = f_item->get_header( ). «get current header data
f_checkheader_curr = fo_header->get_data( ). «compare current header with the one from memmory
if f_checkheader_curr <> f_checkheader.
«if different then we’ve got new PO
refresh ft_condcheck[].
f_checkheader = f_checkheader_curr.
«clear cond wa and set ebelp
clear fs_condcheck.
fs_condcheck—ebelp = f_mepoitem—ebelp.
else.
«we’re in same PO like befor so let’s check if we already have
«data for current position in our check table
read table ft_condcheck with key ebelp = f_mepoitem—ebelp into fs_condcheck.
if sy—subrc ne 0.
«if not then we clear check wa and set ebelp
clear fs_condcheck.
fs_condcheck—ebelp = f_mepoitem—ebelp.
endif.
endif. «if the condition was set before then we do nothing
if fs_condcheck—set is initial.
data: ft_conditions type mmpur_tkomv.
data: f_cond_changed type c.
field-symbols: <komv> type komv.
«clear cond change flag
clear f_cond_changed.
«get condition for item
f_item->get_conditions( importing ex_conditions = ft_conditions[] ). «our manipulation of conditions (do your coding here)
loop at ft_conditions assigning <komv>.
if <komv>—kschl ne ‘PB00’ and
<komv>—kschl ne ‘PBXX’ and
<komv>—kbetr is not initial. clear <komv>—kbetr.
<komv>—kmprs = ‘X’.
«set that we’ve done change
f_cond_changed = ‘X’.
endif.
endloop. «check if we changed something
if f_cond_changed is not initial.
«if yes then we set conditions
f_item->set_conditions( exporting im_conditions = ft_conditions[] ).
«fill check data and set that for this ebelp the conditions were
«already saved
fs_condcheck—set = ‘X’.
«export data to memory so we can read it in the next call of process_item
append fs_condcheck to ft_condcheck[].
export ft_condcheck = ft_condcheck
f_checkheader = f_checkheader
to memory id ‘CONDADJUST’.
endif.
else.
data: fo_order type ref to cl_po_header_handle_mm.
data: fo_model type ref to if_model_mm.
«cast header
fo_order ?= fo_header.
«cast item to model
fo_model ?= f_item.
«check if item is still in the queue to check again
read table fo_order->my_recheck_queue with key model = fo_model transporting no fields.
if sy—subrc ne 0.
«if not then we can delete entries from table to be able to run check
«in the next change of item
delete ft_condcheck where ebelp = f_mepoitem—ebelp.
«export data to memory without line that was changed already
export ft_condcheck = ft_condcheck
f_checkheader = f_checkheader
to memory id ‘CONDADJUST’.
endif.
endif.
endif.
endif.endform. «process_item