BADI to modify a BP AFTER save
Hello Expert,
i have a scenario in which i have to add information about territory on the BPs after their creation on CRM.
Simplifying:
BPs are created / modified on CRM from R/3 through BUPA_MAIN or BUPA_REL
for each BP in BUPA_MAIN / REL, if the BP has Role "ZROLE" and a relation with the BP "BP_X"add the new BP on the territory "terr_A"
Now I must find a BAdi that is triggered after the commit of creation / update, because i need all the information on DB to use the BOL in order to assign a territory.
All the BAdi I've tried (PARTNER_UPDATE, BUPA_ROLE_CHECK, BUPA_FURTHER_CHECKS, BUPA_GENERAL_UPDATE and so on...) are triggered before the commit so, for example, i can't find the information on the BUT000 as well as I can't use BOL programming to do analisys.
Can you help me?
Thank you a lot...
Hello Alberto,
With the BAdis you will have to use FM that can read memory data while getting created for example BUP_MEMORY_BUT000_GET, but you run a risk that this data may get changed in some other BAdi after you have read it.
If you must be sure that data is saved in DB table before you start adding territory information, then you can trigger a job from one of these BAdi. Starting time of the job can be system time + 30 seconds so that you have enough time for data to get saved in tables. In the job program you can check again that data has been saved in table before starting your core logic.
If you have this logic for initial load, then you will have lot of jobs created. Probably best will be to have a separate program for initial load. But if this is for delta, then this solution will not have any problem.
Cheers,
Niraj
Similar Messages
-
Badi or user-exit for QA32 after save
I need a badi or user exit to execute exactly after save in QA32 ..I tried belows but they are not that i want
QPL1_SUBSCREEN_ADDON
INSPECTIONLOT_UPDATE
Check these Exits:
QEVA0004 Exit for changing information line in usage decision he
QEVA0005 User subscreen for displaying add. data for usage decis
QEVA0006 Entry to usage decision transactions
QEVA0007 UD: Control of compulsory comment or long text presetti
QEVA0008 Usage decision: Customer function key (e.g. to cancel U
QEVA0009 UD: Predefinition of quantity to be posted to sample st
QEVA0010 UD: Usage decision check
QLCO0001 QM: Call alternative costs report from UD
QSS10001 Possibility of calling a different print reportHello Tuncer,
have you checked the BADI QE_SAVE? This is the last possible chance of changing data on saving a QM transaction and should be active in QA32.
The only other solution I can come up with is a follow-up action i.e. for the UD-code
Hope this information proves usefull.
Regards
Isabelle -
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. -
Need Userexit/Badi after save while creating invoice at VF01
Hi expert,
Can anyone tell me which BADI / USEREXIT i can use for update the custom table
after save while creting invoice at VF01.
Regards,
ManasiManasi,
from next time onwards please post it in relevant forums
for now check these links
USSER-EXIT creating the invoice in VF01
Re: user exit at invoice creation Vf01/Vf04
VF01/VF04 user exit
Thanks
Bala Duvvuri -
Web Service do not work after save in Designer ES2 SP1
Dear all,
I am trying to migrate 8.2.1 process to ES2.
Although it have some bugs, but the process are working fine when using ES2 without any SP.
One day we installed SP1 for ES2 and hopeing for some bugs we found fixed, but find none of them fixed... oh well, so we continue the migration.
And the problem happen when we try to modify the form for some testing, we find that even we *did not* modify anything in the form, if we pressed the save button and deploy the form, all the web service related code in the form will stop working.
Anyone have any idea about this?
Thanks in advance.
Regards
BillHi Paul,
Thanks for the suggestion.
Already tried to update the dataconnection by right click at data view, and choice "Refresh Data View", but that doesn't help, would like to know are there any others way to do so?
I already open a case with the support, but it seem that the engineer in APAC region have a very slow response time...
Just wonder if I can send the case to others support center with better response time.
I tried to compare the form before and after save and find that some information may missing in the post-SP1 form.
In the pre-SP1 from, I can find a <dd:dataDescription> section for every web service used in the form, but in the post-SP1 form they are missing.
I tried to add that section back and it will make the web service usable again, but the problem is I need to do that every times I modify anything, and I also need to create this section for a every new web service added to the form...
Regards
Bill -
Identify if new Business Partner in After Save event
Hello,
I need to implement some logic in the After Save event of a BP. I am doing this in DSAVE event in BUS7 transaction. In the custom function module for the event, I need to identify if the BP is a new or a modified BP.
Can anyone suggest which is the best approach to do identify if a BP is new or modified?
Thanks
AjayIts simple.. with BP Guid go to the BUT000 (BP: General data I) if the record is available.. then its not new otherwise its a new BP.
Or Use this BAPI to check the BP is already avaialbe or not.. BAPI_BUPA_EXISTENCE_CHECK
Hope this helps you... -
Hi
I want to print a label for the items in MIGO once the document is posted but I am unable to find a user exit after save of the MIGO transaction.
Please guide me in this aspect
regards
Grame SmithUse this Badi.
MB_DOCUMENT_BADI
Read the documentation in Se18. -
Can not refresh page after save properly(When not saving master record)
I am using jdeveloper 11g R2 (11.1.2.3) JSF Facelet
In some use case I have Address as master table and Person as detail table
For some business reason I need to don't save same addresses
eg:
If +1 Test St+ is in database already and new user coming and adding this address with new person
I need to use the row in database not creating a new address
I do saving in doDML method of Address with some hashing algorithm and it is fine
My problem is that I can not refresh page after save properly
User coming to page think Adding a new address and a new person but in fact no new
address added because of business I describe above
Any ideas how I can implement this?
Appreciate that
Regards
MohsenHi,
from your description it is not clear why the page doesn't refresh. It could be a problem in your implementation code - who knows. What if you perform the address check on a command button that actually submits the new address? If the check returns true (address exists) you would call row.refresh(forget new row); and re-query the view object so the address coming from the database is displayed. If you wanted to use the doDML then yuou need to be aware that doDML doesn't help removing the row the user created. It just ignores the database update but the entity is still around, which in my suggested solution wont be the case.
Frank -
Auto po creation after save sales order.
Hi, Experts,
A s per my business requirement, We have mapped configuratin for auto PR creation at a time of order if stock not available, But system not create automatic PO after save sales order. I want to crate Automatic PO after save sales order, it is possible i know , But for that which type for configuration require i don't know, can anybody give me solution for this issue.
Thankls a lot in advance,
Regards:
HappyHi,
It's possible to create PO automatically after sales order is saved.
1. Set up back-to-back, i.e. PR can be automatically created after the SO is saved.
2. Item category - make sure 'Create PO automatically' checkbox is ticked.
3. Enterprise Structure --> Sales Organization - ensure that PO type, purchasing group etc. is maintained.
4. Transaction code SWETYPV - Ensure that both checkboxes are ticked for BO (object category), BUS2032 (object type), ALECREATEE/CHANGED and ERRORCHANGINGPURORD/ERRORCREATINGPURORD.
5. Optional: You could execute BD86 to check for consistencies (note that you can still get it work even if BD86 shows errors)
Regards,
HweeLing -
Lightroom 5 file edited in photoshop cc 2014 does not appear back next to original after save. Is anyone else having this issue? If so what is the fix. The edited image appears back in lightroom in a new folder.
I'm performing a normal "Save", not "Save As". Work flow I'm using is as follows: Select photo in Lightroom 5.7 >" Edit In" Photoshop CC 2014 > (after working on photo is PS) > Save > close PS. Photo returns to Lightroom 5.7 in a new folder rather than next to the original. Prior to purchasing the monthly plan and upgrading to PS CC 2014, I performed this same work flow using Lightroom 5.6 and Photoshop CS6 without any issues.
Just for fun... I attempted to move the edited file back into the original folder. I received a prompt that said the file already existed in the original folder, however I can't see it except the new folder that LR created. I tried several different sort orders, etc without any success.
*** Follow up: Was unable to resolve the issue using Photoshop CC 2014. Uninstalled PS CC 2014 and went back to using Photoshop CS6. Return trips from LR 5.7 to Photoshop is now performing as it should: returning edited photo back to the original folder in LR 5 and placing next to the original image.
Should anyone have a suggestion on getting Photoshop CC 2014 to do the same, I would love to be educated.
Thanks for the help, dj_paige. -
How to get the only the changed or newly added entries in AFTER SAVE.
I have created table maintenance generated for a table,I want to get the newly added or changed entries while saving thats why im using AFTER SAVE event for the same,can anyone please tell me how to get the only the changed or newly added entries in AFTER SAVE.
Hi,
Welcome you post on the forum.
I have moved your thread here because it is in English and should not in the language specific forum. What is your system version?
Thanks,
Gordon -
Premiere pro cc losing audio after save and close
Though I can see the wave form, audio won't play back after save, close and reopening of project. Not every file is affected. If I reimport track, audio will work again, but this is causing me to lose TONS of editing work when I have to start over again and then I'm afraid to close project.
Any ideas?I am having this same issue in PPro CC. I am editing multi-source material from interviews that were 2-3 hours long. The audio was recorded separately and the wave files ran the entire length of the interview. 44100kHz, 16-bit wav files. It happens after I reopen the project to only some (5%?) of the audio files I imported into the project, not all.
When I re-open the project, the audio data within the wav file will shift forward, so that the back end of the clip will show green/grey diagonal striping signifying the deadspace left when the audio data shifted forward. This is only visible when the entire file is in a sequence. In sequences where it is just a clip from the *shifted* file, the clip will either play dead space if the clip is from the end of the *shifted* file or audio from the wrong part of the file since it's time reference is shifted. The only work around is to import the file again and re-cut, but its killing my work flows. I'm editing 56 interviews, each of 2-3 hours and I can't waste time re-cutting my deliverables each time there's an a revision. -
Status is not updated after Save in the transaction but after closing and
Hi
In CRM GUI and PCUI,
1) Opening a transaction (say an Invoice)
2) Changing the status from 'Open' to 'Completed'.
3) Save it
4) after save, the status shows as 'Open' (but it should show as completed) but if we come out of the transaction and come again to the same transaction, we can see now that it is in completed status.
Is there any thing to be checked or SAP usually works like this?
As whenever an user change the status from open to completed, an follow up activity is created, since here the user see the open status again in the same transatcion (after saving), he/she again change the status from open to completed and save.. so it now creates two follow-up activity..
Please help.HI
i had similar issue when I planned callback after saving document (function module with commit was doing sth).
This commit caused that status displayed on my document was previous not actual. When entering document again status was ok.
So check if there are any function modules with commit launched after you save document (of course I do not mean standard commit for saved document).
Regards
Radek -
OWB Issue|| ORA-12838: cannot read/modify an object after modifying it in
Hi
I am not able to enter the data into the staging table .
it is also not throwing any error ,only giving warnings.
so as a next step i just took the intermediate result generation and try to run it
but it is giving me an error in that
ORA-12838: cannot read/modify an object after modifying it in parallel
Can you please help me in tthis case.
ThanksHello,
The error ORA-12838 occurs if you try to issue SELECT/DML immediately after completing parallel DML, within one transaction - it's not permitted.
Start another transaction - issue Commit or Rollback first. -
Post Author: queen3
CA Forum: General
I use C#/VBScript (tried both) to update database location for all subreports and save new report:- open report- update location (LogOnInfo / SetTableLocation / etc);- SaveAs.Nothing more. This works fine on my machine. However, on client's computer the only subreport which uses stored procedure (others use views) is saved with fields messed up. For example, there're 2 fields: "number" and "text" with display formulas. After saving they "field source" is flipped - "number" become "text" and vice versa. However, their formulas remains the same! So after SaveAs we got "number" with text formula and "text" with number formula! This results in incorrect displaying and errors in formulas (like, "a string is required here").The fields are not swapped; there're 9 fields and they are RANDOMLY replaced with another ones, some of them even remain valid.This happens only on client's computer and only for subreport which uses stored procedure.FIXED!
if you have this issue the best way to see if the dynamiclink server is in a crash loop. It will intermittently freeze your machine. On the task manager you will see it starting and quitting.
see http://forums.adobe.com/message/3196845#3196845
post 15. Solved it for me (the prefs in dynamiclinkmanager)
cheers
chris
Maybe you are looking for
-
I'm having problems with my Time Capsule (doesn't everyone seem to?). Just checked my backups on the Powerbook only to be told the last backup was in July. Tried 'backup now' - 'preparing backup' message displayed but never progressed to 'Backing up'
-
I must have accidentally clicked the mouse somewhere on the toolbar. All of a sudden , the whole page was in minute print.
-
EAP MD5 with ISE 1.2 - How to Prevent Active Directory Account locks?
Hi, Is there any how to prevent accounts to be locked in AD if someone do a password brute force attack in a account? ISE has some feature/Configuration to prevent this type of attack ? Thanks.
-
I have a preloader, but...
I have an mp3 file in a Flash movie using Flash MX. The movie purely consists of the mp3 file and a stop and play button. I would like the music (or movie) to play when 50% loaded and I am searching the net to find a way. I already have a preloader w
-
The ipod is diabled when connected to the itunes
the ipod is disabled