[CRM] BADI for BP after input
Hi Everyone,
I'm searching for a BADI that can be triggered after creating (save) a new BP. Does anyone knows if there is one?
I have found some BADIs that use the method CHANGE_BEFORE_UPDATE. But this method does not work for what I have to do.
Thanks!
Felipe
Hello Felipe,
I think you haven´t realised but the BADI PARTNER_UPDATE has two standard implementations. The one called CUSTOMER_DESCR_UPD calls some functions that gets the data from the partner that has just created. I think it works because this functions have the information of the new partner buffered into internal tables.
Also the other implementation called BUPA_MWX_SAVE sends the Customer BDOC of the new customer, so if this badi have all the customer data to send the bdoc, i think you could get the data in the same way. This implementation is far more complex in my option. So I think you can start looking the first implementation.
Take a look, debug it and see if you can use the same logic and functions.
Let me know if it works.
Regards,
Mauricio
Similar Messages
-
User Exit or BADI for MIRO after save
Hi
I want to show a message in MIRO once the invoice document is create but I am unable to find a user exit or BADI after save of the MIRO transaction.
Please guide me in this aspect.
Regardstry to run the below codes in a new program,it can help you to find all user exits of a t-code:
TABLES : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
TABLES : 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 OBLIGATORY.
SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.
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 = 'SMOD'
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:/(95) sy-uline.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
WRITE:/(95) sy-uline.
LOOP AT jtab.
SELECT SINGLE * FROM modsapt
WHERE sprsl = sy-langu AND
name = jtab-obj_name.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
WRITE:/1 sy-vline,
2 jtab-obj_name HOTSPOT ON,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
ENDLOOP.
WRITE:/(95) sy-uline.
DESCRIBE TABLE jtab.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No of Exits:' , sy-tfill.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'No User Exit exists'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'Transaction Code Does Not Exist'.
ENDIF.
AT LINE-SELECTION.
GET CURSOR FIELD field1.
CHECK field1(4) EQ 'JTAB'.
SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN. -
NullPointerException for showSaveDialog after input without extension
Hello,
I have a small problem that I cannot figure out.
I have a simple JFileChooser that I use for the the showSaveDialog:
JFileChooser fc = new JFileChooser();
fc.setCurrentDirectory(new File( /* valid dir in here (works) */ ));
int returnval;
File chosenFile;
fc.setFileFilter( /* my filter for my file format and directories (works) */ );
try {
returnval = fc.showSaveDialog(MainFrame.instanceOf());
chosenFile = fc.getSelectedFile();
} catch (HeadlessException e) { /* exception code here */
// Now comes code where I use chosenFileI can now perfectly use this "chosenFile", except when the user gives a file without an extension. For instance: "test.grr" gives the correct "Invalid extension used" after the rest of my code. But "test" gives a NullPointerException when I try to use chosenFile in my code. By the way, this also happens if I instantiate chosenFile as a correct file before calling the saveDialog.
I would like to allow the user this, because I can then append the correct extension myself, but it appears that the dailog actively makes the file null in this case, so I cant find out what name the user typed in then.
Best RegardsRight, here is my code and how to test at is at the start of that, as is the nature of the error.
The GUI has only 1 button and a nice exitOnClose, so all should be well.
The fileFilter is set to ".java" files.
* Main.java
* Just a testing file to show the error. To see the error, try
* - create a file test.wrong (should give an error)
* - create a file alreadyexisting.java (should give an error)
* - create a file temporary.java (should work, it will be created)
* - create a file noextension (this gives the NullPointerException
* that I do not understand)
package test;
import java.awt.HeadlessException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.filechooser.FileFilter;
* @author Quinten
public class Main extends JFrame implements ActionListener {
private class ArchiveFileFilter extends FileFilter {
private final String EXT = "java";
// Accept files (for browsing) and the ".java" files which are of interest
// method also for extending FileFilter
public boolean accept(File pathname){
if (pathname.isDirectory()) return true;
else if (getExtension(pathname).equals(EXT)) return true;
return false;
/** for extending FileFilter */
public String getDescription() {
return "Java code files (\".java\")";
/** Constructor */
public ArchiveFileFilter() {
public String getExtension(File f) {
if (f.isDirectory()) return "DIRECTORY";
String ext = null;
String s = f.getName();
int i = s.lastIndexOf('.');
if (i > 0 && i < s.length() - 1) {
ext = s.substring(i+1).toLowerCase();
} else if (i == s.length() - 1) {
return "NO_EXTENSION";
return ext;
/** Creates a new instance of Main */
public Main() {
super("demo of problem");
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JButton test = new JButton("Test");
test.addActionListener(this);
test.setActionCommand("test");
JPanel panel = new JPanel();
panel.add(test);
this.add(panel);
this.pack();
this.setVisible(true);
public void actionPerformed(ActionEvent e) {
if(e.getActionCommand().equals("test")) {
JFileChooser fc = new JFileChooser();
int returnval = -1;
File chosenFile;
fc.setFileFilter(new ArchiveFileFilter());
try {
returnval = fc.showSaveDialog(this);
chosenFile = fc.getSelectedFile();
} catch (HeadlessException hE) {
System.out.println("Failed, because of a seriously weird system:\n" +
hE.toString());
return;
if (returnval == JFileChooser.APPROVE_OPTION) {
// if no extension is given, use ".java" :
if (getExtension(chosenFile).equals("NO_EXTENSION")) {
chosenFile = new File(chosenFile.toString() + ".java");
// it must not already exist, or it can't be created... :
if (chosenFile.exists()) {
System.out.println("Failure: file already exists.");
return;
// a directory is not a valid choice:
else if (getExtension(chosenFile).equals("DIRECTORY")) {
System.out.println("Failure, chosen file was a directory");
return;
// check the extension
else if (!getExtension(chosenFile).equals("java")) {
System.out.println("Failure: incorrect extension.");
return;
// now create the archive file
else {
try {
chosenFile.createNewFile();
System.out.println(chosenFile.toString() + " created succesfully");
} catch (IOException ioE) {
System.out.println("Failure: IOException when trying to create: "
+ chosenFile.toString() + "\n" + ioE.toString());
* @param args the command line arguments
public static void main(String[] args) {
Main main = new Main();
} -
User,Customer exits or BADI for IDOC Type - CRMXIF_ORDER_SAVE_M01 in CRM
Hi Friends,
We are creating teh EDI Sales order in CRM using below details:
Basic Type - CRMXIF_ORDER_SAVE_M01
Message Type - CRMXIF_ORDER_SAVE_M
Functional Module - IDOC_INPUT_CRMXIF_ORDER_SAVE_M
Direction -Inbound
We need to customize the values for the IDOC,
Can any one help us in providing the details on any Customer Exits , User Exits and /or BADIs for the abov ementioned FM.
We greatly appreciate your early responce.
Thanks
VijayThanks Naresh, it helped...
Can you please help on the below:
1. For outbound Sales order IDoc- CRMXIF_ORDER_SAVE_M01,need BADIs for modification of the IDoc before it gets generated.
2. Need program to generate output as outbound IDoc- CRMXIF_ORDER_SAVE_M01 for sales order conformation/acknowledgement.
3. Need a BADI after the EDI Sales order is saved.
Thanks in advance
Vijay -
BAdI for replacing CRM Pricing
Hi Experts,
I have a requirement to make a RFC call to retrieve the pricing from ECC/Vistex in CRMD_ORDER transaction after hit enter key with product/qty entry. I'm searching a BAdI for CRMD_ORDER (so many BAdIs for this TC) that can RFC by customer/material to retrieve the pricing from ECC then overwrite CRM's pricing with it (at least has customer/material as importing and subtotals as export/changing). Can anyone please advise if there is a BAdI for this purpose?
Thanks in advance, JinIn CRM_PRICING_I_BADI-MERGE: there are netvalue/price and subtotals in Importing IU/S_PRICING_I_WRK, but not in Changing CS_PRICING_I_BADI.
In CRM_PRICING_BADI-MERGE: there are none of them.
Why PRICING BADIs have no Pricing fields that can be changed? I think I'm missing something here. Any advise / documentation?
Thanks, Jin -
How to find the BADI for the transaction CRM_IC in CRm 5.0
Hi all,
I have a issue:
in CRM 5.0, for the transaction CRM_IC (IC Web tcode), i need to do an enhancement for that tcode.
In crm_ic, we can enter Business partner and product id data,whenever we provide the inputs for BP and Product id and if we press enter then it displays the details like product description, UOM etc.
what i need to do is when we enter product id which is not available in Product Master,develop an enhancement which get those details from Cust / Dist chain and replace the entered value with retrieved value.
For this CRM_IC, I need to find the correct BADI.
Can any one send me out the Exact BADI for this requirement.spro> crm > transactions > basic settings > badi's
BAdI: Product Processing at Item Level
In this step, you can create enhancements for product processing at item level in the business transaction The following methods are available to you in the Business Add-In CRM_PRODUCT_I_BADI:
CRM_PRODUCT_I_CHECK: BAdI to check object PRODUCT_I
CRM_PRODUCT_I_MERGE: BAdI to merge object PRODUCT_I -
SAP CRM Which BADI is triggered after SAVE
Hi All,
I am working on one Interaction center requirement. Basically I would like to know which BADI isgetting triggered after hitting the save button in Complaint tab in CRM WEB UI. I need to enhance that BADI to create transaction link to my interaction record in transaction history tab.
I appreciate your help in advance..
Thanks,
Sar.Hi Krishnan,
My requirement is we have complaint tab configured in SAP CRM interaction center. User can create complaints in CRM UI using complaints button. After creating complaint one button is active for the user like 'Create notofication' User will click on that button it basically calls Transcation laucher in ECC visa SAP GUI to create notification with reference to this Complaint. after creating the notifcation in ECC and after hiting the back button in CRM UI we have to create a link with notification created in ECC in transcation history tab in complaint.
As I am trying to update the documnet flow in my transaction launcher class I am getting the message saying that 'Order is locked my user id'. This is becuase as I am using the SAP GUI as TL the session is still open in CRM. So I am trying to create the link after hiting the save button for the complaint IN CRM Web GUI.
I am not sure which option is better in this scenario. Enhancing the Complaints Component or writing the code in BADI or using the update task in my transcation launcher class. I am not sure how frequently we can use the update tasks in CRM not user if it works for CRM UI scenarios.
Any suggestion are helpfull..
Thanks,
Sar.. -
Creating BADI for datasource enhancement in CRM system
Hi,
I am working on SAP BI/BW. This is the first time I am working in CRM system with CRM datasources. Facing some problem for datasource enhancement as never done it before in the CRM system. Is there anyone who can help in in creating BADI for datasource enhancement in CRM.
Thanks in advance
MoumitaHi Kushal,
You can find the BADI name by,
Go to Transaction SE24
Enter the Object Type CL_EXITHANDLER and click on Display.
Double Click on method "GET_INSTANCE".
Put a Break-point on Call method cl_exithandler=>get_class_name_by_interface
Run RSA3 transaction and execute the DataSource.
The execution will stop at the break point.
Check the values of variable 'exit_name', it will give you the BADI name called at that time.
Thanks,
Kokila -
Creating BADI for datasource enhancement in CRM.
Hi,
I am working on SAP BI/BW. This is the first time I am working in CRM system with CRM datasources. Facing some problem for datasource enhancement as never done it before in the CRM system. Is there anyone who can help in in creating BADI for datasource enhancement in CRM.
Thanks in advance
MoumitaHi Prasad Reddy,
This are the available badis and exits for this t.code:
Enhancement/ Business Add-in Description
Enhancement
MGA00001 Material Master (Industry): Checks and Enhancements
MGA00002 Material Master (Industry): Number Assignment
MGA00003 Material Master (Industry and Retail): Number Display
Business Add-in
MG_MASS_NEWSEG User-Specific Fields & Segments in Mass Maintenance
MATGRP_SKU_UPD
CDT_CHECK_MATERIAL Checks for Existence of a Material in a CDT
BADI_MM_MATNR
BADI_MAT_F_SPEC_SEL BAdI for Material Special Field Selection
BADI_MATNR_CHECK_PVS
BADI_MATERIAL_REF Addition of customer-defined default data for material
BADI_MATERIAL_OD
BADI_MATERIAL_CHECK Enhanced checks for material master table
BADI_GTIN_VARIANT
BADI_EAN_SYSTEMATIC
o.of Exits: 3
o.of BADis: 11
Find the Exact exits and badis for ur requirement.
How to fine the exact badi:
1) Goto se24 (Display class cl_exithandler)
2) Double click on the method GET_INSTANCE.
3) Put a break point at Line no.25 (CASE sy-subrc).
Now
4) Execute SAP standard transaction
5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
7) This way you will find all the BADIs called on click of any button in any
transaction
Rgds,
P.Naganjana Reddy
if you follow this 7 steps, you will find a suitable BADI. -
BADI / USER EXIT for MB01 - after posting GR.
Hi,
We have some requirement, where we need to create the Goods Issue using bdc after posting the GR in MB01. can anybody give the user exit / BADI for this.
i have used BADI - MB_DOCUMENT_BADI : It is triggering while click on the Save button in the MB01, but it is calling before post the GR. the customization part should trigger after the GR post.
Regards,
SreeHi Sree,
Do it the other manner. Store the GR in a Z-table and do the BDC or use the BAPI as suggest Keshav in a periodic job, or call it with a job (OPEN_JOB, CLOSE_JOB,...) in a function module, always with the option IN UPDATE TASK. Think that you have the number of document in this BADI and you must wait some time (1, 2 or 5 seconds) until the database save all data.
Be careful with this badi (MB_DOCUMENT_BADI), see Note 92550 - Stock inconsistency due to customer enhancement (exit, BAdI) to understand the reasons.
Regards,
Eduardo
Edited by: E_Hinojosa on Feb 2, 2011 2:20 PM -
BADI for Vendor Invoice after Posting to send a mail to vendor
Hi,
My requirement Is like this.
I have to send a mail to vendor after the Invoice for vendor is Posted.
For dat I am searching for a badi to implement after the invoice is successfully posted.
Please give some solution about this.
Regards,
Jyoti..if it is F-43 . check out the following
BAdI Definition Description
AC_QUANTITY_GET Transfer of Quantities to Accounting - Customer Exit
BADI_ENJ_ALT_ADR Go to alternative vendor/customer data
BADI_F040_SCREEN_600 Screen Enhancement on F040 0600 Document Header
BADI_FDCB_SUBBAS01 Screen Enhancement 1 on FDCB Basic Data Screen (010, 510)
BADI_FDCB_SUBBAS02 Screen Enhancement 2 on FDCB Basic Data Screen (010, 510)
BADI_FDCB_SUBBAS03 Screen Enhancement 3 on FDCB Basic Data Screen (010, 510)
BADI_FDCB_SUBBAS04 Screen Enhancement 4 on FDCB Basic Data Screen (010, 510)
BADI_FDCB_SUBBAS05 Screen Enhancement 5 on FDCB Basic Data Screen (010, 510)
BADI_PRKNG_NO_UPDATE BAdI for Deactivating Update of Parked Documents
F050S008 FIDCC1, FIDCC2 Inbound IDoc: Update Comparison Ledger
FBAS_CIN_LTAX1F02 Tax interface
FBAS_CIN_MF05AFA0 EWT - Downpayment Clearing - Tax transfer for CIN
FI_AUTHORITY_ITEM Extended Authorization Check for Document Display (FB03)
FI_GET_INV_PYMT_AMT BAdI for determining the payment amount for an invoice
FI_HEADER_SUB_1300 Screen Enhancement for Document Header SAPMF05A
FI_PAYREF_BADI_010 BAdI: Payment Reference Number
FI_TRANS_DATE_DERIVE Derive BKPF-WWERT from Other Document Header Data
INVOIC_FI_INBOUND BADIs for Inbound IDoc INVOIC FI (Vendor Invoice)
RFESR000_BADI_001 BAdI for Own Processing of POR Item
otherwise - find out the package of the program of the transaction.
go to se84 - enhancements- business add ins - definitions - enter package and execute - you will see all the definations. -
I forgot my ipad on charge after 100%,is this bad for ipad battery?
I forgot my ipad on charge after 100%,is this bad for ipad battery?
Once the battery was fully charged, the smart circuitry stops charging the battery. Power is then used just for running the device, and the charging circuits will not cut back in until the battery has spontaneously drifted down by 5%-10% of a full charge (which should take days with a normal, healthy battery).
You cannot over charge any Apple device. -
CRM BADI implimentations for BP validation .
Hi all ,
CRM BADI implimentations for BP validation . BUPA_FURTHER_CHECKS works only for WEB UI .
is there a way we can implement those validations for GUI ?
Thanks ,
Naval Bhatt.Hi NB,
Hope you had checked all the available BADIs for GUI..
Long time back, I remember enchancing the interface to accomadate my requirements.
Created a new method and used it for my requirement.
Regards,
Raghu -
UserExit or Badi for inbound posting idocs after commit
Hello Folks,
I want to know the User Exit/Badi that can be used after inbound idoc gets posted-iam using FM IDOC_INPUT_HRMD for posting idocs, as i want to use perform on commit statement.
Thanks & Regards,
Nishanth KumarHi Nishanth
Dont sure about the question actually.Can you elaborate.
see the [thread|Re: User Exit or BADI for ME21N or ME51N;
it may help you
Regards
Sachin -
Is it good or bad for the battery to keep the powercord plug in after complete charge.
Is it good or bad for the battery to keep the powercord plug in after complete charge.
It does no harm. It won't over charge.
Maybe you are looking for
-
I have many photos in iPhoto whose dates I know to be wrong and many appear to be the date I moved them all to a new Mac. I photos in question, I think, were originally on a PC and in Picassa. If it was taken before metadata was embedded, I suppose I
-
"Organizing files" window in burn-to-disc 10.4.0.80
I recently downloaded iTunes 10.4.0.80 in an automatic update from Apple. Now, when I select a playlist and right-click to select "burn playlist to disc," the "burn settings" window pops up (normally) and then when I click OK, an "Organizing Files" w
-
Why do we need the combination of Apache and Tomcatt?
Both Apache and Tomcatt are web servers. It is possible to get the ob done with any of them. Then, why do we go for the combination of Apache and Tomcatt in most of the Applictions? What is the significance of doing it?
-
Lockbox processing - customer invoice
Hi Gurus, i have a query on Lockbox processing of an invoice created using F-22 tcode. How will we tell the system that this particular invoice ( or say particular customer ) is going to pay this amount to a lockbox maintained in the system? I have m
-
Locked Appleworks File Notice on Desktop
Hello. I have recently noticed an error report on my desktop (actually two of them, both identical) that say ' This file is locked or in use, Would you like to open a copy of it?'. Below that is CANCEL and OPEN A COPY. I first tried clicking on CANCE