Problem in Sales Order type

Hi
I am creating a user exit for transaction VA01. In this I am checking for order type 'OR'. But when I create a sales order with order type OR the user exit is getting some other order type. I have got this through debugging. What might be the problem.
Thanks in advance.
regards,
Eswar

Eswar,
I hope you are using field VBAK-AUART. For Domain AUART there is a Conversion Routine assigned as AUART which changes the Input value to the Internal Stored value.
For order type 'OR' the internal value is 'TA'. So in your logic check for 'TA' instead of 'OR'.
Hope this helps.

Similar Messages

  • Problem in Sales Order with specific condition type.

    Hello Experts,
    I'm facing a problem in sales order creation for a specific condition type.
    the actual scenario is as below,
    We have created a new condition type for special discount.This condtion type is applicable only for specific sales channels.Also the discount percentage has to fetched from a custom table.
    To achieve this I've written a user exit "RV64A999"
    In the FM, i've calculated the subtotal and fetched the discount percentage and calculated the discount amount. After implementing this, the SO were been created properly. for all the line items the discount amount was getting calculated properly.
    But then I added a condition at the top of code in exit that the calculation for the new condition type should happen only for selected sales channels.
    But after adding this condition in code, i'm facing problem. Now when I create/ change any SO, the discount amounts are getting calculated incorrectly. I'm getting discount amount even if the line item subtotal amount is zero (0).
    Any help or pointers reagrding this issue will be very helpful and highly appreciated.

    Hi ..
    Check your config. again or debug the routine code with your ABAPer and find the problem area.
    -Maharshi

  • Condition Period Problem in Sales order -  Need help

    Hi Gurus
    I am testing Sales Order back dated
    Condition period Problem in Sales order
    example for you to understand
    Sales Order where PO date is 17.12.2007
    Del Date & Price date is 13.02.2008
    Then it is not calculating IN: A/R BED %IN A/R BED totalN A/R CESS [1621]
    But if i do it after 14 feb 2008 then it is calculating IN: A/R BED %IN A/R BED totalN A/R CESS [1621]
    When I do it with current date it is calculating IN: A/R BED %IN A/R BED totalN A/R CESS [1621] say date is 9-5-2008
    I am not able to trace out problem, kindly help me from where I do I check and why this is happening.
    Rajesh Chalke

    Hi,
    I am not sure if this solves your problem, but I am suspecting that this might be due to the 'valid on date' of the condition records created for the relevant duty condition types.
    Since it was a recent regulation and VK11 usually defaults current date as the valid date, that condition record may have been valid only from the recent date on which it was created.
    Check the date in VK12 (To find the exact selection parameters, check the pricing analysis in the sales order which will display the exact condition record which is being selected as of current date.) Check for the same parameters; change the date to relevant date in the past and recreate the sales order. Hopefully this should solve the issue.
    Cheers,
    KC

  • BAPI - Problem in Sales order creation

    Hi Friends,
    I have problem in Sales order creation using BAPI ,I am getting a messsage - Error in creating document ,I have sent the code along with this mail ,can you help it out.
    Code:
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
    PARAMETERS: p_auart TYPE auart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Sales organization
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
    PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Distribution channel
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
    PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Division.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
    PARAMETERS: p_spart TYPE spart OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Sold-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
    PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Ship-to
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
    PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    SKIP 1.
    Material
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
    PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Quantity.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
    PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    Plant
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
    PARAMETERS: p_plant TYPE werks_d OBLIGATORY.
    SELECTION-SCREEN END OF LINE.
    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.
    Initialization.
    INITIALIZATION.
    v_text   = 'Order type'.
    v_text1  = 'Sales Org'.
    v_text2  = 'Distribution channel'.
    v_text3  = 'Division'.
    v_text4  = 'Sold-to'.
    v_text5  = 'Ship-to'.
    v_text6  = 'Material'.
    v_text7  = 'Quantity'.
    v_text9  = 'Plant'.
    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.
        WRITE: / 'Document ', v_vbeln, ' created'.
      ENDIF.
    Regards,
    Dinesh

    what messages u are gettting in RETURN ? Please check the RETURN tables data.
    [code]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.
    Regards
    Prabhu

  • Rounding off value problem in sales order

    Hi All,
    This is related to a rounding off value problem in sales order.
    The problem is described by an example which is as follows -
    Selling Price of Material A = Rs. 176.76
    Excise charged = Rs. 21.80
    Total Price = Rs.176.76 + Rs.21.80 = Rs. 198.56
    On this total Trade Discount (ZDTD) having access sequence,is calculated  at the rate of 4% = Rs. 7.94
    But the condition base value after the discount is showing Rs.198.60 instead of Rs.198.56
    I want the system to reflect the value as Rs.198.56 intact and it should not round up to the nearest value i.e. Rs. 198.60
    Why is this happening? Is it possible to reflect the exact value? If yes what is needed to be done?
    The commercial round off is activated for the DIFF Condition Type.
    Looking forward to some valuable suggestions.
    Thanks & Regards
    Priyanka Mitra

    Hi Ramesh,
    Thanks for your suggestion but the problem has been solved by me.
    Regards
    Priyanka Mitra

  • Problem about sales order stock stock transfer and batch determination

    Hi, experts, I get a problem about sales order stock stock transfer and batch determination.The following is the current situation of my system:
      In OMCG I assigned search procedure ME0001 to both 311 and 311 E and ticked check batch. After that, I found  that if iI need to tranfer unrestricted-use material from storage location 1000 to 2000 with movement type 311, I just need to input * at the field batch, then the system will display all of the available batches. But for the transferring of sales order stock with movement type 311 E, after I input * at the batch field, no batch is displayed and there is also no message from the system.
      Can anybody help me? Is there anything else I need to do? Thanks very much.

    I think my question is not clear, actually I tried 562 E , 411 E and 413 already. all the transaction looking for the sales order but unfortunatly the sales order is deleted  from SAP.

  • CRM ATP Checking using R/3 & Immediate Delivery for Sales Order Type in R/3

    We use CRM 4.0 and R/3 6.4.
    I've configured CRM to do ATP Checking using R/3.  The ATP Checking works fine if I change the Sales Order Type in R/3 to NOT create a delivery immediately. 
    I'm trying to find out if the combination of turning on CRM ATP using R/3 and Create Delivery Immediately for a Sales Order in R/3 are supposed to work properly together.
    If anyone knows and or has this working, I'd like to know.
    Thanks.
    Donna

    Hi ,
    I am working with R/3 and I have the same problem.
    Complete delivery is flowing down from the customer master for all order.
    And then we have items on order which have different shipping point.
    They all fail in background delivery and give the error ' customer requested complete delivery'.
    Is there anyway to override this?
    Any help will be really appreciated.
    regards
    BgS

  • Sales Order Output - determined by Sales Order Type, Created By

    I want have my order output determined by sales order type
    (vbak-auart) and created by (vbak-ernam).
    I have created a condition table 501, access seqeunce Z001.
    In v/48, in accesses for Z001, I created
    AcNo: 10
    Tab: 501
    Requirement: [empty]
    Exclusive: unchecked
    in fields, I can't find ERNAM in structure KOMKBV1(header), but I find one in KOMPBV1 (item).So I have assigned it to ERNAM.
    besides, I have created the corresponding records in VV11
    I expect to have:
    Output Z001 will be created for sales order type OR if created by user XXX
    However, no output is generated. When I go out detemination analysis, I found that in the output determination procedure, it did go into output type Z001, but, since no value is found for "created by", i got message "Access not made (initialized field").
    I suspect that no value stored in KOMPBV1-ERNAM. Do you know how I can get it done?
    Points will be awarded for useful information. Thanks in advance.

    Hi
    You have to include this field as a Zfield in the structures KOMKBV1, KOMPBV1 and KOMB.
    You have to include the field as Zfield in these structures.
    Once this is done, you should also be able to update this field in the structures.(As on now, you have only created a field, but you have not mentioned how the field has to be updated.
    In order to update the logic, you have to do a small code in one of the user exits for outputs.
    In the user exit, you have to write a code like this
    MOVE VBAK-ERNAM = KOMKBV1-ZERNAM(this is the zfield you have created)
    Now create the condition table and do the rest.
    Your output should work fine. The user exit I was saying is the subroutine USEREXIT_KOMKBV3_FILL in the include RV61B902 in the user exit RVCOMFZZ. If you can give this info to the technical guy, he should be able to find out the same for saels order output also.
    The user exit RVCOMFZZ also has the subroutine USEREXIT_KOMKBV1_FILL    which you can verywell use for your requirement. This will solve your problem
    Hope this helps.
    If you have any problems in this, you can again put the problems in this thread. I will try to solve.
    Reward if this helps you

  • Add sales order type and switch off fields in webshop

    Hi all!
    Got questions for you!
    Does anyone know how to add possible sales order types in shop management. For now the only possible entry is ISBC, I have created a copy of this one with some other control functions, ZISB. What are the steps to make this a possible choice in Shop Management.
    I would also want to know if there is a "standard" way of switching of visibility of some of the fieds in the webshop.
    CRM 5.0, ECC 6.0, Scenario B2C.
    Thankful for input!
    Best Regards,
    Roland

    Hi Roland,
       I meet many problem in webshop configring, would you kind enough to give me some advise?
       1. SAP CRM5.0 SP2
       2. I use the standard order type:ISBC
    The first problem is:
    When I register a user from webshop.
    I can add the product into basket, but when I check it out, the system give me an error: 99  can't use partner xxx. (But we can check out the basket before, I dont where be changed.)
    Second:
    After check out, the system will create an order, but price of the order is zero, I dont know to resolve this question.
    Thank you very much.
    Eric

  • Hide the characteristics grouping buttons depending on the sales order type

    Hi Gurus,
    I am trying to find a way to hide a characteristics grouping button (CU50) whenever a certain sales order type is issued.
    A condition was created that states that a certain characteristic will be invisible for the user depending on the sales order type chosen for that case. The characteristic is located inside a char. grouping button.
    I would like to know id there is a way to hide the button while the characteristic is hidden as well, just to avoid showing a button which is empty.
    If It is of any help, here is the condition created to turn the char invisible:
    $SELF.INVISIBLE = 'N01017_E'.
    *if not $self.N01017_E specified
    Thanks in advance.
    Kind regards.

    Hi!
    Sounds like you need a line-triggered output (with a message, which displays all lines of the order).
    Do you have problems to create a new output type?
    Regards,
    Christian

  • Credit Management for different Sales Order Types

    Hello All,
    The problem is related to Credit Management for Sales Order which is explained below with an example -
    We have separate Sales Order Types for New Launches (ZNLS) & Normal Depot Sales (ZDPS) but both the Order Types are assigned with same pricing procedure and respective orders will be raised against the same party code.Now automatic credit check is only active for order type ZDPS where the credit limit had been set to Rs.1000. Now Rs,.500 had already been raised using order type ZDPS, then another sales order of Rs. 500 is raised using order type ZNLS.But when a sale order of Rs. 550 is raised using order type ZDPS the sales order is getting blocked, because the system had taken into consideration & added up the Rs. 500 value of ZNLS with previous value of Rs. 500 against order type ZDPS as a result of automatic credit check though it is not active for order type ZNLS.Point to be noted that Credit exposure is  also not active for Order Type ZNLS.
    How is this taken into consideration & what are the steps need to be configured so that the credit limit check will not get automatically activated for order type ZNLS  and  only remain active for order type ZDPS  despite they are assigned to same pricing procedure and used for invoicing same party code?
    Please suggest.
    Thanks & Regards
    Priyanka Mitra

    Hi Mitra,
    The issue occurs because of the fact that credit check and the
    update of the credit values are separate processes which are also
    controlled separately by the respective customizing:
    1. credit check is controlled by transactions OVAK and OVA8.
    According to the attachment, you have already refered to note 18613 to
    check the customizing settings.
    2. update of the credit values is controlled by VOV7 or OVA7: "credit
    acttive" flag. The 'Credit active' setting only affects the credit
    update of the SD credit values (open orders, open delivery and open
    billing documents). This flag has no control on the credit check. So
    if for an order type, there is no credit check in OVAK and OVA8 but
    the "credit active" flag is set for the item category, the order will
    update the credit values even if no credit check is performed for the
    order.
    If the flag "credit active" is not set, the system will not update the
    open credit values. On the other hand, the system ALWAYS updates the FI
    credit value 'Open receivable' when the billing document is transferred
    to Accounting. So, although you deactivated the "Credit active" flag in
    in OVA7 or VOV7, such an item will increase the 'Open receivables' and
    thus the credit limit used when the corresponding billing document is
    posted to Accounting.
    If you would like the value from sales order type  ZNLS is excluded from credit update, you could consider set the "Credit Active" field as blank in VOV7 for the item category used for ZNLS.
    Best regards,
    Smile

  • Preventing update to COPA tables for a particular Sales order type

    Hi ,
    We need to have incoming sales order transfer to COPA activated only for one particular sales order type activated.
    Earlier we implemented note 571697  for user exit to allow COPA update only for particular sales order type.
    This prevented the transfer of SO to actuals table, but off late the performance for VA01 and VA02 has decreased substantially.
    Upon checking, we found this is happening because of other CE4XXXX tables (excluding CE1XXXX) which are getting updated during creation/ change of SO. as the data in these tables is huge .
    If possible, please advise, right userexit to prevent update to these tables.
    Thanks.
    Neeraj

    Thanks for your inputs..I have few more queries on same.
    Initially we had incoming sales order activated in KEKF allong with implemented SAP note 571697, which helped us to update CE1XXXX only for a particular sales order type. This was initial requirement to have system updating COPA values only for one particular sales order type.Also, KEQ3 was also activated which resulted in updates to CE4XXXX. This was not a problem initially since we had few sales orders now that plant has grown old with more sales order (resulting in huge size of CE4XXXX) VA01 is impacted..
    Currently ,since we have KEQ3 activated so, Segment is created the moment we create sales order.. and table CE4XXXX is updated..
    As most of you have suggested to switch off sales order in KEQ3, i need to analyze the impact of this..
    From what i understand CE1XXXX will continue with updation for that order type... and CE4XXXX won't be updated in future..Please correct me if i am wrong..
    Also, please advise what all can be possible impacts on COPA reporting if I switch off from now onwards (client has been using this since long) , and what all should be the precautions that i should take while doing this.
    Thanks

  • How to CIF Z Sales Order Type?

    Dear Experts,
    I am facing a huge problem.
    All my Z order types are not being CIFed to APO.
    Is there any extra configuration?
    Do I need to code any BADI, Exit?
    Thanks a lot in advance,
    Thiago

    I accidentaly removed Thiago's last reply.
    Here it is:
    Mr. Sai
    One more question...
    I have a custom delivery type that is generated by a custom sales order type.
    Nor the custom sales order type neither the custom delivery type has individual requirements.
    Anyway, I need to send the Custom Delivery to APO once I want to plan a shipment to it in TP/VS.
    Debugging EXIT_SAPLCSLS_002 I can see the CT_DOC and CT_REQ (CT_DOCX and CT_REQX) filled with all my Sales Orders and Deliveries that have individual requirements.
    Looking in the other structures available in this User-Exit we can find:
    CT_DOC_CUS = Customer Enhancement Structure for CIF_SL_DOC
    CT_REQ_CUS = Customer Enhancement Structure for CIF_SL_REQ
    It is not clear enough what it would be the purpose of these structures.
    My goal is to send that Custom Delivery Type to APO.
    How should I implement this User-Exit?
    What does need to be filled?
    Should I have to fill CT_REQ?
    Should I have to fill CT_REQ_CUS?
    Should I have to fill CT_REQX?
    Do you have any example of code?
    Thanks!!

  • Can't specify the customer to use a new sales order type ,why?

    I created a new sales order type, finished the configeration.. but when I use it to create a order by t_code VA01 ,input the order type and sales area ,then enter, why the sold-to-party and ship-to-party are inmodifiable? i can't specify the customer... where is the problem?
    appreciate you help.thank you !

    Hi Sue,
             I think u havent did the Partner determination for that Sales document.  If you create ur own sales doc type in VOV8 ,new entries.
    U need to maintain the Partner determination for that sales doc type.
    this is the same,the way u maintaint the customer partner determination.
    If you dont maintain this , in VA01 screen, u cant able to enter Sold to & ship to parties as it will be in display mode. I think the same error ur getting know as per ur issue.
    This will def solve ur issue as i faced n overcome long back.
    *reward points ,if helpful

  • How to Block Customer from Sales Order Type

    Hello Gurus!
    I was wondering if there was a way to block a specific customer from a sales order type? 
    We have 4 Sales Organizations, and 2 of them use this customer, with different sales order type for each sales organization.  So I only want to block this customer for 1 sales organization and a sales order type.....is this possible.  If so, please advise!
    I just want to block a customer from a sales order type. 
    Thank you for your time!
    Best regards,
    WC

    Hi,
    I have an wild idea just check it works or not--
    Create a dummy customer pricing procedure.whenever u want to bleck a customer for any particular order type assign this dummy pricing procedure in customer master(Sales Tab).
    Do not define any pricing procedure in SPRO against this customer pricing procedure
    The moment user will try to process any order type (which u want to block for a customer), the system will not determine any pricing procedure & consequently it will not allow to save the order.
    Hope it will solve the problem.
    Regards
    Sanjay

Maybe you are looking for