MB_DOCUMENT_BADI.
Hi,
Documentation for this BADI says we cannot access global fields defined in class as methods are called at different time,so I am trying to Use EXPORT/IMPORT to pass on internal table to Update Method.
I am using this in Before Update Method
select * into table it_itab from i_tab where regio = 'XX'.
read table it_itab into it_itab1 index 1.
it_itab1-regio = 'ABC'.
MODIFY it_itab FROM it_itab1 INDEX 1.
EXPORT it_itab from it_itab TO MEMORY ID 'XXXX'.
ENDIF.
and Code in Update Method , will read from Memory id 'XXXX'.
IMPORT it_itab to it_itab FROM MEMORY ID 'XXXX'.
INSERT i_tab1 FROM it_itab.
free memory id 'XXXX'.
But it is inserting blank record into i_tab1, any idea why??
Thanks
Lakhbir
Hi,
Question->Why can't you directly do the select and insert in the MB_DOCUMENT_UPDATE method..Instead of selecting the data in the method MB_DOCUMENT_BEFORE_UPDATE and then export it to the memory..and then import it in the method MB_DOCUMENT_UPDATE..
Add the below code directly in the method MB_DOCUMENT_UPDATE..
select * into table it_itab from i_tab where regio = 'XX'.
read table it_itab into it_itab1 index 1.
it_itab1-regio = 'ABC'.
MODIFY it_itab FROM it_itab1 INDEX 1.
INSERT i_tab1 FROM it_itab.
Thanks,
Naren
Similar Messages
-
BADI MB_DOCUMENT_BADI
Hi All,
I have created one implementation to the BADI MB_DOCUMENT_BADI. This badi will hit while creation of material document.I have write the code in method MB_DOCUMENT_BEFORE_UPDATE such that it will act only for certain movement types specially for t-codeMb1a and MB31.
What problem I am facing i have used a error message "MB_DOCUMENT_BEFORE_UPDATE" in this method.If we got the erroe message then we dont need to post the material dcoument,but here problem is that if the material document could not posted then it corrupt the material and when we performing 261/101 we got error message like " Inconsistency between MM and ML for material and plant"
Can anybody elebrate the problem why its happining and what will be the solution to the issue.
Thanks ,
sandeep.Hi,
This needs to be handled in the program based on the user action, you can either 'exit' the program or 'continue' processing, refer the sample code below,
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Confirm'
TEXT_QUESTION = 'Do you want to continue or exit'
TEXT_BUTTON_1 = 'Continue'
TEXT_BUTTON_2 = 'Exit'
DISPLAY_CANCEL_BUTTON = ' '
IMPORTING
ANSWER = LV_ANSWER.
IF LV_ANSWER = 1.
Handle the error,
endif.
Hope this helps,
Rgds, -
Use of enque and deque function in BADI MB_DOCUMENT_BADI
Hi All,
I have implemented one implementation to the BADI MB_DOCUMENT_BADI.I have to use update command in this implementation to update on ZTABLE,In order to update I need to use enqueue and dequeue function before updating the table.
My concern is that in the documentation to the BADI it specifies that Unlocking the data( DEQUEUE_ALL) will be not used in this implementation.
Please let me know Can I use enqueue and deques function for this table to this BADI.
Thanks,.
Sandeep.Hi,
I think field GOODSMVT_CODE is not table type, you mension it type table of 'BAPI2017_GM_CODE'.
Thanks,
Anmol. -
BADI MB_DOCUMENT_BADI and method only working in debug mode
Hi SAP Experts,
I have a problem with badi MB_DOCUMENT_BADI. I implemented method MB_DOCUMENT_UPDATE, which is called from update
task.
My implementation calls a BAPI to update a standard sap table and I also update a custom table. When I put a breakpoint and the debugger gets to it, it runs wells. Everything gets updated properly.
With no breakpoints it doesnu2019t update anything. Iu2019m not sure what is causing this. Any help would be greatly appreciated.
<< Moderator message - Everyone's problem is important. But the answers in the forum are provided by volunteers. Please do not ask for help quickly. >>
Miguel
Edited by: Rob Burbank on Oct 28, 2011 2:18 PMHi,
Please see below:
CALL FUNCTION 'BAPI_EQUI_CHANGE'
EXPORTING
EQUIPMENT = <FS_UPD>-EQUNR "->equnr of looped table
DATA_GENERAL = K_DATA_GENERAL
DATA_GENERALX = K_DATA_GENERALX
DATA_SPECIFIC = K_SPECIFIC_DATA
DATA_SPECIFICX = K_SPECIFIC_DATAX
IMPORTING
DATA_GENERAL_EXP = K_DATA_GENERAL_EXP
RETURN = I_MESSAGE.
***This is called inside a loop, after the loop...
UPDATE "Z_MY_TABLE" FROM TABLE I_UPD_FM.
Inside the loop the data gets prepared for the custom and standard table.
Thanks all!
Miguel -
MB_DOCUMENT_BADI not triggring in ECC 6.0 version
Hi All,
We are upgrading our SAP R3 from 4.6c to ECC 6.0.
In the new system, Transaction SE18 now has two options
1. Enhancement spot
2. BAdI Name
When I display my BADI MB_DOCUMENT_BADI
Attributes tab shows BAdI migrates to enhancement spot MB_GOODSMOVEMENT
When I display Enhancement spot Technical details Tab shows Enhancement Implementation Status shows "Initial".
We have implemented this BADI in our 4.6c version. And its triggering when I run MIGO transaction.
In the new system BADI is not triggering when I run the MIGO.
Above is the only difference I found in the new system when compared with our old system settings.
Can any one suggest me what all the things I need to take care to get working this BADI
Thanks,
SatishHi
Also please read this.
Business Add-In: Create a Material Document
Business add-ins when creating a material document
The enhancement MB_DOCUMENT_BADI has two methods that are called up by the same interface, though at different times. All material document data from the following tables is transferred to this business add-in:
MKPF (material document header)
MSEG (material document items)
VM07M (update data)
This data can be used in other programs, but cannot be changed.
The methods differ according to the time at which they are called up:
The method MB_DOCUMENT_BEFORE_UPDATE is called up before the FI document is created. This means that it is called up even if the program is terminated by an error during the subsequent processing. The update of data in separate tables should always be contained in function modules that are called up with the addition 'in update task'. This ensures that all the data is updated consistently.
The method MB_DOCUMENT_UPDATE is not carried out until update. This means that all updates are carried out immediately in their own tables and do not have to be contained in 'update task' in function modules. For performance reasons, you should not re-read the tables or carry out any time-consuming routines at this point.
You should always call up MB_DOCUMENT_BEFORE_UPDATE before MB_DOCUMENT_UPDATE, particularly if time is a critical factor when posting the material documents. The method MB_DOCUMENT_UPDATE is processed after the FI document numbers are called. As a result, no other FI documents can be posted until this document is completely updated.
Even if the two methods are in the same class, you cannot access the same global fields, as the methods are called up at different times and are therefore carried out in another roll area.
From the business add-in display, you can go to coding examples for both methods by choosing Goto -> Example coding -> Display
Note
The enhancement does not transfer any data to the material document, that is, you cannot change material document data before it is updated.
If this business add-in is not set up properly, it may result in an inconsistency between the documents and the stocks and between the material documents and the accounting documents. Inconsistencies like these may be caused by the following elements in the business add-in:
COMMIT WORK
Remote function call (CALL FUNCTION ... DESTINATION)
Own updates in document tables or stock tables (for example, update in tables MBEW, MARD, MSEG)
The unlocking of data (for example, via DEQUEUE_ALL)
Before the two business add-ins are called up, data is already flagged for the UPDATE. If a COMMIT WORK or a Remote Function Call is transmitted in the enhancement, these are written in the database. If another error occurs after the business add-ins are processed, you cannot carry out a complete ROLL BACK, as the data up to the COMMIT or Remote Function Call has already been written in the database. This can result in an inconsistent status (for example, material document without accounting document), which can only be repaired with considerable cost and effort.
The business add-ins are not suitable for customer-specific updates in the stock tables, as updates like these destroy the standard stock update.
Unlocking the data (for example, via DEQUEUE_ALL) is also critical, as the data that is to be updated is no longer protected from updates from external systems, and inconsistencies can result from parallel updates.
Before you activate an enhancement, check carefully that the business add-in does not contain any critical coding places.
If data inconsistencies have already occurred in your system as a result of the business add-in, remove the critical coding so that it does not cause any further inconsistencies.
Business Add-In: Change Item Data in Transaction MIGO
Use
Application component: MM-IM-GR-MIGO
The Business Add-In (BAdI) MB_MIGO_ITEM_BAdI enables you to set the storage location and item text in the transaction for goods movements ( MIGO).
The Business Add-In is called when a new item is inserted in MIGO or when an existing item is changed.
If changes are made at header-level, the Business Add-In does not run; the header data is then transferred to the external application for information.
All available header and item data is transferred from MIGO to the external application.
The determined storage location and item text of a material document item is transferred back from the external application.
Note
The Business Add-In is called in MIGO at different times. The external application must be prepared for this.
Standard settings
In the standard system, the Business Add-In is not active.
There is no default code that would run without an active implementation.
The Business Add-In is not filter-dependent.
The Business Add-In cannot be used more than once.
Activities
To activate the Business Add-In, you must create an active implementation. Do this in Inventory Management and Physical Inventory Customizing and choose the relevant activity under Maintain Customer-Exits and Business Add-Ins.
For more information about this procedure, see the SAP Library under
Basis Components -> ABAP Workbench -> Changing the SAP Standard -> Business Add-Ins -> Implementing Business Add-Ins.
Example
Storage location determination
The Business Add-In should be used for a customer-specific storage location determination.
Item text
Goods receipt for purchase order with account assignment: As the purchase order item does not have a material number, the material short text in the puchase order should be adopted as the item text.
Example of source text:
IF IS_GOITEM-MATNR IS INITIAL.
E_ITEM_TEXT = IS_GOITEM-MAKTX.
ENDIF.
If the material short text is to be adopted as the item text for all goods movements, the source text only consists of the following line:
Example of source text:
E_ITEM_TEXT = IS_GOITEM-MAKTX.
Further notes
Documentation on the BAdI method:
Change particular fields of a line (GOITEM)
ITEM_MODIFY
You can also call the documentation on the BAdI method via the menu, by carrying out the following steps:
1. Choose the tab page Interface.
2. Double-click on the relevant method.
3. Click on the right mouse button and choose Component documentation.
Change a Row from Certain Fields (GOITEM)
Functionality
The ITEM_MODIFY method makes it possible to set the storage location and item text in the transaction for goods movements ( MIGO).
The method is called if a new item is added in MIGO or if an existing item is changed.
If changes are made to the header, the method will not run; however, the header data is transferred to the external application for information.
All available header and item data is transferred from MIGO to the external application.
The external application then transfers back the determined storage location and the item text of a material document item.
Requirements
Note that the Business Add-In can run several times for each material document item if entries are changed on the entry screen, or if error messages are outputted.
Result
The storage location and item text is returned from the external application to MIGO. The item text is also saved in the accounting document.
Note:
Data is only copied into MIGO, if the corresponding fields are visible and ready for input.
Parameters
The following structures are transferred:
IS_GOHEAD: contains the header data for the goods movement
IS_GOITEM: contains the itemd ata for the goods movement
E_STGE_LOC: storage location
E_ITEM_TEXT: item text
Exceptions
None
Notes
GOITEM includes all information on an item, in other words, both business data (material number) and technical data (for example, whether or not a tab page is to be shown for an item). We recommend you only analyze the business data of an item, as the technical data may be changed due to new developments at SAP.
Documentation for Business Add-In:
BAdI in MIGO for Changing Item Data (MB_MIGO_ITEM_BADI)
<b>Also try out the BADI - MB_MIGO_BADI</b>
Business Add-In: Maintain External Detail Subscreens for Transaction MIGO
Use
Application component: MM-IM-GR; MM-IM-GI
With the Business Add-In (BAdI) MB_MIGO_BADI, you can extend the interface of the goods movements transaction ( MIGO) with additional tabstrip controls for the detailed information (detail tabstrips) and header information (header tabstrips). It is possible for an external application
to display an additional detail tabstrip with own subscreen (max. 10 lines) in MIGO
to display an additional header tabstrip with own subscreen (max. 3 lines) in MIGO
The program name, screen number and tab page text can be determined dynamically. Different screens can therefore be controlled according to the mode (for example, change mode, display mode, goods receipt, goods issue).
Pushbuttons
It is not possible to implement pushbuttons in the MIGO menu, but you can, however, implement pushbuttons directly on the external subscreen. The OK code from MIGO is forwarded to the external application so it can react.
Cursor Control
So that the cursor stays on the same subscreen after you press Continue, if it was positioned there before, the external application in the own PAI must hold the cursor positioning (on the same screen 'yes'/'no'; if 'yes', on which field), to set the cursor in PBO again.
Requirements
If you use the BAdI MB_MIGO_BADI in MIGO to update customer-own data, in addition to the material document, to the database, you should note the following:
The BAdI MB_MIGO_BADI is only active in transaction MIGO.
If you post goods movements with other transactions (for example, with MB01, MB1C, VL02N), you must ensure that customer data is also updated, if necessary.
You can do this by using the BAdI MB_DOCUMENT_BADI (Creating a material document) to post the goods movements with the transactions mentioned above.
Note that otherwise, posting the goods movements will lead to inconsistencies between SAP system data (for example, in stocks, material documents, FI documents) and customer data.
To avoid these inconsistencies, we recommend posting all goods movements with transaction MIGO.
Standard settings
In the standard system, the Business Add-In is not active.
There is no default code.
The Business Add-In is not filter-dependent.
The Business Add-In can be used more than once.
Activities
To activate the Business Add-In, you must create an active implementation. Do this in Inventory Management and Physical Inventory Customizing and choose the relevant activity under Maintain Customer-Exits and Business Add-Ins.
For more information about this procedure, see the SAP Library under
Basis Components -> ABAP Workbench -> Changing the SAP Standard -> Business Add-Ins -> Implementing Business Add-Ins.
Note that the Business Add-In can be used multiple times and therefore all active implementations are called and run through.
Create Implementations
BAdI definition MB_MIGO_BADI was created with transaction SE18.
Using transaction SE19, you can create an implementation for this BAdI. You can provide the methods with customer-defined code.
The BAdI definition can be used several times. In MIGO, five additional tabstrip control were defined for the detail screen, and five additional tabstrip controls for the header information. In other words, up to five different implementations can be created.
Recommendation
We recommend that you do not install the external application data directly in the implementation, but enclose it in function modules. You assign the screen with the subscreens to the corresponding function group; see the example implementation.
Example
For easier comprehension, an example code has been created for the BAdI MB_MIGO_BADI. The example implementation class isCL_EXM_IM_MB_MIGO_BADI.
To activate the example implementation, use transaction SE19 to create a new implementation and then activate it. Copy the example code with Goto -> Sample Code -> Copy.
The tabstrip controls MIGO BAdI Example are then displayed in MIGO for the header and detail information.
On the tabstrip control for the detail information, you can enter an additional quantity (and unit of measure). Both are saved in table MIGO_BADI_EXAMPL.
The text field SGTXT can also be changed. An example shows how an external application can change the data from the GOITEM (item data in MIGO) structure.
On the tabstrip control for the header information, you can enter an additional number. This is saved in table MIGO_BADI_EXAMP2.
Further notes
Documentation for BAdI methods:
Initialization and registration of external detail screens:
INIT
PBO of detail screen
PBO_DETAIL
PAI of detail screen
PAI_DETAIL
Insert / change line (GOITEM)
LINE_MODIFY
Delete line (GOITEM)
LINE_DELETE
MIGO reset (delete all internal data)
RESET
Post a goods movement
POST_DOCUMENT
Check item data for goods movement
CHECK_ITEM
Mode of transaction MIGO (action, reference document, etc.)
MODE_SET
Status information and header data
STATUS_AND_HEADER
Save held data
HOLD_DATA_SAVE
Load held data
HOLD_DATA_LOAD
Delete held data
HOLD_DATA_DELETE
PBO of header screen
PBO_HEADER
PAI of header screen
PAI_HEADER
Check item data for goods movement
CHECK_HEADER
You can also call the documentation on the BAdI method via the menu, by carrying out the following steps:
1. Choose the tab page Interface.
2. Double-click on the relevant method.
3. Click on the right mouse button and choose Component documentation.
Hope this will help.
Please reward suitable points.
Regards
- Atul -
MB_DOCUMENT_BADI Not Working after Transport
Hi Experts
I have created an implementation of the MB_DOCUMENT_BADI in our ECC6 system to perform some processing as part of the goods issue process. The code has been unit tested and works as required. I have transported the development to our QA system but despite the implementation showing as active the code is not executed.
Having put a break point on the exit handler class this BADI does not get called in our test system. Has anyone resolved this or a similar issue before? How can I identify why the badi is not being called?
I'm not sure if this is an ABAP / transport issue or an MM configuration issue, but any help would ge gratefully accepted as I need to get this working and into our live system as a matter of urgency.
Thanks
AndrewHi Shiva
I have already got a breakpoint at this point and it does not hit this. I have added a breakpoint in the method of the earlier implementation and this is not being hit either.
I now need to identify if this is not being hit as a result of my changes, or whether this implementation was not working before my transport, e.g. after our system upgrade that was completed last year.
Kind regards
Andrew -
MB_DOCUMENT_BADI badi is not poping up the error message
hi friend,
i m using the badi MB_DOCUMENT_BADI for MIGO transaction code to check batch condition for that i m using the method MB_DOCUMENT_BEFORE_UPDATE. in this method i have given the condition like
if wa_XMSEG-charg <> wa_mseg-charg.
message 'Batch is different' type 'I'.
LEAVE PROGRAM.
endif.
now my problem is when this condition is true its going to "message 'Batch is different' type 'I'" this statment but it is not poping up
the message, after this it is directly going to the "LEAVE PROGRAM" and comming out of transaction. i want to pop up this message first and then it shoul come out of the transaction.
pl suggest me some thing to get out of this problem.
regards,
vicky.HI ,
Use the following piece of code for message...
if wa_XMSEG-charg wa_mseg-charg.
message I368(00) with 'Batch is different'.
LEAVE PROGRAM.
endif.
Hope this helps.
Regards,
Rohan. -
Hi Experts,
I need to populate around 10 standard SAP fields and 8 custom fields on MSEG(material document item table) record, WHILE the material document is creating or CONFIRMING the delivery or SHIPEMENT confirmation. In this process I found an a BADI (MB_DOCUMENT_BADI), well, this BADI does not having CHANGING parameters of MSEG.....pls. let me know any other user-exit ot BADI which serves my requirement?
Actually, I tried to do it by suing field-symbols (below code) in this BADI, but still my values are not reflecting!
FIELD-SYMBOLS: <SGTXT> TYPE any,
<SGTXT_1> TYPE any.
ASSIGN '(SAPMM07M)MSEG-SGTXT' TO <SGTXT>.
CHECK SY-SUBRC = 0.
assign (<SGTXT>) to <SGTXT_1>.
CHECK SY-SUBRC = 0.
<SGTXT_1> = 'MY_TEST'.
assign (<SGTXT_1>) to <SGTXT>.
endmethod.
Thank youI found that this BADI itself is migrating.
Thank you -
Problem with badi MB_DOCUMENT_BADI
Hi experts
i have a problem with the badi, MB_DOCUMENT_BADI this is i am using for MIGO transaction
my requirement is i need to call MR22 transaction in this badi but as this badi is calling in up date task i cann't use the call transaction statement and there is no BAPI available for MR22 transaction so could you please tell me is there any any way to process the session automatically after creating the session for MR22 transaction.
it would be great help for me
thanks in advanceLets the FM created is Z_Call_transaction_data. ( Make this FM as RFC enabled by selecting radiobutton Remote- Enabled Module in Attributes of the FM)
Call this FM in ur BADiI Method as :
Call function 'Z_Call_transaction_data.' starting new task 'TASK1'.
Import ...
Export...
You can ginve any name to this task.
If you want to debug it , execute ur code and when control reaches to FM , press F5 a new session will be opened .
Starting new task starts the code in new LUW. -
MB_DOCUMENT_BADI (MB_DOCUMENT_BEFORE_UPDATE)
Hi,
I implemented the BADI MB_DOCUMENT_BADI - Method MB_DOCUMENT_BEFORE_UPDATE. Inside the method I called a custom Function Module which calls a BAPI (BAPI_BATCH_CHANGE). However, it was reported that users sometimes encounter an update termination when using MIGO.When I opened an OSS message, they told me that the BADI implementation caused it.
My question is, should the FM (which contains the call to the BAPI) be called in BACKGROUND TASK AS SEPARATE UNIT ? If it is going to be called in this mode, do I need to also add an explicit BAPI_COMMIT after the BAPI_BATCH_CHANGE is called ? In the current version of the method, the FM is called as a normal function module.
Thanks.Hi,
this BADI is really weird. You have to be really careful what you put in it. There is even OSS note related to this problem - Note 1284654. I briefly checked BAPI BAPI_BATCH_CHANGE and I found the following code
* End of transaction - IDOC-creation or directly COMMIT WORK
IF sy-subrc IS INITIAL.
CALL FUNCTION 'TRANSACTION_END'
EXPORTING
transaction_id = f_transaction_id
EXCEPTIONS
OTHERS = 1.
So it calls COMMIT WORK automatically. Therefore you don't have to call BAPI_COMMIT.
Cheers -
Call BAPI in BADI 'MB_DOCUMENT_BADI'
Hi all,
How can i call a BAPI in MB_DOCUMENT_BADI~MB_DOCUMENT_BEFORE_UPDATE ? I wrote code below but got "GOODSMVT_CODE" is the correct type, its length is incorrect." error.
DATA:
goodsmvt_header TYPE TABLE OF bapi2017_gm_head_01,
goodsmvt_code TYPE TABLE OF bapi2017_gm_code,
goodsmvt_headret TYPE TABLE OF bapi2017_gm_head_ret,
matdocumentyear TYPE bapi2017_gm_head_ret-doc_year,
goodsmvt_item TYPE TABLE OF bapi2017_gm_item_create, " OCCURS 0 WITH HEADER LINE,
goodsmvt_serialnumber TYPE TABLE OF bapi2017_gm_serialnumber. " OCCURS 0.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = goodsmvt_header
goodsmvt_code = goodsmvt_code
testrun = ''
IMPORTING
goodsmvt_headret = goodsmvt_headret
materialdocument = materialdocument
matdocumentyear = matdocumentyear
TABLES
goodsmvt_item = goodsmvt_item
return = messages.
Best regards,
MunurHi,
I think field GOODSMVT_CODE is not table type, you mension it type table of 'BAPI2017_GM_CODE'.
Thanks,
Anmol. -
In the MIGO update task, you can do custom stuff using the exit "exit_saplmbmb_001" (FG XMBC, Include ZXMBCO01) or the BAdI "MB_DOCUMENT_BADI".
Does anyone know "right-off" the MIRO equivalent of this exit and/or the MIRO equivalent of this BAdI?Hi,
Please find below the BADI's for MIRO Transaction,
BAdI MRM_HEADER_DEFAULT to prepopulate various header fields
BAdI MRM_PAYMENT_TERMS to set terms of payment
BAdI MRM_UDC_DISTRIBUTE to distribute unplanned delivery costs. You can distribute unplanned delivery costs according to your own rules, for example, under...
BAdI MRM_TRANSACT_DEFAULT to prepopulate various transaction fields
BAdI MRM_WT_SPLIT_UPDATE to change the withholding tax data and the data during a vendor split
BAdI MRM_TOLERANCE_GROUP to set vendor-specific tolerance groups
Other BAdIs:
BAdI MRM_RELEASE_CHECK for additional checks before invoices are released, in other words, you can restrict the list of invoices to be released by defining your own criteria.
BAdI MRM_MRIS_HDAT_MODIFY to change document header data in invoicing plans
BAdI MRM_MRKO_HDAT_MODIFY to change document header data in consignment settlement
Thanks,
Krishna -
Using MB_DOCUMENT_BADI on MB31
Hi,
I'm trying to use the BADI MB_DOCUMENT_BADI on MB31 (when saving document) to insert notification number on MKPF-XABLN (GR/GI Slip No).
I created an Implementation of the BADI, the class and a method IF_EX_MB_DOCUMENT_BADI~MB_DOCUMENT_UPDATE where I've coded something where there's a breakpoint to see if the method gets called. Everything's activated and Runtime Behavior: The implementation will be called
Problem is, the breakpoint is never reached and therefore the method never gets called.
What am I doing wrong?
BADI INFO:
Attributes
Implementation name ZMB_DOCUMENT_BADI
Definition name MB_DOCUMENT_BADI
BAdI migrates to enhancement spot MB_GOODSMOVEMENT
Impl. migrates to enhancement ZMB_DOCUMENT_BADI
Interface:
Interface name IF_EX_MB_DOCUMENT_BADI
Name of implementing class: ZCL_IM_MB_DOCUMENT_BADI
Thank you!Hi Amit,
Thanks for your response, I have called the function module inside the BADI, and in the function module I have used the Call scree statement to trigger the popup, the call screen statment calls the program there I had written the logic for updating the custom table,
I tried initializing the tables that are returned from BADI, that didnt help as the internal tables cant be modified, the documentation clearly says that changing the global structures returned from BADI are not possible, I will try using ROLL BACK and check,
Rgds, -
Usage of MB_DOCUMENT_BADI
hi,
I'm working in SD module in that my requirement is in VA01 transaction once we Delivered the Sales details We will get Post Goods Issue functionality. Once if I press PGI it will generate Material Document at the same time i need to generate Billing document also (VF01 functionality). For that i got one BADI "MB_DOCUMENT_BADI".
what the use of these "MB_DOCUMENT_BADI".
So my question is how we will trigger this VF01 functionality though the BADI I "MB_DOCUMENT_BADI".
Other wise any other options are available for triggering the functionality VF01 when i press PG?I.
regards
babThis BADI is for goods movement only. (Means, This can be used while doing PGI)
But you can not directly triggering VF01 to create a billing document. If the PGI is done successfully, then only you can do VF01.
What is the business use of triggering VF01 when doing PGI?
Instead you can shcedule a job to run the creation of billing documents.VF06. -
BADI MB_DOCUMENT_BADI dump error
Hi all,
am using BADI : MB_DOCUMENT_BADI,method MB_DOCUMENT_BEFORE_UPDATE,to have checks in MB1A(Goods Issue transaction).I have written a code to check some values,after checking and raising an error message if I press enter the following dump error is coming:
Error analysis
Short text of error message:
Internal error: Multiple call of update function module
Long text of error message:
Diagnosis
In the FORM routine Buchen_Ausfuehren (program SAPMM07M), an error
message was issued by a Business Add-In (BAdI) or function module.
This is not permitted, because it could lead to data
inconsistencies. For this reason, the update of the material
document was also terminated with a termination message (dump).
Note that this message (M7 372) is not the responsible error
message.
System Response
Procedure
Contact your system administrator.
Procedure for System Administration
If there is an active implementation of the Business Add-In
MB_DOCUMENT_BADI, check that no error message is issued in the
MB_DOCUMENT_BEFORE_UPDATE method.
Technical information about the message:
Message class....... "M7"
Number.............. 372
Variable 1.......... " "
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
Hope am clear in my questian,
Thanks & Regards,
Rock.Hi,
This BADI is called in update task.
So as a result when you call your error message, SAP is retuning it as message type 'X" and an update termination occurs.
I was facing a similar problem becuase i was trying to update measurment doc via this badi.
Incase the measuring document was locked by some user my FM used to throw an error message and that would lead to a message type 'X' in this badi.
So if you want to do some validations only; please use the following BADI.
MB_MIGO_ITEM_BADI in the method ITEM_MODIFY.
Regards,
Ankur Parab -
Help to use BAPI_GOODSMVT_CREATE in BAdI MB_DOCUMENT_BADI
Hi frnds ,
I want use BAPI_GOODSMVT_CREATE in BAdI MB_DOCUMENT_BADI,
can any one have any code related this ?
i have also writeen my code but it is giving error that itab is not an inatertable occurs n misiing , but when i m creting internal table with occurs staement it is not suppoertd by OO concept.
Dont worry about points.
Mahesh.Hello
Use the syntax
data : itab type table of <xmseg> with header line.
regards
Maybe you are looking for
-
We have a Java7 web app, which generate PDF report by calling Crystal Server 2013 SP4. The app is being deployed on many different servers. We sometimes got the error below when generating report: com.crystaldecisions.sdk.occa.report.lib.ReportSDKExc
-
Problem in installing SAP NetWeaver 7.0 Java sneak preview on windows xp sp
Hi when I am trying to install SAP NetWeaver 7.0 Java sneak preview on windows xp sp2 I am getting the following problem 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Automatic LiveUpdate scheduler does not exist' after giving the jce file pa
-
Is close() blocking in nonblocking SocketChannel?
Hi I'm writing a socket server based on the NIO package. I saw in several NIO code samples that the SocketChannel close() method is invoked inside the NIO select loop, which should only contain nonblocking calls. However, I couldn't find any document
-
UWL - WF TASKS TS20000189 Change Trip - Dynamic parameters for WD ABAP Appl
Hi I am struggeling to manage to solve a WF task in the UWL The task is TS20000189 for changing a trip which has been returned for corrections from a manager. When previewing th iView for "My trips" I am able to get the overview of all my trips, and
-
Rman writing to two archiving destination
Hi all, Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product Windows XP I have implemented a rman backup, but I changed the archiving, data and autobackup destinations: ALTER SYSTEM SET log_archive_dest='C:\oraclexe\Backup\archivelog\arch