How to display a new view from a nib ?

how to
display a new view from a nib in the main window after clicking on a button.
When I click a the button named for example "goToGokyo", the link to my procedure
runs correctly because I see my NSLog message "goToGokyo button pressed".
My nib, which name is "GokyoViewController" does exist.
I did as follow for the moment but I'm stuck now, my nib  :
- (IBAction)goToGokyo:(id)sender
    NSLog(@"goToGokyo button pressed");
  //[self stopSound];
  if (gokyoViewController == nil)
        GokyoViewController *aGokyoViewController = [[GokyoViewController alloc]
                                                     initWithNibName:@"GokyoViewController" bundle:nil];
        self.gokyoViewController = aGokyoViewController;
        //[aGokyoViewController release];
    [self GokyoView:gokyoViewController animated:YES completion: nil];
Thanks in advance for your advice.
Cheers

I did that now :
- (IBAction)btnLoadMyViewController:(id)sender
    NSViewController *viewController = [[NSViewController alloc] initWithNibName:@"MyView" bundle:nil];
    NSView *view = [viewController view];
    [_myWindowController.window setContentView:view];
    //view addSubview:view];
    //[self.myView addSubview:view];
Using
"_myWindowController.window setContentView:view];"
or
"[self.myView addSubview:view];"
does not an error but does nothing !
Would you help me one more times please ?
Thanks in advance

