MM User Exit : MB_CF001
Can anyone please tell me when do this user exit break.
The enhancement MB_CF001 includes a function module that is called up immediately before the COMMIT WORK when a goods movement is posted.
All the material document data is passed on to this function module from the following tables:
o MKPF (Material document header)
o MSEG (Material document items)
o VM07M (Update data)
This data can be passed on to other programs.
Note
The enhancement does not write any data to the material document, that is, it is not possible to change material document data before the update posting takes place.
If the enhancement MB_CF001 (component: Function module EXIT_SAPLMBMB_001with Include ZXMBCU01) is implemented incorrectly, an inconsistency may occur between documents and stocks as well as between material documents and accounting documents. Such inconsistencies can be caused by the following elements in the user exit, for example:
o COMMIT WORK
o Remote function call (CALL FUNCTION .. DESTINATION)
o Separate updates on the document or stock tables (for example, an
update on table MBEW, MARD, MSEG)
o Unlocking data (for example, through DEQUEUE_ALL)
The enhancement MB_CF001 is called in the update function module MB_POST_DOCUMENT. If a COMMIT WORK or a Remote Function Call is set in the enhancement, a complete ROLL BACK is not possible in the case of an update termination, since data has already been written until the COMMIT
or the remote function call in the database. Consequently, an asynchronous status (for example, a material document without accounting document), which can only be repaired with considerable effort, may be the result.
The enhancement MB_CF001 is not suited for customer-specific updates on the stock tables, because such updates can destroy the standard inventory update if they are not programmed incrementally (see Note 6899), or if they do not take the material blocks into account.
Unlocking data (for example, using DEQUEUE_ALL) is also very important, as the data to be updated is no longer protected against external updates, and inconsistencies can result from parallel updates.
Before you activate an enhancement, check thoroughly that the user exit does not contain high priority source code positions.
If data inconsistencies have already occurred in your system, inconsistencies that can be traced back to the user exits, remove the high priority source code positions immediately before they cause further
inconsistencies.
Similar Messages
-
USER EXIT MB_CF001 NOT GETTING TRIGGERED
Hi All,
I am using EXIT_SAPLMBMB_001(MB_CF001)
I want it to be triggered after the document has been saved but its not trigeering..
How can I find out the reason???
Regards
ShilpaHi,
have you checked documentation for that enhancement? That function module is not called after goods movement creation.
The user exit MB_CF001 includes a function module that is called up
immediately before the COMMIT WORK when a goods movement is posted.
How do you test that FM? Some function modules from user exits are called in UPDATE TASK so they just ignore break points. In this case you can use the following trick. You need to enter an infinite loop into your user exit. Then you can connect to this program via transaction SM50 (Program/Session -> Program -> Debugging).
Cheers -
User exit MB_CF001 in MIGO
Folks,
I am using the user exit MB_CF001 to get the data from XMSEG table and send it to an external system. I was asked to call an RFC function module in this user exit to send the XMSEG data to an external system but the user exit documentation clearly says not to use RFC function call in this user exit.
I also heard that I can do this by using the idocs that get posted after MIGO is done. Could anyone give me step by step procedure how to do this as I am new to IDOCS.
Points will be rewarded for best answers.
Thanks,
AlokDear Alok,
Below is a documentation about IDOCs. Hope it will be useful to you.
Data Creation in Idoc
IDocs are text encoded documents with a rigid structure that are used to exchange data between R/3 and a foreign system. Instead of calling a program in the destination system directly, the data is first packed into an IDoc and then sent to the receiving system, where it is analyzed and properly processed. Therefore an IDoc data exchange is always an
asynchronous process. The significant difference between simple RFC-calls and IDoc data exchange is the fact, that every action performed on IDocs are protocolled by R/3 and IDocs can be reprocessed if an error occurred in one of the message steps.
While IDocs have to be understood as a data exchange protocol, EDI and ALE are typical use cases for IDocs. R/3 uses IDocs for both EDI and ALE to deliver data to the receiving system. ALE is basically the scheduling mechanism that defines when and between which partners and what kind of data will be exchanged on a regular or event triggered basis. Such a set-up is called an ALE-scenario.
IDoc is a intermediate document to exchange data between two SAP Systems.
*IDocs are structured ASCII files (or a virtual equivalent).
*Electronic Interchange Document
*They are the file format used by SAP R/3 to exchange data with foreign systems.
*Data Is transmitted in ASCII format, i.e. human readable form
*IDocs exchange messages
*IDocs are used like classical interface files
IDOC types are templates for specific message types depending on what is the business document, you want to exchange.
WE30 - you can create a IDOC type.
An IDOC with data, will have to be triggered by the application that is trying to send out the data.
FOr testing you can use WE19.
For more information in details on the same along with the examples can be viewed on:
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm#_Toc8400404
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a6620507d11d18ee90000e8366fc2/frameset.htm
http://www.sappoint.com/presentation.html
http://www.allsaplinks.com/idoc_search.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://www.erpgenie.com/sapedi/idoc_abap.htm
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30 )
Create Message Type ( WE81 )
Assign Idoc Type to Message Type ( WE82 )
Creating a Segment
Go to transaction code WE31
Enter the name for your segment type and click on the Create icon
Type the short text
Enter the variable names and data elements
Save it and go back
Go to Edit -> Set Release
Follow steps to create more number of segments
Create IDOC Type
Go to transaction code WE30
Enter the Object Name, select Basic type and click Create icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDOC Name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press Enter
The system transfers the name of the segment type to the IDOC editor.
Follow these steps to add more number of segments to Parent or as Parent-child relation
Save it and go back
Go to Edit -> Set release
Create Message Type
Go to transaction code WE81
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter
Click New Entries to create new Message Type
Fill details
Save it and go back
Assign Message Type to IDoc Type
Go to transaction code WE82
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back
Check below link. It will give the step by step procedure for IDOC creation.
http://www.supinfo-projects.com/cn/2005/idocs_en/2/
ALE/ IDOC
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.docs
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.sappoint.com/abap/ale.pdf
http://www.sappoint.com/abap/ale2.pdf
http://www.sapgenie.com/sapedi/idoc_abap.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://www.allsaplinks.com/idoc_sample.html
http://http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
2.IDOCs are independent of the sending and receiving systems.
3.IDOCs are independent of the direction of data exchange.
The two available process for IDOCs are
Outbound Process
Inbound Process
AND There are basically two types of IDOCs.
Basic IDOCs
Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
Extended IDOCs
Extending the functionality by adding more segments to existing Basic IDOCs.
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30)
Create Message Type ( WE81)
Assign Idoc Type to Message Type ( WE82)
Important links
http://www.allsaplinks.com/idoc_sample.html
http://www.sapgenie.com/sapedi/idoc_abap.htm
www.sappoint.com
--here u can find the ppts and basic seetings for ALE
http://sappoint.com/presentation.html
www.sapgenie.com
http://www.sapgenie.com/ale/index.htm
WE30 - you can create a IDOC type.
An IDOC with data, will have to be triggered by the application that is trying to send out the data.
>SAP ALE & IDOC
Steps to configuration(Basis)
>>1. Create Logical System (LS) for each applicable ALE-enabled client
>>2. Link client to Logical System on the respective servers
>>3. Create background user, to be used by ALE(with authorizaton for ALE postings)
>>4. Create RFC Destinations(SM59)
>>5. Ports in Idoc processing(WE21)
>>6. Generate partner profiles for sending system
The functional configuration(Tcode: SALE)
Create a Customer Distribution Model (CDM);
Add appropriate message types and filters to the CDM;
Generate outbound partner profiles;
Distribute the CDM to the receiving systems; and
Generate inbound partner profiles on each of the clients.
>Steps to customize a new IDoc
>>1. Define IDoc Segment (WE31)
>>2. Convert Segments into an IDoc type (WE30)
>>3. Create a Message Type (WE81)
>>4. Create valid Combination of Message & IDoc type(WE82)
>>5. Define Processing Code(WE41 for OUT / WE42 for IN)
>>6. Define Partner Profile(WE20)
Important Transaction Codes:
SALE - IMG ALE Configuration root
WE20 - Manually maintain partner profiles
BD64 - Maintain customer distribution model
BD71 - Distribute customer distribution model
SM59 - Create RFC Destinations
BDM5 - Consistency check (Transaction scenarios)
BD82 - Generate Partner Profiles
BD61 - Activate Change Pointers - Globally
BD50 - Activate Change Pointer for Msg Type
BD52 - Activate change pointer per change.doc object
BD59 - Allocation object type -> IDOC type
BD56 - Maintain IDOC Segment Filters
BD53 - Reduction of Message Types
BD21 - Select Change Pointer
BD87 - Status Monitor for ALE Messages
BDM5 - Consistency check (Transaction scenarios)
BD62 - Define rules
BD79 - Maintain rules
BD55 - Defining settings for IDoc conversion
WEDI - ALE IDoc Administration
WE21 - Ports in Idoc processing
WE60 - IDoc documentation
SARA - IDoc archiving (Object type IDOC)
WE47 - IDoc status maintenance
WE07 - IDoc statistics
BALE - ALE Distribution Administration
WE05 - IDoc overview
BD87 - Inbound IDoc reprocessing
BD88 - Outbound IDoc reprocessing
BDM2 - IDoc Trace
BDM7 - IDoc Audit Analysis
BD21 - Create IDocs from change pointers
SM58 - Schedule RFC Failures
Basic config for Distributed data:
BD64: Maintain a Distributed Model
BD82: Generate Partner Profile
BD64: Distribute the distribution Model
Programs
RBDMIDOC Creating IDoc Type from Change Pointers
RSEOUT00 Process all selected IDocs (EDI)
RBDAPP01 - Inbound Processing of IDocs Ready for Transfer
RSARFCEX - Execute Calls Not Yet Executed
RBDMOIND - Status Conversion with Successful tRFC Execution
RBDMANIN - Start error handling for non-posted IDocs
RBDSTATE - Send Audit Confirmations
FOr testing you can use WE19.
Best Regards,
Rajesh.
Please reward points if found helpful. -
hola, necesito un user exit para desplegar un mensaje cuando se hace un traslado por la transacción MB1B y no el material no tiene costo, estoy tratando de usar la ampliación MB_CF001 y no me perimite desplegar mensajes via abap
gracias y saludos
DayanaAssuming that you are speaking Portuguese, please post your queries here: /community [original link is broken]
For Spanish: /community [original link is broken]
pk -
Need a badi or user exit to update numbers at level of Goods Receipt level
Hi I need to update serial number based on combination of plant, company code and fiscal year while generating a Goods Receipt by using MIGO transaction code.
Step1) once run the MIGO transaction, here enter values of Purchase Order, Quantity, and delivery note and check the item ok check box for goods receipt.
Step2) Then check for any warnings and errors by clicking the check button/tabular
Step3) Finally post the goods receipt for the purchase order by clicking Post button/tabular.
Result:
Then system will provides the Material of Document number for the goods receipt of purchase order. That number like 5000000342.
Here client wants to put his number like V500000001.for one combination of plant, company code and fiscal year.
Example
Z TABLE AS LIKE BELOW COMBINATION
Plant company code first no end no current no FISCAL YR
7800/7801 2000 V500000001 V599999999
7802/7803 3000 F500000001 F599999999
7804 4000 D500000001 D599999999
Whenever end user generates a GR then System should display one of above number instead of systems generate value.
I have used to fix the issue badi> mb_badi_migo document_badi_update and user exit-> mb_cf001, mbcf0002 but not found the solution.
Please provide me needful information.
Thanks,
RajHi
<b>Here is the sample code...</b>
method if_ex_mb_migo_badi~post_document .
data: ls_migo_badi_example type migo_badi_exampl,
lt_migo_badi_example type table of migo_badi_exampl,
ls_extdata type migo_badi_example_screen_field,
ls_xmseg type mseg.
field-symbols: <gt_extdata> type migo_badi_example_screen_field.
* Transaction MIGO will now post a material document.
* Any errors here MUST be issued as A-message (better: X-message)
* Copy data from material document into internal table
loop at gt_extdata into ls_extdata.
if g_cancel is initial.
read table it_mseg into ls_xmseg
with key line_id = ls_extdata-line_id.
else.
read table it_mseg into ls_xmseg
with key smbln = ls_extdata-mblnr
smblp = ls_extdata-zeile
sjahr = ls_extdata-mjahr.
endif.
if sy-subrc is initial.
move-corresponding ls_extdata to ls_migo_badi_example.
move-corresponding ls_xmseg to ls_migo_badi_example.
append ls_migo_badi_example to lt_migo_badi_example.
endif.
endloop.
* The data from external detail screen can be saved now:
check gt_extdata is not initial.
call function 'MIGO_BADI_EXAMPLE_UPATE_DATA' in update task
tables
it_migo_badi_example = lt_migo_badi_example.
* The data from external header screen can be saved now:
move-corresponding is_mkpf to gs_exdata_header.
call function 'MIGO_BADI_EXAMPLE_UPDATE_HEAD' in update task
exporting
is_migo_badi_header_fields = gs_exdata_header.
endmethod. "IF_EX_MB_MIGO_BADI~POST_DOCUMENT
Hope this will help.
Please reward suitable points.
Regards
- Atul -
Hello Experts
i am having a requirement where in i will have to perform certain validations before posting PO and material document (MIGO). If these validations fail, PO or Material document should not be posted.
i managed to find certain BADI and user-exits (MB_CF001 and MB_DOCUMENT_BADI) typically for MIGO but when tested they use to get triggered once these doucment numbers are generated.
what i am looking at is cancel the process by giving the hard-error.
thanks in advance.
regards
rajeevHi,
<b>User exits for MIGO:</b>
MBCF0002 Customer function exit: Segment text in material doc. item
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0011 Read From RESB and RKPF For Print List in MB26
MBCFC003 Maintenance of batch master data for goods movements
MBCFC004 Maintenance of batch specifications for goods movements
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc.
<b>User eits for PO:</b>
These are the User exit for CO01 ( Create PO)
CCOWB001 Customer exit for modifying menu entries
COIB0001 Customer Exit for As-Built Assignment Tool
COZF0001 Change purchase req. for externally processed operation
COZF0002 Change purchase req. for externally procured component
PPCO0001 Application development: PP orders
PPCO0002 Check exit for setting delete mark / deletion indicator
PPCO0003 Check exit for order changes from sales order
PPCO0004 Sort and processing exit: Mass processing orders
PPCO0005 Storage location/backflushing when order is created
PPCO0006 Enhancement to specify defaults for fields in order header
PPCO0007 Exit when saving production order
PPCO0008 Enhancement in the adding and changing of components
PPCO0009 Enhancement in goods movements for prod. process order
PPCO0010 Enhancement in make-to-order production - Unit of measure
PPCO0012 Production Order: Display/Change Order Header Data
PPCO0013 Change priorities of selection crit. for batch determination
PPCO0015 Additional check for document links from BOMs
PPCO0016 Additional check for document links from master data
PPCO0017 Additional check for online processing of document links
PPCO0018 Check for changes to production order header
PPCO0019 Checks for changes to order operations
PPCO0021 Release Control for Automatic Batch Determination
PPCO0022 Determination of Production Memo
PPCO0023 Checks Changes to Order Components
STATTEXT Modification exit for formatting
I am giving you the list of all user exits available for ME21N:
AMPL0001 User subscreen for additional data on AMPL
LMEDR001 Enhancements to print program
LMELA002 Adopt batch no. from shipping notification when posting a GR
LMELA010 Inbound shipping notification: Transfer item data from IDOC
LMEQR001 User exit for source determination
LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt
LWSUS001 Customer-Specific Source Determination in Retail
M06B0001 Role determination for purchase requisition release
M06B0002 Changes to comm. structure for purchase requisition release
M06B0003 Number range and document number
M06B0004 Number range and document number
M06B0005 Changes to comm. structure for overall release of requisn.
M06E0004 Changes to communication structure for release purch. doc.
M06E0005 Role determination for release of purchasing documents
ME590001 Grouping of requsitions for PO split in ME59
MEETA001 Define schedule line type (backlog, immed. req., preview)
MEFLD004 Determine earliest delivery date f. check w. GR (only PO)
MELAB001 Gen. forecast delivery schedules: Transfer schedule implem.
MEQUERY1 Enhancement to Document Overview ME21N/ME51N
MEVME001 WE default quantity calc. and over/ underdelivery tolerance
MM06E001 User exits for EDI inbound and outbound purchasing documents
MM06E003 Number range and document number
MM06E004 Control import data screens in purchase order
MM06E005 Customer fields in purchasing document
MM06E007 Change document for requisitions upon conversion into PO
MM06E008 Monitoring of contr. target value in case of release orders
MM06E009 Relevant texts for "Texts exist" indicator
MM06E010 Field selection for vendor address
MMAL0001 ALE source list distribution: Outbound processing
MMAL0002 ALE source list distribution: Inbound processing
MMAL0003 ALE purcasing info record distribution: Outbound processing
MMAL0004 ALE purchasing info record distribution: Inbound processing
MMDA0001 Default delivery addresses
MMFAB001 User exit for generation of release order
MRFLB001 Control Items for Contract Release Order
For your purpose you can probably try MM06E005. Or you can also try BADI ME_PROCESS_PO_CUST.
You can also check this BADI available for PO:
EXTENSION_US_TAXES Extended Tax Calculation with Additional Data
ME_ACTV_CANCEL_PO BAdI for Activating the Cancel Function at Header Level
ME_BAPI_PR_CHANGE_01 BAdI: Enjoy BAPIs for Purchase Requisitions (Method Chan
ME_BAPI_PR_CHANGE_02 BAdI: Enjoy BAPIs for Purchase Requisitions (Method Chan
ME_BAPI_PR_CREATE_01 BAdI: Enjoy BAPIs for Purchase Requisitions
ME_BAPI_PR_CREATE_02 BAdI: Enjoy BAPIs for Purchase Requisitions (Method Crea
ME_BSART_DET Change document type for automatically generated POs
ME_CCP_BESWK_AUTH_CH BAdI for authorization checks for procuring plant
ME_CCP_DEL_DURATION Calc. of Delivery Duration in CCP Process (Not in Standa
ME_CHANGE_CHARACTER Customer-Specific Characteristics for Product Allocation
ME_CHECK_ALL_ITEMS Run Through Items Again in the Event of Changes in EKKO
ME_CHECK_SOURCES Additional Checks in Source Determination/Checking
ME_CIN_LEINRF2R BADI for CIN India - Delivery charges
ME_CIN_LEINRF2V BADI for LEINRF03 excise_invoice_details
ME_CIN_MM06EFKO Copy PO data for use by Country version India
ME_CIP_ALLOW_CHANGE Configuration in Purchasing: Changeability Control
ME_COMMITMENT_STO_CH BadI for checking if commitments for STOs are active
ME_COMMTMNT_PO_REL_C Check for Commitment-Relevance of Purchase Orders
ME_COMMTMNT_REQ_RE_C Check of Commitment Relevance of Purchase Requisitions
ME_DEFINE_CALCTYPE Control of Pricing Type: Additional Fields
ME_GUI_PO_CUST Customer's Own Screens in Enjoy Purchase Order
ME_HOLD_PO Hold Enjoy Purchase Orders: Activation/Deactivation
ME_PO_SC_SRV BAdI: Service Tab Page for Subcontracting
ME_PROCESS_COMP Processing of Component Default Data at Time of GR: Cust
ME_PROCESS_PO_CUST Enhancements for Processing Enjoy Purchase Order: Custom
ME_PROCESS_REQ_CUST Enhancements for Processing Enjoy PReqs: Customer
ME_PURCHDOC_POSTED Purchasing Document Posted
ME_RELEASE_CREATE BAdI: Release Creation for Sched. Agreemnts with Rel. Do
ME_REQ_OI_EXT Commitment Update in the Case of External Requisitions
ME_REQ_POSTED Purchase Requisition Posted
ME_TAX_FROM_ADDRESS Tax jurisdiction code taken from address
ME_TRIGGER_ATP Triggers New ATP for Changes in EKKO, EKPO, EKPV
MM_EDI_DESADV_IN Supplementation of Delivery Interface from Purchase Orde
SMOD_MRFLB001 Control Items for Contract Release Order
Transaction codes for BADI are:
SE18 - Business Add-ins(BADIs): Definition transaction
SE19 - Business Add-ins(BADIs): Implementation transaction
SE24 - Class Builder
Link for all user exits in SAP:
http://www.easymarketplace.de/userexit.php
Pls reward helpful points.
Regards,
Ameet -
Hi,
I have added code in the user exit MB_CF001 for the transcation code MIGO.
I put a break-point in it (hard coded),
I have activated in SMOD and CMOD also.
But when i run MIGO and POST (click on post button on application tool bar) it is not posting, while clicking on SAVE also it is not stopping.
Please tell me when the user exit will be encountered.
regards,
Prabhu.
Points assured.sorry.
regrads,
Prabhu -
User Exit or BADI while posting GRs.
HI all,
I am looking for a User Exit or BADI while posting Goods Receipts for Purchase Orders.
I need to change the <b>POSTING DATE</b> on the receipt for certain document types.
i found a user exit : MB_CF001, but this is not allowing me to change the posting date on the material document.
Thanks for your help in advance.Hi Ravi,
This is ULitity program which takes Tcode or program name as a input and gives the BADI existing in the program. Please Allocate me the point if it is usefully to you
REPORT ZBADI_CHECK .
TABLES : TSTC,
TADIR,
MODSAPT,
MODACT,
TRDIR,
TFDIR,
ENLFDIR,
SXS_ATTRT ,
TSTCT.
DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
DATA : FIELD1(30).
DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
PARAMETERS : P_TCODE LIKE TSTC-TCODE,
P_PGMNA LIKE TSTC-PGMNA .
DATA wa_tadir type tadir.
START-OF-SELECTION.
IF NOT P_TCODE IS INITIAL.
SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
ELSEIF NOT P_PGMNA IS INITIAL.
TSTC-PGMNA = P_PGMNA.
ENDIF.
IF SY-SUBRC EQ 0.
SELECT SINGLE * FROM TADIR
WHERE PGMID = 'R3TR'
AND OBJECT = 'PROG'
AND OBJ_NAME = TSTC-PGMNA.
MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
IF SY-SUBRC NE 0.
SELECT SINGLE * FROM TRDIR
WHERE NAME = TSTC-PGMNA.
IF TRDIR-SUBC EQ 'F'.
SELECT SINGLE * FROM TFDIR
WHERE PNAME = TSTC-PGMNA.
SELECT SINGLE * FROM ENLFDIR
WHERE FUNCNAME = TFDIR-FUNCNAME.
SELECT SINGLE * FROM TADIR
WHERE PGMID = 'R3TR'
AND OBJECT = 'FUGR'
AND OBJ_NAME EQ ENLFDIR-AREA.
MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
ENDIF.
ENDIF.
SELECT * FROM TADIR INTO TABLE JTAB
WHERE PGMID = 'R3TR'
AND OBJECT in ('SMOD', 'SXSD')
AND DEVCLASS = V_DEVCLASS.
SELECT SINGLE * FROM TSTCT
WHERE SPRSL EQ SY-LANGU
AND TCODE EQ P_TCODE.
FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
WRITE:/(19) 'Transaction Code - ',
20(20) P_TCODE,
45(50) TSTCT-TTEXT.
SKIP.
IF NOT JTAB[] IS INITIAL.
WRITE:/(105) SY-ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
Sorting the internal Table
sort jtab by OBJECT.
data : wf_txt(60) type c,
wf_smod type i ,
wf_badi type i ,
wf_object2(30) type C.
clear : wf_smod, wf_badi , wf_object2.
Get the total SMOD.
LOOP AT JTAB into wa_tadir.
at first.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 'Enhancement/ Business Add-in',
41 SY-VLINE ,
42 'Description',
105 SY-VLINE.
WRITE:/(105) SY-ULINE.
endat.
clear wf_txt.
at new object.
if wa_tadir-object = 'SMOD'.
wf_object2 = 'Enhancement' .
elseif wa_tadir-object = 'SXSD'.
wf_object2 = ' Business Add-in'.
endif.
FORMAT COLOR COL_GROUP INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 wf_object2,
105 SY-VLINE.
endat.
case wa_tadir-object.
when 'SMOD'.
wf_smod = wf_smod + 1.
SELECT SINGLE MODTEXT into wf_txt
FROM MODSAPT
WHERE SPRSL = SY-LANGU
AND NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
when 'SXSD'.
For BADis
wf_badi = wf_badi + 1 .
select single TEXT into wf_txt
from SXS_ATTRT
where sprsl = sy-langu
and EXIT_NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
endcase.
WRITE:/1 SY-VLINE,
2 wa_tadir-OBJ_NAME hotspot on,
41 SY-VLINE ,
42 wf_txt,
105 SY-VLINE.
AT END OF object.
write : /(105) sy-ULINE.
ENDAT.
ENDLOOP.
WRITE:/(105) SY-ULINE.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No.of Exits:' , wf_smod.
WRITE:/ 'No.of BADis:' , wf_badi.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'No userexits or BADis exist'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'Transaction does not exist'.
ENDIF.
AT LINE-SELECTION.
data : wf_object type tadir-object.
clear wf_object.
GET CURSOR FIELD FIELD1.
CHECK FIELD1(8) EQ 'WA_TADIR'.
read table jtab with key obj_name = sy-lisel+1(20).
move jtab-object to wf_object.
case wf_object.
when 'SMOD'.
SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
when 'SXSD'.
SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
endcase. -
User exit for MIGO Posting Date
Dear all,
My Client want requirement is : Posting date of GRN should be after last posting date of goods issue
i.e. GI 261 1st june
GI Reverse 262 2nd june
again GI 261 28 may ( as 2 posting perod are open )
then user should be able to do GRN on or after 28th may
For this user exit please suggest me any FM or logic
my current logic is allowing to post GRN after 1st june i.e. latest GI date but that is not matching client requirement
Please suggest
Regards,
IshwarHi,
Enhancement for MIGO ,you can try these user exit
MB_CF001--> Customer Function Exit in the Case of Updating a Mat. Doc.
MBCF0002 --> Customer function exit: Segment text in material doc. item
MBCF0005 --> Material document item for goods receipt/issue slip
MBCF0007 -->Customer function exit: Updating a reservation
In BADI,you can refer these
MB_CIN_LMBMBU04--> posting of gr
.In MKPF table having data (posting date of goods issue) BUDAT-field name,tell the conditions as per your requirement to ABAPer,they can implement the enhancement as per your requirement...
I hope,it will help you
<=<< Sharing Knowledge is a way to Innovative >>=>
By,
Yoga -
USER EXIT FOR MIGO_GR ISSUE:
HI
I have case which user want to limit material received of quantity.
i addon one table which structure
WERKS --plant id
MATNR ---material
ALLOW_SIZE -
allow max limit
RECEIVE_SIZE --- have received quantity
ervery time when execute MIGO_GR program, i will add this time received quanitity to table and check RECEIVE_SIZE < ALLOW_SIZE .
otherwise will give a message to user what this action be reject.
so i find a user exit:MB_CF001
and ABAP CODE as follow:
tables:ZMRP_LOT_SIZE,ZMRP_PARAMETER.
data:wa_mseg type mseg.
data:l_subrc type c.
DATA:IT_PARA TYPE ZMRP_PARAMETER OCCURS 0 WITH HEADER LINE.
DATA:IT_ZMRP_LOT_SIZE TYPE ZMRP_LOT_SIZE OCCURS 0 WITH HEADER LINE.
data:wa_zmrp_lot_size type ZMRP_LOT_SIZE.
RANGES:R_WERKS FOR ZMRP_LOT_SIZE-WERKS,
R_MATNR FOR MARA-MATNR,
R_MATKL FOR MARA-MATKL.
data:wa_mara type mara.
data:l_msg(30) type c,
g_msg(100) type c.
break john.
break fms04873.
clear l_subrc .
read table XMSEG INTO wa_mseg with key bwart = '101'.
if sy-subrc <> 0.
read table XMSEG INTO wa_mseg with key bwart = '103'.
if sy-subrc = 0.
l_subrc = '0'.
endif.
else.
l_subrc = '0'.
endif.
check l_subrc = '0'.
***lock mrp prameters table.
CALL FUNCTION 'ENQUEUE_EZ_MRP_PARAMETER'
EXPORTING
MODE_ZMRP_PARAMETER = 'S'
MANDT = SY-MANDT
MRP01 =
MRP02 =
X_MRP01 = ' '
X_MRP02 = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE 'parameter table is lock' TYPE 'E'.
ENDIF.
SELECT * INTO TABLE IT_PARA FROM ZMRP_PARAMETER.
loop at IT_PARA.
IF IT_PARA-MRP01 = '1'.
R_WERKS-SIGN = 'I'.
R_WERKS-OPTION = 'EQ'.
R_WERKS-LOW = IT_PARA-MRP03.
COLLECT R_WERKS.
ENDIF.
IF IT_PARA-MRP01 = '3'.
R_MATNR-SIGN = 'I'.
R_MATNR-OPTION = 'CP'.
R_MATNR-LOW = IT_PARA-MRP03.
COLLECT R_MATNR.
ENDIF.
IF IT_PARA-MRP01 = '4'.
R_MATKL-SIGN = 'I'.
R_MATKL-OPTION = 'CP'.
R_MATKL-LOW = IT_PARA-MRP03.
COLLECT R_MATKL.
ENDIF.
ENDLOOP.
LOOP AT XMSEG INTO WA_MSEG.
IF WA_MSEG-BWART = '101' OR WA_MSEG-BWART = '103'.
IF WA_MSEG-WERKS IN R_WERKS.
IF NOT WA_MSEG-MATNR IN R_MATNR.
SELECT SINGLE * INTO WA_MARA FROM MARA
WHERE MATNR = WA_MSEG-MATNR.
IF NOT WA_MARA-MATKL IN R_MATKL.
read table IT_ZMRP_LOT_SIZE with key werks = wa_mseg-werks
matnr = wa_mseg-matnr.
if sy-subrc = 0.
it_zmrp_lot_size-RECEIVE_SIZE =
it_zmrp_lot_size-RECEIVE_SIZE + wa_mseg-MENGE.
if it_zmrp_lot_size-ALLOW_SIZE <
it_zmrp_lot_size-RECEIVE_SIZE.
perform unlock_data.
perform display_info.
loop at it_zmrp_lot_size into wa_zmrp_lot_size.
CALL FUNCTION 'DEQUEUE_EZ_ZMRP_LOT_SIZE'
EXPORTING
MODE_ZMRP_LOT_SIZE = 'E'
MANDT = SY-MANDT
WERKS = wa_zmrp_lot_size-werks
MATNR = wa_zmrp_lot_size-matnr.
endloop.
CALL FUNCTION 'DEQUEUE_EZ_MRP_PARAMETER'
EXPORTING
MODE_ZMRP_PARAMETER = 'S'
MANDT = SY-MANDT.
l_msg = wa_mseg-ebeln.
condense l_msg.
concatenate 'num:' l_msg into g_msg.
l_msg = wa_mseg-ebelp.
condense l_msg.
concatenate g_msg 'item' l_msg into g_msg.
concatenate g_msg 'exceed max number'
into g_msg.
MESSAGE g_msg type 'E'.
else.
modify it_zmrp_lot_size.
endif.
else.
select single * into IT_ZMRP_LOT_SIZE from ZMRP_LOT_SIZE
where werks = wa_mseg-werks
and matnr = wa_mseg-matnr.
if sy-subrc <> 0.
perform unlock_data.
perform display_info.
loop at it_zmrp_lot_size into wa_zmrp_lot_size.
CALL FUNCTION 'DEQUEUE_EZ_ZMRP_LOT_SIZE'
EXPORTING
MODE_ZMRP_LOT_SIZE = 'E'
MANDT = SY-MANDT
WERKS = wa_zmrp_lot_size-werks
MATNR = wa_zmrp_lot_size-matnr.
endloop.
CALL FUNCTION 'DEQUEUE_EZ_MRP_PARAMETER'
EXPORTING
MODE_ZMRP_PARAMETER = 'S'
MANDT = SY-MANDT.
l_msg = wa_mseg-ebeln.
condense l_msg.
concatenate 'num:' l_msg into g_msg.
l_msg = wa_mseg-ebelp.
condense l_msg.
concatenate g_msg 'item' l_msg into g_msg.
concatenate g_msg 'exceed max number'
into g_msg.
MESSAGE g_msg type 'E'.
else.
if it_zmrp_lot_size-ALLOW_SIZE <
it_zmrp_lot_size-RECEIVE_SIZE.
perform unlock_data.
perform display_info.
loop at it_zmrp_lot_size into wa_zmrp_lot_size.
CALL FUNCTION 'DEQUEUE_EZ_ZMRP_LOT_SIZE'
EXPORTING
MODE_ZMRP_LOT_SIZE = 'E'
MANDT = SY-MANDT
WERKS = wa_zmrp_lot_size-werks
MATNR = wa_zmrp_lot_size-matnr
endloop.
CALL FUNCTION 'DEQUEUE_EZ_MRP_PARAMETER'
EXPORTING
MODE_ZMRP_PARAMETER = 'S'
MANDT = SY-MANDT.
l_msg = wa_mseg-ebeln.
condense l_msg.
concatenate 'num:' l_msg into g_msg.
l_msg = wa_mseg-ebelp.
condense l_msg.
concatenate g_msg 'item' l_msg into g_msg.
concatenate g_msg 'exceed max number'
into g_msg.
MESSAGE g_msg type 'E'.
else.
perform lock_data.
CALL FUNCTION 'ENQUEUE_EZ_ZMRP_LOT_SIZE'
EXPORTING
MODE_ZMRP_LOT_SIZE = 'E'
MANDT = SY-MANDT
WERKS = it_zmrp_lot_size-werks
MATNR = it_zmrp_lot_size-matnr.
IF SY-SUBRC <> 0.
perform unlock_data.
loop at it_zmrp_lot_size into wa_zmrp_lot_size.
CALL FUNCTION 'DEQUEUE_EZ_ZMRP_LOT_SIZE'
EXPORTING
MODE_ZMRP_LOT_SIZE = 'E'
MANDT = SY-MANDT
WERKS = wa_zmrp_lot_size-werks
MATNR = wa_zmrp_lot_size-matnr
endloop.
CALL FUNCTION 'DEQUEUE_EZ_MRP_PARAMETER'
EXPORTING
MODE_ZMRP_PARAMETER = 'S'
MANDT = SY-MANDT.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
append it_zmrp_lot_size.
endif.
endif.
endif.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
*****modify
IF it_zmrp_lot_size[] is not initial.
modify zmrp_lot_size from table it_zmrp_lot_size.
endif.
perform unlock_data.
loop at it_zmrp_lot_size into wa_zmrp_lot_size.
CALL FUNCTION 'DEQUEUE_EZ_ZMRP_LOT_SIZE'
EXPORTING
MODE_ZMRP_LOT_SIZE = 'E'
MANDT = SY-MANDT
WERKS = wa_zmrp_lot_size-werks
MATNR = wa_zmrp_lot_size-matnr.
endloop.
CALL FUNCTION 'DEQUEUE_EZ_MRP_PARAMETER'
EXPORTING
MODE_ZMRP_PARAMETER = 'S'
MANDT = SY-MANDT.
***************end
first question:
this segment code can't be debug even have set break point.
how to debug this segment.
second question:
use the same condition to execute MIGO_GR,but one usING BDC method with CALL TRANSCTION 'MIGO_GR' will go to this segment code and display message which set in USER EXIT code.
but other use TCODE MIGO_GR to receive goods and will create document successfully.
three question:
have other method will be resolve my issue.
thank you advance!close!
-
Dear all,
In MB51 report, sale order value is not showing values even though it actually has.
What could be the reason?
If the answer is User-exits or BADI, can u suggest me the correct user-exit or BADI.
I have already tried the following user-exits by placing BREAK-POINT in the includes. But no where the execution is breaking.
MBCF0002 Customer function exit: Segment text in material doc. ite
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE
MBCF0011 Read from RESB and RKPF for print list in MB26
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc
Plz give some suggestions.
Regards,
PremHi ,
U need to change the layout of MB51 in order to get the SO no.
goto MB51---> give some inputs ---> in the o/p screen ->click on the variant button-> on the pop screen u, top of it u will get 2 options
1.Header
2.Position
click Position Button ---> here u will get all Fields avail. for this Report O/P , so u can add SO field and save the variant.
regards
Prabhu -
HOW TO CREATE A USER-EXIT FOR MB31 GOODS RECEIPT
Hy,
<b>HOW TO CREATE A USER-EXIT FOR MB31</b>
TO COMPARE ORDER QTY CONFIRMED AND GOODS RECEIPT QTY
( IF GR QTY GREATER THAN CONFIRMED QTY ERROR MESSAGE SHOULD COME AND NOT ALLOW TRANSCATION TO PROCEED).
POINTS CONFIRMED.
REGARDS,
KARTIKEY.Hi Rawat,
You Don't need to create User Exits,but you need to find user Exits.Below are list of user Exits for MB31.
Use proper exit as per your requirement.
Exit Name Description
MBCF0002 Customer function exit: Segment text in material doc. item
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0011 Read from RESB and RKPF for print list in MB26
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc.
award points if ans is useful.
Regards,
Albert -
User exit/BADI for updating custom table in MB1B transaction-
Dear All,
When performing a material to material conversion in MB1B transaction for batch managed materials,system is creating a new batch by copying the characteristics of issuing material/batch.The details of the new batch created are updated in standard batch tables(MCH1,MCHA,MCHA).
The requirement is when the new batch is created,the batch details and characteristics has to be stamped in a custom table.
Kindly suggest a user exit/BAIi available for updating the same in the custom table.
Regards,
DeepakDeepak, Exits for MB1B are
MBCF0002 Customer function exit: Segment text in material doc. item
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0011 Read from RESB and RKPF for print list in MB26
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc. -
USER EXIT or BADI for Vendor field in MIRO
Hi Experts,
In MIRO transaction vendor field gets defaulted from Purchase Order. So my requirement is to changes that vendor with alternate payee.
To <u>replace the vendor with alternate payee</u> I need the <b>USER EXIT or BADI</b>, kindly help me on this will be useful for us.
Thanks in Advance.
SAP ConsultantTransaction Code - MIGO Goods Movement
Exit Name Description
MBCF0002 Customer function exit: Segment text in material do
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_
MBCF0011 Read from RESB and RKPF for print list in MB26
MB_CF001 Customer Function Exit in the Case of Updating a Ma
No of Exits: 8
BAPI-step by step procedure
http://www.sapgenie.com/abap/bapi/example.htm
list of all BAPI's
http://www.planetsap.com/LIST_ALL_BAPIs.htm
Rewards if useful.................
Minal -
User exit/BADI for MIGO Batch numbers
Hi All,
I want to find a user exit which will give the oldest batch number (MCHA-LWDET) of semi-finished product during the goods receipts of the finished prodocut in MIGO.
Could you please give me any hints to find out the user exit for this.
Regards,
Sekhar DHi,
Check these User exits... for MIGO
Exit Name Description
MBCF0002 Customer function exit: Segment text in material doc. item
MBCF0005 Material document item for goods receipt/issue slip
MBCF0006 Customer function for WBS element
MBCF0007 Customer function exit: Updating a reservation
MBCF0009 Filling the storage location field
MBCF0010 Customer exit: Create reservation BAPI_RESERVATION_CREATE1
MBCF0011 Read from RESB and RKPF for print list in MB26
MB_CF001 Customer Function Exit in the Case of Updating a Mat. Doc.
Check thse BADI's.. for MIGO
Badi Name
ARC_MM_EBAN_CHECK
ARC_MM_EBAN_WRITE
ARC_MM_EINA_WRITE
ARC_MM_INVBEL_WRITE
ARC_MM_MATBEL_CHECK
ARC_MM_MATBEL_WRITE
MB_CHECK_LINE_BADI
MB_CIN_MM07MFB7
MB_CIN_MM07MFB7_QTY
MB_DOCUMENT_BADI
MB_DOCUMENT_BADI_SAP
MB_DOCUMENT_BADI_SAP
MB_DOC_BADI_INTERNAL
MB_DOC_BADI_INTERNAL
MB_ME_CSGMT_BADI_SAP RTFASH:
MB_MIGO_BADI
MB_MIGO_ITEM_BADI
MB_PHYSINV_INTERNAL MB_PHYSINV_INTERNAL BAdI Implementation
MB_RESERVATION_SCR DFPS: Field in the Reservation
MB_RESERVATION_UPCHD DFPS: Reservation
Regards,
Raghu
Edited by: Raghavendra Rao G on Aug 27, 2009 5:50 PM
Maybe you are looking for
-
Got a new iPod touch and now i want it to be the iPod i can use on my iTune
So i got an itouch to replace an older ipod of mine. But now my itunes only recognizes my old ipod and the only way i can get new stuff onto my new ipod is by syncing it which is fine but i can't create playlists or organize my music at all. So what
-
Best practice for using both devices
Hello, I currently have a mac book pro and mac pro that I use for my editing. My questions are as follows: * Best way to import / export photos for use on both devices * Is there a way to sync catalogs on both computers so they are able to update on
-
How to view broadcast tv on Touchsmart with internal tuner
I would like to watch digital over-the-air tv on my Touchsmart420 using the built-in ATSC tuner. I have connected a tv antenna to the computer. In Media Center I get a message saying that no tv signal is detected. Do I need a special kind of tv anten
-
My iTunes keeps closing unexpectedly
This happens whenever I refresh my podcasts. I thought it could be solved with a software update, but that's not working either (I can't install it). Can someone help me?
-
Large number of concurrent sessions
What optimizations are used to provide a large number of concurrent sessions?