In SD, assign programmatically an external sales doc nbr

Hello, we have a sales document type that will be need to be externally assigned a sales document number in txn VA01.  Right now it is configured to be mandatory.
The requirement is to go to txn VA01, enter the sales doc type, hit enter, and then have a userexit/badi to find what the externally assigned number would be in a custom table (some complicated formatting of numbers and chars - hence why it cannot be internally assigned number), and have it populate in the sales doc field.
Because it is a mandatory field, the check for mandatory fields seems to fire before anything we can find.  We are also looking at making the field not be required for this sales doc type but not sure that can be done.
Is there a userexit or BADI that we could use to populate that number that people have come across.
We are trying, if at all possible, to avoid creating a custom txn that calls VA01 or a custom program that loads the sales order via a BAPI(these would be last resorts).
We are on ECC5.0 webAS 6.40.
Any help would be appreciated.
Thanks, David

Yes, the sales doc number field.  The do not want to use a custom field or place it into the PO field.  It is just an externally assigned number range, but it is to be stored in VBAK-VBELN.
The numbers may not be able to be calculated as a sequential sequence which is why they did not create an internal assigned number range, but they want to automate the calculation of that externally assigned number through a lookup to a custom table, etc.
So, they key we are looking for is if there is a userexit, badi, project that we could use to do this since right after we enter the VA01 txn, that field is required to be populated and there does not seem to be a userexit that fires before that check for the required field.
Another option we are thinking is declaring the field as internally assigned but then using the userexit USEREXIT_NUMBER_RANGE in MV45AFZZ but not sure that would even work as well without some sort of coremod which we want to avoid.

