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

Similar Messages

  • 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

  • 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.

  • Create  PCD folder using web dynpro Java

    Hi All ,
    I would like to create pcd folder structure using web dynpro java
    i.e. My folder at top level and under this there will be iviews , roles , worksets  etc.
    Is it possible using WDJ ?
    I have checked the below link , but for folders I did not get anything.
    http://help.sap.com/saphelp_nw04/helpdata/en/44/6aaf92f5a23672e10000000a114a6b/frameset.htm
    Can you please help me ?
    Thanks,
    Sandip

    Hi,
    Please refer to the following document
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508baf88-9335-2d10-efa6-c6ad61e5fc4b?quicklink=index&overridelayout=true
    The same can be implemented in webdynpro also.
    Regards,
    Raju Bonagiri
    Edited by: Raju Bonagiri on Sep 3, 2010 8:36 AM

  • 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?

  • Create portal user using web dynpro abap application

    Dear All,
    I would like to know is it possible to create portal user-id through web dynpro abap application.
    My requirement is
    > I have to create a web dynpro abap application. In the web dynpro abap application I have name email-id and phone number as entry fields.
    > I will click on submit, one unique id will get created. This unique id will be the login id for portal.
    I found how to create portal user using web dynpro java, but i could not find regarding web dynpro abap.
    If it is possible to create the portal users using web dynpro abap pls share the code as well.
    Regards,
    Swapnil Indulkar

    Hi swapnil,
    I think by using BAPi.. BAPI_USER_CREATE1 you can create.
    Please check this...
    Create portal user from webdynpro abap
    Creating user and assigning a group through code
    user administration su01
    How can i get the portal user id from logon ticket in the webdyn 4 ABAP
    Cheers,
    Kris.
    Edited by: kissnas on May 21, 2011 8:47 AM

  • Sales Order Creation Using Web Dynpro java

    hi
    i am new to webdynpro java.
    Can anybody provide me the solution  for creating sales order using bapi's .if possible with code snippets
    if possible pls provide me some links for  this.
    Regards
    kiran

    Hi Kiran,
    These are the mandatory fields to create sales order. While Service Context Mapping you select  these fields and bind these attributes to input fields.
    Order_header_in
    Doc_type
    Sales_org
    Distr_chan
    Division
    Incoterms1
    Pmnttrms
    Order_items_in
    Material
    Plant
    Target_qty
    Target_qu
    Gross_wght
    Net_weight
    Untof_wght
    Ship_point
    Order_partners
    partn_role
    Partn_numb
    Order_schedules_in
    Itm_number
    Sched_line
    Req_Date
    Req_qty
    Regards,
    Sunaina Reddy T

  • How to create a user in UME Database using web dynpro java custom application

    Hi,
    Can you please suggest me how to create a user in UME Database using web dynpro java custom application.
    My Requirement is user can register his/her user id in SAP Portal 7.3 UME database.
    Please suggest me.
    Thanks and Regards,
    Amit

    Hi Amit,
    Generated Documentation (Untitled)
    This is what you're looking for, there's no real cook-book -- though Amey mentioned there might be some material on SDN, perhaps some tutorials.
    You should be looking into com.sap.security.api.IUserFactory, methods newUser(String) which gives you and IUserMaint and commitUser(IUserMaint, IUserAccount) -- IUserAccount can be obtained using com.sap.security.api.IUserAccountFactory, method newUserAccount(String)
    Hope it helps,
    D.

  • How to set a variable in portal session using web dynpro java.

    Hi,
    I have created a web dynpro application, which is running inside portal. I have created a role called "R1". Inside role R1, i have created 3 workset W1, W2 and W3. and inside each workset i have some pages and iviews.
    My requirement is when user logins to the portal , and when he clicks on role R1 for the first time, a login page should come (so that we can do revalidation), and when he enters his password again in that login page , then only workset W1, W2 and W3 should be visible/accessible to him and after successful revalidation, if he clicks again on role R1, in that particular portal session, than that login page should not come.
    for this, i thought i will set a variable in portal session, whenever user successfully revalidated himself, and if after successful revalidation he clicks again on role R1, i will check in doinit method of webdynpro whether variable is set or not (which i already set on successful revalidation), and if it is set then i will do Donavigation else i will present login page to the user.
    Can anyone tells me how to set a variable in portal session using web dynpro java.
    thanks
    Arush

    Hi,
    Try this:
    WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE, key, value)
    WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE, key)
    Ex:
    WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE,"Key1","Value1");
    String value1=WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE,"Key1").toString();
    /people/william.cui/blog/2007/02/12/sharing-session-context-between-parent-and-external-windows-running-on-same-host
    Regards,
    Charan

  • Reusable objects using web dynpro java...any suggestions ?

    Hello All,
    I want to create few Reusable objects using web dynpro java. Please suggest some scenarios.
    regards
    Mrinalini.

    Hi,
    I can suggest especially this one:
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30d56578-f7e5-2a10-5ab5-8afc55d2e0e8
    Some other hits you may find useful:
    This guide mentions some tutorials about reusability:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ba2db0e5-0601-0010-9790-e271902f2c38?quicklink=index&overridelayout=true
    Here
    Web Dynpro Java [original link is broken]
    and here
    SAP NetWeaver Composition Environment Samples Center [original link is broken]
    you'll find other tutorials as well.
    Best Regards,
    Ervin

  • Problem in completing the TASK when using Web Dynpro Java and BPM

    Hi,
    I am using Web Dynpro Java and BPM.
    i see my Web Dynpro View when i run the process.
    Just that the task is not completing.
    when i click on the Web Dynpro button to signal the completion of the event, nothing happens.
    i have appropriately created events in both Component controller and Interface Controller and used the same in creating the Task.
    a method in Component controller fires the event and a button click in the view calls this method.
    i have successfully completed Donka Dimitrova's "SAP Netweaver Business Process Management-End-to-End Process Implementation Sample " but when i tried my own with slight modifications, it is not working !!!
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d07f3e88-554f-2b10-3cbf-ab8afea51b9f
    regards,
    -Amol Gupta

    Hi Amol,
    The way you described the things, I dont see any problems. Just to make sure that you are triggering the right event that you mapped as completion event for the task, try to cross check once again and see if the correct event is getting triggered. Also try to put some messages for debugging to see till where the control goes.
    Regards,
    Arafat

  • Setting user specific contract data while creating sales order using BAPI

    Hi all,
    I am creating sales order using BAPI - BAPI_SALESORDER_CREATEFROMDAT2.
    Now my problem is that there is no structure for contract data (i.e. VEDA), system automatically set contract data using customization values.
    I am doing some validations on cotract data in MV45AFZZ which fails, because these validations are performed on standard values, user specific values r not set.
    How to handle this issue, your small clue may help a lot.
    Regards,
    S@meer

    HI
      Pricing will be carried basing on the pricing
    procedure.
    Case1: Prices will be carried out automatically if
    necessary condition records are maintained for the
    condition type.
      For this you can go to Sales Order-> Item Conditions
    In the screen you can click on command button Analysis,
    which gives you the list of condition types associated
    to the pricing procedure. By clicking on the condition
    type you can know the action that has taken place.
    Case2: Manually forcing prices for Items.
      To do this, you have to populate ORDER_CONDITIONS_IN &
    ORDER_CONDITIONS_INX. Also note to identify the item
    numbers, you manually pass the item number for each item
    in the sales order, use the same item number for
    populating conditions.
      Parameters required:
    ORDER_CONDITIONS_IN:
      ITM_NUMBER, COND_TYPE, COND_VALUE, CURRENCY
    ORDER_CONDITIONS_INX:
      ITM_NUMBER, COND_TYPE, UPDATEFLAG, COND_VALUE,CURRENCY.
       Hope the above info helps you. Do revert back if you
    need more info.
    Kind Regards
    Eswar

  • PS Project description when creating sales order using BAPI

    I am trying to create sales orders using BAPI_SALESORDER_CREATE_FROMDAT2.
    Because of the material configuration in table TCN61 the material will trigger a project creation in the project system.
    Now, in order to create a project, we must provide the project description.
    I would like to ask you if anyone knows how to pass the project description in one of the BAPI parameters.
    Thank you for your help.

    Thank you Sreedhar for the answer.
    I tried the CAMPAIGN field but did not work...
    In fact, I am not able to find a field, in any of the of the tables, that could hold the project description (PROJ-POST1).
    An entry is created in PROJ table when we manually create a sales order for materials specified in table TCN61.
    Thanks.

  • Creating sales order using bapi

    while creating sales order using bapi serial no is added in dat but its not saving.
    plz reply

    Hi
    See tha sample code for sales order creation
    SALES ORDER INPUT CREATION.
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    PARAMETERS: p_spart TYPE vtweg OBLIGATORY.
    PARAMETERS: p_sold TYPE kunnr OBLIGATORY.
    PARAMETERS: p_ship TYPE kunnr OBLIGATORY.
    *ITEM
    PARAMETERS: p_matnr TYPE matnr OBLIGATORY.
    PARAMETERS: p_menge TYPE kwmeng OBLIGATORY.
    PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
    PARAMETERS: p_itcat TYPE pstyv OBLIGATORY.
    DATA DECLARATIONS.
    DATA: v_vbeln LIKE vbak-vbeln.
    DATA: header LIKE bapisdhead1.
    DATA: headerx LIKE bapisdhead1x.
    DATA: item LIKE bapisditem OCCURS 0 WITH HEADER LINE.
    DATA: itemx LIKE bapisditemx OCCURS 0 WITH HEADER LINE.
    DATA: partner LIKE bapipartnr OCCURS 0 WITH HEADER LINE.
    DATA: return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: lt_schedules_inx TYPE STANDARD TABLE OF bapischdlx
    WITH HEADER LINE.
    DATA: lt_schedules_in TYPE STANDARD TABLE OF bapischdl
    WITH HEADER LINE.
    HEADER DATA
    header-doc_type = p_auart.
    headerx-doc_type = 'X'.
    header-sales_org = p_vkorg.
    headerx-sales_org = 'X'.
    header-distr_chan = p_vtweg.
    headerx-distr_chan = 'X'.
    header-division = p_spart.
    headerx-division = 'X'.
    headerx-updateflag = 'I'.
    PARTNER DATA
    partner-partn_role = 'AG'.
    partner-partn_numb = p_sold.
    APPEND partner.
    partner-partn_role = 'WE'.
    partner-partn_numb = p_ship.
    APPEND partner.
    ITEM DATA
    itemx-updateflag = 'I'.
    item-itm_number = '000010'.
    itemx-itm_number = 'X'.
    item-material = p_matnr.
    itemx-material = 'X'.
    item-plant = p_plant.
    itemx-plant = 'X'.
    item-target_qty = p_menge.
    itemx-target_qty = 'X'.
    item-target_qu = 'EA'.
    itemx-target_qu = 'X'.
    item-item_categ = p_itcat.
    itemx-item_categ = 'X'.
    APPEND item.
    APPEND itemx.
    Fill schedule lines
    lt_schedules_in-itm_number = '000010'.
    lt_schedules_in-sched_line = '0001'.
    lt_schedules_in-req_qty = p_menge.
    APPEND lt_schedules_in.
    Fill schedule line flags
    lt_schedules_inx-itm_number = '000010'.
    lt_schedules_inx-sched_line = '0001'.
    lt_schedules_inx-updateflag = 'X'.
    lt_schedules_inx-req_qty = 'X'.
    APPEND lt_schedules_inx.
    Call the BAPI
    CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
    EXPORTING
    sales_header_in = header
    sales_header_inx = headerx
    IMPORTING
    salesdocument_ex = v_vbeln
    TABLES
    return = return
    sales_items_in = item
    sales_items_inx = itemx
    sales_schedules_in = lt_schedules_in
    sales_schedules_inx = lt_schedules_inx
    sales_partners = partner.
    Check the return table.
    LOOP AT return WHERE type = 'E' OR type = 'A'.
    EXIT.
    ENDLOOP.
    IF sy-subrc = 0.
    WRITE: / 'Error in creating document'.
    ELSE.
    COMMIT WORK AND WAIT.
    WRITE: / 'Document ', v_vbeln, ' created'.
    ENDIF.
    after that check in the table VBAP whether serial number is cretaed or not
    Reward points if useful
    Regards
    Anji

