Help needed to write a dialog program

Hello ABAP Gurus,
I am very much new to ABAP Programming.
Can anybody help me to write a simple Dialog Program ??
I have a database table.
I have created a screen with screen painter, and kept some input fields & a push button in it.
I want to fill the database table with the data entered into the fields on the screen.
When the user enters the data and  presses  the PUSH BUTTON then that data record should be stored into the Database table.
So what kinda code I have to write in PAI (Process After Input),  to achieve this functionality ??
The help will be greatly appreciated.
Thanks in advance
Best regards
Ravi
Edited by: Ravi Kiran on Oct 28, 2009 2:17 PM

It's easy:
In PAI you have do an insert into a database table, following the steps:
1.on PAI  create a module: for exemple Zwrite_table.
2. inside Zwrite_table code as follow:
move var1 to wa_table-var1.
move var2 to wa_table-var2.
move var3 to wa_table-var3. etc etc
insert table ztable from wa_table.
P.s. ztable is a database table.
wa_table is a structure that have the same structure of ztable.
var1 var2 var3 etc is a variable inside your dynpro.
regards,
Roberto.

Similar Messages

  • Help needed to write download file program

    I want to write a servlet which will allow clients to download files from server. Main work is, a fixed no.of downloads(only n users can have download permission) will be allowed at any time. if any more no.of new users came they have to wait for a download connection. if a connection is freed then that connection will be given to a user who had entered first. (First In First Out). Can it possible. Plz help me. Thanks in advance.

    It's easy:
    In PAI you have do an insert into a database table, following the steps:
    1.on PAI  create a module: for exemple Zwrite_table.
    2. inside Zwrite_table code as follow:
    move var1 to wa_table-var1.
    move var2 to wa_table-var2.
    move var3 to wa_table-var3. etc etc
    insert table ztable from wa_table.
    P.s. ztable is a database table.
    wa_table is a structure that have the same structure of ztable.
    var1 var2 var3 etc is a variable inside your dynpro.
    regards,
    Roberto.

  • Help needed in writting Customer exit - ABAP Code

    Hi Friends,
    I have a scenario in one of the query and need to write a customer exit for the same. Here is the scenario:
    I am using one input variable XXX to get input from user which feeds value to one of the charateristic  lets say "CHAR1" in query. I have one more characteristic "CHAR2" which has to get the value from the same variable XXX. This is not allowed in BI7.0 as the variable is Hierarchy Node type. It gives error that "Variable XXX is used for two different characteristics."
    So i need to create one more vaiable YYY which will get the value from XXX and then YYY will feed value to CHAR2.  I would appreciate if some one could tell me step by step how to write customer exit and give me the piece of ABAP code i need to write in my case.
    Your help will be appreciated in terms of points.
    Thanks,
    manmit

    Hi Arun,
    1. What should CHAR2 take - Hierarchy node variable or something else ?
    --> CHAR2 is a simple charateristic
    2. In your scenario - why have CHAR1 and CHAR2 ? why not have the user enter values against CHAR2 ??
    --> We dont want user to enter two input as the input values for both Chars are same.
    3. Did you try using a replacement path variable with the CHAR2 variable taking values from Variable on CHAR1 ?
    --> In BI7.0 replacement path variable only take values from Query results. So not able to do the same.
    Thanks

  • Help needed to write control file.

    Hi Guys,
    i need to write one control file to upload data from .txt file to oracle table.
    .txt file data contains like this
    2006041110:40:22
    2006041111:30:42
    2006041210:40:22
    i need to upload this data into date column in oracle table.
    please help me to write control file for this requirement.
    Thanks for your help and time

        data1        "to_date(:data1, 'YYYYMMDDHH24:MI:SS')"

  • Please  Help me How write the BDC program for the MIGO inbound Delivery

    Please help me how to write bdc program for the MIGO Inbound Delivery in 4.7EE Version. Please help me.
    Not in LSMW.  Required call transaction or Session Method. Please help me.
    Mohan

    Run transaction BAPI . Select Logistics Execution/Shipping/InboundDelivery/SaveReplica.. You can use function module BAPI_INB_DELIVERY_SAVEREPLICA in your ABAP program.

  • Help needed in executing pl/sql programs

    hi all
    iam new to PL/SQL programming
    i have installed oracle 9i
    iam trying to practice some sample pl/sql programs
    i have opened oracle 9i and typed these commands
    sql>ed sum
    then a notepad opens where i type my pl/sql program and save it and then return back to oracle 9i and type this
    sql>@ sum
    then my pl/sql program gets executed.......but iam not getting any output
    its comig as procedure implemented succesfully
    is it compulsory to open notepad to execute pl/sql progams or we can direclty type the programs in oracle 9i
    please help in this matter ASAP
    Regards
    Suresh

    Yes, you can type the program directly at the SQL prompt, but editing will be a bit difficult.
    You should use some good editor that allows you to edit properly and then run like you did.
    You need to do:
    SQL> set serveroutput onbefore running your program to see dbms_output messages.

  • HELP needed to write a function returning 1 record from join tables

    Hi,
    I would like to have some help to write a function so It can return 1 result.
    I post my question in the APEX Express sextion but I think it's belong here.
    Mount Points and Home Directory
    Also, can I move a thread in another forum?
    thanks
    Roseline
    Edited by: user8772975 on 2009-09-19 21:43

    ok, I think I started to understand the functions. But I still can't figured out
    CONTEXT
    We are scanning pages and images from different newspaper. All the .tif, .jpg are on DVDs.
    I'm trying to build a search page who will allow for all DVDs and All images name related to the search result. Let say I search for:
    FIGARO
    I have this SQL query and I want to make a function that will return the same thing as:
    select     
          "DOSSIER"."ID" as "DOSSIERID",
          "DOSSIER"."TITLE" as "TITLE",
          "DVD"."ID" as "DVDID",
          "DVD"."NAME" as "DVDNAME",
          "DVD"."ID_DOSSIER" as "DVD_ID_DOSSIER",
          "ELEMENTS"."ID" as "ELEMENTSID",
          "ELEMENTS"."NAME" as "ELEMENTSNAME",
          "ELEMENTS"."ID_DVD" as "ELEMENTS_ID_DVD"
    from      "DOSSIER" "DOSSIER",
               "DVD" "DVD",
               "ELEMENTS" "ELEMENTS"
    where   "DVD"."ID_DOSSIER"="DOSSIER"."ID"
    and      "ELEMENTS"."ID_DVD"="DVD"."ID"
      and       "DOSSIER"."TITLE" = :P3_SEARCH
    ORDER BY "DVD".NAMEBasiccly, We are scanning pages and images from different newspaper. All the .tif, .jpg are on DVDs.
    So we have someting like that:
    TITLE: FIGARO
    DVD:        C2008-203
    Elements: 12l10201.tif, 12l10202.tif, 12l11101.tif, 12l11102.tif, 12l11201.tif
                    12l11202.tif, 12l12101.tif, 12l12102.tif
    DVD         C2008-204
    Elements: 12l12202.tif, 12l13101.tif, 12l13102.tif, 12l13201.tif, 12l13202.tif,
                   12l14101.tif, 12l14102.tif, 12l14201.tif, 12l14202.tif, 12l15101.tif,
                   12l15102.tif, 12l15201.tif
    DVD:       C2008-205
    Elements: 12l15202.tif, 12l16101.tif, 12l16102.tif, 12l16201.tif, 12l16202.tif,
                    12m01101.tif, 12m01102.tif, 12m01201.tifBased on what people on the forum told me, I now know that I have to use Pl/SQL so I have to write a function that will return the same thing as the prvious query.
    Is that exact?
    Based on this example,
    [http://plsql-tutorial.com/plsql-functions.htm|http://plsql-tutorial.com/plsql-functions.htm]
    I would write something like:
    CREATE FUNCTION my_super_function
    RETURN VARCHAR(2000);
    IS
    details VARCHAR(2000);
    BEGIN
    select     
          "DOSSIER"."ID" as "DOSSIERID",
          "DOSSIER"."TITLE" as "TITLE",
          "DVD"."ID" as "DVDID",
          "DVD"."NAME" as "DVDNAME",
          "DVD"."ID_DOSSIER" as "DVD_ID_DOSSIER",
          "ELEMENTS"."ID" as "ELEMENTSID",
          "ELEMENTS"."NAME" as "ELEMENTSNAME",
          "ELEMENTS"."ID_DVD" as "ELEMENTS_ID_DVD"
    from      "DOSSIER" "DOSSIER",
               "DVD" "DVD",
               "ELEMENTS" "ELEMENTS"
    where   "DVD"."ID_DOSSIER"="DOSSIER"."ID"
    and      "ELEMENTS"."ID_DVD"="DVD"."ID"
      and       "DOSSIER"."TITLE" = :P3_SEARCH
    RETURN details;
    END;
    / And then, use soemthing like:
    select my_super_function("DOSSIER"."ID") from "DOSSIER" "DOSSIER" where "DOSSIER"."TITLE" = :P3_SEARCHI'm kinda of lost. I spent the last 6 hours but I think that programming is a working progress.
    Any hint would be appreciated,
    thanks
    Roseline

  • Help needed on a TicTacToe java program

    I am very new to java and our teacher has given us a program
    that i am having quite a bit of trouble with. I was wondering if anyone could help me out.
    This is the program which i have bolded.
    {You will write a Java class to play the TicTacToe game. This program will have at least two data members, one for the status of the board and one to keep track of whose turn it is. All data members must be private. You will create a user interface that allows client code to play the game.
    The user interface must include:
    �     Boolean xPlay(int num) which allows x to play in the square labeled by num. This function will return true if that play caused the game to end and false otherwise.
    �     Boolean oPlay(int num) which allows o to play in the square labeled by num. This function will return true if that play caused the game to end and false otherwise.
    �     Boolean isEmpty(int num) will check to see if the square labeled by num is empty.
    �     Void display() which displays the current game status to the screen.
    �     Char whoWon() which will return X, O, or C depending on the outcome of the game.
    �     You must not allow the same player to play twice in a row. Should the client code attempt to, xPlay or oPlay should print an error and do nothing else.
    �     Also calling whoWon when the game is not over should produce an error message and return a character other than X, O, or C.
    �     Client code for the moment is up to you. Assume you have two human players that can enter the number of the square in which they want to play.
    Verifying user input WILL be done by the client code.}

    Hi,
    This forum is exclusively for discussions related to Sun Java Studio Creator. Please post your question at the Java Programming forum. The URL to this forum is:
    http://forum.java.sun.com/forum.jspa?forumID=31
    Cheers
    Giri

  • Help needed to write algorithm to find Direction given lat/lon

    Hello, i need an algorithm to find out the direction being traveled given the starting and ending lat/lon decimal coordinates. Anybody have any clues how to do it? or where i can find one to just plug into my program? thanks for your help
    public String getDirection(double prevLat, double prevLon, double newLat, double newLon) {
        String direction;
        return direction;
    }

    Perhaps this helps:
    http://www.cssd.ab.ca/tech/social/latitude/index.html
    It will help you learn the meaning of lat/long-coords. I think you will end up with somthing like this:
    if ( prevLat < newLat) {
       //we are travelling north
    else {
       // we are travelling south
    if (prevLong < newLong) {
       //we are travelling east?
    else {
       //we are travelling west
    }This could be wrong, since there is a west-long and an east-long..
    Anyhow, hope this gets you on your way.
    ps: is this a class-assignment??

  • Help Needed to Write Nim Game

    I need help in writing the Nim game. I have the program written already for the user to select if they want to go first or the computer and how many stones the user wants to start with. The problem I am having is writing a loop that recognizes which player is to go first and executes the play of taking stones. Any help would be appreciated.

    Perhaps there could be a boolean firstPlayerMove. Then, when the loop starts, if that is true then the first player enters the stones, otherwise second player. At the end of every time the loop is executed firstPlayerMove should equal "!firstPlayerMove."

  • Help needed creating a linked list program

    I have been trying to create a linked list program that takes in a word and its definition and adds the word to a link list followed by the definition. i.e. java - a simple platform-independent object-oriented programming language.
    the thing is that of course words must be added and removed from the list. so i am going to use the compareTo method. Basically there a 2 problems
    1: some syntax problem which is causing my add and remove method not to be seen from the WordList class
    2: Do I HAVE to use the iterator class to go thru the list? I understand how the iterator works but i see no need for it.
    I just need to be pointed in the right direction im a little lost.................
    your help would be greatly appreciated i've been working on this over a week i dont like linked list..........
    Here are my 4 classes of code........
    * Dictionary.java
    * Created on November 4, 2007, 10:53 PM
    * A class Dictionary that implements the other classes.
    * @author Denis
    import javax.swing.JOptionPane;
    /* testWordList.java
    * Created on November 10, 2007, 11:50 AM
    * @author Denis
    public class Dictionary {
        /** Creates a new instance of testWordList */
        public Dictionary() {
            boolean done=false;
    String in="";
    while(done!=true)
    in = JOptionPane.showInputDialog("Type 1 to add to Dictionary, 2 to remove from Dictionary, 3 to Print Dictionary, and 4 to Quit");
    int num = Integer.parseInt(in);
    switch (num){
    case 1:
    String toAdd = JOptionPane.showInputDialog("Please Key in the Word a dash and the definition.");
    add(toAdd);
    break;
    case 2:
    String toDelete = JOptionPane.showInputDialog("What would you like to remove?");
    remove(toDelete);
    break;
    case 3:
    for(Word e: list)
    System.out.println(e);
    break;
    case 4:
    System.out.println("Transaction complete.");
    done = true;
    break;
    default:
    done = true;
    break;
       }//end switch
      }//end while
    }//end Dictionary
    }//end main
    import java.util.Iterator;
    /* WordList.java
    * Created on November 4, 2007, 10:40 PM
    *A class WordList that creates and maintains a linked list of words and their meanings in lexicographical order.
    * @author Denis*/
    public class WordList{
        WordNode list;
        //Iterator<WordList> i = list.iterator();
        /*public void main(String [] args)
        while(i.hasNext())
        WordNode w = i.next();
        String s = w.word.getWord();
        void WordList() {
          list = null;
        void add(Word b)
            WordNode temp = new WordNode(b);
            WordNode current,previous = null;
            boolean found = false;
            try{
            if(list == null)
                list=temp;
            else{
                current = list;
                while(current != null && !found)
                    if(temp.object.getWord().compareTo(current.object.getWord())<0)
                        found = true;
                    else{
                    previous=current;
                    current=current.next;
                temp.next=current;
                if(previous==null)
                    list=temp;
                else
                    previous.next=temp;
                }//end else
            }//end try
            catch (NullPointerException e)
                System.out.println("Catch at line 46");
        }//end add
    /*WordNode.java
    * Created on November 4, 2007, 10:40 PM
    *A class WordNode that contains a Word object of information and a link field that will contain the address of the next WordNode.
    * @author Denis
    public class WordNode {
        Word object;//Word object of information
        WordNode next;//link field that will contain the address of the next WordNode.
        WordNode object2;
        public WordNode (WordNode wrd)
             object2 = wrd;
             next = null;
        WordNode(Word x)
            object = x;
            next = null;
        WordNode list = null;
        //WordNode list = new WordNode("z");
        Word getWord()
            return object;
        WordNode getNode()
            return next;
    import javax.swing.JOptionPane;
    /* Word.java
    * Created on November 4, 2007, 10:39 PM
    * A class Word that holds the name of a word and its meaning.
    * @author Denis
    public class Word {
        private String word = " ";
        /** Creates a new instance of Word with the definition*/
        public Word(String w) {
            word = w;
        String getWord(){
            return word;
    }

    zoemayne wrote:
    java:26: cannot find symbol
    symbol  : method add(java.lang.String)
    location: class Dictionary
    add(toAdd);this is in the dictionary class
    generic messageThat's because there is no add(...) method in your Dictionary class: the add(...) method is in your WordList class.
    To answer your next question "+how do I add things to my list then?+": Well, you need to create an instance of your WordList class and call the add(...) method on that instance.
    Here's an example of instantiating an object and invoking a method on that instance:
    Integer i = new Integer(6); // create an instance of Integer
    System.out.println(i.toString()); // call it's toString() method and display it on the "stdout"

  • Help needed for editable alv grid program

    hi,
    Can you please tell me how to set a ‘update’ button in application toolbar of alv griv without suppressing it and how to write the code for that update button so that if I change my editable column data and press the update button my updated data should be stored in my database table.
    the code what i wrote is:
    TABLES: vbak,vbap.
    TYPE-POOLS: slis. "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_final,
    vbeln LIKE vbak-vbeln,
    erdat LIKE vbak-erdat,
    matnr LIKE vbap-matnr,
    posnr LIKE vbap-posnr,
    END OF t_final.
    DATA: i_final TYPE STANDARD TABLE OF t_final INITIAL SIZE 0,
    wa_final TYPE t_final.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    gd_tab_group TYPE slis_t_sp_group_alv,
    gd_layout TYPE slis_layout_alv,
    gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
    PERFORM data_retrieval.
    PERFORM build_fieldcatalog.
    PERFORM build_layout.
    PERFORM display_alv_report.
    *& Form BUILD_FIELDCATALOG
    •     Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
    fieldcatalog-fieldname = 'VBELN'.
    fieldcatalog-seltext_m = 'sales order'.
    fieldcatalog-col_pos = 0.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'ERDAT'.
    fieldcatalog-seltext_m = 'date'.
    fieldcatalog-col_pos = 1.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'MATNR'.
    fieldcatalog-seltext_m = 'material no.'.
    fieldcatalog-col_pos = 2.
    fieldcatalog-edit = 'X'.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    fieldcatalog-fieldname = 'POSNR'.
    fieldcatalog-seltext_m = 'line item no.'.
    fieldcatalog-col_pos = 3.
    APPEND fieldcatalog TO fieldcatalog.
    CLEAR fieldcatalog.
    ENDFORM. " BUILD_FIELDCATALOG
    *& Form BUILD_LAYOUT
    •     Build layout for ALV grid report
    FORM build_layout.
    gd_layout-no_input = 'X'.
    gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text = 'Totals'(201).
    •     gd_layout-totals_only = 'X'.
    •     gd_layout-f2code = 'DISP'. "Sets fcode for when double
    •     "click(press f2)
    •     gd_layout-zebra = 'X'.
    •     gd_layout-group_change_edit = 'X'.
    •     gd_layout-header_text = 'helllllo'.
    ENDFORM. " BUILD_LAYOUT
    *& Form DISPLAY_ALV_REPORT
    •     Display report using ALV grid
    FORM display_alv_report.
    gd_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = gd_repid
    •     i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
    i_callback_user_command = 'USER_COMMAND'
    i_grid_title = outtext
    is_layout = gd_layout
    it_fieldcat = fieldcatalog[]
    •     it_special_groups = gd_tabgroup
    •     IT_EVENTS = GT_XEVENTS
    i_save = 'X'
    •     is_variant = z_template
    TABLES
    t_outtab = i_final
    EXCEPTIONS
    program_error = 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.
    ENDFORM. " DISPLAY_ALV_REPORT
    *& Form DATA_RETRIEVAL
    •     Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
    SELECT avbeln aerdat bmatnr bposnr FROM vbak AS a
    INNER JOIN vbap AS b ON avbeln = bvbeln
    INTO TABLE i_final WHERE avbeln = bvbeln.
    •     ENDFORM. " DATA_RETRIEVAL
    thanks in advance.

    hi sudhir,
    thanks for ur reply.
    after seeing the code u send to me i made changes to my program.but still when i click on update button,nothing is happening.can u please suggest me an idea.
    TABLES: vbak,vbap.
    TYPE-POOLS: slis.                                 "ALV Declarations
    TYPES: BEGIN OF t_final,
         vbeln LIKE vbak-vbeln,
         erdat LIKE vbak-erdat,
         matnr LIKE vbap-matnr,
         posnr LIKE vbap-posnr,
         END OF t_final.
    DATA: i_final TYPE STANDARD TABLE OF t_final WITH HEADER LINE,
          wa_final TYPE t_final.
    *DATA:i_final LIKE vbap OCCURS 0.
    *DATA:wa_final LIKE vbap.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'VBELN'.
      fieldcatalog-seltext_m   = 'sales order'.
      fieldcatalog-col_pos     = 0.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'ERDAT'.
      fieldcatalog-seltext_m   = 'date'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'material no.'.
      fieldcatalog-col_pos     = 2.
      fieldcatalog-edit        = 'X'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'POSNR'.
      fieldcatalog-seltext_m   = 'line item no.'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = gd_repid
               i_callback_top_of_page   = 'TOP-OF-PAGE'  "see FORM
                i_callback_user_command = 'USER_COMMAND'
                i_callback_pf_status_set = 'GUI_STAT'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       = gd_tabgroup
               it_events                = it_events
                i_save                  = 'X'
               is_variant              = z_template
           TABLES
                t_outtab                = i_final
           EXCEPTIONS
                program_error           = 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.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT avbeln aerdat bmatnr bposnr FROM vbak AS a
      INNER JOIN vbap AS b ON avbeln = bvbeln
      INTO TABLE i_final WHERE avbeln = bvbeln.
    ENDFORM.                    " DATA_RETRIEVAL
          FORM GUI_STAT                                                 *
    -->  RT_EXTAB                                                      *
    FORM gui_stat USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'UPDATE' EXCLUDING rt_extab.
    ENDFORM.
          FORM USER_COMMAND                                             *
    -->  U_COMM                                                        *
    -->  RS_SELFIELD                                                   *
    FORM user_command USING u_comm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
      DATA:selfield TYPE slis_selfield.
      CASE u_comm.
        WHEN 'UPDATE'.
          LOOP AT i_final ."into wa_final.
            i_final-matnr = vbap-matnr.
            update (vbap) from table i_final.
            IF sy-subrc = 0.
              MESSAGE s000(0) WITH 'records updated successfully'.
            ENDIF.
          ENDLOOP.
      ENDCASE.
    ENDFORM.

  • HELP NEeded in creating tis java program

    create a prompter appliation that prompts the user for two numbers. The first number is a minimum value, and the second is a maximum value. Prompter then prompts the user for a number between the minimum and maximum numbers entered. The user should be continuously prompted until a number within the range is entered. Be sure to include the minimum and maximum numbers in prompt.
    use boolean operator in while loop
    what do do??

    so can some 1 help me"Help" as in provide workable code? They might - you did all right in your last
    thread. Personally, though, I doubt you're much helped by this.
    Start by reading the description of what your code must do. Make sure you
    understand the description - perhaps by explaining it in your own words to someone
    else. If they don't understand then you don't understand: not in any sense
    that matters.
    Then proceed to write some code. The first sentence of the description you posted
    makes a good starting point. Write some code that compiles and does this.
    Make sure you understand what each line does before moving on.
    If you get stuck post some code and an actual question. If there is a compiler error,
    copy paste and post the actual error you can't understand and say which line it refers
    to. If your code compiles but has unwanted, unexpected or mysterious results,
    say what it does and what you were expecting, or wanting.
    Hope that helps.
    (My apologies if your native language is not English, but really. Use a
    dictionary - online or, better, in paper form. Eschew abbreviations. Read what you
    post aloud or, as above, to someone else who can tell you if it makes no sense.)

  • Help NEEDED!!! - Quiz Program

    Doing a Java project, writing a Quiz program basically got multiple screens and using a Buffered reader which loads a txt folder, at the moment it reads the questions and allows u to skip questions on all 4 buttons, i know need it to count up the correct answers and have a final score etc.
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.StringTokenizer;
    import javax.swing.*;
    public class Main extends JFrame implements ActionListener
         private JButton button, buttonAns1, buttonAns2, buttonAns3, buttonAns4;
         private JPanel panel, panelAns, panelAns1, panelAns2, panelAns3, panelAns4;
         private JLabel labelTitle, labelName, labelQ1;
         BufferedReader inFile;
         boolean start =true;
         String answer = null;
         int noOfQuestions = 0;
         Main myMain ;
         MusicQuiz myMusicQuiz;
         Levels myLevels;
         public Main()
              String name;
         name = JOptionPane.showInputDialog(null,"Please enter your Name!");     
              JOptionPane.showMessageDialog(null,"Welcome " + name);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              Container c= getContentPane();
              setSize(700,600);
              panel = new JPanel();
    panel.setLayout(new GridLayout(5,1));
    panel.setSize(600,400);
              c.add(panel);
              labelTitle = new JLabel("MTV's Quiz Star");
              labelTitle.setHorizontalAlignment(JLabel.CENTER);
              panel.add(labelTitle);
              labelTitle.setFont(new Font("Tahoma",Font.BOLD,48));
              labelTitle.setForeground(Color.orange);
              labelName = new JLabel("User: "+ name);
              labelName.setHorizontalAlignment(JLabel.CENTER);
              panel.add(labelName);
              labelName.setFont(new Font("Tahoma",Font.BOLD,14));
              labelName.setForeground(Color.darkGray);
              labelQ1 = new JLabel("");
              labelQ1.setHorizontalAlignment(JLabel.CENTER);
              panel.add(labelQ1);
              labelQ1.setFont(new Font("Tahoma",Font.BOLD,24));
              labelQ1.setForeground(Color.darkGray);
              panelAns = new JPanel();
              panelAns.setLayout(new GridLayout(2,2));
              panelAns.setSize(600,400);
              panel.add(panelAns);
              buttonAns1 = new JButton("");
              buttonAns1.addActionListener(this);
              buttonAns1.setForeground(Color.darkGray);
              panelAns.add(buttonAns1);
              buttonAns2 = new JButton("");
              buttonAns2.addActionListener(this);
              buttonAns2.setForeground(Color.darkGray);
              panelAns.add(buttonAns2);
              buttonAns3 = new JButton("");
              buttonAns3.addActionListener(this);
              buttonAns3.setForeground(Color.darkGray);
              panelAns.add(buttonAns3);
              buttonAns4 = new JButton("");
              buttonAns4.addActionListener(this);
              buttonAns4.setForeground(Color.darkGray);
              panelAns.add(buttonAns4);
              setSize(600,400);
              show();
              countQuestions();
              readQuestions();
         public static void main(String[] args)
                   Main myMain = new Main();
         public void countQuestions()
              try
                   String line;
                   inFile = new BufferedReader(new FileReader("Questions.txt"));
              try
                   while ((line = inFile.readLine()) != null)
                        noOfQuestions++;
                   inFile.close();
              catch(Exception e)
         catch (FileNotFoundException e)
              System.out.println("File - Questions.txt - File Not Found");
              private void readQuestions()
                   int number = (int)(Math.random() * noOfQuestions);
                   if(start == true)
                   start = false;
              try
                   inFile = new BufferedReader(new FileReader("Questions.txt"));
                   String line = null;
                   for(int loop =0;loop < number;loop++)
                        line= inFile.readLine();
                   StringTokenizer parts = new StringTokenizer(line,"|");
                   labelQ1.setText(parts.nextToken());
                   buttonAns1.setText(parts.nextToken());
                   buttonAns2.setText(parts.nextToken());
                   buttonAns3.setText(parts.nextToken());
                   buttonAns4.setText(parts.nextToken());
                   answer = parts.nextToken();
                   inFile.close();
              catch (Exception e)
              /* (non-Javadoc)
              * @see java.awt.event.ActionListeneractionPerformed(java.awt.event.ActionEvent)
              public void actionPerformed(ActionEvent arg0)
                   if (arg0.getSource()==myMusicQuiz)
                        if(myMusicQuiz==null)
                             myMusicQuiz= new MusicQuiz();
                        else show();
                   if (arg0.getSource()==myLevels)
                        if(myLevels==null)
                             myLevels= new Levels();
                        else show();
                   if(arg0.getSource() == buttonAns1)
                        readQuestions();
                   if(arg0.getSource() == buttonAns2)
                        readQuestions();
                   if(arg0.getSource() == buttonAns3)
                        readQuestions();
                   if(arg0.getSource() ==buttonAns4)
                        readQuestions();
    }

    In case you're wondering if someone is going to do it for you, I'd guess No. So if you're still sitting there on your hands you might want to do something about it instead.

  • Help needed to write in excel sheet

    Hi,
    I currently need to read a table and write it in a file.
    iam able to do it by using UTL package.The utl file also writes in xls format.but if a record has two column.
    both the columns are written in a single column in excel
    sheet.Kindly suggest me how to solve this problem
    Thanks in advance.

    1. spool a file with 'csv' extension using Sql*Plus.
    2. Use a delimiter for columns.
    For example,
    select '"'||column1||'","'||column2||'"'
    from mytable

Maybe you are looking for

  • Capturing FCP

    Hey, I just shot on the DSR-P150. An old camera but I thought it would suffice. Hooked it up to my Graid drive with fire wire cable and FCP is not recognizing it. The AV device warning kept popping up.Tried different options in the Audio Video settin

  • Updating child table with parent table

    Can anyone help me with this update statement? I have a table BETA with children of the family list and I have table GAMA with children and family list. The relation between family and children is 1 to many. Now we have decided to update table BETA w

  • JAVA MIME Content Type text/xml - as inline mail text

    I have code currently which uses Java Mail to post an email having xml contents. I used the MIME content type as text/xml however the way outlook is showing the mail is as an attachment. I was expecting it to show it inline. Is there any way i can di

  • I tunes 8 constantly asking for authorization, then says already authorized

    Ever since I downloaded itunes 8.0, it has been constantly asking me to authorize songs- after which it says the computer is already authorized- I thought it was a quirk with the download, so I re-downloaded and installed 8.0, but I"m having the same

  • Removing namespace from xml

    Hi, I have an xml which has some target namespace. I need to remove the namespace and the qualifiers and put it on a machine using a file adapter. Any help in this regard is highly appreciated. With Regards, Harsh