Similar Messages

  • Where do we assign shipping point to sales doc.

    where do we assign shipping point to sales doc.

    hi,
    i guess this time your question is correct but answer is not. We can for sure assign shipping conditions to sales document in the document type definition at VOV8 transaction. In the shipping section we have a field to input the shipping condition. This is very used incase of cash sales.
    regards
    sadhu kishore

  • WBS netowrk not assigned to its respective Sales Doc item

    Hi Guru's,
    I have a project assigned to the sales document item.
    WBS is already released for billing, but how come the network's under WBS is noy assigned to the sales item?
    Any idea?
    Big thanks in advance..
    Tina

    hi,
    yes wbse is assigned to the sales order item
    but supposedly when i check the network assigned to the wbs (cn23),
    it should have the sales document number and item number under assignment tab.
    but it does not have, any idea why?
    thanks..
    tina

  • No range ext.assg. in sales doc type

    Hello,
    Could you please tell me what's the use of no range ext. assg in saleas doc type? what's the relationship between int.&ext? How can I config ext. in IMG? Where's the menu parth?
    Reward if help!
    Thanks

    Hi ling
    In VOV8 for our sales document type ( OR ) we assign internal number range and external number range 
    You can assign number ranges in VN01 for both internal and external
    Internal number range - system will propose the number automatically
    External Number range - User has to give the number while creating
    In VN01 , for Internal number range  we don't check the box , where as  for external number range we have to  check that box that is how you differentiate 
    Example :
    In VOV8 we give for internal number range as 01 and the external number range as 02
    Now go to VN01  and see  the status of 01 number range if it is from 1000-2000, system will give sales document numbers from 1000 to 2000 as it is an internal number range .and similarly  see  the status of 02 number range if it is from 5000-7000, we can save  sales document numbers from 5000-7000 as it is external number range
    Regards
    Srinath

  • How to make plant in shipping cond tab for line item in sales doc mandatory

    Hi
    How to make plant as mandatory for a sales document say quotation mandatory ? I went to SPRO-> Basic Fucntion - > log of incomplete terms ->  Define incomplete Groups -> B.selected sales -Item -> Created new procedure Z001 with fielda VBAP - WERKS ,selected screen name PDE2 and checked warning check box.
    When i goto Assign incompleteness procedures I donot have option to assign it sales document item level procedure i will only get sales doc header procedure to assign it to document type quotation.
    How to make plant as mandatory for each line item in quotation?
    Thanks,
    Vaishnavi

    Include: MV45AFZB
    Form  USEREXIT_CHECK_VBAP
    In our business scenario, we have used the same ,But  Plant is mandatory only for 1st line item-
    source code:
    IF vbak-vkorg = '1000' OR vbak-vkorg = '2000'.
        IF sy-tcode = 'VA31' OR
           sy-tcode = 'VA11' OR
           sy-tcode = 'VA21' OR
           sy-tcode = 'VA41' OR
           sy-tcode = 'VA01' .
          IF vbap-werks IS INITIAL AND
             vbap-posnr EQ '000010'.
            MESSAGE e398(00) WITH 'Please enter the plant for first line'.
          ENDIF.
        ENDIF.
      ENDIF.
    Help:
    Through this form exit we are making the "plant' field (for the ist  &*
    & line item ) mandatory for the sales document . This interns helps us &
    & to create the sales document numner according to the plant (Region)  &
    *& of the Plant
    Hope it clears. take assistance of your ABAPer.

  • Sales area and sales doc

    Hi
    how can I configure the system where all sales document type can be allowed for all the sales area. and this means i dont require to assign sales area and sales doc type into OVAZ.

    Hi
    Yes, you are right.
    Check the img activity documentation in SPRO under "Assign Sales area to sales doc types".
    Assign Sales Area To Sales Document TypesI
    n this menu option, you allocate the allowed order types to each sales area group.
    You do not need to make any entries at all if all the sales order types are allowed for each of your sales areas.
    If you wish to check allowed sales document types, you must set up common sales areas. This means you must define common sales organizations, common distribution channels and common divisions. If, for example, you have define common divisions, then you must also define common distribution channels and sales organizations.
    Regards
    Madhu

  • Reg:sales area+sales doc ty

    hi all,
    in VA01 when im trying to create a SO after entering sales doc ty and res sales area im getting the error as"sales doc is not defined for the sales area"
    plz help me out to solve this issue.
    Thanx
    Raj

    Dear Raj
    Go to OVAZ, assign the sale document type to your sales area.  Now create a sale order
    thanks
    G. Lakshmipathi

  • Sales Area per doc and cross div per sales doc

    Hello Experts,
    We know that a sales doc is tied to a Sales Area.
    But a Customer can be extended to n Sales Areas.
    So, please confirm is it true that a customer extended to n Sales Areas can only buy from 1 sales area per sales doc.
    Another related question:
    Cross division sales is where a sales doc allows a customer to order products from n divisions.
    But Sales doc is tied to Sales Area.
    So, where is the logic?
    What is so specifial about div 00 that makes it cross division? Where is the setting for this div 00 that makes it cross-division?
    regards
    M Russo

    Hi
    For better understanding of your first question regarding sales area, please read the IMG activity documentation for the customizing step "Assign sales areas to sales document types".
    I guess you can find your answer for the second question regarding cross divisions is as given below:
    Reference division for document types (by sales area)
    Specifies a division as a reference for sales document types.
    Use
    You can share sales document type data between different divisions. You define sales document types in a central division and then use it as a reference division. Each division to which you assign the reference can use the same sales document types defined in the reference division. The sales document types are maintained centrally in the reference division.
    Procedure
    If all sales document types are allowed for all divisions, leave the field blank. Otherwise, enter the division you want to use as a reference.
    Example
    Division Reference division
    01 01
    02 01
    03 01
    04 04
    In this example, only divisions 01 and 04 have sales document types defined. Divisions 01, 02, and 03 share the sales document types defined for division 01. Division 04 has its own sales document types. When you create a sales order in division 03, the system checks the sales document type against the types defined for division 01. You do not maintain sales document types in divisions 02 and 03, since they are never used.
    Regards
    Madhu

  • Output type beside the output procedure while asigning to sales doc header?

    Hi All,
    T-Code v/43   (Sales Doc Header - output assignment )
    Please can any one elaborate why do we need to specify output type beside the output procedure while asigning to sales doc header.
    please explain me its use and significance.
    thanks and regards/ashu

    Hi Ashutosh,
                1. The output procedure will be one for total sales documents but if you want to assign different output types to different sales document types which are in same output procedure you can use this.
                 2. You can restric the output type based on the document type.
    I hope it will clear for you,
    Regards,
    Murali.

  • Created new Sales Doc Type - Cost Center field on header isn't showing

    Hi,
    I need to have the cost center input enabled on the header account assignment tab but it isn't showing at the moment.
    On my new Sales document type the order category is "H Returns" is this blocking it or is there something else I need to do.
    I don't want to auto assign the cost center just have it input enabled and showing.
    Thanks

    I found that sales doc category H for returns disabled the cost center.
    Mine was a free good so I was able to change to an I which worked.

  • How to assign numbers in external number range?

    Dear experts,
    Since NUMBER_GET_NEXT can only be used to assign numbers in internal number range, how to assign numbers in external number range?
    So far, I only know the NUMBER_CHECK function module to deal with external number ranges and it only check a number whether it lies in any external number range or not, but it doesn't update any number range status. What I need is a function module like NUMBER_GET_NEXT that supports external number range.
    Thanks in advance.
    Regards,
    Haris
    Edited by: harissahlan on Oct 19, 2011 5:44 AM

    With external number range, there is no updating of the number range objectt. The only thing you need to know is whether the number you wish to assign is allowed according to the external number range. And also check if there isn't already an object/document with the same number in the database.

  • Sales doc number?

    hi
    can i keep sales doc number in key fields or data fields in DSO?
    in data fields generally K.F and unique character also.
    in key fields we keep characters only.
    regards
    suneel.

    Hi Sunil,
    you can put the sales doc number (EBELN)
    in key filelds ,because which is the uniqe in the sales data.
    Regards
    Krishna Reddy

  • Incorrect requirements type in sales doc.

    HI,
    Due to incorrect requirements types of material the costs and sales volume are posted directly to sales doc instead of posting
    to WBS element.
    How can this be fixed (after cancellation of posting)?
    How can we identify already created u201Cincorrectu201D sales docs?
    Regards,
    Anup
    Edited by: anup12 on Jun 3, 2011 7:29 AM

    Hi !
    regarding your query, there may be various sales documents type which might be created during configuration.
    Some of these might not be required by end users and need to be blocked so that wrong document types are not chosen. so an indicator 'X' is placed againt these document types and these can not be used.
    There may be some documents wherein manual creation might not be allowed, and auto creation is desired. so againt these doc types-'A' is placed by which these doc types can not be created manually,
    Other sales doc types might not be blocked so that they can be used or created manually, hence kept blank against the indicator field.
    Plz reward point if useful.

  • Delete a line item from Sales Doc type RE

    Unable to delete a line item from a sales order linked to document type RE.  Get a long runtime - no specific error message.  Use the 'Stop Transaction' option to end the transaction.
    Have done thorough testing and can delete line items linked to all other sales document types in our system.
    Researched SPRO to see if there was a line item deletion option that was not created for sales doc type RE - but can find nothing.
    On a critical time line here - this was discovered during Hotpak installation testing which is scheduled to move to PRD June 22.  Question as to why we have not run across this issue before now??  - I don't think we have had an occasion to delete a returns line item before - but I want to have the option if available.
    Any help to resolve this issue would be appreciated.
    Regards
    Patsy

    Thanks for your response.
    After creating document type RE, execute VA02 transaction, select line item, select delete line item icon.  The system goes into runtime and just stays there.  No error message, no abap dump.  To escape the transaction, I have to select 'stop transaction'.
    I have tested all other document types we use in our system,  (including our customized transactions) SO, CR, DR, etc., and the system allows line item deletion.

  • How to use FM CRM_ORDER_READ using only object_id(sales doc)

    Hello Experts,
    I need to get the details for a given sales document in
    CRM(crmd_orderadm_h-object_id). I want to use FM CRM_ORDER_READ
    to get the details of a sales doc but my problem is where to put the object_id
    value. ANy simple example would be highly appreciated.
    Thanks a lot guys and take care!

    DATA:BEGIN OF i_order_h OCCURS 0.
            INCLUDE STRUCTURE crmd_orderadm_h.
    DATA:END OF i_order_h.
    SELECT *
        INTO CORRESPONDING FIELDS OF TABLE i_order_h
        FROM crmd_orderadm_h
       WHERE object_id    IN s_obj_id.
      DATA: i_header_guid   TYPE crmt_object_guid_tab ,
            i_et_partner    TYPE crmt_partner_external_wrkt,
            i_et_orderadm_i TYPE crmt_orderadm_i_wrkt,
            i_et_product_i  TYPE crmt_product_i_wrkt,
            i_et_pricing_i  TYPE crmt_pricing_i_wrkt,
            i_et_schedlin   TYPE crmt_schedlin_wrkt,
            i_et_sales      TYPE crmt_sales_wrkt.
    LOOP AT i_order_h.
    CLEAR i_header_guid.
        REFRESH  i_header_guid.
        APPEND i_order_h-guid TO i_header_guid.
        CLEAR: i_et_partner,
               i_et_orderadm_i,
               i_et_product_i,
               i_et_pricing_i,
               i_et_sales,
               i_et_schedlin.
        REFRESH: i_et_partner,
               i_et_orderadm_i,
               i_et_product_i,
               i_et_pricing_i,
               i_et_sales,
               i_et_schedlin.
        CALL FUNCTION 'CRM_ORDER_READ'
          EXPORTING
            it_header_guid = i_header_guid
          IMPORTING
            et_partner     = i_et_partner
            et_orderadm_i  = i_et_orderadm_i
            et_product_i   = i_et_product_i
            et_pricing_i   = i_et_pricing_i
            et_sales       = i_et_sales
            et_schedlin    = i_et_schedlin.
        IF sy-subrc = 0.
        ENDIF.
    ENDLOOP.
    Message was edited by:
            EastViking

Maybe you are looking for