Import variable from classical BADI to workflow

Hi Experts,
I have created a BADI containing the function GET_COMMENT so that a popup appears and an approver enters a comment after they click on the reject button in transaction ME54N. The text that they enter should should be exported the workflow and also should be sent to the mail notification sent to the creator (initiator) of the PR. Definition name is ME_COMMTMNT_REQ_RE_C, interface is IF_EX_ME_COMMTMNT_REQ_RE_C. How do I export the variable so that it can be seen in the workflow? Can I have a step by step procedure as I am quite new to workflow.
Regards,
Darlington

Please take a look at my code implemented in the BADI. Is what I have done correct? The first IF statement is just so that the popup does not appear when it's not needed.
DATA: l1(120) TYPE c,
        l2(120) TYPE c.
  DATA : lt_cont TYPE TABLE OF swr_cont.
  DATA : ls_cont TYPE  swr_cont.
  CLEAR: l1,l2.
  IF sy-ucomm = 'MESAVE' OR
     sy-ucomm = 'OK'.
    EXIT.
  ELSE.
    INCLUDE <swfcntn01>.
    CALL FUNCTION 'GET_COMMENT'
      EXPORTING
        ref               = '123'
*   IM_VALUE          = ' '
     IMPORTING
       tech_name         = l1
       description       = l2
     EXCEPTIONS
       cancelled         = 1
       OTHERS            = 2
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ls_cont-element = 'l2'.
    ls_cont-value = l2.
    Append ls_cont TO lt_cont.  
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
      EXPORTING
        TASK                      = 'TS20000161'
*   LANGUAGE                  = SY-LANGU
*   DO_COMMIT                 = 'X'
*   USER                      = SY-UNAME
*   START_ASYNCHRONOUS        = ' '
*   DESIRED_START_DATE        =
*   DESIRED_START_TIME        =
*   DESIRED_START_ZONLO       = SY-ZONLO
*   IFS_XML_CONTAINER         =
* IMPORTING
*   RETURN_CODE               =
*   WORKITEM_ID               =
*   NEW_STATUS                =
* TABLES
*   INPUT_CONTAINER           =
*   MESSAGE_LINES             =
*   MESSAGE_STRUCT            =
*   AGENTS                    =
  ENDIF.
Regards,
Darlington

