Inserting a Line in front(top ) of a imageview Problems. (x,y) issues

Hi Guys, so, im making a concept of a Round-robin , i think. Its called Fila Circular in Portuguese. Anyway, the thing is, every time the user press Push, a ball(aka circle) must enter the [index] of the hexagon. But, im having issues making the path.
When i Mess the X, the Y changes. When i Mess the Y, the X changes.
Heres the Fully Code, and a picture so you can analyze , in that picture, the startX was very clsoe to 0 as startY was also.But when i moved the endX, it came down all the way.
First the link :
http://img17.imageshack.us/img17/5696/duvidajavafx.jpg
Now the Code of the two Classes :
Please help me.
package filacircular;
import java.net.MalformedURLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.effect.BlendMode;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.GridPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.CubicCurve;
import javafx.scene.shape.Line;
* @author André
public class FilaCircular extends Application {
    private int vet[] = new int[5];
    private int begin;
    private int last;
    private boolean queueFull;
    public static void main(String[] args) {
        launch(args);
    @Override
    public void start(Stage primaryStage) {
        Controle c = new Controle();
        StackPane root = new StackPane();
        Scene scene = new Scene(root, 750, 750, Color.GHOSTWHITE);
        ImageView imv = null;
        GridPane gp = new GridPane();
        gp.setHgap(5);
        gp.setVgap(5);
        Button pushBeginBt = new Button("Push From Begin");
        pushBeginBt.setPrefSize(150, 25);
        Button pushEndBt = new Button("Push From End");
        pushEndBt.setPrefSize(150,25);
        Button pullBeginBt = new Button("Pull From Begin");
        pullBeginBt.setPrefSize(150, 25);
        Button pullEndBt = new Button("Pull From End");
        pullEndBt.setPrefSize(150,25);
        Label sizeLabel = new Label("Size");
        TextField textSize = new TextField("5");
        textSize.setEditable(false);
        Label beginLabel = new Label("Begin");
        TextField textBegin = new TextField("");
        textBegin.setEditable(false);
        Label lastLabel = new Label("Last Var");
        TextField textLast = new TextField("");
        textLast.setEditable(false);
        Label queueLabel = new Label("Queue");
        TextField textqueueFull = new TextField("");
        textqueueFull.setEditable(false);
        queueLabel.setPrefSize(100,10);
        try {
            imv = c.getImage();
            gp.add(imv,8,25);
            imv.toBack();
            imv.setOpacity(0.5);
        } catch (MalformedURLException ex) {
            System.out.println("\nError While Loading Image : \n");
            System.out.println(ex.getMessage() + " Finished Transmitting Error;");
        Line l4 = c.getPathTo4();
        gp.setGridLinesVisible(true);
        gp.add(l4,8,25);
        gp.toBack();
        l4.toFront();
        l4.setVisible(true);
        System.out.println("X: " + imv.getX());
        System.out.println("Y: " + imv.getY());
        gp.add(textSize,1, 13);
        gp.add(sizeLabel, 3, 13);
        gp.add(textBegin,1, 15);
        gp.add(beginLabel, 3, 15);
        gp.add(textLast,1, 17);
        gp.add(lastLabel, 3, 17);
        gp.add(textqueueFull,1, 19);
        gp.add(queueLabel, 3, 19);
        gp.add(pushBeginBt,1, 5);
        gp.add(pushEndBt,4,5);
        gp.add(pullBeginBt,1, 10);
        gp.add(pullEndBt,4,10);
        root.getChildren().add(gp);
        primaryStage.setTitle("Minha Pilha Circular");
        primaryStage.setScene(scene);
        primaryStage.show();
     public boolean enQueue(int elem)
        if(isFull()) return false;
        else{
            vet[last++] = elem;
            if(last == vet.length) last = 0;
            if(last == begin) queueFull = true;
        return true;
    public boolean isFull()
    {return queueFull;}
    private int size()
     if (last >= begin && !queueFull)return vet.length + last - begin;
     return vet.length + last - begin;
     public boolean isEmpty()
    {return (size()==0);}
    public int front()
        return vet[begin];
    public int deQueue()
    int aux = vet [begin++];
    if(begin==vet.length) begin = 0;
    queueFull = false;
    return aux;
    public int[] getVet() {
        return vet;
    public void setVet(int[] vet) {
        this.vet = vet;
    public int getBegin() {
        return begin;
    public void setBegin(int begin) {
        this.begin = begin;
    public int getLast() {
        return last;
    public void setLast(int last) {
        this.last = last;
    public boolean isQueueFull() {
        return queueFull;
    public void setQueueFull(boolean queueFull) {
        this.queueFull = queueFull;
* To change this template, choose Tools | Templates
* and open the template in the editor.
package filacircular;
import java.io.File;
import java.net.MalformedURLException;
import javafx.animation.PathTransition;
import javafx.scene.Node;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.shape.CubicCurve;
import javafx.scene.shape.CubicCurveBuilder;
import javafx.scene.shape.Line;
import javafx.scene.shape.LineBuilder;
import javafx.scene.shape.Path;
import javafx.util.Duration;
* @author André Vinícius Lopes
public class Controle {
    public ImageView getImage() throws MalformedURLException
        String path = "D://FilaCircular.jpg";
        String f = new File(path).toURI().toURL().toExternalForm();
        ImageView imv = new ImageView(f);
        return imv;
    public PathTransition getPathToStack(Node n, Path p)
        PathTransition pt = new PathTransition();
        pt.setNode(n);
        pt.setPath(p);
        pt.setDuration(Duration.millis(2000));
        return pt;
   public Line getPathTo4()
     Line l = LineBuilder.create()
             .startX(100)
             .startY(-50)
             .endX(300)
             .endY(50)
             .build();
       return l;
}Edited by: Andre Lopes on 08/09/2012 21:43

Thanks for the answer guys. I will try to upload the image to make it runnable.
Also, About the pref/width etc..
I dont know where i will put the balls. Anywhere its possible.
For instance, the ball could come from the 5,5 gripPane and enter the slot 0. When i try to insert another, it will go slot 1, and then when i push ( insert) another, it will go slot 2. , and then 3, and then 4. WHen i pull them, it will leave the last slot inserted.
I did not make the path yet. Im trying to make a line from outside the hexagon to inside slot[0] , so i can make the ball follow the line.
Not sure how do this : "" I find that using prefWidth and prefHeigh"" I know how to use pref wifth and pref height, but not sure what you meant.
Also, im uploading the image to run the thing :
http://imageshack.us/photo/my-images/253/filacircular.jpg/
or
http://img253.imageshack.us/img253/5770/filacircular.jpg

Similar Messages

  • I'm in a multi-page document, how can i rearrange the pages or insert blank pages in front of pages? Also, is there a way to show the ruler both horizontally and vertically?

    I'm in a multi-page Pages document, how can i rearrange the pages or insert blank pages in front of pages? Also, is there a way to show the ruler both horizontally and vertically?

    Not on my document. I have a 7 page document open. The "flashing vertical bar" is at the top of page 3. I have the thumbnail view showing. I click page break and two blank pages are added to the end of my document. I have to scrool thru the pages to see that the 2 pages were added as they do not appear in the layout view... I'm not sure if it is inserting a "section" as it adds two blank pages.. But I am clicking on "INSERT PAGE BREAK".. So guess there are still a lot of bugs to fix..
    Thanks again

  • Question on sort behavior when inserting ACL lines into existing ACL

    Hello,
    I have a request / need to insert lines into existing ACLs (some standard, some extended) and I need to control where they are added (we want some to go to the top, some in the middle, some second from bottom).
    I'm trying to understand / follow how ACL lines are added / sorted.  I have three examples of different configs (standard ACL) where someone inserts lines into the existing ACL. 
    The problem is, it does not follow the guidelines I've found on cisco.com - i.e. using Sequence #s if specified, they don't all get added to the bottom, etc. 
    How can I determine how a line added to an existing ACL will behave? 
    I've added new ACLs, and as far as I can tell, for those examples, it will follow the sequence #s for both standard and extended acls, but not at all for these examples. 
    thanks!
    -Chris

    There's a tutorial on creating client-side XSLT pages here: http://www.adobe.com/devnet/dreamweaver/articles/display_xml_data.html.
    I'm not sure if it will work with a template. Unfortunately, XSLT is a mind-bender that tends to do serious damage to the average brain. That's why most people use server-side technology to deal with XML.
    You mention that XSL isn't supported on your PHP server. What about SimpleXML? That's standard in all PHP 5 installations. Don't say your server is still running PHP 4. Support for PHP 4 was dropped nearly two years ago.

  • IF statement inserts extra line.

    I am having problems with IF statements inserting extra lines;
    POH_VENDOR_NAME<?if:POH_PO_NUM != ''?>(POH_PO_NUM)<?end if?>
    Returns:
    Consolidated Supplies
    (1085)
    Instead of:
    Consolidated Supplies (1085)
    I have tried using CHOOSE but get the same results. Any help appreciated.
    Thanks
    Carl.

    Hi Carl,
    Hope your development is going ok. Not sure why the choose wouldn't work with @inline, if the IF statement did. What I would suggest instead is using a series of IF statements. So <?if@inline:x=1?> and the opposite <?if@inline:x!=1?>
    Its a bit of a pain, but I can't think of any other way to get around this.
    Regards,
    Cj

  • How to insert horizontal lines in alv report?

    hi,
        i have to insert horizontal lines in alv report.( RM07MLBB )
            actually my requirement is:
                               basis list = RM07MLBB.
    first secondary list = another report is called here ( RM07DOCS )
                      i want to insert horizontal lines in the first secondary list, when i execute individually RM07DOCS , i can get horizontal lines, but when i dounle click in the basic list --> in the first secondary list , i am not getting the horizontal lnes.
    functional modules used are REUSE_ALV_HIERSEQ_LIST_DISPLAY & REUSE_ALV_GRID_DISPLAY.
        here in this program,
                        is_layout = alv_layout.
    hence i tried to give     
                  alv_layout-no_hline = ' '. 
    but not effecting.
              can some one please tell me , how to insert lines in the alv report.
    thanks in advance,
    Dastagir.

    hello,
         so i cannot insert horizontal lines in the first secondary list according to my sorting condition, i.e., in a single block there should be :
           if same delivery challan number is repeating they should come in the same block,
    for the corresponding delivery challen number, if have po number, is repeating , they also should come in the same block.
                       in this way i have to seperate the blocks containing EXNUM , EBELN CONDITIONED.

  • Insert specific line in an internal table at a specific place

    Hi
    i have an internal table (itab) let's say
    Name1 Name2 NUM1 NUM2 NUM3
    Which already populater with data.
    i have to do a subtotal for every NAME1 and insert a line just after the NAME1 in the internal table
    and another subtotal by every NAME1 NAME2 and insert a line just after every NAME1 and NAME2 in the internal table
    then another Grand total at the end of the table
    My psudeo code is a bit like that but the insert is done in the wrong row
    Index=1
    LOOP at itab index
    if itab-name1 NE old
      insert structure in itab index
    elseif itab-name1 NE old and itab-name2 NE old
      insert structure in itab index
    elseif itab EQ last line
      insert structure in itab index
    else
      structure-num1 = structure-num1 + itab-num1
      structure-num2 = structure-num2 + itab-num2
    endif
    index = index + 1
    endloop
    Do you think i need to use a temporary table here. can u guide me in code plz..

    sort internal table by name1 and name2. <b>Have name1 and name2 as the first two variables in the internal table</b>
    declare a work area and an internal table with the same structure as internal table.
    declare num1 as type itab-num1.
    num2 and i_num2 type itab-num2.
    sort itab by name1 and name2.
    loop the internal itab1.
    append itab1 to itab2.
    wa-num1 = structure-num1 + itab-num1
    wa-num2 = structure-num2 + itab-num2.
    i_num2 = i_num2 + itab-num2.
    num1 = num1 + itab-num1.
    num2 = num2 + itab-num2.
    at end of name2.
    append wa to itab2.
    clear wa_name2.
    endat.
    at end of name1.
    wa-num2 = i_num2.
    append wa to itab2.
    clear: i_num2, wa.
    endat.
    at last.
    wa-num1 = num1.
    wa-num2 = num2.
    append wa_itab2.
    endat.
    endloop.
    Thanks.

  • How to insert new line in the copied schema with transaction code PE01?

    Dear Experts,
             I have copied HKT0 to ZKT0 , i want to insert new line between  line 150 and line 160 in ZKT0, I don't know how to insert new line 160, who can tell me ?
             Looking forward to your reply.
    Best Regards,
    Merry

    Hi,
    1. Open your schema,
    2. In first colume "Line" select line where you want to add new line,
    3. Replace first value in the column field (that indicates number of line) with character I (means insert),
    4. Press enter
    The line will be added. The same way you can add lines to PCR.
    To delete use character D.
    Cheers

  • When opened, my image appears black with a few red lines at the top, yet the thumbnail looks as it should be. How do I fix this?

    I have been working on an illustration in Photoshop for a few months now. When I tried to open it yesterday it came up as a single layered black image with a few red lines at the top. I have no idea what this is. I have not even used red in my artwork. However, no matter how many times open this file, the thumbnail still looks like my artwork, as it should be. How do I fix this? Will I be able to get my artwork back? Please help! Thank you in advance.

    Make sure you has the latest Windows Device driver for your display adapted from its manufacturer's web site installed on your system. Perhaps you updated the device driver with a Microsoft Windows Update.   Microsoft update does not always install the correct update needed fpr Phoroshop.
    Supply pertinent information for quicker answers
    The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
    Adobe product and version number
    Operating system and version number
    The full text of any error message(s)
    What you were doing when the problem occurred
    Screenshots of the problem
    Computer hardware, such as CPU; GPU; amount of RAM; etc.

  • Insert new line item in va01&va02 - urgent

    Hi frndz,
    At the time of creation standard sales order using va01.
    When user enters the sold to party in header and then
    material & quantity in line item reocrds. After user enters the details in first line. I have some checks to be executed and on the basis of that customer will get the free material that should come on second line item.
    I am getting the details which i will be inserting on new line item but the problem is that in which exit i should write the code for the same.
    So frndz could you please let me know, in which userexit I should insert this new line item. There can be more than one free material.
    If anyone has done this already, please let me know.
    I know one exit i.e.MV45AFZB but in that there are many forms. so exactly which form i should where i will write the code to insert new line item???
    Points will be awarded surely.
    Regards,
    Prashant

    HI Stephen,
    I have the same prolem. I modified the 5 global tables, but I don't see the new line in the screen.
    Can you help me with some details?
    Thx!
    Mihaela

  • Can't remove white border/line on left & top of Swiftweasel [Solved]

    As the title states; I cannot remove this persistent white line/border thing at the top and left side of my Swiftweasel (Firefox) web browser. I know there must've been a post about this before but with such familiar/vague keyword combinations such as "white line border swiftweasel / firefox", etc, I couldn't find anything in the Forum or on Google except something to do with certain webpages (which in my case is on ALL pages). Here's a screenshot of what I'm talking about:
    (Swiftweasel is at the top of the screen, in case you couldn't tell. See the white line/border at top/left?)
    I disabled all my extensions and Stylish styles and the white line/border on top & left side are still there. This was an issue on my previous Arch installation as well (not that it has anything to do with Arch itself) but I'm just saying that it's been an issue before for me. Any ideas?   It's just very annoying.
    EDIT:  Solved: read my last post.
    Last edited by milomouse (2009-09-21 21:24:10)

    Thanks for the response. As far as renaming ~/.mozilla, it kept regenerating itself each time I opened Swiftweasel, so I moved ~/.sw35 to ~/.sw000 and then opened it and there was no white line. So I went through one by one installing my add-ons again and, even though I had disabled it and restarted earlier, it turns out that if I don't install "NumExt" it wont have the white line. That's so weird that it didn't do it earlier when I disabled it. Sad, though, since I really liked that extensions. Maybe I'll see if I can edit the file somehow.

  • Inserting a line in schema

    Hi,
    How to insert a line in between the schema. Through Edit->Add line, it is adding at the end of the schema.
    Samriddhi

    Type in 'I' in the LHS of the screen where you see the line numbers and
    press enter. It creates a blank line. You type 'I5', it will insert 5
    new lines in the schema
    Note:- If it does not type any value in the line numbers, delete the
    line number and type the 'I' in. Also if you want to copy the same
    thing to the
    Next line, use 'R' and press enter. 'r' means 'to repeat'
    I think this is what you need.
    Thanks,
    Manu

  • How to insert new line break in XSLT mapping

    Hi experts,
    I am doing file to mail scenario, i am sending the text file as an attachment using reciever mail adapter.
    I did everything, i can able to send the mail with text file attachment, but with in the file i got multiple rows, i need to put line break in XSLT mapping.
    I did use following statement but it is inserting small rectangle between the records, the records are not separating with new lines, all are in one line.
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    Can anyone suggest me how to insert new line in XSLT mapping.
    My XSLT mapping as look like:
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:ns0="http://www.Coj.co.za/SapIsuToABSA/DirectDebitFile">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:variable name="break">&lt;br/&gt;</xsl:variable>
    <xsl:variable name="space"> </xsl:variable>
    <xsl:variable name="newline"><xsl:text></xsl:text></xsl:variable>
    <xsl:template match="/">
    <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
    <Subject>Please Check Attached Direct Debit File</Subject>
    <From>S@za</From>
    <To>P@za</To>
    <Content_Type>text/plain</Content_Type>
    <Content>
    <xsl:for-each select="MT_SapIsuToABSA_DirectDebitFile/DirectDebitRec/Body">
    <xsl:value-of select="Space1"/>
    <xsl:value-of select="Cust_AccNo"/>
    <xsl:value-of select="Reserve_1"/>
    <xsl:value-of select="Cust_Name"/>
    <xsl:value-of select="Cust_Name1"/>
    <xsl:value-of select="Cust_Bank_AccNo"/>
    <xsl:value-of select="Space2"/>
    <xsl:value-of select="Cust_Bank_BranchNo"/>
    <xsl:value-of select="Reserve_2"/>
    <xsl:value-of select="Space3"/>
    <xsl:value-of select="Cust_AccNo_1"/>
    <xsl:value-of select="Space4"/>
    <xsl:value-of select="Reserve_3"/>
    <xsl:value-of select="Deduction_Amnt"/>
    <xsl:value-of select="Space5"/>
    <xsl:value-of select="Reserve_4"/>
    <xsl:value-of select="Space6"/>
    <xsl:value-of select="Action_Date"/>
    <xsl:value-of select="Space7"/>
    <xsl:value-of select="Reserve_5"/>
    <xsl:text>*#xA;</xsl:text>   
    note: in real coding replace * with &
    </xsl:for-each>
    </Content>
      </ns1:Mail>
      </xsl:template>
      </xsl:stylesheet>
    Kind regards,
    Praveen

    Hi,
    I think <xsl:text>#xa;</xsl:text> should do the trick, but depending on which OS (ux or win), the "new line" chars sequence is different (win would require a CRLF like <xsl:text>#xd;*#xa;</xsl:text>)
    Chris
    -> &
    Edited by: Christophe PFERTZEL on Apr 14, 2010 2:16 PM

  • Report Painter insert blank line after report header

    Hi Expert,
    I have a problem to insert a blank line (a spacing) after the report header of my customized report painter.
    For example, in standard cost center report, S_ALR_87013611, there is a small box listed information like cost center/group ... and reporting period.
    Right after reporting period, the report header box ends, and there is a space line between it and the cost element data ...
    For my customized report painter, I cannot make this space line.
    I tried edit > row > insert blank line ... but not successful ... kindly advise.
    Thanks and regards,
    -CK

    Hi
    In KKO2 go to output tab, here under layout, tick header and then press pencil symbol and in the editor you write your header. I think this will give you desired result.
    Regards
    Rajneesh Saxena

  • Inserting new line to a text file at position #

    Hi,.
    Is it possible to do this in java?
    1. Open a new text File (woutFile)
    2. woutFile.write(" line #1\r\n"); // write new line
    3. woutFile.write(" line #2\r\n"); // write new line
    4.woutFile.write(" line #3\r\n"); // write new line
    5. Go to line #2 position on a text file
    6. Insert NEW LINE between line #2 and Line #3
    7. move to the end-of-file
    8.Close the file
    Please help

    Is it possible to do this? please look at question
    inside comments.Your question has already been answered. Beyond that,
    if you have some code and you want to know if it will
    work, then run it and see.The answer was no. It's one of the fundamental properties of files that you cannot insert content in the middle, just at the end. To insert content you first have to make room for it. In this respect a file works like an array and not like a linked list.

  • How to insert multiple line items in fv60 using bdc.

    Hi all,
          How to insert multiple line items in fv60 using bdcs

    hi
    chk this
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA : IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : V_EBELP(30) , V_MENGE(30) , V_WERKS(30), V_EMATN(30) ,
    V_PEINH(30).
    DATA : FILE TYPE STRING, V_MSG(100) , V_IND(2) TYPE N , FLAG VALUE 'X'.
    PARAMETERS: P_FILE(50) TYPE C DEFAULT 'C:\ME21_TEST'.
    DATA : BEGIN OF ITAB OCCURS 0,
            IND(02),
            LIFNR_001(010),
    data element: BSART
            BSART_002(004),
    data element: BEDAT
    data element: EKORG
            EKORG_004(004),
            EKGRP_006(003),
    data element: LPEIN
            LPEIN_005(001),
    data element: EMATNR
            EMATN_01_007(018),
    data element: EWERK
            WERKS_01_008(004),
    data element: EPEIN
            PEINH_01_009(006),
    data element: EWERK
           MENGE_01_013(017),
    data element: AUFEP
            EBELP_014(005),
    data element: AUFEP
         END OF ITAB.
    START-OF-SELECTION.
    FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FILE
        FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = ITAB
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    SORT ITAB BY IND.
    START-OF-SELECTION.
    LOOP AT ITAB.
    REFRESH IT_MESSAGES.
    <b>V_IND = V_IND + 1.</b>
    <b>AT NEW IND.</b>
    <b>READ TABLE ITAB INDEX SY-TABIX.</b>
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0100'.
    PERFORM BDC_FIELD       USING 'EKKO-LIFNR'
                                  ITAB-LIFNR_001.
    PERFORM BDC_FIELD       USING 'RM06E-BSART'
                                  ITAB-BSART_002.
    *perform bdc_field       using 'RM06E-BEDAT'
                                 ITAB-BEDAT_003.
    PERFORM BDC_FIELD       USING 'EKKO-EKORG'
                                  ITAB-EKORG_004.
    PERFORM BDC_FIELD       USING 'RM06E-LPEIN'
                                  ITAB-LPEIN_005.
    PERFORM BDC_FIELD       USING 'EKKO-EKGRP'
                                  ITAB-EKGRP_006.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    ENDAT.
    <b>PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    CONCATENATE 'EKPO-EMATN(' V_IND ')' INTO V_EMATN.
    PERFORM BDC_FIELD       USING  V_EMATN
                                   ITAB-EMATN_01_007.
    CONCATENATE 'EKPO-WERKS(' V_IND ')' INTO V_WERKS.
    PERFORM BDC_FIELD       USING  V_WERKS
                                   ITAB-WERKS_01_008.
    CONCATENATE 'EKPO-PEINH(' V_IND ')' INTO V_PEINH.
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    PERFORM BDC_FIELD       USING  V_PEINH
                                   ITAB-PEINH_01_009.
    *CONCATENATE 'EKPO-MENGE(' V_IND ')' INTO V_MENGE.
    *perform bdc_dynpro      using 'SAPMM06E' '0120'.
    *perform bdc_field       using  V_MENGE
                                  ITAB-MENGE_01_013.
    *CONCATENATE 'EKPO-EBELP(' V_IND ')' INTO V_EBELP.
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    PERFORM BDC_FIELD       USING  'RM06E-EBELP'
                                   ITAB-EBELP_014.</b>PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    AT END OF IND.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=BU'.
    ENDAT.
    CALL TRANSACTION 'ME21' USING IT_BDCDATA MODE 'A'
                                             UPDATE 'S'
                                        MESSAGES INTO IT_MESSAGES.
       LOOP AT IT_MESSAGES WHERE MSGTYP = 'E' OR MSGTYP = 'A'.
         IF FLAG = 'X'.
         CALL FUNCTION 'BDC_OPEN_GROUP'
         EXPORTING
            CLIENT                    = SY-MANDT
           DEST                      = FILLER8
            GROUP                     = 'GAMY_FAILURE'
           HOLDDATE                  = FILLER8
            KEEP                      = 'X'
            USER                      = SY-UNAME
           RECORD                    = FILLER1
           PROG                      = SY-CPROG
         IMPORTING
           QID                       =
          EXCEPTIONS
            CLIENT_INVALID            = 1
            DESTINATION_INVALID       = 2
            GROUP_INVALID             = 3
            GROUP_IS_LOCKED           = 4
            HOLDDATE_INVALID          = 5
            INTERNAL_ERROR            = 6
            QUEUE_ERROR               = 7
            RUNNING                   = 8
            SYSTEM_LOCK_ERROR         = 9
            USER_INVALID              = 10
            OTHERS                    = 11
         IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
         CLEAR FLAG.
         ENDIF.
         CALL FUNCTION 'BDC_INSERT'
          EXPORTING
            TCODE                  = 'ME21'
           POST_LOCAL             = NOVBLOCAL
           PRINTING               = NOPRINT
           SIMUBATCH              = ' '
           CTUPARAMS              = ' '
           TABLES
             DYNPROTAB              = IT_BDCDATA
          EXCEPTIONS
            INTERNAL_ERROR         = 1
            NOT_OPEN               = 2
            QUEUE_ERROR            = 3
            TCODE_INVALID          = 4
            PRINTING_INVALID       = 5
            POSTING_INVALID        = 6
            OTHERS                 = 7
         IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
        ENDIF.
    CALL FUNCTION 'FORMAT_MESSAGE'
      EXPORTING
        ID              = IT_MESSAGES-MSGID
        LANG            = 'EN'
        NO              = IT_MESSAGES-MSGNR
        V1              = IT_MESSAGES-MSGV1
        V2              = IT_MESSAGES-MSGV2
        V3              = IT_MESSAGES-MSGV3
        V4              = IT_MESSAGES-MSGV4
      IMPORTING
        MSG             = V_MSG
      EXCEPTIONS
        NOT_FOUND       = 1
        OTHERS          = 2
       WRITE : / V_MSG.
    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.
       ENDLOOP.
    IF FLAG NE 'X'.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
       EXCEPTIONS
         NOT_OPEN          = 1
         QUEUE_ERROR       = 2
         OTHERS            = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      ENDIF.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM  = PROGRAM.
      IT_BDCDATA-DYNPRO   = DYNPRO.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
        CLEAR IT_BDCDATA.
        IT_BDCDATA-FNAM = FNAM.
        IT_BDCDATA-FVAL = FVAL.
        APPEND IT_BDCDATA.

Maybe you are looking for

  • How can I publish photos from my ipad to NEW album in my gallery

    I am traveling overseas with only my iPad. I need to upload photos from the iPad to my Galley, but not to any of the existing albums. I need to create a new album for these photos. There doesn't seem to be a way to add new albums to my gallery when u

  • Tracking Downpayment in Purchase Order

    Hi, Are there any ways to track downpayment(via FI) made in advance in the purchase order that raise later? Thanks, CW

  • How do I copy, paste Word document into Adobe Reader PDF?

    A client is not using Microsoft Word, but typing text for my edits into Adobe PDF. Too many edits, too cumbersome for me. After converting PDF to Word, I edit using various ink colors. How can I copy, cut, paste edited WORD document into her PDF? Oth

  • How to run SMSDemo from WTK2 in a real HP (SE K500i)?

    Hello J2ME experts out there, Is there a way to run the SMSDemo from Wireless Toolkit 2 in a real Handphone? How? I've tried to deploy it to my SE K500i, which AFAIK has supported WMA 1.1, but had no luck in sending nor receiving SMS. When I tried to

  • Can't install Adobe Air with Safari

    I'm using Adobe Air 1.5 with Safari 4.0.3 on Mac OS Snow Leopard. When the browser attempts to download the Air file, binary code is displayed in the browser instead of downloading the Air application. Firefox has no problems downloading this Air app