How to close NetStream in class script

How to close NetStream in class script
I use NetStream action to play the video. It’s working perfectly. Want to know how I can close my NetStream video to clicking on the button as in class scrip. I tray this
ns.close();
but got error
NetStream class action
package {
    import flash.display.SimpleButton;
    import flash.events.MouseEvent;
    import flash.media.Video;
    import flash.net.NetConnection;
    import flash.net.NetStream;
    import flash.media.SoundTransform;
    import flash.display.MovieClip;
    public class clickbutton extends SimpleButton {
          var ns:NetStream;
          var previousVolume:Number = 1;
          public function clickbutton() {
                this.addEventListener(MouseEvent.CLICK, clickF);
          private function clickF(e:MouseEvent):void{
               MovieClip(this.root).gotoAndStop(2, "Scene 1");
               var nc:NetConnection=new NetConnection();
               nc.connect(null);
               ns=new NetStream(nc);
               var video:Video=new Video(320, 200);
               video.x=(stage.stageWidth-320)/2;
               video.y=(stage.stageHeight-200)/2;
               ns.client=this;
               this.parent.addChild(video);
               video.attachNetStream(ns);
               ns.play("video_test.flv");
               controlsF();
               this.removeEventListener(MouseEvent.CLICK, clickF);
               this.parent.removeChild(this);
      private function controlsF():void{
          MovieClip(root).play_btn.addEventListener(MouseEvent.CLICK,playF);
          MovieClip(root).pause_btn.addEventListener(MouseEvent.CLICK,pauseF);
          MovieClip(root).muteToggle_btn.addEventListener(MouseEvent.CLICK,muteF);
          // add volume listener here.  you'll need to decide how you want to control volume.
                                                function playF(e:MouseEvent):void{
                                                                ns.resume();
                                                function pauseF(e:MouseEvent):void{
                                                                ns.pause();
                                                function muteF(e:MouseEvent):void{
                                                                if(ns.soundTransform.volume>0){
                                                                var st:SoundTransform=ns.soundTransform;
                                                                previousVolume=st.volume;
                                                                st.volume=0;
                                                                ns.soundTransform=st;
                                                } else {
                                                                st=ns.soundTransform;
                                                                st.volume=previousVolume;
                                                                ns.soundTransform=st;
                                public function onMetaData(eobj:Object): void {
                                                // this needs to be in the scope of your loader
                                public function onPlayStatus(eObj: Object): void {
                                public function onXMPData(eobj:Object):void{

I make to keyfram in my time line.
In 1st keyfram on the video button I use this code
package {
     import flash.display.SimpleButton;
     import flash.events.MouseEvent;
     import flash.media.Video;
     import flash.net.NetConnection;
     import flash.net.NetStream;
     import flash.media.SoundTransform;
     import flash.display.MovieClip;
          public class palyvideo extends SimpleButton {
               var ns:NetStream;
               var previousVolume:Number = 1;
                    public function palyvideo() {
                         this.addEventListener(MouseEvent.CLICK, clickF);
                    private function clickF(e:MouseEvent):void{
                         MovieClip(this.root).gotoAndStop(2, "Scene 1");
                         var nc:NetConnection=new NetConnection();
                         nc.connect(null);
                         ns=new NetStream(nc);
                         var video:Video=new Video(320, 200);
                         video.x=(stage.stageWidth-320)/2;
                         video.y=(stage.stageHeight-200)/2;
                         ns.client=this;
                         this.parent.addChild(video);
                         video.attachNetStream(ns);
                         ns.play("video_test.flv");
                         controlsF();
                         this.removeEventListener(MouseEvent.CLICK, clickF);
                         this.parent.removeChild(this);
               private function controlsF():void{
                    MovieClip(root).play_btn.addEventListener(MouseEvent.CLICK,playF);
                    MovieClip(root).pause_btn.addEventListener(MouseEvent.CLICK,pauseF);
                    MovieClip(root).muteToggle_btn.addEventListener(MouseEvent.CLICK,muteF);
                    // add volume listener here.  you'll need to decide how you want to control volume.
               function playF(e:MouseEvent):void{
                    ns.resume();
               function pauseF(e:MouseEvent):void{
                    ns.pause();
               function muteF(e:MouseEvent):void{
                    if(ns.soundTransform.volume>0){
                    var st:SoundTransform=ns.soundTransform;
                    previousVolume=st.volume;
                    st.volume=0;
                    ns.soundTransform=st;
               } else {
                    st=ns.soundTransform;
                    st.volume=previousVolume;
                    ns.soundTransform=st;
          public function onMetaData(eobj:Object): void {
               // this needs to be in the scope of your loader
          public function onPlayStatus(eObj: Object): void {
          public function onXMPData(eobj:Object):void{
In 2nd keyfram I use this code on reply button
package  {
     import flash.display.SimpleButton;
     import flash.display.MovieClip;
     import flash.events.MouseEvent;
     import flash.media.SoundMixer;
     import flash.media.Video;
     import flash.net.NetConnection;
     import flash.net.NetStream;
          public class reply extends SimpleButton {
                              public function reply() {
                                        this.addEventListener(MouseEvent.CLICK,clickFF);
                              private function clickFF(e:MouseEvent):void{
                                        SoundMixer.stopAll();
                                        MovieClip(this.root).gotoAndStop(1, "Scene 1");
                                        ns.close();
                                        //video.attachNetStream(null);
But when I click on reply button I got this compiler error

Similar Messages

  • How to close a form within script

    Hello,
    I'm using Adobe LiveCycle Designer v 8.2 to develop an Order form. I'm fairly new to developing in LiveCycle, and would like to ask the following question that I couldn't find an answer to elsewhere.
    I'd like to know if it is possible to close a form down within a script, if certain conditions are met/not met. Specifically, when my form loads I am testing the user's version of Acrobate Reader. If it is not above the stated version, I would like the form to close down. At the moment, it displays the warning message correctly but then continues to try and load the form.
    I guess the JavaScript equivalent of Me.Close() is what I am after
    if 
    (xfa.host.version < 8.101){
    xfa.host.messageBox("Your version of Adobe Acrobat Reader is not recent enough to use this form.",
    "Wrong version of Adobe Acrobat", 1);//Code to close form to go here
    Can anyone help?
    Thanks
    Matt

    You will be able to close the form but you will not be able to close the Reader application. The command you want is event.target.closeDoc(). This will close the currently active Document. Note that if you are diosplaying in a browser then it will not close the doc ....it will only work form the Reader/Acrobat applications.
    Paul

  • How we close Views without using Java Script

    Hi All,
    can you please suggest me how i close view with out using java script.
    if possible please reply with code.
    Thanks
    Siva

    Hi Siva,
    You can do this either by hiding your window or by closing the window. Following is the sample code to do that
    IWDWindowInfo windowInfo = null;
    IWDWindow window =null;
    windowInfo = (IWDWindowInfo)  wdComponentAPI.getComponentInfo).findInWindows("<<WindowName>>");
    if(windowInfo!=null)
    window = wdComponentAPI.getWindowManager().createWindow(windowInfo,true);
    window.hide();
    Try with this code, might be useful for your scenario.
    Thanks,
    Sandeep

  • How to change the development class of a script?

    helo experts can u please explain how to change the development class of a script?

    SE03->Object Directory-->select change object entries->Execute
    Now Select FORM in second row
    Check box(tick)    R3TR     FORM     SAP Script     <Give your Script name here>
    Package   : give the current package of the script ex. $tmp
    Execute
    Now right click on your form name--> object directory ( I guess from here you can proceed)
    Reward points to all useful answers.
    Regards,
    SaiRam Reddy

  • How to close the detach popup on click of a button in the panel collection

    Hi,
    I'm using Jdeveloper 11.1.2.3.0.
    I have an af table surrounded by panel collection. There is a button on panel collection to commit the changes in the table.
    Clicked detach button to view the table in full browser.
    On click of Commit button, the detach popup is not closed. I have set partialSubmit of that button to false. Then also detach popup is not closed.
    Can anybody suggest me how to close the detach popup on click of a button in the toolbar.
    Thanks,
    Vinod

    Hi Frank,
    Thanks for your response. Popup is not closed.
    I tried this approach, when the view tree is navigated on the Detach, I see that the tree is same as if it is traversed on the page without detach.
    Printed client id and UI component class in the while loop, result is as below.
    r1:0:pc1:t3 class oracle.adf.view.rich.component.rich.layout.RichToolbar
    r1:0:pc1 class oracle.adf.view.rich.component.rich.output.RichPanelCollection
    r1:0:ph2 class oracle.adf.view.rich.component.rich.layout.RichPanelHeader
    r1:0:pgl1 class oracle.adf.view.rich.component.rich.layout.RichPanelGroupLayout
    r1 class oracle.adf.view.rich.component.rich.fragment.RichRegion
    pgl1 class oracle.adf.view.rich.component.rich.layout.RichPanelGroupLayout
    db2 class oracle.adf.view.rich.component.rich.layout.RichDecorativeBox
    db1 class oracle.adf.view.rich.component.rich.layout.RichDecorativeBox
    psl1 class oracle.adf.view.rich.component.rich.layout.RichPanelStretchLayout
    ps1 class oracle.adf.view.rich.component.rich.layout.RichPanelSplitter
    f1 class oracle.adf.view.rich.component.rich.RichForm
    Tried with setting partialsubmit property to false on the command button, still the popup is not closed and my Faces Message are shown behind the detach popup.
    Thanks,
    Vinod

  • How to close port 32773 in solaris 9

    Hi
    Need your kindly assistance to close port on solaris 9.
    Have done the rpcinof -p but can't found the port 32773 showing.According to my research, 32773 port is for rpc services.
    root@mcisdev # rpcinfo -p
    program vers proto port service
    100000 4 tcp 111 rpcbind
    100000 3 tcp 111 rpcbind
    100000 2 tcp 111 rpcbind
    100000 4 udp 111 rpcbind
    100000 3 udp 111 rpcbind
    100000 2 udp 111 rpcbind
    100232 10 udp 32779 sadmind
    100229 1 tcp 32775 metad
    100229 2 tcp 32775 metad
    100230 1 tcp 32776 metamhd
    100422 1 tcp 32777
    100068 2 udp 32780
    100068 3 udp 32780
    100068 4 udp 32780
    100068 5 udp 32780
    100011 1 udp 32781 rquotad
    100001 2 udp 32782 rstatd
    100001 3 udp 32782 rstatd
    100001 4 udp 32782 rstatd
    100002 2 udp 32783 rusersd
    100002 3 udp 32783 rusersd
    100002 2 tcp 32778 rusersd
    100002 3 tcp 32778 rusersd
    100008 1 udp 32784 walld
    100012 1 udp 32785 sprayd
    100024 1 udp 32786 status
    100024 1 tcp 32779 status
    100133 1 udp 32786
    100133 1 tcp 32779
    100021 1 udp 4045 nlockmgr
    100021 2 udp 4045 nlockmgr
    100021 3 udp 4045 nlockmgr
    100021 4 udp 4045 nlockmgr
    1289637086 5 tcp 32799
    1289637086 1 tcp 32799
    300598 1 udp 32813
    300598 1 tcp 32827
    805306368 1 udp 32813
    805306368 1 tcp 32827
    100249 1 udp 32814
    100249 1 tcp 32828
    Have done netstat -a | grep 32773
    root@mcisdev # netstat -a | grep -i 32773
    *.32773 Idle
    *.32773 *.* 0 0 49152 0 LISTEN
    Since we don't know the port is tie to which program or services thus we cant comment out anything in /etc/inetd.conf.
    Have do more /etc/services and the port not showing inside this file as well.
    Kindly assist on how to close the port for tcp 32773.
    Your assistance is highly appreciate.
    Thanks
    Regards
    Chew Chen Lai

    I am pretty sure rpc is a standalone daemon, and not managed by inetd. Instead check /etc/init.d/ and /etc/rc*** scripts.
    There may be some services that require rpc- nfs probably requires it (NFS v4 with kerberos authentication might not.) The idmap daemon used by nfs may also require this (not sure of the exact daemon name..)

  • How to close external programs?

    Hi there,
    in vbs is a command "ExtProgram(ExtProgramName, ExtProgramArg)" to
    start external programs. But how to  close external programs when
    they finished its work? Is there a vbs-command for it? Is there a way
    when calling "cmd.exe" with a proper parameter?
    Martin Bohm

    Hello Martin!
    Yes, with the tool 'tasklist' in the same directory.
    The problem is that it is not easy to query from script. I tried it in the following script. Perhaps not perfect espacially because a command interpreter pop up every time you call the function.Option Explicit
    If IsDIAdemRunning() Then
    Call MsgBox( "At least one DIAdem is running!" )
    Else
    Call MsgBox( "No DIAdem at all!" )
    End If
    Function IsDIAdemRunning()
    Dim oWshShell
    Dim oExec
    ' Execute via Shell Object
    Set oWshShell = CreateObject("WScript.Shell")
    Set oExec = oWshShell.Exec( "C:\windows\system32\tasklist.exe /FI ""IMAGENAME eq DIAdem.exe""")
    ' wait until tasklist is finished
    Do While oExec.Status = 0
    Pause(1)
    Loop
    ' no Standard Output -> no DIAdem running
    IsDIAdemRunning = Len(oExec.StdOut.ReadAll) <> 0
    End Function
    A better solution might be possible via WMI.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • How to close JDBC client connections in JSP (9IDS Jdeveloper)

    Can anyone tell me how to close JDBC connections neatly through JSP in Oracle 9IDS Jdeveloper.
    I have a developer who has deployed a WAR file (comprising JSP page) to the Tomcat webserver.
    The page works fine except that it always leaves a JDBC client connection after the user closes the internet explorer window.
    I've tried using dead connection detection without success.
    At the operating system level, I have a script that can kill these sessions but I would prefer if theres some way the connection can be closed neatly through the JSP application.

    Hi:
    At database level you can:
    See CONNECT_TIME and IDLE_TIME options to CREATE/ALTER PROFILE
    Joao

  • How to close aframe

    // how to close frame
    import java.awt.*;*
    * import java.awt.event.*;
    class Myframe1 extends Frame
      public static void main(String args[])
    Myframe1 obj = new Myframe1();
       obj.setTitle("shekar");
       obj.setSize(400,400);
       obj.setVisible(true);
       obj.addWindowListener(new Myclose());
    //to close the frame we should add a  listner to the component (frame is also a component)
    //we we should add an appropirate listner to a component , this is done by addxxxxxlistener() method
    class Myclose implements WindowListener
      public void WindowActivated(WindowEvent e){ }
      public void WindowClosed(WindowEvent e){ }
      public void WindowClosing(WindowEvent e)
      System.exit(0);
      public void WindowDeactivated(WindowEvent e){ }
      public void WindowDeiconified(WindowEvent e){ }
      public void WindowIconified(WindowEvent e){ }
      public void WindowOpened(WindowEvent e){ }
    D:\my programs\awt>javac Myframe1.java
    Myframe1.java:22: Myclose is not abstract and does not override abstract method windowDeactivated(java
    .awt.event.WindowEvent) in java.awt.event.WindowListener
    class Myclose implements WindowListener
    ^
    1 error

    That method is
    windowDeactivated
    not
    WindowDeactivatedWhy are you using AWT, rather than Swing? The Swing JFrame even has a nice little setDefaultCloseOperation(int) method that makes closing the frame, easy.

  • How to close jwindow

    hi,
    Can you tell me how to close JWindow. Please help
    thanks

    alt-F4 seems to work OK when the JWindow has a parent
    here's your previous post's code, modified
    import java.awt.*;
    import javax.swing.*;
    class demo extends JWindow
      int screenWidth;
      int screenHeight;
      public demo(JFrame f)//<------changed
        super(f);//<--------added
        screenWidth = Toolkit.getDefaultToolkit().getScreenSize().width;
        screenHeight = Toolkit.getDefaultToolkit().getScreenSize().height;
        JPanel pn = new JPanel();
        pn.setBackground(new Color(0x808000));
        getContentPane().add(pn);
        setSize(screenWidth,screenHeight);
        setVisible(true);
      public static void main(String args[])
        JFrame f = new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setUndecorated(true);
        f.setSize(0,0);
        f.setVisible(true);
        //demo d = new demo();
        demo d = new demo(f);
    }

  • ActionScript 2.0 class scripts may only define class or interface constructs.

    This is driving me nuts. I have an old AS1 project which I
    upgraded to AS2. It uses an include file, settings.as, which has
    stuff like this:
    settings = new Object();
    settings.property = 'some value';
    Then I include it on the main timeline like this:
    #include "settings.as"
    Every time I render, I get a million and one Compile Errors
    stating:
    "ActionScript 2.0 class scripts may only define class or
    interface constructs."
    But it isn't an ActionScript 2.0 class! It's just a regular
    include. How do I avoid the bogus Compile Errors?

    Okay, I found why the compiler is getting confused.
    In my settings.as file I create an object named 'settings' as
    mentioned. Later in my code elsewhere on the timeline, I refer to
    settings.property. When Flash sees that, I guess it sees that I
    refer to an object 'settings' and that there's a .as file called
    'settings' and it erroneously assumes it should be a class or
    something. I concluded this because if I change the object or .as
    name so that they do not match, the compile errors go away. As far
    as I know there's no way to tell the compiler that settings.as is
    not a class, despite the fact I'm not telling Flash that it is a
    class.

  • Reg:How to add fields to the scripts in detail

    How to add fields to the scripts in detail.
    Plz give me one example help me out.

    Hi
    add fields to the scripts by sending that field between  two &s.
    for example if u want to add lifnr of lfa1 table then pass field like this.
    &wa_lfa1-lifnr&.here wa_lfa1 is work area for internal table it_lfa1.
    if name1 then &wa_lfa1-name1&
    in this way you can add fields to the script under any window.
    i am sending one example program for scripts.
    &--structure declaration--
    TYPES:BEGIN OF ST_LFA1,
          LIFNR TYPE LFA1-LIFNR,
          NAME1 TYPE LFA1-NAME1,
          LAND1 TYPE LFA1-LAND1,
          ORT01 TYPE ORT01,
          REGIO TYPE REGIO,
          END OF ST_LFA1.
    TYPES:BEGIN OF ST_EKKO,
          EBELN TYPE EKKO-EBELN,
          BUKRS TYPE EKKO-BUKRS,
          AEDAT TYPE EKKO-AEDAT,
          ERNAM TYPE EKKO-ERNAM,
          BSTYP TYPE EKKO-BSTYP,
          LIFNR TYPE EKKO-LIFNR,
          END OF ST_EKKO.
    TYPES:BEGIN OF ST_EKPO,
          EBELN TYPE EKPO-EBELN,
          EBELP TYPE EKPO-EBELP,
          LOEKZ TYPE EKPO-LOEKZ,
          AEDAT TYPE EKPO-AEDAT,
          MATNR TYPE EKPO-MATNR,
          NETWR TYPE EKPO-NETWR,
          END OF ST_EKPO.
    &--internal table,work area declaration--
    DATA:WA_LFA1 TYPE ST_LFA1,
         IT_LFA1 TYPE STANDARD TABLE OF ST_LFA1,
         WA_EKKO TYPE ST_EKKO,
         IT_EKKO TYPE STANDARD TABLE OF ST_EKKO,
         WA_EKPO TYPE ST_EKPO,
         IT_EKPO TYPE STANDARD TABLE OF ST_EKPO.
    &--data declaration--
    DATA:TOTAL TYPE EKPO-NETWR,
          V_EBELN TYPE EKKO-EBELN.
    data: v_item(20) type c.
    &--parameter for purchase document number--
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS P_PURDOC LIKE V_EBELN.
    SELECTION-SCREEN END OF BLOCK B1.
    START-OF-SELECTION.
      PERFORM GET_DATA_FROM_EKKO.
      PERFORM GET_DATA_FROM_LFA1.
      PERFORM GET_DATA_FROM_EKPO.
    &--grand total--
      LOOP AT IT_EKPO INTO WA_EKPO.
        TOTAL = TOTAL + WA_EKPO-NETWR.
        CLEAR WA_EKPO.
      ENDLOOP.
    &--open form--
      CALL FUNCTION 'OPEN_FORM'
       EXPORTING
        DEVICE                            = 'PRINTER'
        FORM                              = 'Z_50886_VENDOR'
        LANGUAGE                          = SY-LANGU
       EXCEPTIONS
         CANCELED                          = 1
         DEVICE                            = 2
         FORM                              = 3
         OPTIONS                           = 4
         UNCLOSED                          = 5
         MAIL_OPTIONS                      = 6
         ARCHIVE_ERROR                     = 7
         INVALID_FAX_NUMBER                = 8
         MORE_PARAMS_NEEDED_IN_BATCH       = 9
         SPOOL_ERROR                       = 10
         CODEPAGE                          = 11
         OTHERS                            = 12
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    &--write form for header details--
      READ TABLE IT_EKKO INTO WA_EKKO INDEX 1.
      CALL FUNCTION 'WRITE_FORM'
       EXPORTING
         ELEMENT                        = 'HEAD'
         WINDOW                         = 'HEADER'
       EXCEPTIONS
         ELEMENT                        = 1
         FUNCTION                       = 2
         TYPE                           = 3
         UNOPENED                       = 4
         UNSTARTED                      = 5
         WINDOW                         = 6
         BAD_PAGEFORMAT_FOR_PRINT       = 7
         SPOOL_ERROR                    = 8
         CODEPAGE                       = 9
         OTHERS                         = 10
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    &--write form for item details--
      LOOP AT IT_EKPO INTO WA_EKPO.
      concatenate wa_ekko-ebeln wa_ekpo-ebelp into v_item.
        CALL FUNCTION 'WRITE_FORM'
         EXPORTING
           ELEMENT                        = 'ITEM'
           WINDOW                         = 'MAIN'
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       CODEPAGE                       = 9
       OTHERS                         = 10
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDLOOP.
    &--write form for vendor details--
      READ TABLE IT_LFA1 INTO WA_LFA1 INDEX 1.
      CALL FUNCTION 'WRITE_FORM'
       EXPORTING
         ELEMENT                        = 'VENDOR'
         WINDOW                         = 'ADDRESS'
       EXCEPTIONS
         ELEMENT                        = 1
         FUNCTION                       = 2
         TYPE                           = 3
         UNOPENED                       = 4
         UNSTARTED                      = 5
         WINDOW                         = 6
         BAD_PAGEFORMAT_FOR_PRINT       = 7
         SPOOL_ERROR                    = 8
         CODEPAGE                       = 9
         OTHERS                         = 10.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    &--write form for grand total--
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
        WINDOW                         = 'TOTAL'
    EXCEPTIONS
       ELEMENT                        = 1
       FUNCTION                       = 2
       TYPE                           = 3
       UNOPENED                       = 4
       UNSTARTED                      = 5
       WINDOW                         = 6
       BAD_PAGEFORMAT_FOR_PRINT       = 7
       SPOOL_ERROR                    = 8
       CODEPAGE                       = 9
       OTHERS                         = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    &--close form--
      CALL FUNCTION 'CLOSE_FORM'
       EXCEPTIONS
         UNOPENED                       = 1
         BAD_PAGEFORMAT_FOR_PRINT       = 2
         SEND_ERROR                     = 3
         SPOOL_ERROR                    = 4
         CODEPAGE                       = 5
         OTHERS                         = 6
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    *&      Form  get_data_from_ekko
    FORM GET_DATA_FROM_EKKO .
      SELECT EBELN
             BUKRS
             AEDAT
             ERNAM
             BSTYP
             LIFNR
          FROM EKKO INTO TABLE IT_EKKO WHERE EBELN = P_PURDOC.
    ENDFORM.                    " get_data_from_ekko
    *&      Form  get_data_from_lfa1
    FORM GET_DATA_FROM_LFA1 .
      IF NOT IT_EKKO[] IS INITIAL.
        SELECT LIFNR
               NAME1
               LAND1
               ORT01
               REGIO
               FROM LFA1 INTO TABLE IT_LFA1 FOR ALL ENTRIES IN IT_EKKO WHERE
                    LIFNR = IT_EKKO-LIFNR.
      ENDIF.
    ENDFORM.                    " get_data_from_lfa1
    *&      Form  get_data_from_ekpo
    FORM GET_DATA_FROM_EKPO .
      IF NOT IT_EKKO[] IS INITIAL.
        SELECT EBELN
               EBELP
               LOEKZ
               AEDAT
               MATNR
               NETWR
               FROM EKPO INTO TABLE IT_EKPO
               WHERE EBELN = P_PURDOC.
      ENDIF.
    ENDFORM.                    " get_data_from_ekpo

  • How to close RMA lines?

    I have got request to close RMA lines?. The product was returned but the kit line was cancelled so the lines are stuck. So I have to close it from back end. Any one please help me on this with any scripts.
    -- Babuji

    Your duplicate post of this same question has been locked.
    how to close RMA lines?
    Please do not multi-post.

  • How do I reference a class in a .dll library?

    How do I reference a class in a .dll library?  The following code extracts the contents of a ListView after a line is MouseDoubleClick:
        static public void GetListViewValues(object sender, List<string> liststListViewValues)
          ListViewItem lvi = sender as ListViewItem;
          ListViewTabs obj = lvi.DataContext as ListViewTabs;
          liststListViewValues.Add(obj.tabNumber);
          liststListViewValues.Add(obj.tabDetails);
        public class ListViewTabs
          public string tabNumber { get; set; }
          public string tabDetails { get; set; }
    I want to move this code (not the class) into a library .dll.  The .dll is generic ... could be called by any namespace.  It needs to know about the ListViewTabs class in this example.
    bhs67

    >>How do I reference a class in a .dll library?
    You add a reference to the .dll (https://msdn.microsoft.com/en-us/library/wkze6zky.aspx?f=255&MSPPError=-2147217396) and add a using statement for the namespace
    in which the class is defined at the top of the code file in which you want to use the class:
    using YourNameSpace;
    >>I want to move this code (not the class) into a .dll.
    The method must be put into some class. You could create a class in the class library and put the method in there:
    namespace YourNameSpace
    public class YourClass
    static public void GetListViewValues(object sender, List<string> liststListViewValues)
    ListViewItem lvi = sender as ListViewItem;
    ListViewTabs obj = lvi.DataContext as ListViewTabs;
    liststListViewValues.Add(obj.tabNumber);
    liststListViewValues.Add(obj.tabDetails);
    public class ListViewTabs
    public string tabNumber { get; set; }
    public string tabDetails { get; set; }
    >>The .dll is generic ... could be called by any namespace.
    Every class belongs to a namespace (potentially the global (or unnamed) namespace) in C#.
    >>It needs to know about the ListViewTabs class in this example.
    If the method in the .dll needs to know about the ListViewTabs class you must put the ListViewTabs class into the same .dll or create another .dll, put the ListViewTabs class there and then add a reference to this .dll from the one containing your method.
    You cannot keep the ListViewTabs class in the WPF application project from which you add a reference to the .dll that contains the method because you cannot add a reference from A to B and from B to A as this will lead to a circular dependency.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and please start a new thread if you have a new question.

  • How to close opened URL

    Hello, I have a question on how to close opened browser window/tab.
    I having the following rightnow
    NSURL* url = [ [NSURL alloc] initWithString: urlBase ];
    [[NSWorkspace sharedWorkspace] openURL: url];
    I looked around and openURL returns a bool. How can I do something like [browserWindow close]?
    I thought about using js in the opened URL page to close the window/tab, but closing from where I launched the URL would work better for me.
    thanks

    837703 wrote:
    Hi I'm a little green with the URL // Runtime class and I don't know how to sure up this method.
    Essentially I want to make close an opened url page with a timer actionlistener.
    You should check out:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    But anyhow, your statement
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);Actually returns a Process Object.
    So you should change it to something like:
    Process  myProcess = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);Then if you want to kill the process you can just do:
    myProcess.destroy();hope that helps.
    take a look at:
    http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Process.html
    for more Info on processes

Maybe you are looking for

  • How do connect my sony bravia tv as a monitor screen for mac pro

    How do I connect my Sony Bravia tv as a monitor for my MacBook Pro? I have an hdmi lead with an adapter to the computer and get a picture of factory setting cosmos with some of the folders of my desktop going off the side of the tv screen.

  • Oracle 8.1.7 on Debian 2.2 (potato)

    Hello (again), I'm trying to install Oracle 8.1.7 on Debian 2.2r2 (kernel 2.2.19 and glibc 2.1.3) but runInstaller dies with SIGSEGV. On the same machine I have already successfully installed Oracle 8.1.6. I installed Blackdown JDK 1.1.8 but it does

  • When closing my laptop's lid... how to avoid any ''sleep'' or any change...

    everytime i close my laptop lid ( i'm not sure if that's the right word ) but my notebook goes on sleep mode i think, and the connection is lost or something like that, and i like my notebook to only change the display, no more no less, i don't want

  • Criptography in WAS - Help will be rewarded

    hello guys, i need help. I want to crypt information on a bsp app and then encrypt it. I find the way to crypt the data with some function module located on WAS that use md5 or sha1 algorithm, but i didn't find the way to encrypt it, coz' the functio

  • 2 weeks and 4 months

    Why 2 weeks and 4 months? Well, in 2 weeks the schools in my area all come back and they will still not be able to use their ipods / ipads through the school networks due to the long standing issue of problems with apps not going through a proxy on a