Similar Messages

  • How to call a Webdynpro view from BSP page (MVC) in a new window?

    Dear Experts,
    kindly advise how to call a webdynpro view from BSP application after performing an event (through button or hyper link).
    Regards,
    Sarat.

    Hi,
    This has been discussed many times in several forums.
    Please check the method CL_WD_UTILITIES=>CONSTRUCT_WD_URL, to create a runtime url for your WD Application and call this URL.
    Refer thread: Call Webdynpro Application from BSP Application
    Hope this will be useful!
    Regards,
    Meganadhan S

  • Can you please how to retrive the new netprice from the new validity period

    Hi,
    When you display  a contract using ME33K and you click on  a item and view its conditions(shift+F6), there might be 2 validity periods for a given item.
    and each period will have different netprice in it.
    One will be old date before the PO was created and the other new one which has validity till 31.12.999..We want to fetch the netprice for the new validity date but currently the program is fetching this data from the table EKPO which is having the netprice of the old date only..
    Can you please how to retrive the new netprice from the new validity period

    Thank you so much.
    But I need more help specific to my problem.
    Let me describe the same.
    Suppose the PO creation date is 04.07.2007
    The conditions for an item in a contract for the PO are as follows;
    1. Validity from 04.07.2007 validity to 04.07.2007 Netprice = 100.00
    2. Validity from 05.07.2007 validity to 31.12.9999 Netprice = 200.00
    We need to always fetch the netprice from the validity period which always matches with the PO creatio date. here the value 100.00 should be the correct netpr as the PO creation date matches with the first validity period.
    But the program is fetching the netprice 200.000 which belongs to the second validity period. That is beacuse the select statement which fetches the data for contracts collects on the basis of EKKO-kdate and ekko-kdtab.the fields kdate and kdtab retrieves the validity period of the contract which is from 04.07.2007 to 31.072007. This data is then used to retrieve the netpr data from EKPO and it fetched 200.00 as it retrives the netprice of current data in contract validity and h not with respect to PO creation date.
    This data is then used to fetch the get the netpr data from EKPO.
    <u>what we need is the netprice for that validity period of item(Conditions) that matches with the PO creation date</u>..
    Below is the code where I'm selecting the data from ekko and ekpo for the contracts data..Can you please add the code snippet to the below attachesd subroutine to get the required data from KONV and KONP so that we can retrieve the correct Netprice.
    FORM select_contracts USING p_s_cebeln LIKE s_cebeln[]
                                p_c_k_bstyp  TYPE ebstyp
                                p_p_bukrs    TYPE bukrs
                                p_p_ekorg    TYPE ekorg
                                p_p_ekgrp    TYPE bkgrp
    *Begin of Mod-004
                                fp_p_cernam   type ty_r_ernam
                               p_p_cernam   TYPE ernam
    *End of Mod-004
                                p_s_werks    LIKE s_werks[]
                                p_s_matnr    LIKE s_matnr[]
                                p_s_lifnr    LIKE s_lifnr[]
                                p_s_val_dt   LIKE s_val_dt[].
    *mod-002
        data : l_amount   type BAPICURR_D,   " Net price
               l_waers    TYPE waers,        " Currency Key
               l_eff_amount type BAPICURR_D. " Effective value
          data: l_v_netpr type bprei.
    *mod-002
    SELECT  ebeln
              bukrs
              bstyp
              aedat
              ernam
              lifnr
              zterm
              ekorg
              ekgrp
              waers
              wkurs
              <b>kdatb
              kdate</b>
              inco1
              INTO TABLE i_ekko
              FROM ekko
              WHERE    ebeln IN p_s_cebeln
                   AND bstyp EQ p_c_k_bstyp
                   AND bukrs EQ p_p_bukrs
                   AND ekorg EQ p_p_ekorg
                   AND ekgrp EQ p_p_ekgrp
    *Begin of Mod-004
                  AND ernam EQ p_p_cernam
                   AND ernam IN fp_p_cernam
    *End of Mod-004
                   AND lifnr IN p_s_lifnr
                   AND ( kdatb IN p_s_val_dt OR kdate IN p_s_val_dt ).
      IF sy-subrc EQ 0.
    Populates internal table i_ekpo using EKPO table.
        SELECT   ebeln
                 ebelp
                 loekz
                 txz01
                 matnr
                 werks
                 ktmng
                 menge
                 meins
                 bprme
                 netpr
                 peinh
                 webaz
                 mwskz
                 uebto
                 untto
                 erekz
                 pstyp
                 knttp
                 repos
                 webre
                 konnr
                 ktpnr
                 ean11
                 effwr
                 xersy
                 aedat
                 prdat
                   INTO TABLE i_ekpo
                   FROM ekpo
                   FOR ALL ENTRIES IN i_ekko
                   WHERE ebeln = i_ekko-ebeln
                     and aedat = i_ekko-aedat
                     AND werks IN p_s_werks
                     AND matnr IN p_s_matnr.
    LOOP AT i_ekpo INTO rec_ekpo.
          MOVE rec_ekpo-ebeln  TO rec_contr-ebeln.
          MOVE rec_ekpo-ebelp  TO rec_contr-ebelp.
          MOVE rec_ekpo-loekz  TO rec_contr-loekz.
          MOVE rec_ekpo-txz01  TO rec_contr-txz01.
          MOVE rec_ekpo-matnr  TO rec_contr-matnr.
          MOVE rec_ekpo-werks  TO rec_contr-werks.
          MOVE rec_ekpo-ktmng  TO rec_contr-ktmng.
          MOVE rec_ekpo-menge  TO rec_contr-menge.
          MOVE rec_ekpo-meins  TO rec_contr-meins.
          MOVE rec_ekpo-bprme  TO rec_contr-bprme.
         MOVE rec_ekpo-netpr  TO rec_contr-netpr.
         move l_v_netpr        TO rec_contr-netpr.
    mod-002
          read table i_ekko into rec_ekko with key
                           ebeln = rec_ekpo-ebeln.
            l_waers =  rec_ekko-waers.
    CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
      EXPORTING
        currency              =  l_waers
        amount_internal       =  rec_contr-netpr
    IMPORTING
       AMOUNT_EXTERNAL       =  l_amount.
                rec_contr-netpr = l_amount.
    mod-002
          MOVE rec_ekpo-peinh  TO rec_contr-peinh.
          MOVE rec_ekpo-webaz  TO rec_contr-webaz.
          MOVE rec_ekpo-mwskz  TO rec_contr-mwskz.
          MOVE rec_ekpo-uebto  TO rec_contr-uebto.
          MOVE rec_ekpo-untto  TO rec_contr-untto.
          MOVE rec_ekpo-erekz  TO rec_contr-erekz.
          MOVE rec_ekpo-pstyp  TO rec_contr-pstyp.
          MOVE rec_ekpo-knttp  TO rec_contr-knttp.
          MOVE rec_ekpo-repos  TO rec_contr-repos.
          MOVE rec_ekpo-webre  TO rec_contr-webre.
          MOVE rec_ekpo-konnr  TO rec_contr-konnr.
          MOVE rec_ekpo-ktpnr  TO rec_contr-ktpnr.
          MOVE rec_ekpo-ean11  TO rec_contr-ean11.
          MOVE rec_ekpo-effwr  TO rec_contr-effwr.
    mod-002
          CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
       EXPORTING
          currency              =  l_waers
          amount_internal       =  rec_contr-effwr
       IMPORTING
          AMOUNT_EXTERNAL       =  l_eff_amount.
               rec_contr-effwr = l_eff_amount.
    *mod-002
          MOVE rec_ekpo-xersy  TO rec_contr-xersy.
          APPEND rec_contr TO i_contr.
          CLEAR: rec_ekpo,rec_contr.
    mod-002
          CLEAR : rec_ekko,l_amount, l_eff_amount,l_waers.
    mod-002
        ENDLOOP.
    Modifying i_contr using i_ekko.
        SORT i_ekko BY ebeln.
        LOOP AT i_contr INTO rec_contr.
          READ TABLE i_ekko INTO rec_ekko WITH KEY
                              ebeln = rec_contr-ebeln
                              BINARY SEARCH.
          MOVE rec_ekko-bukrs  TO  rec_contr-bukrs.
          MOVE rec_ekko-bstyp  TO  rec_contr-bstyp.
          MOVE rec_ekko-aedat  TO  rec_contr-aedat.
          MOVE rec_ekko-ernam  TO  rec_contr-ernam.
          MOVE rec_ekko-lifnr  TO  rec_contr-lifnr.
          MOVE rec_ekko-zterm  TO  rec_contr-zterm.
          MOVE rec_ekko-ekorg  TO  rec_contr-ekorg.
          MOVE rec_ekko-ekgrp  TO  rec_contr-ekgrp.
          MOVE rec_ekko-waers  TO  rec_contr-waers.
          MOVE rec_ekko-wkurs  TO  rec_contr-wkurs.
          MOVE rec_ekko-kdatb  TO  rec_contr-kdatb.
          MOVE rec_ekko-kdate  TO  rec_contr-kdate.
          MOVE rec_ekko-inco1  TO  rec_contr-inco1.
          MODIFY i_contr FROM rec_contr.
        ENDLOOP.
      ENDIF.
      REFRESH: i_ekko,
               i_ekpo.
      CLEAR  : rec_ekko,
               rec_ekpo,
               rec_contr.
    ENDFORM.      "select_contracts
    Thanks.

  • How to call a maintenance view  from a program

    Hello Abapers,
    Can anybody explain with some examples. How to call a mainetenance view from a program.
    Thanks
    Ranjith.

    Use FM 'VIEW_MAINTENANCE_CALL'.
    REPORT  zmaintaintest.
    VARIABLES / CONSTANTS                          
    CONSTANTS: 
                    c_action(1) TYPE c VALUE 'U',                                 "Update
              c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
              c_field(6) TYPE c VALUE 'EMPNO'.                            "Field Name
    INTERNAL TABLES
    DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
              v_empno TYPE zempno,
              wa_rangetab TYPE vimsellist.
    SELECTION SCREEN
    PARAMETERS:     p_empno TYPE   zempno   OBLIGATORY.  "Emplyee ID
    AT SELECTION-SCREEN                                                 
    AT SELECTION-SCREEN.
    Chcking the existence of the user in EMPLOYEE table
      PERFORM validate_employee.
    START_OF_SELECTION                                                  
    START-OF-SELECTION.
    This will restrict the user view so that user can only view/change
    Table data corresponding to his/her Employee ID
      PERFORM define_limited_data_area.
    Displaying table maintenance view for a particular employee ID
      PERFORM call_view_maintenance.
    *&      Form validate_employee
    Validate plant entered in the selection screen
    FORM validate_employee.
      SELECT SINGLE empno     u201CEmployee ID
        FROM zemp_example     u201CEmployee Table
        INTO v_empno
        WHERE empno = p_empno.
      IF sy-subrc <> 0.
        MESSAGE 'Not an Valid User' TYPE 'I'.
      ENDIF.
    ENDFORM.                    "validate_employee
    *&      Form DEFINE_LIMITED_DATA_AREA
    To restrict the user view so that user can see/change table data
    corresponding to his employee ID. Here one internal table is
    getting populated with field name as u201CEMPNOu201D (Key field of the table)
    And value as given by user in Selection Screen and this is passed as
    Parameter in function module 'VIEW_MAINTENANCE_CALL'
    FORM define_limited_data_area.
      CLEAR wa_rangetab.
      wa_rangetab-viewfield  = c_field.
      wa_rangetab-operator  = 'EQ'.
      wa_rangetab-value       = p_empno.
      APPEND wa_rangetab TO itab_rangetab.
    ENDFORM.                    "define_limited_data_area
    *&      Form CALL_VIEW_MAINTENANCE.
    Displaying table maintenance view for a particular employee ID
    FORM call_view_maintenance.
      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'      
        EXPORTING
          action           = c_action
          view_name   = c_viewname
        TABLES
          dba_sellist     = itab_rangetab.
    ENDFORM.                    "call_view_maintenance
    Regards,
    Joy.

  • How to open a new window from the login window?

    hi,
    can someone tell me how to open a new window from an existing window, here by window i mean frame. The case is i hv two java files - oracle.java and FDoptions.java. The first frame is in the Login.java. The oracle.java file has a button "Login", when it is clicked, i want to open the next frame which is in the file FDoptions.java. Can some one help me with this? I m giving the code below -
    oracle.java
    import java.awt.BorderLayout;
    import java.awt.FlowLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JPasswordField;
    import javax.swing.JTextField;
    * The application's main frame.
    public class oracle {
        private JFrame frame;
        private JPanel logInPanel;
        private JButton clearButton;
        private JButton logInButton;
        private JButton newuserButton;
        private JButton forgotpasswordButton;
        private JTextField userNameTextField;
        private JPasswordField passwordTextField;
        public oracle() {
            initComponents();
        private final void initComponents() {
            JLabel userNameLabel = new JLabel("User name: ");
            JLabel passwordLabel = new JLabel("Password: ");
            userNameTextField = new JTextField();
            passwordTextField = new JPasswordField();
            JPanel userInputPanel = new JPanel(new GridLayout(2, 2, 5, 5));
            userInputPanel.setBorder(BorderFactory.createEmptyBorder(10, 20, 10, 20));
            userInputPanel.add(userNameLabel);
            userInputPanel.add(userNameTextField);
            userInputPanel.add(passwordLabel);
            userInputPanel.add(passwordTextField);
            logInButton = new JButton(new LogInAction());
            clearButton = new JButton(new ClearAction());
            newuserButton = new JButton(new NewUserAction());
            forgotpasswordButton = new JButton(new ForgotPassword());
            JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
            JPanel buttonPanel1 = new JPanel(new FlowLayout(FlowLayout.RIGHT));
            buttonPanel.add(logInButton);
            buttonPanel.add(clearButton);
            buttonPanel1.add(newuserButton);
            buttonPanel1.add(forgotpasswordButton);
            logInPanel = new JPanel(new BorderLayout());
            logInPanel.add(userInputPanel, BorderLayout.NORTH);
            logInPanel.add(buttonPanel, BorderLayout.CENTER);
            logInPanel.add(buttonPanel1,BorderLayout.SOUTH);
            frame = new JFrame("FD Tracker");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(500, 500);
            frame.setContentPane(logInPanel);
            frame.pack();
            frame.setVisible(true);
        private void performLogIn() {
            // Log in the user
            System.out.println("Username: " + userNameTextField.getText());
            char[] password = passwordTextField.getPassword();
            System.out.print("Password: ");
            for(char c : password) {
                System.out.print(c);
            System.out.println();
        private void performClear() {
            // Clear the panel
            System.out.println("Clearing the panel");
            userNameTextField.setText("");
            passwordTextField.setText("");
        private final class LogInAction extends AbstractAction {
            public LogInAction() {
                super("Log in");
            @Override
            public void actionPerformed(ActionEvent e) {
                performLogIn();
        private final class ClearAction extends AbstractAction {
            public ClearAction() {
                super("Clear");
            @Override
            public void actionPerformed(ActionEvent e) {
                performClear();
        private final class NewUserAction extends AbstractAction{
             public NewUserAction(){
                 super("New User");
             @Override
             public void actionPerformed(ActionEvent e){
                 JFrame newuser = new JFrame("NewUser");
        private final class ForgotPassword extends AbstractAction{
            public ForgotPassword(){
                super("Forgot Password");
            @Override
            public void actionPerformed(ActionEvent e){
                JFrame forgotpassword = new JFrame("Forgot Password");
        public static void main(String args[]) {
            new oracle();
         FDoptions.java
    import java.awt.FlowLayout;
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.BorderFactory;
    import javax.swing.JPanel;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    public class Fdoptions{
        private JFrame fdoptions;
        private JPanel fdoptpanel;
        private JButton enterfdbutton;
        private JButton viewfdbutton;
        public Fdoptions() {
            initComponents();
        private final void initComponents(){
            fdoptpanel = new JPanel(new BorderLayout());
            fdoptpanel.setBorder(BorderFactory.createEmptyBorder(80,50,80,50));
            enterfdbutton = new JButton(new EnterFDAction());
            viewfdbutton = new JButton(new ViewFDAction());
           JPanel enterbuttonpanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
           JPanel viewbuttonpanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
            enterbuttonpanel.add(enterfdbutton);
            viewbuttonpanel.add(viewfdbutton);
            fdoptpanel.add(enterbuttonpanel,BorderLayout.NORTH);
            fdoptpanel.add(viewbuttonpanel,BorderLayout.SOUTH);
            fdoptions = new JFrame("FD Options");
            fdoptions.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            fdoptions.setSize(1000,1000);
            fdoptions.setContentPane(fdoptpanel);
            fdoptions.pack();
            fdoptions.setVisible(true);
        private void performEnter(){
        private void performView(){
        private final class EnterFDAction extends AbstractAction{
            public EnterFDAction(){
                super("Enter new FD");
            public void actionPerformed(ActionEvent e){
                performEnter();
        private final class ViewFDAction extends AbstractAction{
            public ViewFDAction(){
                super("View an existing FD");
            public void actionPerformed(ActionEvent e){
                performView();
        public static void main(String args[]){
            new Fdoptions();
    }

    nice day,
    these lines..., despite the fact that this example is about something else, shows you two ways
    1/ modal JDialog
    2/ two JFrame
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * Parent Modal Dialog. When in modal mode, this dialog
    * will block inputs to the "parent Window" but will
    * allow events to other components
    * @see javax.swing.JDialog
    public class PMDialog extends JDialog {
        private static final long serialVersionUID = 1L;
        protected boolean modal = false;
        private WindowAdapter parentWindowListener;
        private Window owner;
        private JFrame blockedFrame = new JFrame("No blocked frame");
        private JFrame noBlockedFrame = new JFrame("Blocked Frame");
        public PMDialog() {
            noBlockedFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            noBlockedFrame.getContentPane().add(new JButton(new AbstractAction("Test button") {
                private static final long serialVersionUID = 1L;
                @Override
                public void actionPerformed(ActionEvent evt) {
                    System.out.println("Non blocked button pushed");
                    blockedFrame.setVisible(true);
                    noBlockedFrame.setVisible(false);
            noBlockedFrame.setSize(200, 200);
            noBlockedFrame.setVisible(true);
            blockedFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
            blockedFrame.getContentPane().add(new JButton(new AbstractAction("Test Button") {
                private static final long serialVersionUID = 1L;
                @Override
                public void actionPerformed(ActionEvent evt) {
                    final PMDialog pmd = new PMDialog(blockedFrame, "Partial Modal Dialog", true);
                    pmd.setSize(200, 100);
                    pmd.setLocationRelativeTo(blockedFrame);
                    pmd.getContentPane().add(new JButton(new AbstractAction("Test button") {
                        private static final long serialVersionUID = 1L;
                        @Override
                        public void actionPerformed(ActionEvent evt) {
                            System.out.println("Blocked button pushed");
                            pmd.setVisible(false);
                            blockedFrame.setVisible(false);
                            noBlockedFrame.setVisible(true);
                    pmd.setVisible(true);
                    System.out.println("Returned from Dialog");
            blockedFrame.setSize(200, 200);
            blockedFrame.setLocation(300, 0);
            blockedFrame.setVisible(false);
        public PMDialog(Dialog parent, String title, boolean isModal) {
            super(parent, title, false);
            initDialog(parent, title, isModal);
        public PMDialog(Frame parent, String title, boolean isModal) {
            super(parent, title, false);
            initDialog(parent, title, isModal);
        private void initDialog(Window parent, String title, boolean isModal) {
            owner = parent;
            modal = isModal;
            parentWindowListener = new WindowAdapter() {
                @Override
                public void windowActivated(WindowEvent e) {
                    if (isVisible()) {
                        System.out.println("Dialog.getFocusBack()");
                        getFocusBack();
        private void getFocusBack() {
            Toolkit.getDefaultToolkit().beep();
            super.setVisible(false);
            super.pack();
            super.setLocationRelativeTo(owner);
            super.setVisible(true);
            //super.toFront();
        @Override
        public void dispose() {
            owner.setEnabled(true);
            owner.setFocusableWindowState(true);
            super.dispose();
        @Override
        @SuppressWarnings("deprecation")
        public void hide() {
            owner.setEnabled(true);
            owner.setFocusableWindowState(true);
            super.hide();
        @Override
        public void setVisible(boolean visible) {
            boolean blockParent = (visible && modal);
            owner.setEnabled(!blockParent);
            owner.setFocusableWindowState(!blockParent);
            super.setVisible(visible);
            if (blockParent) {
                System.out.println("Adding listener to parent ...");
                owner.addWindowListener(parentWindowListener);
                try {
                    if (SwingUtilities.isEventDispatchThread()) {
                        System.out.println("EventDispatchThread");
                        EventQueue theQueue = getToolkit().getSystemEventQueue();
                        while (isVisible()) {
                            AWTEvent event = theQueue.getNextEvent();
                            Object src = event.getSource();
                            if (event instanceof ActiveEvent) {
                                ((ActiveEvent) event).dispatch();
                            } else if (src instanceof Component) {
                                ((Component) src).dispatchEvent(event);
                    } else {
                        System.out.println("OUTSIDE EventDispatchThread");
                        synchronized (getTreeLock()) {
                            while (isVisible()) {
                                try {
                                    getTreeLock().wait();
                                } catch (InterruptedException e) {
                                    break;
                } catch (Exception ex) {
                    ex.printStackTrace();
                    System.out.println("Error from EDT ... : " + ex);
            } else {
                System.out.println("Removing listener from parent ...");
                owner.removeWindowListener(parentWindowListener);
                owner.setEnabled(true);
                owner.setFocusableWindowState(true);
        @Override
        public void setModal(boolean modal) {
            this.modal = modal;
        public static void main(String args[]) {
            new PMDialog();
    }

  • Creating BOM using BDC :How to display no of records from flat file under

    Hi,
          How to display no of records from flat file under one (Alternative BOM) vertically.
        When i execute, the records are replacing one by one.
    Here my coding:
    report ZBOM1
           no standard page heading line-size 255.
    *include bdcrecx1.
    DATA: BEGIN OF bdc OCCURS 0,
           matnr(18),
           werks(4),
           stlan(1),
          END OF BDC.
    DATA: BEGIN OF BDC1 OCCURS 0,
           idnrk(18),
           MENGE(18),
           MEINS(3),
           postp(1),
          END OF bdc1.
    DATA: BEGIN OF BDCDATA OCCURS 0,
             matnr(18),
             werks(4),
             stlan(1),
             idnrk(18),
             MENGE(18),
             MEINS(3),
             postp(1),
             posnr(4),
          END OF BDCDATA.
    data: ibdcdata type  standard table of bdcdata WITH HEADER LINE.
    *start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\Documents and Settings\dilipkumar.b\Desktop\soft.txt'
       FILETYPE                       = 'ASC'
       HAS_FIELD_SEPARATOR            = ','
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                     =
      HEADER                         =
      TABLES
        DATA_TAB                      = BDCDATA
    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.
    *perform open_group.
    loop at bdcdata.
    perform bdc_dynpro      using 'SAPLCSDI' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29N-STLAN'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29N-MATNR'
                                  'SOFTDRINKS'.
    perform bdc_field       using 'RC29N-WERKS'
                                  'WIND'.
    perform bdc_field       using 'RC29N-STLAN'
                                  '1'.
    perform bdc_field       using 'RC29N-DATUV'
                                  '16.09.2008'.
    perform bdc_dynpro      using 'SAPLCSDI' '0110'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RC29K-BMENG'
                                  '1'.
    perform bdc_field       using 'RC29K-STLST'
                                  '1'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-EXSTL'.
    perform bdc_dynpro      using 'SAPLCSDI' '0111'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29K-LABOR'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPLCSDI' '0140'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSTP(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=FCBU'.
    perform bdc_field       using 'RC29P-IDNRK(01)'
                                  BDCDATA-IDNRK.
    perform bdc_field       using 'RC29P-MENGE(01)'
                                  BDCDATA-MENGE.
    perform bdc_field       using 'RC29P-MEINS(01)'
                                  BDCDATA-MEINS.
    perform bdc_field       using 'RC29P-POSTP(01)'
                                  BDCDATA-POSTP.
    perform bdc_dynpro      using 'SAPLCSDI' '0130'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POSNR'.
    perform bdc_field       using 'RC29P-POSNR'
                                   BDCDATA-POSNR.            "'0010'.
    perform bdc_field       using 'RC29P-IDNRK'
                                  BDCDATA-IDNRK.             "'15'.
    perform bdc_field       using 'RC29P-MENGE'
                                  BDCDATA-MENGE.             "'1'.
    perform bdc_field       using 'RC29P-MEINS'
                                  BDCDATA-MEINS.             "'ml'.
    perform bdc_dynpro      using 'SAPLCSDI' '0131'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RC29P-POTX1'.
    perform bdc_field       using 'RC29P-SANKA'
                                  'X'.
    *perform bdc_transaction using 'CS01'.
    *perform close_group.
    CALL TRANSACTION 'CS01' USING IBDCDATA MODE 'A' UPDATE 'S'.
    REFRESH IBDCDATA.
    endloop.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR iBDCDATA.
      iBDCDATA-PROGRAM  = PROGRAM.
      iBDCDATA-DYNPRO   = DYNPRO.
      iBDCDATA-DYNBEGIN = 'X'.
      APPEND ibDCDATA .
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
    IF FVAL <> NODATA.
        CLEAR iBDCDATA.
        iBDCDATA-FNAM = FNAM.
        iBDCDATA-FVAL = FVAL.
        APPEND iBDCDATA .
    ENDIF.
    ENDFORM.

    Hi,
    the BDCDATA structure must be fnam, fval,dynbegin,dynpro,program.
    You have to declare like this and pass this in your CALL TRANSACTION statement.
    Please give some other table name for BDCDATA you declared for and also for IBDCDATA.

  • How to Create a new column from two different result sets

    How to Create a new column from two different result sets, both the result set uses the different date dimensions.

    i got solutions for this is apply filters in column formula it self, based on the requirement.

  • How to create a new connection from SAPGUI to Test drive?

    Hi,
    I have installed Sap Netweaver Test drive on a linux virtual machine (windows host). The installation was successful and I was able to start the instance (application server and the database), yet I don't know how to create a new connection from my SAPGUI client (7.20) to this server. The static IP address of the server is 192.168.1.160.
    I entered the following values for my new connection entry
    Description: SAP Netweaver
    Application server: 192.168.1.160
    Instance number: 01
    System ID: DB2
    SAProuter: /H/192.168.1.160/S/3201/H/
    But it does not work. Any idea about the values needed  for creating a new entry?
    Thanks in advance,
    Dariyoosh

    >
    Dibya R Das wrote:
    > Why are you entering a router string? Can't you reach a box directly from your machine?
    >
    > Doesn't a ping to that host & a "telnet <host/ip address> 3201" work from your machine to the SAP System.
    >
    > Remove the router string you wont need if the above works.
    >
    > - Regards, Dibya
    Hello there,
    Thank you very much for your answer which solved my problem. In fact there was no need of providing router string.
    Kind Regards,
    Dariyoosh

  • How to display a oracle table from a java program?

    How to display a oracle table from a java program.
    Hello friends, I have written a Java program, using oracle 10g as backend.
    I want to display a oracle table as output. Im not getting how to display oracle table as a output table.. Pls help me
    Thank you

    jayanthds, you're not going to get a satisfactory
    answer to this here. it's too big a task to justbe
    quickly outlined in a forum - the reply "all youneed
    to do is to query you table and return it asJTable"
    is worthless, for example, since the solution to
    any problem can be distilled to such a
    soundbite, if need be. doesn't make the solutionany
    simpler
    essentially you're asking "how do I write adatabase
    application?". all you'll get is snippets of code
    that, when fitted together, will eventually helpyou
    do this, but you'll spend days and days comingback
    saying "right, I've done that, now what?" until
    either you or the forum gets frustrated with the
    whole affair and the process stops
    there are entire books written about this subject,
    and countless tutorials and guides on theinternet.
    you're better off going down that routehehehe.well, it's true! I used to have a manager that would outline the solution to a problem in a few lines of pseudocode, and then firmly believe that the actual solution would be just as brief and simple. shame his pseudocode included such lofty abstractions as "reformat all data"

  • How do i find new downloads from i tunes in my video app in this os7

    How do i find new downloads from i tunes in my video app in this os7. All purchsed items are there, what a
    mess???

    Leonard,
    I used the sample code from StamperUI.cpp as a starting point. I have tried 'LoadBitmap', 'LoadCursor' and 'LoadIcon' and none of these seam to work for me.
    As I stated before, I used Visual Studio to create the icons in the resource file, so I would think that they would be recognized by the application.
    Thanks,
    Gregory

  • HT4137 how to backup my new Iphone from my old Iphone ?

    how to backup my new Iphone from my old Iphone ? Forexample, i just bought Iphone5 and I want to put all messages, which is in my old Iphone 4 to my new Iphone 5.
    please help cause need you helps.

    Transferring information from current device to new device

  • How can I sync new friends from Facebook?

    Hi guys,
    I have Nokia N9 with the latest firmware version.
    I configured my Facebook account and set it to show my friend list in my Contacts.
    I can see all my friends from Facebook and they have merged with my contacts list.
    But when I add new friends to my Facebook, they won't sync and won't show up on my Contact list.
    How can I sync new friends from my Facebook? Is there any way to refresh the list?
    Thanks :-)

    Only the contents of the most recent photo sync remains on the iPad, so if you want both sets of photos on the iPad you need to include them in the sync - by not including the current iPad photos in the new sync iTunes 'assumes' that you no longer want them on the iPad.

  • How do I sync new photos from IMac to IPad2?

    How do I sync new photos from IPhoto from my laptop to my IPad2?

    See Here  >  Syncing photos using iTunes
    From Here  >  http://www.apple.com/support/ipad/syncing/

  • How to add a new view in Factsheet to collect data from R3

    Hi Experts,
    I need to add a new view in Account Factsheet called  'Open Delivery data'
    which will collect the delivery data from R3 system.
    As I know we have two Function Modules (at CRM) 'CRMT_ERP_FACT_SHEET_RETRIEVE'
    (at R3) 'CRM_CCKPT_EXPORTSUMMARY'
    All We need to do is create view which calls the data from R3 Via these modules.
    How should I proceed.
    Is this relevent steps :-
    http://wiki.sdn.sap.com/wiki/display/CRM/Howtodisplayaz-tableinanassignmentblock
    Regards,
    Ram

    Hi Sandeep,
    To add a new currency in Metadata, just add in Currencies dimension, and to add in Data form-just send the script what you are using as of now for rest of the currencies, or follow the same steps as specified above. or just add the script A#CLORATE.w#Periodic.C2#XYZ in rows of your data form (where XYZ- is the new currency).
    To add a new location in FDM login to FDM web client- click on Metadata--> locations and select the Controls review location where you want to add the data load location, right click and add the new location.

  • How to create a new view by copying from standard view in IC webclient?

    Hello, expert,
    I need to enhance a sap standard component (BP_Factsheet), inside it I need to create a new view by copying from an existing standard view (Acitivities). However when I try to make a copy, I was asked for destination BSP application, I entered the Z-Application which I used when defining enhancement for the component. After the copy, I don't see the new view.
    Then I tried the destination BP_factsheet, instead of the z-application, then after the copy, I can see the new view. However since it's in SAP application, it seems like it's a MOD, not enhancemnet, and inside the new view, the classes (for context, context nodes, etc.) are not in custom namespace (not starting with Z).
    So please let me know how can I make a copy of sap standar view in custom namespace.
    Thanks in advance.
    Jayson

    When copying you can put any BSP name..normally the practice is to prefix the standard name with a Z.
    Secondly when you want to make changes to the individual classes and methods you need to right click and say enhance. Then the AZ class names etc would be generated. The view should appear in the component wherein you copied the original view from.
    I hope this helps.
    The cookbook should have details on this. Otherwise also its quite intuitive.
    Award points if it helps.
    Thanks.

Maybe you are looking for

  • How do I get my info onto an iPad that used to belong to someone else?

    I recently received a friend's old iPad and cannot get his account off and mine on.  He thought all I had to do was plug it into my computer and iTunes would automatically wipe his stuff off and put mine on when I log into iTunes on my PC.  That didn

  • Setting invoice lock when creating contract object

    Hello, For specific contract objects we don't want to create an invoice if a document is posted on there. In the contract object you have a field called invoice locking. When i set this manually it is working fine, so now i want this to be set automa

  • Problems with derivative/integral in PD control for real time.

    Hello to you all, I'm using Labview 8.5 to build a PD controller. i'm using a PXI 8187 with FPGA 7831-R. I run a simulation of the controller both in matlab and laview using the simulation module and it worked fine. the next step is to build the PD c

  • Selection tool malfunction

    Hello. I have been using illustrator CS3 with no problems, but all of the sudden, neither of the selection tools will allow me to scale anything. what is the deal?! Any input would be greatly appreciated! Thanks!

  • Error When Check for Updates

    An error has occurred the operation couldn't be completed nsurlerrordomain error 1012 This began happening after the May 15 OS X Update via the Mac App Store.  Other/similar discussions talk about having an antivirus installed (Avast or Kaspersky or