Similar Messages

  • Importing variables from another page in jsp

    Hey.
    I want to make two pages. I want the first page to include the variables from another page or POJO.
    I did this but i cant use the variables in index.jsp without initializing them first. But when I initialize them i get an error when trying to initialize them two times.
    if i use the variable in index without saving i get an error in eclipse.. but it works if i save and deploy.
    Is there any way to make eclipse see that i have imported the variable?
    The pages look something like this:
    index.jsp
    <%@ include file="extra.jsp" %>
    Print the number from the extra page
    <%= number %>extra.jsp
    int number = 32;I plan using this in a much greater system so I would appreciate any help.

    I'm having the same problem.
    Would be nice if somebody could help us.

  • How to import variables from timeline to a class?

    I'm pretty noobish to ActionScript 2.0, so I'm still reading an Ebook. But I wanna make a game where you can get skill points, and then use them on a buttons, and when you have pressed the button, your character gets 3+ speed. I can use the skill points and stuff, but I can't add the 3+ speed to my character, so I made a variable in frame 1 that's named "speedupgrade", and that variable gets 3+ if you press the button. And I made a variable in frame 3 called "speed1". And in my character, I made a variable "speed", and it was speed1+speedupgrade. I can show you guys the code.
    On my button
    on (release) {
              if (skill >= 1)
                        skill -= 1;
                        speedupgrade += 10;
              else
                        gotoAndStop(22);
    frame 1
    var skill:Number = 1;
    var speedupgrade:Number = 1;
    frame 3
    var speed1:Number = 7;
    My character
    var speed:Number = speed1 + speedupgrade
    I can't see the problem, because I'm not very experienced with this...

    If you are expecting
    var speed:Number = speed1 + speedupgrade
    to automatically update every time the values of the variables change, that will not happen.  If the variables change you need to execute the code again so that the new values get used.
    If you are just learning AS2, you should get away from a bad practice right away.  Do not place code "on" any objects, such as what you are doing with that button.  Give your button an instance  name and use it to assign code to it from the timeline so that you have all your code in one easy to find location.  If you named your button "btn", then the timeline code for it would be...
    btn.onRelease = function(){
           if (skill >= 1) {
                     skill -= 1;
                     speedupgrade += 10;
            } else  {
                     gotoAndStop(22);
    and if you have multiple button with the same code you could just create the function and assign it to the buttons ...
    btn1.onRelease = btnClick;
    btn2.onRelease = btnClick;
    function btnClick(){
           if (skill >= 1) {
                     skill -= 1;
                     speedupgrade += 10;
            } else  {
                     gotoAndStop(22);

  • Importing photos from classic iPod or iPhone into iPhoto

    My students are bringing in photos stored on their classic iPods or iPhones to import into iPhoto for use in their multimedia projects using either iMovie or iDVD. Some iPods and iPhones are not being recognized (no icon on the desktop) by the iMac when the USB cords are connected. The screen flashes "Do Not Disconnect" on the iPod or an error box appears saying something about only being able to sync to one library. I tried my daughters iPod and when I did the sync the photos were removed from her iPod. How can I get these great images into my students iMovie or iDVD projects without wiping out the photos from their iPod. Please help Thanks!

    Welcome to the Apple Discussions. There are some 3rd party applications for copying photos from an iPod to a Mac. See this search result at VersionTracker.com.
    Also ask in the iPod and iPhone forums. I think you'll get more users there who have addressed that issue there.
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • How to access a variable from one program to another (independent)

    Hi,
    My requirement is to use a variable(value) from one program(prog1) to another (prog2). how is it possible.
    Regards
    Arani Bhaskar

    Go for memory id .
    passing on values from one program to another program
    Program1
    EXPORT (variable) TO MEMORY ID 'LOC'.
    Program2
    IMPORT (variable) FROM MEMORY ID 'LOC'.
    LOC is the address , for more press f1 on export in abap editor.

  • How to undo migration of classic BADI from enhancement spot...

    Hello Experts,
    Is there a way to "UNDO" if a BADI is migrated to a custom enhancement spot? I want to
    revert it back to its "classic" status.
    Thank you guys and take care!

    hai do u want to undo migration of custom badis or standard badis
    if for custom badis then from se18 just u can delete the definition form teh enhancement spot
    if for standard badi then i guess it is not advisable
    and if u want a classical badi to be created just select utuilites --> create classical badi definition and it wil not ask for spots
    m.a

  • Passing variables from JSP to workflow

    I want to pass some variables from my JSP forms to a workflow. The workflow is triggered when I call processLaunch.jsp with the name of the workflow. I couldn't figure out a way to have the input fields in my JSP form passed to the workflow.
    If anyone can provide me with some answer, I'd greatly appreciate it.

    <Property name='postURL'>
    <block>
    <concat>
    <s>user/processLaunch.jsp?id=</s>
    <ref>ConstantData.REGISTERED_PROCESSES.WF_COMMON_ITARUPDATE</ref>
    </concat>
    </block>
    </Property>
    I have this code on the form...how should I pass a op_enduserId from here to my workflow. Can I pass it by query string &op_enduserId=enduserId

  • How to import values from txt and pass values to variables

    I need to export some variables from Indesign and import them in Illustrator.  I can export a txt file from InDesign but I don't know how to import and pass the values to variables in Illustrator.
    Can someone help?

    Well from you ID script Im presuming that you are simply writing a few lines of info to a plain text file like so…
    writeFile('SomeData');
    writeFile('AnotherData');
    writeFile('LastData');
    function writeFile(info) {
         try     {
              var log = File('~/Desktop/ID_Data.txt');
              log.open('a');
              log.write(info + '\r');
              log.close()
         catch (e) {
              alert(e);
    So you would just read this back where or when ever you need to use it in your Illustrator script…
    var log = File('~/Desktop/ID_Data.txt');
    log.open('r');
    var a = log.readln();
    var b = log.readln();
    var c = log.readln();
    log.close();
    alert(a);

  • AS3 send/import variables to/from php file

    Hi
    im new I would like to send some variables from ac3 to a
    php-file. the
    php-file have to copperate with this variable (send
    querystring to
    mysql-server).
    ac3 have to read then new variables and traced it on the
    screen.
    i found some examples on the net but i have not undersood
    any.
    can you please explane that to me????
    Sebastian

    Hi
    im new I would like to send some variables from ac3 to a
    php-file. the
    php-file have to copperate with this variable (send
    querystring to
    mysql-server).
    ac3 have to read then new variables and traced it on the
    screen.
    i found some examples on the net but i have not undersood
    any.
    can you please explane that to me????
    Sebastian

  • Passing variables from AS3 to PHP

    Hi there
    I am having some trouble in passing variables from AS3 to PHP. I am using flash and php both in the same file [try.php].
    I've stuck with this for two days.. Here's what I have done. Please help!!!
    header.fla [Actionscript in the timeline]
    stop();
    import flash.events.Event;
    import flash.display.Sprite;
    import flash.net.*;
    var url:String = "http://localhost/0000/try.php";
    var req:URLRequest = new URLRequest(url);
    var loader:URLLoader = new URLLoader();
    var variables:URLVariables = new URLVariables();
    send_btn.addEventListener(MouseEvent.CLICK, sendForm);
    function sendForm(evt:MouseEvent):void
        // add the variables to our URLVariables
        variables.asd = "value";
        // send data via post
        req.method = URLRequestMethod.POST;
        req.data = variables;
        loader.dataFormat = URLLoaderDataFormat.TEXT;
        // add listener
        loader.addEventListener(Event.COMPLETE, onLoaded);
        loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
        //send data
        loader.load(req);
    function onLoaded(evt:Event):void
        var result_data:String = String(loader.data);
        if (result_data)
            trace(result_data);
        else if (!result_data)
            trace("error");
    function ioErrorHandler(event:IOErrorEvent):void
        trace("ioErrorHandler: " + event);
    try.php
    <body>
    <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="563" height="280">
      <param name="movie" value="header.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="6.0.65.0" />
      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
      <param name="expressinstall" value="../Scripts/expressInstall.swf" />
      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="header.swf" width="563" height="280">
        <!--<![endif]-->
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="6.0.65.0" />
        <param name="expressinstall" value="../Scripts/expressInstall.swf" />
        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
        <div>
          <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
        </div>
        <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>
    <?php
    if($_POST['asd'])
    echo "value of var1 is <b>".$_POST['asd']."</b>";
    else
    echo "bad luck";
    ?>
    </body>
    BIG THANKS!!

    the problem is nothing your showed.   did you see a security warning that you ignored?
    to test, if that's the problem go here and adjust your security settings:  http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.ht ml
    if that fails, upload your files to a server and confirm everything works.  then start working on your local configuration.

  • Classic BAdi and New BAdi ...

    Hi all,
    I have a question regarding the new BAdi concept using enhancement spots.
    With the classic BAdi's once we create an implementation it will call up our implementation when the BADI class is been called.
    But with the new concept we have to explicitly call the BAdi we created right ? doesn't this mean modifiying the standard code ( If there's no ehancement section or point )?
    Can someone tell me whether there is another way to call our implementation by using GET BADI and CALL BADI statement without modifying standard code ( by creating an explicit enhancement).
    Cheers,
    D.

    hi,
    Classic and new BAdIs differ in a number of features that are important for migration:
    1. BAdI object
    a. With classic BAdIs, a BAdI object is created by calling a factory method, and referenced via a reference variable of the type of the BAdI interface.
    b. With new BAdIs, a BAdI object is created via the ABAP statement GET BADIas a handle for the calls of BAdI methods, and referenced via a reference variable of the type of the BAdI. A BAdI object is an instance of an internal BAdI class, which otherwise is invisible to the outside.
    2. Passing comparison values for the filter
    a. With the classical BAdIs, the filter values are stored in a structure and passed with the call of the BAdI methods.
    b. With the new BAdIs, the comparison values for the filters used to search for implementations are passed when the BAdI object is created with the GET BADIstatement.
    There is no way of migrating the call of the factory method one-to-one into the ABAP statement, because GET BADI can also return an existing BAdI object, which is not possible with the factory method.
    3. Calling BAdI methods
    Passing comparison values for the filter
    a. A classic BAdI can be called only once and the call positions are registered centrally.
    b. With new BAdIs, multiple calls are possible and the call positions are not registered centrally.
    For the above reasons, an automatic call migration is not possible.
    Have a look at below link.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ee/6f3b42ea85b26be10000000a155106/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/4d3e42fc94aa04e10000000a1550b0/content.htm
    I hope it helps.
    Best Regards,
    Reshma

  • Whats is the diff. btw classic badi and new badi

    Hi guy,
    I just found out that there is classic and new badi implementation in SE19, I would like to check out with u guys on what is the diff btw the two?
    thanks.

    <b>Differences Between Classic and New BAdIs</b>
    Classic and new BAdIs differ in a number of features that are important for migration:
    1. BAdI object
    a.      With classic BAdIs, a BAdI object is created by calling a factory method, and referenced via a reference variable of the type of the BAdI interface.
    b.      With new BAdIs, a BAdI object is created via the ABAP statement GET BADIas a handle for the calls of BAdI methods, and referenced via a reference variable of the type of the BAdI. A BAdI object is an instance of an internal BAdI class, which otherwise is invisible to the outside.
    2. Passing comparison values for the filter
    a.      With the classical BAdIs, the filter values are stored in a structure and passed with the call of the BAdI methods.
    b.      With the new BAdIs, the comparison values for the filters used to search for implementations are passed when the BAdI object is created with the GET BADIstatement.
    There is no way of migrating the call of the factory method one-to-one into the ABAP statement, because GET BADI can also return an existing BAdI object, which is not possible with the factory method.
    3. Calling BAdI methods
    Passing comparison values for the filter
    a.      A classic BAdI can be called only once and the call positions are registered centrally.
    b.      With new BAdIs, multiple calls are possible and the call positions are not registered centrally.
    For the above reasons, an automatic call migration is not possible.
    Have a look at below link.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ee/6f3b42ea85b26be10000000a155106/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/0e/4d3e42fc94aa04e10000000a1550b0/content.htm
    I hope it helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Accessing global variables in a BAdI

    How can we access the global variables of a program from a BAdI ?The BAdI does not have that particular variable as a part of it's importing/exporting parameter.The BAdI gets triggered at a particular point in the program.The name of the BAdI is /SAPAPO/SDP_SELECTOR and the transaction is /SAPAPO/SDP94(Demand Planning: APO).
    Thanks,
    Savitha

    Hi,
        Try to export the variable to memory id or use database memory id.
    Like this.
    Export l_vbeln to memory id 'ZTEST'.
    you can give any name instead of ZTEST.
    or u can export to database memory id
    EXPORT tab = lt_vbkd
      TO DATABASE indx(V1)
      FROM ls_indx ID 'ZTEST'.
    Regards,
    Niyaz

  • Importing clips from iMovie - jittery

    Just got Final Cut Pro 5 and I'm having a problem with importing clips from iMovie into FCP5. The clips were fine in iMovie, but the images are jittery in FCP. I tried Apple Care, but they wanted to charge me $200 to answer my question eventhough I just bought the software yesterday!
    any ideas most welcome - thanks

    Nowhere is it advertised that iMovie is compatible with FCP.
    One is a consumer format, with less features, like lack of timecode. The other is a professional format, which relies heavily on timecode.
    Yes, output to tape from imovie, then capture with FCP.
    #20 Using iMovie to Capture for FCP edit
    Shane's Stock Answer #20:
    iMovie handles the media differently from FCP, specifically where audio is concerned. So it is not a recommended workflow. Here's why...
    iMovie captures using DV Stream (.dv) standard which does not use timecode. That is a big disadvantage over the way that FCP captures in that you can't go back and recapture the material at a later date if you need to revisit a project.
    The DV/NTSC specification (the one FCP uses) also calls for seperate tracks for audio and video, even if you capture it as one clip. iMovie' DV stream format is muxed audio and video, which means that they are tied together (I can't get into specifics because I ain't no engineer or programmer). FCP is a bit more demanding and captures the seperate audio/video tracks, either in a single media file or as seperate video and audio files. With FCP you could capture video only or audio only because each is defined by the DV specs. while with iMovie you can't.
    Also, if you drop the iMovie footage into the timeline, your will get the RED render bar forcing you to render the footage in order to see it...
    "There's no need to fear, UNDERDOG is here!"

  • Pass the data from a form in workflow to z table

    Hi all,
    How can I pass the data from a form in workflow to z table?

    Thanks for your answer, I tried the solution 2, I create "Submit" button, and ser the mapping scope to  be "All data rows", it only works when I select at least one row, otherwise the data would not be passed.
    Another question is I have serveral imported table parameter, for each table I have one "submit" event, I want these tables to be submitted at the same time, but if I click the submit button in one table toolbar, I can only submit the table data which has a submit button clicked, for other tables, the data is not passed, how can I achieve it?
    Thanks.

Maybe you are looking for

  • Function module of smart form delivered an error

    Hi All, I am getting an error like this "Function module /1BCDWB/SF00000007 of smart form delivered an error" FUNCTION /1BCDWB/SF00000007. ""Global interface: *"       IMPORTING *"             VALUE(ARCHIVE_INDEX) TYPE  TOA_DARA OPTIONAL *"          

  • Using USB Microphone With GarageBand iPad?

    Hi, I have the Samson G-Track USB Microphone and have been using it with GarageBand for iPad (with a powered USB hub) and I was wondering if there is a way to enable "Monitor" so that when I speak into the microphone I can hear myself in the headphon

  • Unable to read Properties file from Java code

    Hi, The directory structure of my application is as follows:- My App ++++++ src ++++++++com ++++++++++readProp.java ++++++++resource ++++++++++message.properties I am trying to read the file as follows:- <code> public Static final string FilePath="re

  • How to use an array for variable name of swing components using NetBeans

    I'm completely new to Java and GUIs, so excuse me if I use the wrong terminology. I'm making a JFrameFrom in NetBeans. I'm getting really tired of typing instructions like jTextField15.setText(variable[15].text); I would like to make the variable nam

  • Servlet that contains native metrhods

              Hi,           I'm getting an error of unstatisfied link error whenever I call a servlet that           containes a native methods.           Does anyone know how to do this? The Weblogic Frequently Asked Questions:(S-side           java ser