SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

User-exit при исходящем IDOC



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Максим
Специалист
Специалист



Joined: 27 Sep 2007
Posts: 61

PostPosted: Sat Feb 27, 2010 2:45 pm    Post subject: User-exit при исходящем IDOC Reply with quote

Коллеги, может кто знает, какой user-exit срабатывает на любом исходящем IDOC, чтобы можно было структуру IDOC поменять?
Back to top
View user's profile Send private message
Удав
Гуру
Гуру


Age: 48
Joined: 25 Jan 2008
Posts: 580
Location: Москва

PostPosted: Sat Feb 27, 2010 3:59 pm    Post subject: Reply with quote

Структура IDOC не меняется в USER-EXIT`ах Smile
См. документацию по IDOC.
Поиск user-exit для заполнения своих сегментов осуществляется по ФМ формирования IDOC (см.
пример для ФМ IDOC_OUTPUT_ORDERS.

_________________
С уважением,
Удав.
Back to top
View user's profile Send private message
Максим
Специалист
Специалист



Joined: 27 Sep 2007
Posts: 61

PostPosted: Mon Mar 01, 2010 11:19 am    Post subject: Reply with quote

Удав, спасибо за ответ.
Конечно, имелось ввиду изменить не структуру, а данные. Laughing

Но вторая ссылка о расширениях стандартных сегментов (в моем случае расширения нет), и как я понял, user-exit не универсальные, а на предопределенные типы документов, в примере (purchasing document)

Мне же нужна пособработка IDOC, после изменения партии (BATMAS).
А таких расшиерений у SAP-а вроде не определено.
Back to top
View user's profile Send private message
july7
Старший специалист
Старший специалист



Joined: 10 Oct 2007
Posts: 109
Location: Киров

PostPosted: Mon Mar 01, 2010 2:37 pm    Post subject: Reply with quote

https://forums.sdn.sap.com/thread.jspa?threadID=621029
Back to top
View user's profile Send private message
Максим
Специалист
Специалист



Joined: 27 Sep 2007
Posts: 61

PostPosted: Tue Mar 02, 2010 3:56 pm    Post subject: Reply with quote

july7, фактически и пришли к такому решению, как в ссылке, через клонирование FM. Нормального решения не нашли.

Коллеги ответили:
Quote:
Even We also sometimes back checked the same thing, but not possible to use standard approach for BATMAS Idoc for any custom requirement.

The other way could be create full custom function module, but that also bit difficult as we have to copy many function modules.

1. Copy MASTERIDOC_CREATE_SMD_BATMAS to Z_MASTERIDOC_CREATE_SMD_BATMAS.
2. Copy BAPI_BATCH_REPLICATE to Z_BAPI_BATCH_REPLICATE and call inside Z_MASTERIDOC_CREATE_SMD_BATMAS replacing the original one
3. Copy ALE_BATCH_SAVE_REPLICA to Z_ALE_BATCH_SAVE_REPLICA and call inside Z_BAPI_BATCH_REPLICATE replacing the original one.

Now you have to modify Z_ALE_BATCH_SAVE_REPLICA in order to have the custom functionality before calling the standard function module ALE_IDOCS_CREATE to create the Idoc.

There can be 2 ways to modify the Z_ALE_BATCH_SAVE_REPLICA.
i. I think we can extend the segment E1BPBNCOMZ with the required fields and populate the required fields in the Z_ALE_BATCH_SAVE_REPLICA. in this case you need to check the risk & impact as well. I did not work on this case, So I don’t know exactly the process. I need to check.
ii. We can use a new custom segment and enhanced the standard Idoc type BATMAS03. Then populate the segments with values.

I need to check if there any other easy possibility there or not. Hope it will help you.
Back to top
View user's profile Send private message
vga
Мастер
Мастер


Age: 150
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Mon Mar 15, 2010 3:47 pm    Post subject: Reply with quote

Недавно решал задачу с исходящим BATMAS. Но там нужно было не изменять содержимое сегмента, а наложить дополнительный фильт со списком заводов на исходящий IDOC.
Использовал BADI IDOC_CREATION_CHECK. Если материал не принадлежит заводу, то IDOC вообще не отправлять.

_________________
Молитва - это запрос разработчику на изменение кода программы.
Back to top
View user's profile Send private message Blog Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.