Creating Sales Order using Web Dynpro for java

Hi SDN,
I am new to Web Dynpro for java. I have developed an application for creating a sales order using adaptive RFC Model using BAPI. It's working fine when i create a single order. I wanna create SO with more than one line item. I have used the Table UI Element to do so. But i could not able to enter the 2nd item details. Please suggest me how to pass more than one line item from the Table UI element.
Thanks in advance.
Regards,
Basha

Hi Basha,
Do you need to display the header items and detailed items?
If the BAPI Contains Output values in R/3 side.
I mean to say if BAPI  contains 4 line items.u can get thru wdjava the followinf way.
1. Create webdynpro application.
2.Import the model.
3.Create Customcontroller and model binding .
4. Write the execute method in controller.
  BAPI b = new BAPI();
  WdContext.node<BAPI>.bind(b);
   give inputs for BAPI
b.setname(" ");
b.setno("");
wdContext.currentBAPI().modelObejet().execute();
wdContext.node<output>.invalidate(); in try catch
5. create view or when u give the dynpro application its
in the add custom to view and drag BAPI custom to view .
6.Crete UI for ur table thru insertTemplate table directly mapp the  output values.
7. deploy and run
U can get the out line items .
Or any thing else post ur requirement.
Thanks
Lohi

Similar Messages

  • Creating sales order using web dynpro JAVA

    Hello everyone,
    i am new to web dynpro. Can any one tell me how to creating sales order by web dynpro JAVA using BAPI.
    Thanks.
    Vinita Sharma

    Hi...
    you can use Adaptive RFC methodology in web dynpro java to work with BAPIs..... these are standard bapi's provided
    Here are required Bapis... select which one you want....
    BAPISDORDER_GETDETAILEDLIST Sales Order: List of All Order Data
    BAPI_ORDER_CHANGE_STATUS_GET Change status for order
    BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document
    BAPI_SALESORDER_CHANGE Sales Order: Change Sales Order
    BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create sales order, no more maintenance
    BAPI_SALESORDER_GETLIST Sales order: List of all orders for customer
    BAPI_SALESORDER_GETSTATUS Sales order: Display status
    BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
    check this thread SALES ORDER creation using BAPI
    sample java program which will call SAP bapi function sales order create
    PradeeP

  • Creating a purchase order in web dynpro for java.........

    hello all,
    i am new to web dynpro for java.i have already done an application
    "Creating a Web Dynpro Application Accessing ABAP Functions" this application
    have good document on sdn.
    this application is working fine .
    Now i got an requiremnt for creating a purchase order in web dynpro for java.
    in normal report when i call  the bapi the parameter are the header, headerx,item, itemx is an internal table.
    CALL FUNCTION 'BAPI_PO_CREATE1'
      EXPORTING
        POHEADER                     = HEADER
        POHEADERX                    = HEADERX
      POADDRVENDOR                 =
      TESTRUN                      =
    IMPORTING
      EXPPURCHASEORDER             =
      EXPHEADER                    =
      EXPPOEXPIMPHEADER            =
    TABLES
       RETURN                       = RETURN
       POITEM                       = ITEM
       POITEMX                      = ITEMX.
    i just want to know how can i fill these internal table in web dynpro
    for java to create an application accessing "Bapi_po_create" .
    Thanks

    Hi Gopal,
    I'm not sure what is your issue, it seems you're not really understanding how the Model structure works in WDP.
    I'll assume few things here, like you know how to Import the Model into the WDP, and you know a little bit about what Java Classes will represent this Model in the Project.
    Try these steps:
    1. Import your Model into the Project;
    2. Open your Component Modeler, create a Data Link between your Model / Component (Or Custom Controller, as you prefer)
      - You can also use the "Apply Template -> Service Controler"
    3. Map the Input of your Model as the Main Node, check the Input Tables (you prob. will have two, POITEM = ITEM - POITEMX = ITEMX)
    4. Also, check the Return box, since this is BAPI return (You can use to display Backend messages)
    Now you have the Model mapped into your Controller, you need to develop the Java function to execute it.
    1. Create a new Input class, like
    BAPI_PO_CREATE1_Input purchaseOrderCreateInput = new BAPI_PO_CREATE1_Input();
    2. Bind your Input Node, in the Controller, with your Input Class;
    wdContext.nodeBAPI_PO_CREATE1().bind(purchaseOrderCreateInput);
    3. Set any Import parameters you need:
    purchaseOrderCreateInput.setEXPPURCHASEORDER(XXXX);
    4. To Add references to the Table, you will perform something like:
    First, you need to know what "Structure" you need to add (POItem Structure) - You have a Java class that represents that Structure..
    POITEM_Element poItemElement = new POITEM_Element();
    poItemElement.setPROPERTY();   /// Set your Properties
    purchaseOrderCreateInput.getPOITEM().add(poItemElement);
    5. Execute your Input,
    purchaseOrderCreateInput .execute();
    Hope it helps,
    Regards,
    Daniel

  • Creating a Sales Order using Web Dynpro

    Hi SDN,
      I want to create a Sales Order using Web Dynpro application. For that i have used "Bapi_Salesorder_Createfromdat2" as a adaptive RFC model. Every thing is fine and i could able to create a sales order for a single line item. But my intension is to create a sales order for multiple line items. So in the "Intialview" i have used a "Table" UI element to pass multiple line items. When i execute this application i could pass only single line item from this table. The table UI contol is not allowing to enter the second line item in the second row of the table. Can any one suggest me to solve this problem.
    Thanks in advance.
    Regards
    Basha

    Hi Basha,
    You need to create new element for the model node manually. For example: Create button "New item" and in action handler put someting like described here:
    Add row to table
    How to add more values in a Table in WD appl
    How to add a row to table dynamically?
    How to add a column to a table dynamically.
    add row to table bound to rfc model
    Best regards, Maksim Rashchynski.

  • Can I Design a Forum with using web dynpro for java?

    Hi All:
        Can i design a forum with using web dynpro for java?
        I want to design an application like a simple forum which maybe has many replies.So if i use
    the UI technology "web dynpro for java", i will to create UI elements dynamically.How can i control this
    dynamical UI elements to keep layout ?

    Hi,
    yes you can do that....
    for exaple if you observe SDN...
    you can imagine like....
    A big Transparent Container(TC)....
    Inside that number of other TCs(depending upon the question nd its replies...)....
    In side each TC, again around 9 UIElements....
    one for menioning what is the question/reply?
    other for your description of question/reply...
    other for your name,
    displaing your fourm point... etc...
    So it will be
    for(loop till your (Question+No of replies))
    Create Transparent Container....
    Add Childs to the Container...
    Decide your layout....
    In case if you want to know how to create UIElements dynamically....
    http://help.sap.com/saphelp_nw04/helpdata/en/4f/07cf3dd28b5610e10000000a114084/frameset.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/dynamic%2bui%2bgeneration
    Regards,
    Srinivas.
    Regards,
    Srinivas.

  • DM152 - Creating Interactive Forms in Web Dynpro for Java

    Hi,
    I'm looking for the "initial" Web Dynpro project used in "DM152 - Creating Interactive Forms in Web Dynpro for Java". Does anyone know where I can get this zip file?
    Thanks in advance,
    Geraldo.
    [email protected]

    Hi Geraldo,
    Refer the forum and ask Abdul or Ken to send the code
    /thread/24464 [original link is broken]
    Regards,
    Santhosh.C

  • Documentation on Creating Sales Order using Web Services

    hi,
    I can goto ESA Preview system using SAPGUI and create a sales order (using va01 transaction).
    I tried to do the similar thing using the WebService (Create Sales order), but have lots of problems.
    ->Fields used in WebServices are not in sync with what would be if you use the GUI. (example u enter sales region, buyer id, ship address and the items for a standard sales order.
    ->There is not much documentation on what the fields in the webservice mean. (e.g. what is the difference between BuyerParty and BuyerInternalId? )
    ->There are no sample combination of values that work. (Belive me it would take hours to figure out right combination of values needed..)
    Any hints would be appreciated
    Kiran
    http://erp.esworkplace.sap.com/socoview(bD1lbiZjPTgwMCZkPW1pbg==)/smdisplay.asp?id=138ABFEEA8A34999BFCEB31537EC8D65&fragID=&packageid=CBD4F2B708B8144DAEA05442D8FD491E&context=&iv=
    http://erp.esworkplace.sap.com/socoview(bD1lbiZjPTgwMCZkPW1pbg==)/smdisplay.asp?id=5640EE01E71B11DAB5240007E9102256&fragID=&packageid=CBD4F2B708B8144DAEA05442D8FD491E&iv=

    Hi...
    you can use Adaptive RFC methodology in web dynpro java to work with BAPIs..... these are standard bapi's provided
    Here are required Bapis... select which one you want....
    BAPISDORDER_GETDETAILEDLIST Sales Order: List of All Order Data
    BAPI_ORDER_CHANGE_STATUS_GET Change status for order
    BAPI_SALESDOCU_CREATEFROMDATA Creating a Sales Document
    BAPI_SALESORDER_CHANGE Sales Order: Change Sales Order
    BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create sales order, no more maintenance
    BAPI_SALESORDER_GETLIST Sales order: List of all orders for customer
    BAPI_SALESORDER_GETSTATUS Sales order: Display status
    BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
    check this thread SALES ORDER creation using BAPI
    sample java program which will call SAP bapi function sales order create
    PradeeP

  • Creating Sales Order from WEB Dynpro

    Background:
    My client has the requirement to front end SAP Sales Order Create with a WEB Dynpro screen.
    This WEB Dynpro screen is used to enter minimum data required to create a sales order, plus custom VBAP fields, (added to VBAP using append structure).
    I am using BAPI_SALESDOCU_CREATEFROMDATA2 to create the sales order.  All is working fine.
    New Requirement:
    Client now has an additional requirement to calculate Net Value (VBAK-NETWR and VBAP-NETWR) based on item conditions and a custom item field VBAP-ZZUSE.  I have all the data I need to calculate custom Net Value (VBAK-NETWR and VBAP-NETWR), however these fields are is not available in BAPI_SALESORDER_CREATEFROMDAT2, structure BAPISDH1 or structure BAPISDITM.
    Question:
    Does anyone have any suggestions?  I have searched for a different BAPI where NETWR is available, but can find none.  An option I am considering is to code a custom BAPI that uses RV_SAPES_DOCUMENT_UPDATE where both VBAK and VBAP are available, just to update NETWR.  This function is used during execution of VA01.
    Any other suggestions or ideas?

    Additional Information:
    My client is a services based client.
    For example a material represents a service (drilling) this material is priced at value per day.  Number of days is stored in VBAP as a custom field ZZUSE.  The requirement is to use existing condition and ZZUSE (number of days 1 - 99) to calculate Net Value and update VBAK-NETWR and VBAP-NETWR based on condition and ZZUSE. 
    I can not allow BAPI_SALESORDER_CREATEFROMDAT2 to calculate VBAK-NETWR and VBAP-NETWR based only on conditions.
    Does this clarify my requirement?  Do you have any suggestions?

  • Connectivity with  oracle database using web Dynpro(for java)

    Hi,
    In web Dynpro we will connect to SAP systems by using Adaptive RFC.  Then How to connect the oracle 8i/9i using webdynpro? Plese tell me the procedure to establish the connecting using enterprise portal?
    Thanks & Regards,
    Mastanvali Shaik

    Hi,
    Check these:
    WebDynpro and Oracle using DTOs
    https://wiki.sdn.sap.com/wiki/display/VC/JDBCConnectionSetup
    Connecting Problum of SQL
    Greetings,
    Praveen Gudapati
    [Points are welcome for helpful answers]

  • Is ALV List Possible in Web Dynpro for JAVA ? Please Advice.

    Hello,
    I would like to know if we can simulate the ALV List which we have in ABAP using Web Dynpro for JAVA. I would really appreciate if someone could suggest how it could be done.
    Best Wishes,
    John.

    Hallo John,
    The Abstract List Viewer (ALV) is not available in Web Dynpro for Java within SAP NetWeaver 04s.
    Regards, Bertram

  • Using existing SAP Queries in Web Dynpro for Java

    Hello,
    Does anyone knows any tool to easily reuse SAP Query reports in Web Dynpro for Java?
    Thanks in advance,
    Diz

    Hi Diz,
    You can use RSAQ_REMOTE_QUERY_CALL (which rfc enabled) functional module to generate rfc adaptive model which can be used inside WD project.
    Best regards, Maksim Rashchynski.

  • Why Web services are used to send data not HTTP in Web dynpro for Java?

    Is Web Dynpro for Java supports Web service , RFC as communication to other systems why http cannot be used in Wweb dynpro for java.........
    Thanks and Regards,
    CSP

    Hi Pradeep,
    Yes, Web Dynpro java supports web service, you can expose your web service as RFC Model to
    communicate with others system. As per as HTTP is concern we don't have any
    supportive method in web Dynpro. Insted of HTTP we use context in web dynpro to communicate.
    Thanks
    Anup

  • Notification Service in Web Dynpro for Java?

    Hello Experts,
    I'm new on the topic "web dynpro for java" and have a question about a real-time-notification of web dynpro clients.
    In web dynpro for abap ther is apparently a new solution called "Notification Service" (since NW 7.0 Ehp2).
    Details: http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/f0802995-3433-2c10-2787-d7db51352891&overridelayout=true
    But I found no hints how to solve the problem of a real-time notification in web dynpro for java.
    Requirements for short: The server can trigger a refresh in one or more web dynpro clients.
    Requirements a liitle more extended:
    1. A web dynpro is running in a browser and shows data it gets from a DataBase table1
    2. Now a function module1 is started by an event and changes the data in table1 on the server side, the web dynpro does not know about this event or the changes made by external components.
    3. These changed data should be visible immediately in the running web dynpro after the event occurd --> trigger a refresh of the web dynpro from the function module1?
    All I actually know is that: The web dynpro can update its context with the new data from table1 after a refresh of the gui (wddomodifiyview). Using a timed trigger I can get new data after x seconds (same way --> context update and gui refresh). Is there another way to refresh the web dynpro (that noticed requirements of #3) ?
    Regards,
    Anja Hormann

    I recommend that you create another Web Dynpro application with this Timer to execute an RFC. This application would be in a Web Dynpro iView hidden from your SAP EP and shoot an event that would be captured by another application.
    However I would take great care with this type of application.
    And to answer your question at the moment, to my knowledge, there is no solution for this kind of integration between the ABAP and JAVA.
    regards,
    Angelo

  • Reg:Locking in Web Dynpro for JAVA.

    Hi All,
    When a user logged in the front end i am calling the lock function module(based on this locking mechanism is working) and when a user logged out i am calling the unlock function module(now the locked mechanism is getting unlocked).
    now my problem is when a user closes the window abruptly without loging out,the unloeck mechanism should work at that particular instance.Please suggest me if this is possible or not in web dynpro for java.  
    Thanks,
    Mahesh Nuli.

    Hi,
    I will give you two different solutions, use whatever you think fits best for you.
    First One:
    Whenever you call your "LOCK" function module, do not disconnect the ModelInstance. Create a Locking method in Java which returns a "com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClassExecutable" instance. It should look like this:
    InputClass inputInstance..
    node.bind(inputInstance);
    inputInstance.execute();
    if fails, return null;
    otherwise, return your inputInstance;
    Keep this inputInstance into some Context Attribute. Whenever you wanna "Unlock", you can disconnect this input from the backend system.
    InputClass inputInstance = wdContext.getInputInstance();
    inputInstance.modelInstance().disconnectIfAlive();
    This will work for all the cases you are currently having problem. However, this solution holds one connection.
    Second One:
    Assuming your transaction runs in one View, you can set this View lifecyle to "when_visible" - Doing that, whenever you navigate "away" from this View the method wdDoExit of that ViewController will be executed.
    In this appoach, you dont need to store any "InputClass" - You can perform your Lock and disconnect from the backend. In your wdDoExit method you can code a "Disconnect If Connected" method.
    Use whatever fits best.
    Regards,
    Daniel

  • Design header in Web Dynpro for java

    Dear experts
    I used PageHeader UI Element for design header in web dynpro for java. How to insert a image and set padding  logo in page header?
    Ex : Create a SAP header includes the content as SAP logo, application title, functions, user name, logout button.
    Thanks.

    Hi,
    I couldn't understand your requirement for keeping an image in page header but i suggest you not to do so, because it is not a good practice and creates a performance issue. Page header UI element is not much customizable for same purpose and should not contain interactive UI elements according to [UI Element Guide|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b06c8c9a-19a4-2b10-d985-9ae7a4383478]. You can also refer to the same document for the usage of the Page header and other UI Elements its a very useful and nice article.
    Regards
    Jeetendra

Maybe you are looking for