Two invoice types order-related from the same sales order type

Hi experts,
I need to assign a different invoice type to two different items categories regarding to invoice each item with a different invoice rumber range and a different accounting document type (one 'RV' and another 'PF').
Neither of them have delivery.
I' ve assigned in the copy controls from sales orders to invoices the items categories to the corresponding invoice type in order to avoid the items are invoiced by wrong invoice type.
Exem:
item category ZIC1 must be invoiced by invoice type ZF1
item category ZIC2 must be invoiced by invoice type ZF2
I executed VF04 twice: first regarging to create ZF1 and second create ZF2.
1)  If I insert ZF1 invoice type (order-related) by default in the sales orders definition (Sales and Distribution -> Sales -> Sales -> Sales Document Header -> Define Sales Document Types), the item ZIC1 is properly invoiced and the ZIC2 too. But: although I already invoiced both items, SAP laves the sales order opened waiting to create ZF1 for ZIC2.
2)  If I don't fill the invoice type by defautl, the invoicing can't be done because the invoice type isn't determined (VKDFS-FKART empty).
I want to know if  there is any exit to change the values of VKDFS entries for each item of sales orders before to process this table with VKDFS.
Thanks in advance,
Aupalaura

Hi,
thanks a lot for the quick answer.
But in save document prepare it's not this structure. And the field for save the invoice type by default is at header level FKARA (in VBAK table).
Anyway, I'll check it.
Regards,
Aupalaura

