Need advise on doc save badi

Hi,
   My requirement is when PO is in held status and ordered then only save badi should be called.
ex
po hold -
> ordered
save badi to be called
po in approval -
> change and ordered
save badi not to be called
how can I acheive this in the code
Ingen

I think you may put a check in your save_badi for PO status,
if held, the continue the badi, else just skip it.

Similar Messages

  • Multiple Insert in Doc Save Badi when publishing Bid Invitation

    Hi to all experts,
    Currently i need to track changes in bid invitation. What i did is using doc save badi to get the value (bbp_bd_bid_getdetail) and compare them with the value i save in a cutom table.
    Then the problem come in. Even if there is no changes, the badi will still cause an insert into my custom table. I used the debugger to go through the code and it never go to my insert statement.
    However once i finishing running the dubugger, my custom table will have a new entry...
    Why is this happening? IS it due to the different GUID in the bid invitaion?
    Points will be awarded generaously, thanks again for reading.

    Hi Disha and Marcin,
    Thank you so much for your prompt replies. I have awarded points. We are using SRM 5.5.
    Correct me if I am wrong, I have thought of using the doc_change badi but how do I confirm the changes should user cancel the transaction?
    Hi Marcin,
    I am new to this term LUW, please elaborate more on this.I have checked and confirm no other program or badi called my function modules.
    I have suspected that the badi was called n-times and insert a line into my custom tables. I tried using modify in place of insert so that such problem can be avoided but this was not successful with saving longtext.
    What I notice is after the system undergo a patch, the doc save badi started to behave in this way?
    Please kindly advise, all SAP experts! Thank you!

  • Doc Save As and Trusted Function

    I have been reading over the forum and the adobe help files regarding this. I think I am close but since I need to get my IT department to assist in placing the js files where they have to go, I thought I might ask the forum if I am on the right track
    I still have to make sure the field values will not include an illegal characters. They wont be empty as the forms will be coming directly from our system -prefilled
    Currently these forms automatically email (although staff still have to hit the actual send button) when staff go to print the document.  The people who get these forms are just finding it a bit hard to keep up with the emails and have asked to just have the files save to a folder so they can look at when they have time
    This is what I have for my trust propagator function.  I assume this is the only js file I will need as it incoporates the trusted function?
    mySaveAs = app.trustPropagatorFunction(function(doc,path)
      app.beginPriv();
       doc.saveAs(path);
      app.endPriv(); })
    myTrustedSpecialTaskFunc = app.trustedFunction(function(doc,path)
      // Privileged and/or non-privileged code above
      app.beginPriv();
       mySaveAs(doc,path);
      app.endPriv();
      // Privileged and/or non-privileged code below });
    I got this code from the Adobe Help
    then I want to have this code in the Document Did Print area
    var name = this.getField("FormValues.accountNames_0").value
    var folio =this.getField("FormValues.folioNumber_0").value
    myTrustedSpecialTaskFunc(this, "/w/Public/AccountOpening/" + name + " " + folio,pdf);
    I have to read where to put the js file as I have seen some comments on the forum that where you place the js file has changed for those with Adobe X and Windows 7
    Would anyone be be able to let me know if I am on the right path before I get IT involved.  I suppose I could test the code on my own laptop to see if it would allow me to save the form.....
    Thank you

    Read this: The Acrobat Ninja: Acrobat 10.1.1 JavaScript changes
    You have to manually create the folders that aren't present, and they must be named correctly.
    It's a good idea to use the valueAsString property instead of the value property to get the field values, since you're using the results as strings. It probably won't make a difference here, but it's a good habit to get into. You also have a typo in that last line of code. It should be:
    myTrustedSpecialTaskFunc(this, "/w/Public/AccountOpening/" + name + " " + folio + ".pdf");
    It would be a good idea to make sure those field value aren't blank if there's a chance that they could be.
    Also, consider using a try/catch block for the doc.saveAs call, and look at the return value so you can give the users a more helpful error message than what the default will be if something goes wrong.
    If you need help with any of this, post again.

  • How do I write a javascript code to open InDesign File, import Doc, save and export to pdf?

    How do I write a javascript code to open InDesign File, import Doc, save and export to pdf?

    Hi hasvi,
    Need Template(.indt), textframes etc for the following script:
    var myFolderInd = Folder.selectDialog();
    var myFile = myFolderInd.getFiles("*indt");
    app.open(myFile)
    var myDoc = app.activeDocument;
    var myDocName = myDoc.name;
    var mySaveFile = app.activeDocument.save(myFolderInd.fsName + "/" + myDocName.split(".indt").join(".indd"));
    var myFolderDoc = Folder.selectDialog();
    var myFile1 = myFolderDoc.getFiles("*doc");
    mySaveFile.pages[0].textFrames[0].place(File(myFile1))
    //~ mySaveFile.place(File(myFile1))
    app.activeDocument.textPreferences.smartTextReflow = true;
    var myPDFFile = new File(mySaveFile.filePath + "/" + mySaveFile.name.split(".indd").join(".pdf"))
    myDoc.exportFile(ExportFormat.PDF_TYPE, File("~/Desktop/abc.pdf"));
    alert("Process Completed")
    Regards
    Siraj

  • In DOC CHECK BADI: Check if PO has a SC when coming from a BID

    Hi Experts,
    Please consider this situation and recommend best possible approach.
    From Sourcing, I raise a BID and then create a PO from the BID.
    While PO creation, I need to check if this PO had SC and if so include the SC requestor in the approval if the price has increased while Bidding when compared the created SC.
    Here I am facing a challenge - When executing the DOC CHECK BADI, the FM: BBP_PROCDOC_GETDETAIL does not result any HEADER_REL itab values that shows any history details of the PO document. Whereas by the time the logic moves to the Workflow BADI, this same FM returns values (SC and other details).
    My Query: While creating from a BID, How can I check if this PO is generating out of a SC in the DOC CHECK BADI.
    Thanks in advance.
    Vj

    Hello Asha,
    You can check this BADI "BBP_ITEM_CHECK_BADI" and this badi is called when
    u2022     a new item has been created,
    u2022     an item has been changed or the document is to be checked
    Regards
    Sameer

  • SD Process Design for Plantation industry - need advise

    Hi all experts,
    I am implementing for a crude palm oil plantation company, in which the general flow of the sales process from Estate to the Milling Plant is as below:
    Sales Order --> Delivery Order* --> PGI --> Billing*
    Sales Order: The fresh fruit bunches (FFB) is harvested and then the amount required by the Buyer is fulfilled via creation of a sales order.
    Delivery Order: At this stage, it will interface with the Weighbridge system to carry out the recording of delivery quantity. Truck without the FFB is weighed once at entrance of the estate, and truck with FFB is weighed at exit at estate.
    PGI: Goods Issue is carried out with the recording of the actual quantity from the weighbridge interface back to SAP.
    Billing: The billing doc is created based on PGI quantity done.
    This looks pretty straightforward, but there are few concerns from the above process as highlighted in the asterisk (*) section:
    Issues:
    1. During the Delivery portion, data of the Driver, name, person loading and weight loaded need to be recorded at the same time to carry out the incentive payment to the drivers (both internal and external drivers) with incentives calculated on per tonnage basis.
    2. Secondly, during Billing process, the amount payable would be calculated based on the grading of the FFB + the which year the FFB is planted (i.e. different year would have different pricing per ton).
    Need advise on how to make the above two issues work smoothly along with the process above.
    Opinion, comments and feedbacks is much appreciated.
    Thanks.

    The loader and driver data is integrated to PP and the HR master module is leveraged to maintain driver/loader data master and payment is made to driver via customized program with customised calculation of salary.
    The FFB is handled using PP module for Production and material posted via MIGO in MM and increases stock take manually.
    SD to handle sales of finished goods instead..

  • Why do I have to run a  doc.saveAs() prior to Inserting, Deleteing, or Extracting pages?

    MY SETUP:
    I'm using folder level javascripts.   In Acrobat I have the 'enable menue items javascript execution privledge' enabled,  In my actual folder level scrips I have them wrapped in a trusted function along with app.beginPriv()/app.endPriv().    My PDF's are coming from LiveCycle Designer which I then open and run in Acrobat.
    MY QUESTION:
    Through much trial and error and banging my head on the wall I've found that if I want to use insertPages(), extractPages() or deletePages() called as a trusted fucntion  on its own it won't work unless I first run a saveAs() function to create a new document file and only then can I run the desired function on the new saveAs'd doc.   I simply can't run an insertPages() on the current open doc without a saveAs first().    
    Why is that?
    I find that very frusterating and the resulting errors aren't a help.  If I don't SaveAs first I get security error or invalid function errors.
    EXAMPLE:
    Save As Function:
    var LCB_SaveAs = app.trustedFunction(function(doc, filename) {
        app.beginPriv();
        doc.saveAs(filename);
        app.endPriv();
    Insert Page Function:
    var TEST_InsertPage = app.trustedFunction(function(doc, filename) {
        app.beginPriv();
           doc.insertPages ({
               nPage: -1,
               cPath: filename
           app.endPriv();
    Javascript code in document to call the above functions:
    if(typeof(LCB_SaveAs) == "function") {
        if(typeof(TEST_InsertPage) == "function") {
            try {
                TempFileLocation = "/C/PATH/InsertTemp.pdf"
                LCB_SaveAs(event.target, TempFileLocation);
                try {
                    PathOfInsertDoc = "/C/PATH/FileToInsertIntoSaveAs'dDoc.pdf"
                    TEST_InsertPage(event.target, PathOfInsertDoc)
                catch(e) {
                    xfa.host.messageBox(e.toString().replace("RaiseError: ","") , 0, 0); 
            catch(e) {
                xfa.host.messageBox(e.toString().replace("RaiseError: ",""), 0, 0); 

    Hi George.  Yes I'm using static XFA forms which were created with PDF's as basic 'artwork' in the background and then my custom fields and script tunning on top. 
    I've tried running  a function (below) in the console, but did nothing -- maybe a syntack error.  I don't know what that may or may not mean though.  I'm not use to running stuff through the console so I could be doing it wrong.  My console experiance is limited to calling the path where the javascripts folder resides.
    Attempt script in console:
    var MJS_HN_Delete_RevisitForm = app.trustedFunction(function(doc) {
        app.beginPriv();
        doc.deletePages(15, 15);
        app.endPriv();
    and/or this:
    app.trustedFunction(function(doc) {
        app.beginPriv();
        doc.deletePages(15, 15);
        app.endPriv();

  • I need advise and help with this problem . First , I have been with Mac for many years ( 14 to be exact ) I do have some knowledge and understanding of Apple product . At the present time I'm having lots of problems with the router so I was looking in to

    I need advise and help with this problem .
    First , I have been with Mac for many years ( 14 to be exact ) I do have some knowledge and understanding of Apple product .
    At the present time I'm having lots of problems with the router so I was looking in to some info , and come across one web site regarding : port forwarding , IP addresses .
    In my frustration , amongst lots of open web pages tutorials and other useless information , I come across innocent looking link and software to installed called Genieo , which suppose to help with any router .
    Software ask for permission to install , and about 30 % in , my instinct was telling me , there is something not right . I stop installation . Delete everything , look for any
    trace in Spotlight , Library . Nothing could be find .
    Now , every time I open Safari , Firefox or Chrome , it will open in my home page , but when I start looking for something in steed of Google page , there is
    ''search.genieo.com'' page acting like a Google . I try again to get raid of this but I can not find solution .
    With more research , again using genieo.com search eng. there is lots of articles and warnings . From that I learn do not use uninstall software , because doing this will install more things where it come from.
    I do have AppleCare support but its to late to phone them , so maybe there some people with knowledge , how to get this of my computer
    Any help is welcome , English is my learned language , you may notice this , so I'm not that quick with the respond

    Genieo definitely doesn't help with your router. It's just adware, and has no benefit to you at all. They scammed you so that they could display their ads on your computer.
    To remove it, see:
    http://www.thesafemac.com/arg-genieo/
    Do not use the Genieo uninstaller!

  • Oracle Procurement/Sourcing :- Need advise on an implementation design

    Dear Guru's,
    Need advise on an implementation design
    Problem Summary :-
    Our client(say "X") is contracted to perform certain business functions for their client (Say"Y")
    Say "X" is do sourcing (RFP,RFQ) functions till PO creation,receiving in a excel based custom application ( Not through oracle EBS) for client "Y".
    So "X" is not responsible for paying for those services and "Y" pays for those receipts.
    We want to implement Oracle EBS Advance procurement solution for their above functions and replace the custom application processes.
    But client "X" is not accepting advance procurement solution as they("X") are not paying for the services and they don't want to fit this solution in Oracle EBS as this may cause legal issues.
    Questions:-
    1. Whats the best design solution for this type of scenario to fit the custom process into Oracle EBS procurement ?
    2. Can we follow the sourcing implementation process(RFQ/RFP)-> PO Creation-> PO receipts-> AP Invoice matching in Oracle EBS and is there a way to nullify this transaction in Oracle so      that there will not be any legal issues? May be creating credit memo/AR invoice etc...
    Appreciate your help!
    Thanks
    Karthik

    Hi All,
    Once basic question on the centralized procurement model. Please advise.
    Scenario :-  Two OU(OU1- Requesting OU and OU2- Purchasing OU) Scenaio:-
    1
    Purchase Requisition in OU1
    2
    AutoCreate PO in OU2
    3
    Approve PO in OU2
    4
    Receive the material in INV1 of OU1
    5
    Supplier sends the invoice to OU2
    6
    Cost the transactions
    7
    Run ‘Create Intercompany AR invoices in OU2
    8
    Run ‘Auto Invoice Master Program in OU2
    9
    Run ‘Create Intercompany AP invoices in OU1
    10
    Run ‘Expense Report Import in OU1
    Question:-
    1. After step 5(Supplier sends the invoice to OU2) who will do the payment for supplier and what's the process?
    2. I could see the intercompany invoice process in further steps which creates invoices, but not sure on how supplier payments are paid.
       In which step the paymens(Supplier, Intercompany) are processed.
    Please advise!
    Thanks
    Karthik

  • Doc.saveAs() and filenames with commas

    Using Acrobat 9,  I have convinced myself that commas confuse the innards of the doc.saveAs() function. For example, from the console, the following throws an error:
    this.saveAs("john, jimmy.pdf");
    the error: "UnsupportedValueError: Value is unsupported. ===> Parameter cPath."
    I am more than a little stunned. It's been more than 10 years since the major operating systems allowed commas in the path.
    Am I overlooking something trivially obvious?

    Thanks for that link to the "wish forum".
    I have reported failure to accept commas in the path as a bug.
    I'll keep this question open for just a little longer.
    Does anybody know of any tricky escape character sequences that might solve the problem? I have failed with "\," and various ideas for nested quotes.

  • Doc Change Badi

    Hi All,
    Doc change badi is triggered twice. Once with old values and once with new values.
    How will I know when this badi is for new values. Is there any attribute showing the values are edited.
    I want to know this for item check badi also as i want to validate badi for the new values and not for the old values of the fields.
    Thanks.
    Edited by: santosh.p on Jan 30, 2012 7:50 PM
    Edited by: santosh.p on Jan 30, 2012 8:05 PM

    Hi santosh,
    As I konw, the imported internal table for items only contains the changed items.
    You can try to use FM 'BBP_PD_SC_GETDETAIL' to get the last changed item data, then compare them.
    Hope this can help you!

  • Need advise, I have purchased compressor 4.1 to compress my movie file, particularly MKV files. Problem is, that the software freezes when trying to import the 10GB MKV. Any one that can help?

    Need advise, I have purchased compressor 4.1 to compress my movie file, particularly MKV files. Problem is, that the software freezes when trying to import the 10GB MKV. Any one that can help?

    Afraid Compressor won't work with MKV. If you have access to a system running an earlier version than Mavericks, and with Perian installed you can use MPEG Streamclip or Quick Time Pro to convert to a mov.
    Russ

  • HOW CAN I START DOWNLOADS AUTOMATICALLY? I DON'T NEED TOO SEE THE SAVE OR DISCARD BOX. THIS BUGS THE CRAP OUT OF ME. CAN I CHANGE THIS, OR ARE WE FORCED TO DO WHAT YOU THINK IS BEST? THANKS, KEITH D.

    HOW CAN I START DOWNLOADS AUTOMATICALLY? I DON'T NEED TOO SEE THE SAVE OR DISCARD BOX. THIS BUGS THE CRAP OUT OF ME. CAN I CHANGE THIS, OR ARE WE FORCED TO DO WHAT YOU THINK IS BEST? THANKS, KEITH D.

    Hey, Jeff...
    I don't know how I could have made my question any more clear -- so let me try approaching it the other way around, and refer back to your answer(s).
    You've been responding by saying that it's okay for me to remove the Creative Cloud versions of my software, but I don't have any Creative Cloud versions installed! I'm not talking about that at all, I'm talking about the software for Creative Cloud itself -- I don't use it, I don't need it, I don't want it, and all it does is nag me, telling me that there's updates for it (Creative Cloud). I have the full Adobe Creative Suite 6 Design Standard bought and paid for, I have no reason nor need to "rent" any later versions, I'm just talking about the Creative Cloud software itself that got installed on my system when I installed that suite of programs.
    Like I said, I don't use Creative Cloud at all -- all it does is "nag" me, and eat up space on my hard drive. When I go in my Windows Control Panel and look at my list of installed programs, there it is -- "Adobe Creative Suite" -- and it's listed separately from "Adobe Creative Suite 6 Design Standard" (of which I've only installed Photoshop, Acrobat and InDesign, basically, as those are the only programs I use at all at the moment). Can I just uninstall "Adobe Creative Suite" without it affecting "Adobe Creative Suite 6 Design Standard", i.e. my Photoshop, etc. will still work just fine, and I can still get updates and stuff? And by "updates" I don't mean get later versions of Photoshop, etc., I just mean any possible updates to the software that I do already have (that comes with Adobe Creative Suite 6 Design Standard).
    I hope that makes my question a little more clear?

  • I was adding songs to and existing playlist and now I can't save the changes to the playlist. What do I need to do to save the changes? All my music have now the "  " sign in front of them

    I was adding songs to and existing playlist and now I can't save the changes to the playlist. What do I need to do to save the changes? All my music have now the " " sign in front of them

    I was adding songs to and existing playlist and now I can't save the changes to the playlist. What do I need to do to save the changes? All my music have now the "+ " sign in front of them

  • Need Advise on Global Temporary tables or Materialized views or Views

    Need advise on a plsql procedure working on.
    I had 6 tables having 200,000 rows in total intially,but will get added a maximum 20,000 rows daily by a batch process.
    I am writing a plsql code that takes an input ,for example customer_id, and is required to get all the data for that customer_id and
    had to do some complex calculation that includes stepwise validations before giving the output.Now while doing the logic it has the get the data for that customer_id from all the tables.
    There may be 100 records for that particular customer_id.
    I need advise on the below options.
    1.Use of global temporary tables get those 100 records and do the calculation part on that Global Temporary table.
    2.Use of Views or Materialized views.
    3.Using the Record Structures(like table types for those records) and then do the logic on them
    As Performance is the key point here i would like pull all the data at once into memory and then do the calculations instead of hitting the database many times, this is my main idea(correct me if am wrong).Also please advise if there are any other options
    I am using ORACLE 10G.
    Thanks
    Rede

    The approach that many advocate for here (including myself) is to do as much in SQL as possible. So, copying to GTTs or using record structures is probably not the solution you should be after.
    If you can provide the following details we may be able to steer you down the right path
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.
    Ideally try and re-create the problem, simplifying it as much as possible, without losing context. Use #1-#5 above as a base for posting your simplified problem here. Then we may be able to give you a solution specific to your problem.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Regarding Participant Creation::Authentication in Oracle BPM Admin Console

    Hi, Q1:- Could anyone help me in validating whether we can additional information about participant in Admin console. The parameters available for Participant creation are: UserId, First Name,Last Name, Email, Password, Confirm Passowrd, etc. Now sup

  • Urgent ora -00353 ora-354 ora-312 errors

    hi All we are getting following errors on one of our database i found the following on metalink to resolve TIP: Click help for a detailed explanation of this page. Bookmark Go to End Subject: Ora-354 Ora-353 And Ora-312 Reported On Mirrored Redo Log

  • KDm exchange rate key

    Hi All, I have created a PO where I have changed the currency from EUR to USD at the header level and fixed a different exchange rate than existing in the system (system rate is 1.5 and I have fixed it at 1.25). Indicator "Exch. rate fixed" has been

  • Simplifying the process of making lots of pans and zooms

    I saw a plugin somewhere for helping to automate with creating lots of pans and zooms across images and videos, though I have no idea where it was. Does anyone know where I can find one? Anyone know if it is easier to do lots of pans and zooms in Mot

  • Please help with these dual monitor problem

    Ok, Well i am a final cut pro editor and i have a power mac g5 with 1.6 ghz.Its an older one but it runs great for what i need done. Anyway i wanted to go dual monitors so i went out bought a monitor and set it in place. However my graphics card only