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

mb1b и user exit



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
werwolf
Участник
Участник



Joined: 19 Feb 2008
Posts: 30
Location: Ростов-на-Дону

PostPosted: Fri Jun 20, 2008 2:38 pm    Post subject: mb1b и user exit Reply with quote

Доброго всем дня!

Нужно при создании документа через mb1b дозаполнить таблицу mseg. Нашел расширение MB_CF001, в EXIT_SAPLMBMB_001 поставил break-point, только при создании документа программа туда не заходит, может кто сталкивался с такой проблемой. Собсно и нужно то тока туда попасть.
Back to top
View user's profile Send private message
vga
Мастер
Мастер


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

PostPosted: Fri Jun 20, 2008 4:44 pm    Post subject: Reply with quote

Какое поле нужно обновить?

MBCF0002 - MSEG-SGTXT
MBCF0009 - MSEG-LGORT
Back to top
View user's profile Send private message Blog Visit poster's website
werwolf
Участник
Участник



Joined: 19 Feb 2008
Posts: 30
Location: Ростов-на-Дону

PostPosted: Fri Jun 20, 2008 4:53 pm    Post subject: Reply with quote

Мне нужно заполнить MSEG-DMBTR, что бы при внутреннем перемещении и т.д. фиксировалась сумма документа.

З.Ы. Для отчетов потом нужно в BW
Back to top
View user's profile Send private message
vga
Мастер
Мастер


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

PostPosted: Fri Jun 20, 2008 4:58 pm    Post subject: Reply with quote

Цитатка:
Quote:
EXIT_SAPLMBMB_001
This exit is called in update task when saving Material document.


В описании сказано, что это
EXIT_SAPLMBMB_001 - Customer Function Exit in the Case of Updating a Material Doсument.
MB_CF001 Customer Function Exit in the Case of Updating a Mat.Doc.

MB1B - создание документа перемещения.


Чтобы брек-поинта сработал в модулях обновления, нужно поставить в отладчике галку Update debugging.
Можно так же для проверки срабатывания этого user-exit сгенерировать dump (например поделить число на ноль) и посмотреть в st22 наличие такого дампа.

В крайнем случае можно изменить данные через динамический assign из любого user-exit, которое сработает.
Back to top
View user's profile Send private message Blog Visit poster's website
werwolf
Участник
Участник



Joined: 19 Feb 2008
Posts: 30
Location: Ростов-на-Дону

PostPosted: Fri Jun 20, 2008 5:43 pm    Post subject: Reply with quote

А можно последовательность шагов при динамическом assing, ни разу не сталкивался и вопрос паралельно сработает ли эот способ из метода BADI MB_DOCUMENT_BADI.
Back to top
View user's profile Send private message
vga
Мастер
Мастер


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

PostPosted: Fri Jun 20, 2008 7:29 pm    Post subject: Reply with quote

В BADI тоже можно, только есть ограничения, связанные с невозможностью использования HEADER LINE и тд. внутри класса.

Code:
FIELD-SYMBOLS:
      <fs>   TYPE ANY TABLE,
      <fs_mseg> TYPE mseg.

* PERFORM SEGMENT_INIT(SAPMM07M).
ASSIGN ('(SAPMM07M)xmseg[]') TO <fs>.
IF <fs> IS ASSIGNED.
  LOOP AT <fs> ASSIGNING <fs_mseg>.
    IF <fs_mseg>-MBLNR EQ ...
      <fs_mseg>-DMBTR = '1234.56'. " new value
    ENDIF.
  ENDLOOP.
ENDIF.
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.