Similar Messages

  • How to avoid that two or more people altering the same Sales Order

    I'm looking for a way to avoid that two or more people altering the same Sales Order at the same time.
    If someone has entered a Sales Order in the system and something needs to be adjust it can be done by two or more people at the same time. The problem is that when someone is saving these changes, the changes of another person, who is still working on the same order, get lost.
    So what we need is an alert that someone is already using this order and that no other person can make any changes at that time. So the order needs to be blocked for altering for any other person at that time.
    To avoid this I think you have to do something with the Stored Procedure. Or has someone a more simple and better solution. So far I didn't find a standard option in Business One neither a solution in this forum.
    Best regards,
    Tim

    Tim,
    There is nothing in the application settings in Business One that could be used to prevent this.  You may post this to the SDK forum as well and perhaps there is a way to achieve this through SDK.

  • How to avoid that two or more people alter the same Sales Order same time

    I'm looking for a way to avoid that two or more people altering the same Sales Order at the same time.
    If someone has entered a Sales Order in the system and something needs to be adjust it can be done by two or more people at the same time. The problem is that when someone is saving these changes, the changes of another person, who is still working on the same order, get lost.
    So what we need is an alert that someone is already using this order and that no other person can make any changes at that time. So the order needs to be blocked for altering for any other person at that time.
    To avoid this I think you have to do something with the Stored Procedure. Or has someone a more simple and better solution.
    I've already put this thread in the Business One forum and someone suggested to put it in the Business One SDK forum, as there isn't a solution in Business One itself.
    So if someone can give me a direction for a solution I would be very pleased.
    Best regards,
    Tim

    Hi Tim,
    The only thing that comes close to what you want in standard SBO is Data Ownership. However, this can't stop someone editing a document that is already being edited.
    You can't use stored procedures to track which document is open because the SBO_SP_TransactionNotification proc (which is the only one that you are able to customise) is triggered when a document is updated or added (or cancelled or closed) and not when the document is actually being edited in the user-interface.
    You could do this by writing an addon that uses the UI API to trap events in the sales order form. In theory, a sales order is being edited if the sales order form is in Update mode (ie in order for the form to be in Update mode, the user must have selected an existing document and changed the value of at least one field). You can trap the event of the user changing a value and then log the user and document in a table. When other users try to edit the same document, you could check the table and then prevent them changing values. When the first user clicks on the update button (or cancels the update or closes the form etc etc) you can remove the lock on the document. However, I have doubts as to how robust it would be. The problem with this kind of locking solution is that you sometimes get 'stranded' locks (eg user was editing a document when their workstation crashed) and the solution can end up being more troublesome than it is worth.
    Kind Regards,
    Owen

  • How to put 2 kinds of material prices on the same sales order

    Hello SD Gurus,
    I have a requirement to put a one-time price (e.g. installation price ) and a recurring monthly price on the same sales order.
    I've tried the following but it is not working.
    1. I have a pricing procedure (PSER01) in which I'm using the following price types:PR00 (Defined as a "Discount or Surcharge") and PRSV.  I'm using PR00 to represent my one-time installation price.  I'm using PRSV to represent my monthly+recurring price.
    2. I used it for a material master in a sales order.  I can add PR00 and see the green traffic light.  But as soon as I add PRSV, the traffic light on PR00 turns yellow (Inactive because of subsequent price).
    I've read several posts on the forum regarding this.  Based on my understanding, I'm using two pricing conditions in one pricing procedure which is not allowed. 
    What can I do differently to enable the one-time price and monthly price to appear for my material master on the sales order?
    Thanks so much for your help!

    Hi,
    As per SAP Logic, if the condition type has condition class "C" then only one value is allowed.
    if you want to add two values ( Fixed + Variable) then you can do the following logic.
    1 ) Have one condition type  say ZFIX ( Use this for Fixed Value ) cond class = C
    2 ) another condition type Say ZVAR(Use this for  variable value ) Cond Class = C
    3 ) another condition type say Zxxx ( use this for your Final Value) cond class = C
    now do not assign any access sequence to the third condition type. write a logic in the "Alt Calculation type " routine to get the value of this condition from the sume of ZFIX + ZVAR
    i.e., ZXXX = ZFIX + ZVAR.
    Make sure that the sequence of the codition types are mentioned exactly like the above.
    this is because if you put ZXXX third then the system automatically ignores the value of ZFIX and ZVAR.
    but the values against those condition types will be stores internally. So in future if we want some information also we can trace back..
    let me know if you need further help..
    thanks..

  • How to prevent modifying the same sales order in R/3 & CRM at the same time

    Guys,
    We are using CRM 5.0& R/3 4.6C. We have the middle set up. I have noticed that its possible to open the same sales order in R/3 and CRM in the change mode. I believe this could cause inconsistenices if the users modify the same order in different systems. Is there a standar way to prevent this from happening.
    Is there something like a change lock like we have the distribution lock?
    Anirudh

    Hi,
    As per OSS Note 705200 scenario X, Y and Z are supported with R/3 4.6C. Even if you use Scenario A, SAP wont support that. I would suggest sceario Z to be implemented. This would convert all the CRM order into R/3 order as soon as they are transferred to R/3. As a result the order can now only be modified in R/3 and all the changes would flow back into CRM maintaining the integrity between the systems.
    Refer to OSS Note 541113 for details.
    Regards,
    Gaurav Gera

  • Cannot change Tax Code from the referenced sales order line

    hi,
    Has anyone ever got this error when creating Sales Order(SO): "*cannot change Tax Code from the referenced sales order line*"?
    The error occur with order type Return.
    This SO is created by copying from another SO.
    Please help.
    Regards & thanks,
    eRie

    hi,
    Has anyone ever got this error when creating Sales Order(SO): "*cannot change Tax Code from the referenced sales order line*"?
    The error occur with order type Return.
    This SO is created by copying from another SO.
    Please help.
    Regards & thanks,
    eRie

  • BDOC's to update the custom fields in R/3 from the CRM sales order

    Dear All,
    I need a small help.
    My requirement is as follows.
    When ever a sales order is created in CRM, an outbound delivery will be automatically created in the R/3 system.
    There are some fields in the CRM sales order which are not there in the R/3 system.So I have to create these fields in the LIKP and LIPS tables in R/3 which is not a problem.
    But I have to copy these fields from CRM to the LIKP and LIPS tables in R/3 when ever a sales order is created and saved in CRM. (This should happen automatically)
    So could anyone tell me whether there are any BDOC’s available to update the sales order info in the LIKP and LIPS tables and also any BADI which can be trigger for this purpose.
    Thanks in advance.
    Regards
    Shafath

    Hi,
    Thanks a lot. You have given a good solution.
    But a small correction.
    Sales Order is not transferred from CRM to R/3. The system is creating (automatically) a delivery in the r/3 system for the sales order created in CRM (Here we will not have the sales order in R/3), so we don’t have an entry in VBAK and VBAP tables.
    When we create a sales order in CRM and save , the delivery in R/3 is created and the sales order is not transferred to R/3.
    So while saving the sales order itself in CRM, I need to trigger a badi to update the LIKP and LIPS tables by calling a RFC (which needs to be developed in R/3).
    So I need a badi which triggers when the sales order is saved and which tells whether the sales order is saved without errors or not (because delivery in R/3 is created for only those orders which are created and saved without errors in CRM)  and returns the sales order number.
    It will be helpful if you can send some info on this.
    Any how thanks a lot for your quick response.
    Regards
    Shafath

  • Can 2 invoice number be created with the same Purchase Order number

    HI,
    I have created one invoice number with a Purchase order number 4500020000. Now is it possible to create a another invoice number with the Same PO

    In me23n transaction go to Invoice tab(In items), there will be a check box for <b>Final Invoice</b>. If it is checked, full amount is invoiced.
    The same can be checked in table EKPO.
    Field EREKZ = 'X' means final invoice done.
    another method is:
    foe each item:
    go to table EKPO and see the quantity.
    then go to table ekbe and get all the invoiced quantity by passing VGABE = '2'. for the PO item.
    add all the records with SHKZG = 'H' and subtract the total of all SHKZG = 'S' records.
    If this quantity is equal to the ekpo quantity, then there is no more quantity to be invoiced.
    Get the PO Item quantities
      SELECT EBELN
             EBELP
             MENGE
        FROM EKPO
        INTO TABLE IT_EKPO
       WHERE EBELN IN R_EBELN.
    Get the Invoice Receipt Documents for the POs
        SELECT EBELN
               EBELP
               BEWTP
               MENGE
               GJAHR
               BELNR
               BUZEI
               SHKZG
          FROM EKBE
          INTO TABLE IT_EKBE
          FOR ALL ENTRIES IN IT_EKPO
         WHERE EBELN = IT_EKPO-EBELN
           AND EBELP = IT_EKPO-EBELP
           AND VGABE = C_VGABE_2.
    logic to check if the IR Quantity equals the PO Quantity for each Item
      LOOP AT IT_EKPO.
        CLEAR V_BPMNG.
    For each line item, calculate the total Invoiced Quanity
        LOOP AT IT_EKBE WHERE EBELN = IT_EKPO-EBELN
                          AND EBELP = IT_EKPO-EBELP.
    Change the sign of the quantity for debit
          IF IT_EKBE-SHKZG = C_SHKZG_H.
            IT_EKBE-MENGE = -1 * IT_EKBE-MENGE.
          ENDIF.
          V_BPMNG = V_BPMNG + IT_EKBE-MENGE.
        ENDLOOP.
    If the PO Item Quantity is equal to IR Quantity
        IF IT_EKPO-MENGE = V_BPMNG.   "ARAO
    write:/ 'No more quantity to be invoiced'.
        ENDIF.
      ENDLOOP.
    Regards,
    ravi
    Message was edited by: Ravi Kanth Talagana

  • Two credit control are at the same sales order.

    Hello Gurus,
    I would like to know how if you can help with the following subject:
    I have two sales area:
    XXXX YY A1
    XXXX YY A2
    And for each sales area it´s assigned two credit control areas, like:
    XXXX YY A1  to credit control area A
    XXXX YY A2  to credit control area B
    Is it possible to create a sales order with these two sales area?
    We need to have credit control limit differents for sales area (customers), but also we like two have only one sales order to manage. Is it possible?
    Many thanks in advanced.
    Luiz Geraldi

    Hi Luiz,
    In sales booking screen VA01 t-code we have the following fields as necessary input.
    Order Type        
    Sales organization
    Distribution channe
    Division          
    Sales office      
    Sales group       
    All these fields need to be unique in order to save this document.
    So we can input any number of materials provided the above details are unique.
    We can have more than 1000 line items, but all these materials need to be in a single sales organization, distribution channel and division.
    As this is a standard SAP functionality, i am afraid there is no customization by which we can change this (as far i my knowledge goes)
    Hope i am right in my approach,
    correct me if i am wrong;
    Let me know if you have further concerns;
    Regards,
    Syed Nasir

  • HT1311 Can two iTunes accounts be operated from the same user address?

    I have purchased an ipad2 and when I synced it on itunes it automatically synced all of my wife's music. Can I unsync her music? Can I have two ITunes accounts on the same username?

    Hello, Welcome to discussions. More information about this can be found below.
    You can authorize your account on up to a total of 5 computers. So your account can be authorized on 5 machines, and her account can be authorized on 5 machines. So yes a computer is capable of having more then 1 account authorized on it.
    About iTunes Store authorization and deauthorization
    http://support.apple.com/kb/HT1420
    If you share a computer. You will want to ensure you sign out of your iTunes Store account before the next person uses iTunes. This will prevent accidental charges on someone else's Apple ID.
    Or you can create a second Windows User account, each have your own user account, own iTunes, and purchases and content will be separate.

  • 2 deliveries created for the same sales order

    2 Return Del docs & 2 credit notes were created for one return order no.  
    Posted: Apr 17, 2008 5:33 PM       E-mail this message      Reply 
    Dear SAP Support,
    I would like to know why does the system created 2 return deliveries with the same qty for a single return order document no.? One return delivery doc.no. was created 2 mins earlier than the 2nd return delivery document no. on the same day. After these 2 return deliveries were created, a credit note was also created for each return delivery doc. number. Here is the document flow:
    On Jan. 10, 2008, the Return Order was created
    The Delivery block field is set to 90- (Return block)
    The Billing block field is blank
    On Jan. 14, 2008 @ 12:08:44, the 1st return delivery doc. no. was created. And on the same day also @ 12:10:44, the 2nd delivery doc. was again created.  These 2 deliveries were created by 2 users. 1st delivery is by manual job, the 2nd is by background job processing.  there was a 2 mins. interval for these 2 deliveries.  
    On Jan. 21, 2008 @ 9:47:33, the 1st Credit Return Note was created. And on the same day also @ 9:48:00, the 2nd Credit Return Note was again created.
    In my initial investigation, I found out that there were changes made on the return order document before the 2 return delivery documents were created. Below are the changes that happened:
    On Jan. 14, 2008, @ 9:25:22 hour, the following changes occurred:
    a) Delivery block was changed from 90 - (Return block) to blank
    b) Billing block was changed from blank to 08 - (check credit memo)
    On Jan. 14, 2008, @ 12:08:44, T-Inv Comb field was changed from DC to C
    On Jan. 21, 2008, @ 9:47:20, the Billing Block was changed again from 08 - (check credit memo) to blank
    Will the above changes, contribute to this issue?
    I am also suspecting that the timing on the creation of deliveries via manual job and scheduled background job processig could be the root cause because of the slim time frame between the two job?  
    I hope you can help me get an explanation to this and how this can be avoided.
    Thank you very much in advanced for your help on this matter.
    Hoping to hear from you soon.
    Kind regards,
    Cynthia M. Ondillo
    SAP SD Functional Support

    Hello Jonathan,
    Yes, the  'update document flow' box is ticked and the entry in the 'Pos./negative quantity' field is '+'
      Target delivery type is LR - Returns Delivery    Source sls doc. type is ZRE - Coats Returns Order
      Item category is ZREN - Coats Returns Item
    Since we do not see anything missing in the above setting, can we say that it is a system bug when running manual delivery job close to the time for running the scheduled background job? 
    If it is a system bug, how can this be corrected?
    Regards,
    Cynthia

  • While filling up the set uptables ran twice for the same sales order number

    Hi all,
    I ran the set up tables for a sales order number in the morning and then ran again in the evening by mistake so when i see in the rsa3 i can see 2 sales order number.
    If i load the same in the sales order header and item ods, will there be any duplicates from ecc to bi?
    Thanks
    Pooja

    Hello,
    If you load your ODS in overwrite mode, there should not be any problem.
    Regards,
    Fred

  • Transfer of changed order BOM from quotation to sales order

    Good morning!
    Please consider the following scenario involving variant configuration:
    A quotation is raised in the system, and the values of the characteristics are assigned. Therefore a order BOM is generated (for the quotation), and that order BOM is changed manually using tcode CU51 (for cost estimates purposes). When it is saved, the system updates the BOM in the quotation automatically (ok, this is a desired behavior).
    Although when we create an sales order with reference to that quotation, the newly chnaged order BOM is not copied to this new order, the order BOM is redetermined instead.
    How can I make the system to copy it from the quotation properly?
    Thanks in advance!
    Adriano Cardoso

    Thanks for the reply. I have verified this note and it seems more toward the BOM explosion in the sales documents themselves than for the modifications made afterwards (CU51 changes in BOM, for example).
    After realizing that, I´ve made a little research and found the Order Engineering Workbench possibility, which seems to fulfill all our requirements regarding this point. I looked all over SDN and haven't found too much input about it. In the SAP VC book, says it is not part of the SAP ERP, but a add-on.
    So, you don't happen to have any idea of how can we check if it is activated / installed  in our system or not? We are on version 5.0.
    Thanks!
    Adriano Cardoso

  • Using values of two different applications that are from the same class

    Hi,
    See the following little program
    What I can't figure out is
    i) How to change the values if I add a button
    ii) How to print just app.x1 etc. The way I have it now, it will just print x1, y1 etc, from both app and app1, but I want to be able to distinguish between the two of them so I can use the values.....ie for example add app.x1 and app1.x2 (only using that as an example of what I want to use them for)
    I'd really appreciate if anyone could help me out, it's probably simple, but just cant figure it.
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class drawLine extends JFrame{
    int x1, y1, x2, y2;
    JPanel topPanel;
    JButton button;
    public length l, l3;
    public drawLine(){
    super("drawLine");
    public drawLine(length l){
    this.l = l;
    topPanel = new JPanel();
    button = new JButton("Change");
    topPanel.add(button);
    getContentPane().add(topPanel, BorderLayout.NORTH);
    x1 = 100;
    y1 = 100;
    x2 = l.x2;
    y2 = l.y2;
    System.out.println(x1 + " " + y1 + " " + x2 + " " + y2);
    /*button.addActionListener(
    new ActionListener(){
    public void actionPerformed(ActionEvent e){
    l.length();
    repaint();
    public void hello(){
    System.out.println(x1 + " " + y1 + " " + x2 + " " + y2);
    public void paint(Graphics g){
    draw(g);
    public void draw(Graphics g){
    g.drawLine(x1, y1, x2, y2);
    public static void main(String args[]){
    length l1 = new length();
    length l2 = (length)l1.clone();
    l1.length();
    l2.length();
    drawLine app = new drawLine(l1);
    app.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    app.setSize( 300, 300 );
    app.move(0,0) ;
    app.setVisible( true );
    drawLine app1 = new drawLine(l2);
    app1.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    app1.setSize( 300, 300 );
    app1.move(300,0) ;
    app1.setVisible( true );
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class length implements Cloneable{
    String whatlength;
    int llength;
    int x1 = 100;
    int y1 = 100;
    public int x2, y2;
    public void length(){
    whatlength = JOptionPane.showInputDialog("What is the length of the line");
    llength = Integer.parseInt(whatlength);
    x2 = x1 + llength;
    y2 = y1;
    public Object clone() {
    Object object = null;
    try {
    object = super.clone();
    catch (CloneNotSupportedException exception) {
    System.err.println("AbstractSpoon is not Cloneable");
    return object;
    }

    I've tried it like this, ie by adding an int to drawLine and trying to keep an array of lengths, which sortof works, but see the code I have commented out in the button actionListener class. What I thought I'd ba able to do is access the arrays like that.....how come it gives me an exception?
    public class drawLine extends JFrame{
    int x1, y1, x2, y2;
    JPanel topPanel;
    JButton button;
    public length[] linelength = new length[2];
    public drawLine(final length l, final int k){
    super("drawLine");
    this.linelength[k] = l;
    topPanel = new JPanel();
    button = new JButton("Change");
    topPanel.add(button);
    getContentPane().add(topPanel, BorderLayout.NORTH);
    x1 = 100;
    y1 = 100;
    x2 = linelength[k].x2;
    y2 = linelength[k].y2;
    button.addActionListener(
    new ActionListener(){
    public void actionPerformed(ActionEvent e){
    //Update the length object int's
    linelength[k].getLineLength();
    // Copy these ints back to the drawline object
    x2 = linelength[k].x2;
    y2 = linelength[k].y2;
    System.out.println(k + " " + linelength[k].x1 + " " + linelength[k].y1 + " " + linelength[k].x2 + " " + linelength[k].y2);
    repaint();
    /*********This bit gives me a null pointer exception ********
    linelength[0].x1 = linelength[1].x1;
    linelength[0].x2 = linelength[1].x2;
    linelength[0].y1 = linelength[1].y1;
    linelength[0].y2 = linelength[1].y2;
    public void paint(Graphics g){
    g.clearRect( 0, 0, getWidth(), getHeight() );
    draw(g);
    public void draw(Graphics g){
    g.drawLine(x1, y1, x2, y2);
    public static void main(String args[]){
    length l1 = new length();
    length l2 = (length)l1.clone();
    l1.getLineLength();
    l2.getLineLength();
    drawLine app = new drawLine(l1, 0);
    app.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    app.setSize( 300, 300 );
    app.move(0,0) ;
    app.setVisible( true );
    drawLine app1 = new drawLine(l2, 1);
    app1.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    app1.setSize( 300, 300 );
    app1.move(300,0) ;
    app1.setVisible( true );
    }

  • Order and delivery related billing from same Sales Order

    Hi
    I have a scenario where in the same sales order customer has put two line items.One with item category TAN i.e. Delivery related billing and other TAD i.e. Order related billing. Line item with TAN item category is invoiced. When trying to create invoice for second line item(TAD) system gives error like" Item Category OR TAN can not be invoiced with billing type F2".that means when I create billing for second line item ,it also drags first line item which is already billed.
    Please suggest.
    Thanks

    Hello,
    the system works in this way:
    - for every item present in the sales document to be billed, it searches an entry customizing copy control table TVCPF.
    - if TVCPF entry does not exist (because TAN is not maintained in transaction VTFA OR -> F2) then system issues message VF003
    - If TVCPF entry exists, then system performs the copy-requirement routine to check if the item is billeable.
    SOLUTION:
    You could maintain an entry in VTFA for combination OR -> F2 item TAN, and put a copy-requirement routine setting SY-SUBRC = 4, so that the billing is item is not created for the sales order TAN item.
    Best regards,
    Ivano.

Maybe you are looking for