Designer BC4J Generator Extension creates wrong order by clause

Hi,
Just tried out the new Designer BC4J Generator Extension and it creates a wrong order by clause. I have a List of values in Designer with one table usage. There is a bound item based on a columnname CODE and has the name L_CODE. The order by sequence is 1 and ascending. After generating it in JDeveloper the generated query is:
SELECT PrjEntityUsage.CODE,
PrjEntityUsage.NAAM
FROM X_PROJECTEN PrjEntityUsage
ORDER BY LCODE
So there are two problems:
1) If the name property in designer is different from the column name the select in the SQL query in JDeveloper needs an alias with the name property from Designer.
2)If there is an _ in the name it is ignored in the order by clause in JDeveloper.
I do not know where to report the bug so i placed it here.
Regards,
Andre Jochems

Andre,
Thanks for notifying us about these. There are indeed bugs which we have logged and scheduled for a fix.
Regards
Sue Harper

Similar Messages

  • Conceptual problem about Designer BC4J Generator.

    I'm trying to use Designer BC4J Generator in order to prepare a migration of some generated app.
    Using that generator I saw it works aon a Module base, that means (I think) for each module it will generate :
    . a project
    . an ApplicationModule
    . some ViewObjects
    . some ViewLinks
    . some Entities
    . some Association.
    However the same table is used in many modules but I didn't find any way to force it to reuse the same Entity and Association definitions.
    I belive this is wrong because Entities and theri definitions should be present once and only once in order to reuse all user code, validation etc..
    Did I miss something ?
    What's the conceptual schema for that Generator ?
    I'm confused.
    Tks.
    Tullio

    Tullio,
    Thanks for the feedback. You are correct, each module is generated into a separate package and hence separate EOs are created for the tables usages for each module. If a table is used multiple times in a single module, then one EO is created for that table usage. We are also aware that what you are looking for is very useful functionality and will create an enhancement request for this.
    Further experiences you have with the tool will be greatfully received.
    Charly,
    With respect to your comment about the generator. There are a great many Designer customers who have large numbers of modules already modeled in Designer, who want to start working with Java and JDeveloper. Indeed I had many requests for such a generator from Designer.
    Without the generator to create all the elements, which Tullio lists in his note, these users would need to start building their (BC4J)Application Modules in JDeveloper from scratch. The wizards and tools within JDeveloper are very good and so this not too onerus a task if you are building a few modules. Many of our Designer customers have many modules, with a significant number of module components. The generator reduces the effort of rebuilding these modules. Why repeat the work when all the design decisions are already made?
    Currently the generator only builds the business components, leaving the creation of the UI to the users. We have plans to extend the generator capabilities to include the UI.
    Regards
    Sue Harper
    Application Development Tools
    Product Management

  • Error: Object type '' could not be generated when creating sales order

    Hello Friends,
    I am using a SAP standard ITS service to create sales order.
    When I am creatin SO, it gives me error Object type '' could not be generated.
    Can you plz suggest me what is that issue & how I can reslove it.
    Regards,
    Narendra

    any inputs around this plz??

  • Designing a BADI to create purchase order based on purchase requistion

    Hi..
    i ve to design a badi such tat whenever an order is placed it shld create a purchase order based on the purchase requsition..
    its like a user exit thru a BADI.
    theres somethg called a shoppg cart ... thru tat when we enter.... it creates a purchase requisition and without purchase order.... delivers it

    Hi,
        U can use the BAPI 'BAPI_PO_CREATE1' to create the purchase requisition.

  • Attached libraries in wrong order in generated form

    Hello,
    I am using Designer 6i and upgraded 6.0 headstart templates to generate forms. In my generated form, the libraries are attached in the wrong order. For example, when I attach using called modules:
    - qmslib50.pll
    - qmsevh50.pll
    then the generated form has:
    - qmsevh50.pll
    - qmslib50.pll
    which is a problem because the application wants the QMS$INIT_APPLICATION from qmslib50 and finds the one in qmsevh50 first. So the generated form/application starts up with an error and doesn't work.
    What can I do about this?
    Jeroen van Veldhuizen

    Hi,
    There is a wealth of information on moving from 6.0 to 6i in the Migration Guide available on the Designer page on OTN
    http://otn.oracle.com/products/designer/content.html
    Regards
    Susan

  • DEFECT: DDL generated in wrong order, won't run, and wrong encoding.

    I highlighted a number of related tables in the connections pane, right-clicked and asked it to generate DDL to a worksheet.
    First of all, the generated DDL was unreadable gibberish. That's because my set up is using the Unicode (UTF-16) preference and the generated DDL is apparently encoded into US-ASCII.
    I changed the settings to US-ASCII and was able to generate DDL that can be read in the worksheet. Defect #1.
    Second, the DDL was generated in Table Order. That is to say, all DDL for the first table was generated, then all DDL for the second, etc.
    Since the first table has a foreign key to the second table, the generated DDL won't run. Defect #2. It should generate the create table statements and pk/uk statements for all tables first, then add the foreign keys afterwards.
    That way, the order in which the tables are present in the file won't matter.

    Hi,
    There is a wealth of information on moving from 6.0 to 6i in the Migration Guide available on the Designer page on OTN
    http://otn.oracle.com/products/designer/content.html
    Regards
    Susan

  • Have a problem with my MacBook Pro.5,3 and monitor.  Intermittently, the desk top screen becomes broken up into vertical sections, which appear in the wrong order, creating a haphazard picture.    The Apple icon, usually at top left corner, appears in to

    have a problem with my MacBook Pro.5,3 and monitor.  Intermittently, the desk top screen becomes broken up into vertical sections, which appear in the wrong order, creating a haphazard picture.
    The Apple icon, usually at top left corner, appears in top right corner  in a strip including all that left hand.  When the computer is restarted, the screen goes back to normal.  But I have to move the mouse to the far left of the screen and then up until it reappears on the far right hand side of the screen so that I can hit shut down button.
    It seems to happen randomly though always on desk top and sometimes when I move mouse and computer switches on from rest mode.   My large flat screen is relatively new.
    The video card on this computer, which is approximately two years old, is Nvidia FeForce 9400M.
    Any help would be welcome as my usual source of assistance is not available and I am not well versed in workings of the Mac although I have used one for many years.

    That sounds like a Hardware problem.
    You may be able to confirm that with Apple Hardware Test, or make an appointmenst for a free Genius Bar evaluation.

  • Creating Sales Order, but picking up wrong ship-to-party

    Hello Friends,
    I am creating an urgent sales order by mentioning the sales organization, distribution channel and division.
    I mention the sold-to-party X but do not enter the ship-to-party.
    I know it selects the ship-to-party automatically based on the partner functions mentioned in the sales area data of the customer (sold-to-party X).
    But my problem here is there are three ship-to-party mentioned, and it selects one. How does it determine which ship-to=party to determine?
    Is it sorted in ascending order?

    Hi Raj,
    yes it does show a pop-up with multiple Ship-to-parties and i can select the required. I agree.
    But actually i create sales order using a program, so the program calls BAPI_SALES_ORDER_CREATEFROMDATA which creates the sales order using the first entry in the partner functions pop-up by default.
    I want to know how is it determined that which partner function is first? Is it in ascending order?
    In the above screenshot, why does 16508 appear before 30597?

  • Invoice is not getting created in Order related billing

    Dear all,
    I am trying to do a Order related billing. After creating the order i am going to VF01 and selecting the billing type i have created and trying to create the invoice. I am getting the error "No billing documents were generated. See log" when i am checking the Log its showing now errors.
    In case if my account determination procedure is wrong, system should allow me to create a Sales invoice and accounting document will not be generated. But in this case even the sales invoice is also not getting created.
    Please suggest me if there are any configuration changes i need to do to overcome this problem.

    Apart from the suggestion already given, also ensure that
    the order is not showing in incomplete log
    the order is not blocked for credit limit
    You can also cross check in VF04 whether system is fetching that sale order.  For information, once you execute VF04, by default, system will check only "Delivery related" check box.  You have to manually select "Order related" check box.
    G. Lakshmipathi

  • Deleated Valuation Type --Need Error Message while creating Purchase Order

    Hi,
    In our scenario , i need a message should flash , if enduser by mistake select the deleated valuation type while creating Purchase Order.
    In current configuration , it's not there.
    Await your expert opinion.
    Regards
    Shyam Kogta

    I investigated this recently in our company and gave this answer:
    A deletion flag does not restrict anything. It is just an indicator to tell SAP that you want this record to be deleted with the next archiving run.
    The archiving run then checks if a deletion is possible or not.
    So you can set such deletion flags long time in advance, even at a moment where you still have inventory.
    To block materials from beeing used in business transactions, usually the material and sales status are used. But these statuses can only be set at overall, plant and sales organisation level.  
    In some transactions SAP issues warning messages if a material has a deletion flag. This messages could be customized to be an error and prevent any business. However, this type of restriction is not designed for our machine, as we use the material and sales status.
    Anyhow, there is no message for valuation types that have a deletion flag in procurement area.
    There is one for goods receipts (but only for a certain industry solution that is not used by us)
    There is one for deliveries ( VL 211 ).
    The valuation types are defaulted from customizing to the transaction e.g. purchase order. Or from info record to the PO. So a standard purchase order gets valuation type  ABC , while an internal order (production) gets the DEF.  Usually there should not be a need to change this valuation type manually.
    So the only solution is to archive the material master at valuation type level.
    But I guess, you already have POs with that wrong valuation type, which means you have to archive the POs first. It you have already batches with wrong valuation type, then thy have to be archived as well before a material can be archived.
    And finally if you had stock in current year, then you can archive your material in year after next year, as SAP archives only materials that have no stock in current and previous year.

  • Problem while creating sales order

    Hi
       We are facing a problem while creating a sales order in R/3. The sales order number is getting generated. But we are not able to view the same in the backend meaning it is not there in the database. Any inputs would be of help.
    regs
    Steve

    Hi everybody,
    I've got a problem with this too. I use the BAPI_SALESORDER_CREATEFROMDAT2 with BAPI_TRANSACTION_COMMIT and the webdynpro shows me the document number created in R3 with a Success message. But when I go to R3 and try to display the created sales order, it doesn't exists. So... Maybe I'm doing something wrong with the BAPI_TRANSACTION_COMMIT. ¿Can anybody help me with this?
    The code I use is this:
    When the user pushes the SAVE button in the WebDynpro, this code executes:
        //@@begin onActionSave(ServerEvent)
         wdThis.wdGetSOCreaCustController().executeBapi_Salesorder_Createfromdat2();
         wdThis.wdGetSOCreaCustController().executeBapi_Transaction_Commit();
        //@@end
    In the custom Controller I've got the code for those executions:
      public void executeBapi_Salesorder_Createfromdat2( )
        //@@begin executeBapi_Salesorder_Createfromdat2()
         try {
              wdContext.currentBapi_Salesorder_Createfromdat2Element().modelObject().execute();
         catch (Exception ex) {
              wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);
         wdContext.nodeOutput().invalidate();
        //@@end
      public void executeBapi_Transaction_Commit( )
         try {
              wdContext.currentBapi_Transaction_CommitElement().modelObject().execute();
         catch (Exception ex) {
              wdComponentAPI.getMessageManager().reportException(ex.getMessage(), false);
         wdContext.nodeOutput().invalidate();   
        //@@end
    ¿Is something wrong? ¿Is something missing?

  • How To Create Sample Order Transformation Manager (OTM) Cartridge

    Hi All,
    I've been trying quite unsuccessfully to create a sample OTM cartridge.
    I created a sample orchestration cartridge and it has 2 functions viz. Provisioning and FulfillBilling with a dependency from Provisioning to FulfillBilling inside a Fulfillment Pattern Service.Voice.
    I created a sample model project with the design pattern and it created some default entities like actions and other stuff.
    To begin with I created a Domain FixedLine in conceptual model. Then added a Product 'Voice_PS'. I create a CFS called 'Voice_CFS' under 'Voice_PS' with a primary relationship. I added coceptual fulfillment pattern 'Voice_FP' to product 'Voice_PS'.
    After this I created MappingRule in which I kept everything as default as I did not create any Voice_PS parameters.
    Then I create Order Item Parameter Bindings and that also I kept default as I didn't want to pick any parameters from order line Specification Group.
    Then I invoked design pattern for Create Service Order. This gave me Transformation Sequence and in first stage I added simple Context Type for OLI parameter ProductSpec = 'Service.Voice'.
    I am using the same Order Item Specification for both source and target transformation. For this I checked the "Support Distributed Order Template" checkbox.
    I created the Transformation Manager and Mapped the domain and Transformation Sequence to it.
    After this I marked the "Invoke Transformation Manager" in Orchestration process as checked and gave the provider function as Calculate Service Order.
    I fired an order after configuring all this and I am getting following line in DEBUG log.
    <22-Jan-2015 7:56:26,289 IST PM> <DEBUG> <transformation.OrderTransformationManager> <ExecuteThread: '14' for queue: 'oms.ws.http'> <OTM transform invoked with cartridgeId: 353, provider function: {OracleComms_Model_Base_Cartridge/1.0.0.0.0}Calculate_Service_Order, 3 order items>
    However if I open the order I do not see the Transformed Order Items below Order Items in the left panel.
    What am I doing wrong or missing here?
    Also in "Property References" tab of Order Item Specification there is a field "Order Item Recognition Property" which I mapped to a property returning my original PSR entity which was Product entity "Voice_PS".
    However I'm constantly getting this error for it.
    <23-Jan-2015 10:12:35,832 IST AM> <WARN> <generation.XQueryEntityResolver> <ExecuteThread: '14' for queue: 'oms.ws.http'> <Can't find entity identified by namespace=COM_SalesOrderFulfillment; name=Voice_PS; type=T=OrderItemParameterSpecificationType@http://xmlns.oracle.com/communications/ordermanagement/model>
    I am getting a feeling that OSM requires a non conceptual entity at this place but what that should be is what I'm not getting.
    Any small help will be welcome as I'm really struggling for last 3 days.

    Hi All,
    After almost a month researching on how OTM is configured I was able to successfully create a cartridge with OTM.
    The thing is Oracle has tried multiple things to make sure that you do not work on OTM without taking a training from Oracle University. However working for an Indian IT consulting company, training cost is something that all IT managers don't approve of. So now let me enlist 4 things that I was missing and which are very important for OTM configuration:-
    1.     One thing that was missing the entire time was productSpecMapping.xml with conceptual entities. This was achieved after making dependency of conceptual cartridge to fulfillment pattern cartridge and configuring realization and then building the entire workspace. Fulfillment pattern was derived from this mapping.
    2.     Even though DS is built such that all entities in workspace are available for configuration, however, when you are selecting realization inside OSM entities the conceptual entities are not visible. Only if you make a cartridge dependency of model conceptual cartridge to the OSM cartridge where you are configuring realization then only the conceptual entities start appearing.
    So in my cartridge I was missing 2 realizations. One was the realization from conceptual fulmillment pattern entity to OSM fulfillment pattern entity. Second was realization from conceptual funcational area entity to OSM order entity.
    3.     The next thing that I configured and which was essential was "Common Model Entity Container". This tab appears on all catridge files of all projects. Basically this allows you to select the model project contributing to this project. As soon as I configured it OSM started detecting OrderItemParameterSpecificationType entities.
    4.     The wierdest configuration I found was this one. After trying the previous point I found that even though the entities are now getting created but still I was getting OrderItemSpecificationType entity not found. So I cheked in the cartridgeBuild folder to check what is created in backend before deployment. I found that for some reason it was not Voice_PS but Voice_PSSpec. So I started concatinating "Spec" to all product entities in the incoming order in OrderItemSpecification Order Item Recognition Property. Please note that my order item recognition property was not "Voice_PSSpec" but rather the "qualifiedName" value derived from the productSpecMapping.xml for the node with the attribute name value as "Voice_PS". For more information look at this post from me some time back. OSM 7.2.4 Cartridge
    Lo and behold, my cartridge started recognizing OTM. However I had made some wrong configuration in Order Template for Transformed Order Items inside functions so I quickly corrected them and fired another order. This time I could see the order items and transformed order items. Phew! finally its working.
    Now that I have spent sufficient time in this I would be happy to help those who are having trouble configuring OTM.
    Regards,
    Pranshu

  • Need Help - CD burning tracks in wrong order!

    Dear All..
    I am having a huge problem with my iTunes when it comes to burning a disc. Alright - yesterday I bought a new CD from iTunes and I wanted to burn it to disc for my car. So I did exactly that however, when I play the CD in my car it has the tracks burned in the wrong order than the CD was in the "playlist" that I burned it from.
    It's very frustrating. It has happened previously and I remember an iTunes update fixed it but now it's back. I would really appreciate any help that any of you experts can give me.
    Many thanks..
    Ricky

    I needed to copy a cd and this is the first time I was trying with my Mac. In Windows is so easy and there are hundreds of programs to do it that it's unbelievable how difficult this can be in the Mac world without paying extra $$$ for a program like Toast! I was trying several solutions and none of them worked. Finally I realized that the order I was looking at my the files in the library is the order the playlist is generated and no matter what the track order is that doesn't help in getting the tracks in the cd in proper order. So I went to my library, selected the files I wanted in my cd and got them in the correct track order and then created the playlist from that selection and the order of the files in the playlist matches the original cd order and the new cd I burned out of the playlist. I tried this a couple times already and works fine this way. Kind of a bummer if you ask but... hope this helps anyone out there because this can be very frustrating.

  • Table of Contents displays in wrong order

    I created and generated a Table of Contents, and am having a weird issue.   It's a 19-page document, and Table of Contents is set to display Headings 1 and 2.  Everything went fine, except that on one page the Heading 1 on top of the page displays in the Table of Contents below the Heading 1 level below it - i.e., they're in the wrong order!  
    So, on the page its -
    9       Text
    10     Text
    But on the Table of Contents it returns -
    10     Text
    9       Text
    Any ideas about why it might be doing this?

    It can't be! If "9. Text" and "10. Text" use the same list for auto-numbering and "10" is below "9" on the same page, Indesign can't generate such, unless you don't copy the numbering to the TOC and instead add numbering via TOC style. Check your TOC style settings.

  • Issue in creating sales order using BAPI's...?

    Hi Guru's,
    i had generated the sales order using the BAPI..but could please guide me how to declare the data declaratin same fields as globally and how to move internal table and how to append ....
    thanks in advance...
    REPORT z_bapi_salesorder_create.
    Sales document type
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    Sales organization
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    Distribution channel
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    Division.
    PARAMETERS: p_spart TYPE spart OBLIGATORY.
    Sold-to
    PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
    Ship-to
    PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
    Material
    PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
    Quantity.
    PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
    Plant
    PARAMETERS: p_plant TYPE werks_d 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.
    Start-of-selection.
    START-OF-SELECTION.
    Header data
    Sales document type
      header-doc_type = p_auart.
      headerx-doc_type = 'X'.
    Sales organization
      header-sales_org = p_vkorg.
      headerx-sales_org = 'X'.
    Distribution channel
      header-distr_chan  = p_vtweg.
      headerx-distr_chan = 'X'.
    Division
      header-division = p_spart.
      headerx-division = 'X'.
      headerx-updateflag = 'I'.
    Partner data
    Sold to
      partner-partn_role = 'AG'.
      partner-partn_numb = p_sold.
      APPEND partner.
    Ship to
      partner-partn_role = 'WE'.
      partner-partn_numb = p_ship.
      APPEND partner.
    ITEM DATA
      itemx-updateflag = 'I'.
    Line item number.
      item-itm_number = '000010'.
      itemx-itm_number = 'X'.
    Material
      item-material = p_matnr.
      itemx-material = 'X'.
    Plant
      item-plant    = p_plant.
      itemx-plant   = 'X'.
    Quantity
      item-target_qty = p_menge.
      itemx-target_qty = '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 to create the sales order.
      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 the work.
       COMMIT WORK AND WAIT.
         call FUNCTION 'BAPI_TRANSACTION_COMMIT'.
        WRITE: / 'Document ', v_vbeln, ' created'.
      ENDIF.

    *& Report  ZAREPAS30
    REPORT  zarepas30.
    DATA : gs_vbeln                   TYPE  vbak-vbeln,
           gs_order_header_in         TYPE  bapisdhd1,
           gs_order_header_inx        TYPE  bapisdhd1x,
           gt_order_items_in          TYPE  STANDARD TABLE OF bapisditm,
           gwa_itab1                  TYPE  bapisditm,
           gt_order_items_inx         TYPE  STANDARD TABLE OF bapisditmx,
           gwa_itab2                  TYPE  bapisditmx,
           gt_order_partners          TYPE  STANDARD TABLE OF bapiparnr,
           gwa_itab3                  TYPE  bapiparnr,
           gt_return                  TYPE  STANDARD TABLE OF bapiret2,
           gwa_itab4                  TYPE  bapiret2.
    Sales document type
      PARAMETERS: p_auart TYPE auart OBLIGATORY.
    Sales organization
      PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    Distribution channel
      PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    Division.
      PARAMETERS: p_spart TYPE spart OBLIGATORY.
    Requested Delivery Date
      PARAMETERS: p_edatu  TYPE edatu OBLIGATORY.
    Sold-to
      PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
    Ship-to
      PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
    Material
      PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
    Quantity.
      PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
    Plant
      PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
    Start-of-selection.
      START-OF-SELECTION.
    Header data
    Sales document type
      gs_order_header_in-doc_type = p_auart.
      gs_order_header_inx-doc_type = 'X'.
    Sales organization
      gs_order_header_in-sales_org = p_vkorg.
      gs_order_header_inx-sales_org = 'X'.
    Distribution channel
      gs_order_header_in-distr_chan  = p_vtweg.
      gs_order_header_inx-distr_chan = 'X'.
    Division
      gs_order_header_in-division = p_spart.
      gs_order_header_inx-division = 'X'.
    Reguested Delivery Date
      gs_order_header_in-req_date_h = p_edatu.
      gs_order_header_inx-req_date_h = 'X'.
      gs_order_header_inx-updateflag = 'I'.
    Partner data
    Sold to
      gwa_itab3-partn_role = 'AG'.
      gwa_itab3-partn_numb = p_sold.
      APPEND gwa_itab3 TO  gt_order_partners .
    ship to
      gwa_itab3-partn_role = 'WE'.
      gwa_itab3-partn_numb = p_ship.
      APPEND gwa_itab3 TO  gt_order_partners .
    ITEM DATA
      gwa_itab2-updateflag = 'I'.
    Line item number.
      gwa_itab1-itm_number = '000010'.
      gwa_itab2-itm_number = 'X'.
    Material
      gwa_itab1-material = p_matnr.
      gwa_itab2-material = 'X'.
    Plant
      gwa_itab1-plant    = p_plant.
      gwa_itab2-plant   = 'X'.
    Quantity
      gwa_itab1-target_qty = p_menge.
      gwa_itab2-target_qty = 'X'.
      APPEND gwa_itab1 TO gt_order_items_in.
      APPEND gwa_itab2 TO gt_order_items_inx.
    Line item number.
      gwa_itab1-itm_number = '000020'.
      gwa_itab2-itm_number = 'X'.
    Material
      gwa_itab1-material = p_matnr.
      gwa_itab2-material = 'X'.
    Plant
      gwa_itab1-plant    = p_plant.
      gwa_itab2-plant   = 'X'.
    Quantity
      gwa_itab1-target_qty = p_menge.
      gwa_itab2-target_qty = 'X'.
      APPEND gwa_itab1 TO gt_order_items_in.
      APPEND gwa_itab2 TO gt_order_items_inx.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
      EXPORTING
        order_header_in               = gs_order_header_in
        ORDER_HEADER_INX              = gs_order_header_inx
      IMPORTING
        SALESDOCUMENT                 = gs_vbeln
      tables
        RETURN                        = gt_return
        ORDER_ITEMS_IN                = gt_order_items_in
        ORDER_ITEMS_INX               = gt_order_items_inx
        order_partners                = gt_order_partners.
    Check the return table.
      LOOP AT gt_return into gwa_itab4 WHERE type = 'E' OR type = 'A'.
        EXIT.
      ENDLOOP.
      IF sy-subrc = 0.
        WRITE: / 'Error occured while creating sales order '.
      ELSE.
    Commit the work.
      CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
        WRITE: / 'Document ', gs_vbeln, ' created'.
      ENDIF.

Maybe you are looking for

  • Help with DisplayPort to HDMI display settings

    I am using a 50" Sony LCD TV with Mac Mini via DisportPort to HDMI adaptor. I am getting parts of the Dock and none of the top menu bar, why? The only setting that looks right is setting the display output to 1080x720 (overscan on). Any other setting

  • Won't open homepage on open, won't open web pages from the menu 'open new window', Can't open menu button

    Ok, since update to version 31.0, I have been having some problems. I have tried doing everything stated in the support page about resetting, reinstalling, safe mode, restarting pc etc. First problem, when I open Firefox no web page loads. It just sa

  • Playing Music off of Portable Hard Drive

    I have all my music on a portable hard drive which I use as a main storage location. I hook it up to my computer through USB. I've not had trouble playing until I downloaded the latest version of iTunes. All my drivers are current. The problem is tha

  • Cannot Re-install Itunes anfter removing old version

    I cannot get Itunes to download, I get an Error message that tells me: iTunesSetup[1].exe is not a valid WIN32 Application. What does that mean? any help would be great! Thanks

  • Spry Tabs from Flash?

    I have Spry tabs on my page. I am trying to control which tab is active from a Flash movie on the page. In the HTML, I have a function: function switchTab(which) { TabbedPanels1.showPanel(which); In Flash, I have this actionscript (within an event):