Maybe you are looking for

  • ITunes 12.1.1.4 still does not synchronize with Outlook!  (Windows 7 Enterprise 64bit)

    iPhone 4S, iPhone 5S, iPad Air, iOS 8.3 on all of them:  since I 'upgraded' to iTunes 12, none of them can see any longer my Outlook and its calendars!

  • Export Apple mail to Outlook 2011 for Mac

    Hi everyone, I don't like the serie Mail/iCal/Carnet d'adresses from Apple, reason why I bought Outlook 2011 for Mac. I succeed transferring all my contacts to Outlook. I try now to transfer all my mails with their categories to Outlook too but I don

  • IMac won't start if iSight is plugged in

    If the external iSight camera is connected to my parents' iMac it won't start and they hear clicking sounds. Disconnecting the iSight from the FireWire port, however, solves the problem and the iMac turns on fine. They are running an iMac G5 with 10.

  • Subclass / Object Group / Object Library error?

    Forms [32 Bit] Version 10.1.2.0.2 (Production) I am experiencing a strange problem with classes, object groups and object libraries - I have tried all sorts of combinations, but I always get the same problem. 1. Create a form 2. Creat a property clas

  • Export project to DVD? (Spanning)

    Hi all - I'm actually (believe it or not) starting to feel more comfortable about the idea of archiving Aperture projects now that I know iview can read them. The big question though - is it possible to export projects to span across several DVDs? I