Need to fetch sales order no. before creation

Hi Experts,
My requirement is to add text in "Text" tab at item level in Sales Order creation. This is working fine for VA02 as I am using folowing code:
FM to store date in the 'Text' tab of the Sales Order
    CALL FUNCTION 'CREATE_TEXT'
         EXPORTING
              fid         = 'Z0CF'
              flanguage   = gc_spras     "Language
              fname       = gv_so_it        "Sales Order No+Item number
              fobject     = gc_obj
              save_direct = 'X'
              fformat     = '*'
         TABLES
              flines      = it_temp           "Data to populate text tab with
         EXCEPTIONS
              no_init     = 1
              no_save     = 2
              OTHERS      = 3.
    CLEAR it_date.
  ENDLOOP.   "it_date
It is working fine for VA02 as SO no. is existing and fname is getting sales order no and item no. to create text.
My problem is that I want to do same thing for transaction VA01. But the problem is fname doesn't get appropriate data as SO is still not created.
Is there any way I can achieve this?
Any structure or table that I can use?
Your help in this regard will be highly appreciated.
Best Regards,
Vishal Sharda.

Hi ,
       Create a Z function module in update task add the code
CALL FUNCTION 'CREATE_TEXT'
EXPORTING
fid = 'Z0CF'
flanguage = gc_spras "Language
fname = gv_so_it "Sales Order No+Item number
fobject = gc_obj
save_direct = 'X'
fformat = '*'
TABLES
flines = it_temp "Data to populate text tab with
EXCEPTIONS
no_init = 1
no_save = 2
OTHERS = 3.
CLEAR it_date.
ENDLOOP. "it_date
and call that Z function module in update task in userexit_save_document ,there vbak-vbeln or xvbak-vbeln will have the SO number .
Please reward if useful.

Similar Messages

  • Need code for Sales order creation in oops using xi as integration server

    Need code for Sales order creation in oops using xi as integration server.

    hi rocky,
              could you pls give a bit explanation on what you are expecting.
    regards,
    Pavan

  • How to List Sales Orders based on Creation Date and Delivery Priority

    Dear all,
    How can we list Sales Orders based on creation date and delivery priority.
    I tried using vl10a transaction code, but there we can see sales order based on delivery date.
    we need to list all sales order based on delivery priority and sales order creation date.
    can any one of you tell me which standard report gives such kind of report. Your suggestions will be highly appreciated.
    Thank you
    Raghu Ram

    Hi Raghu,
    There is no st report available as per your req.
    Using SQVI, you develope one report that is list of sales orders based on your req.
    SQVI is used to convert a Quick View into a query.
    Quick Viewer:
    The Quick Viewer allows you to define reports without having to program yourself. The Quick
    Viewer is especially useful for new users and occasional use.
    Quick Viewer is a tool for generating reports. SAP Query offers the user a whole range of options for defining reports. SAP Query also supports different kinds of reports such as basic lists, statistics, and ranked lists. Quick Viewer, on the other hand, is a tool that allows even relatively inexperienced users to create basic lists.
    Quick View definitions are user-dependent. You can transfer a Quick View into SAP Query in order to make reports, for example, accessible to additional users, or to use the other functions available in SAP Query.
    The following is a comparison of Quick Views and queries:
    Quick Views possess the same functional attributes as queries. However, only basic lists may be defined with Quick Views.
    In contrast to queries, no user group assignment is necessary with Quick Views. Each user has his/her own personal list of Quick Views. Quick Views cannot be exchanged between users. Quick Views may, however, be converted to queries and then be made available to other users in a specific user group.
    Info Sets are not required for Quick View definition. Whenever you define a Quick View, you can specify its data source explicitly. Tables, database views, table joins, logical databases, and even Info Sets, can all serve as data sources for a Quick View. You can only use additional tables and additional fields if you use an Info Set as a data source.
    The Quick Viewer uses various controls. Certain hardware and software requirements must also be fulfilled before you can use the Quick Viewer.
    To define a Quick View, you select certain fields according to your data source that determine the structure of your report. The report can be executed in basis mode with standard layout or may be edited using drag and drop and the other toolbox functions available in WYSIWYG mode.
    Reports created using the Quick Viewer may also be passed to external programs (Excel, for example).
    Call the Quick Viewer using System -> Services -> Quick Viewer (or transaction SQVI).
    Enter the name of the Quick View. Quick View names can contain a maximum of 14 characters.
    Choose Create.
    Enter a title for the Quick View and remarks, if you think they are relevant.
    If you do not want to base your list on a table, use the possible entries pushbutton in the Data source field to select another data source. You can choose logical databases or Info Sets. In addition, you may also create table joins. For further information, see Selecting a Data Source.
    Choose Basis mode if you want to create the list directly with no list design. Choose Layout mode if you want to define the layout of your list yourself.
    SQVI Table Quick viewer – Used to created quick client dependent reports
    Probably the easiest and most flexible way to do this is thru one of the ABAP query transactions.
    Transaction SQVI can do this and it has a very good help function that explains how it works... the drawback is that it is only for one user.
    You can play around with it and see if it meets your needs...
    The query results will come back in an ALV Grid or Excel... you can select what fields are returned, and have a selection screen to enter the search criteria.
    You can get the report by joining the tables VBAK and VBAP.
    If you have any queries, i will forward screen shots to your id.
    Reward points pls.
    Regards,
    Govind.

  • Fetch Sales Order number VBELN from Purchase requisition number BANFN

    Hi,
    I'm not able to find a suitable method to fetch the sales order number(VBELN) from the purchase requisition number(BANFN).
    I tried using VBEP table to fetch the data, but it is giving serious performance issues, as in for fetching one record it is taking approx 20 seconds!!!
    Kindly suggest a suitable method for this.
    I've used the query as folllows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    Scenario in brief described below:
    Whenever a direct delivery sales order is created on a supply chain plant, a dummy purchase requisition without source of supply is created automatically at preferred supplying plant for the customer in the sales order. Direct Delivery Sales Orders which are still in Open status and for the associated dummy purchase requisitions with these sales order, the deletion flag set has to be unchecked.
    in this case, only one sales order is created corresponding to a preq..
    BAPI: BAPI_PR_GETDETAIL is not giving entries for the table as this is a special case of direct delivery from the production plant directly to the customer, bypassing the warehouse / distribution center...
    selection screen has input fields preq, matnr(product) and plant. we fetch entries depending on the data filled in selection screen and also they should be of document type(BSART in EBAN table) ZDD1 and deletion indicator is set(LOEKZ in EBAN).
    then we check if the sales order corresponding to the preq is in open status...
    for this i need to programmatically fetch the sales order number corresponding to the preq...
    this is causing a performance issue as i could find only one way -- fetching sales order number from VBEP table corresponding to BANFN... indexing for easier also didnt work...
    no other way i could find to fetch sales order number corresponding to the preq number....
    there is a bapi: BAPI_PR_GETDETAIL, but this is not fetching entries to the changing tables related to sales order...
    also EBKN table doesnt have any entries as this is a special case of direct delivery preq..
    Guess i couldnt find anyother way...
    Thanks.

    I'm not sure as to why the select query was still throwing performance issues. I could see that the index had been created on only BANFN in the DB. Prior to creating the index, it was taking approx 20 seconds per entry, but after creating the index, it took 13seconds approx.
    I used the select query as follows:
    select single vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    where: wa_vbep is the workarea having two fields vbeln and banfn, and wa_eban_zdd1_x-banfn is the reference preq number.
    I tried a few other combinations also, but  those also didnt work effectively:
    select vbeln banfn
    from vbep
    into (wa_vbep-vbeln, wa_vbep-banfn)
    where banfn eq wa_eban_zdd1_x-banfn.
    without using SINGLE in the select query as the select query would implicitly pickup only a single record,
    select vbeln banfn
    from vbep
    into wa_vbep
    where banfn eq wa_eban_zdd1_x-banfn.
    and another query where the INTO statement was directed directly to a workarea.
    But unfortunately, nothing seemed to be working.
    The index i had created was on BANFN alone in the VBEP table.

  • WMS :  How to Process Sales Order Released before Turning on WMS

    Hello Gurus,
    How to process sales orders released before WMS enable flag is turned on in the  new WMS enviournment in Oracle 11.5.10 ?

    Helios,
    Thanks for the document.
    I m looking for how to perform Pick confirm transactions for already printed Pick slips before WMS enabled flag is turn on for the org.
    One option is to close all the deliveries  but if there is no on hand at that point the they will remain option.
    Other option is to Back order those deliveries and re release them post wms enable flag is turned on... The only issue i see here is that if there are more new orders for one of the items  and the orders are released then which orders will get allocated/reserved if there is limited on hand quantity to statisfy the SO need.
    Let me know if you can think off some alternative solution.
    Apprecite help !!
    Thanks,
    Sam

  • How to get sales order number before saving in VA01 by using parameter

    Hi,
    Please let me know how to get sales order number in transaction VA01 before saving it by using parameter in SU3.
    I tried to set parameter in SU3 "AUN", but it is not working as required, means sales order number is not appearing before saving.
    can you please suggest how to do it?
    Thanks & Regards.
    Rahul Verulkar

    Hi,
    In case of Support project, we get the high severity issues from users and needs to be closed withn 2 hours... so what we do we get the requirement from user and checking the same in production from our id, but we can not save the sales order as we are not authorized to do the same, so in such cases it is required to get the sales order number before saving... where we can guide the users.... but actuallly it is not getting saved in the table until and unless u save it manually. It works like a material master... when u create material master, the material number appears in advance in material number field "MATNR"
    If it is possible can you please suggest step by step to work on parameter in SU3 for sales order number before saving.
    Thanks & regards,
    Rahul Verulkar

  • Need to modify Sales order Item additional tab B

    Hello all,
    I need to modify Sales order item additional tab B ...by removing the exisitng fields and should add some new fields ....does it have any impact on this screen could be used in any of the other transaction .......i  just wanted if we remove the fields and some new details will have some impact
    Regards,
    KK

    Additional data B is used to add your own fields also known as custom fields in sales order.
    Custom fields can be added to tables VBAK & VBAP (depending on header or item). Similarly you can remove fields if you don't require it anymore.
    In short, your requirement can be met but you have to take help of ABAP consultant since it requires maintenance of user exits and modification of screens.

  • Fetch Sales order number and PO number from ship to party and sold to party

    HI,
    I need to get Sales order number and PO number
    from ship to party and sold to party.
    I have only ______sold to party and ship to party and req del date_______ in selection screen as mandatory
    Please let me know
    Sreekanth

    Hi,
    You can do this:-
    SELECT VBELN FROM LIKP
    INTO TABLE T_DELIVERIES
    WHERE KUNNR = SHIP TO PARTY
    AND     KUNAG = SOLD TO PARTY
    AND LFDAT      = DEL DATE.
    You will get a table containing the list of deliveries.
    Use VBFA to get the sales orders from deliveries.
    SELECT VBELV FROM VBFA
    INTO TABLE T_SALESORDERS
    WHERE VBTYP_N = 'J'
    AND     VBELN  = T_DELIVERIES-VBELN.
    T_SALESORDERS WILL give you list of sales orders.
    From Sales Orders you can get Purchase orders through EKKN Table.
    Using EKKN pass T_SALESORDERS-VBELN and get corresponding EBELN.
    Regards,
    SUbhashini

  • Need code for sales order create report using bapi's

    need code for sales order create report using bapi's

    Hi,
    Go through below link
    http://www.saptechies.com/bapi_salesorder_createfromdat2/
    <b>Reward points if it helps,</b>
    Satish

  • Fetch Sales order & item from Prod ord to TR Header text when staging mat

    Hello
    We have a need to see Sales order and item number in TR header text when selecting TR to be processed in transaction LB10.
    TR´s are created via transaction LP10. Is there any solution to get Sales order number from Production order to be automatically pasted to TR header text field when generating TR?
    SO & item is always available in Production order General data.
    Thanks for answers!
    -A
    Edited by: A_R_FIN on Feb 5, 2010 8:34 AM

    Hi,
    I hope the below link will help you.
    Help needed with BAPI_SALESORDER_CREATEFROMDAT1 parameters
    Thanks,
    Khushboo.

  • User Exit to get Sales Order Number during creation

    Hi,
    I am looking for for an User Exit which provides Sales Order Number, during creation of Sales Order using transaction VA01.
    Please provide the Structure/Field Name.
    I tried USER_EXIT_SAVE_DOCUMENT. But, it seems it doesn't provide.Kindly help.

    Hi:
    Program : MV45AFZZ
    search for USEREXIT_NUMBER_RANGE.
    BR,
    Manthana

  • Need help in sales order creation

    How to create a sales order ,invoice,credit memo
    step by step.

    Hi,
    SD Flow Cycle:
    INQUIRY ( VA11)
    |
    QUOTATION (VA21)
    |
    PURCHASE ORDER (ME21)
    |
    ORDER CONFIRMATION (VA01)
    |
    PICKING LIST – (VL36)
    |
    PACKING LIST - (VL02, VL01)
    |
    SHIPPING – (VT01)
    |
    INVOICE – (VF21, VF01)
    |
    AR
    SALES ORDER PROCESSING
    Creating Sales Order - VA01
    Maintaining a Sales Order - VA02
    Displaying a Sales Order - VA03
    Releasing an Order or Delivery from Credit Hold: Non-Flooring - VKM1
    Display List of RMAs by Customer - VA05
    Confirm RMA Goods Receipt - VL02
    Generate list of open return orders for deletion - VA05
    Display Customer returns eligibility - MCSI
    Removing a Billing Block (Approving Credit/Debit Requests) - V.23
    SHIPPING
    Creating a Delivery - VL01N
    Displaying a Delivery - VL03N
    Changing a Delivery - VL02N
    Shipment Inquiry / Display - VT03
    Adjusting Transfer Order - Confirmation Quantity - LT12
    Collectively Confirm Transfer Order - LT25
    Batch Shipment Confirmation - VL19
    PGI Reversal Cancellation - VL09
    Creating Service Provider/Carrier Master Data - XK01
    Maintaining Serive Provider/Carrier Master Data - XK02
    Displaying Service Provider/Carrier Master Data - XK03
    Maintaining Product Master/Serial # Profile/Unit of Measure/Shipping Unit - MM02
    IDoc Inquiry - WE02 / WE05
    BILLING
    Invoicing a Customer Shipment - VF01
    Reprinting an Invoice - VF31
    Releasing a Sales Order for Billing - V.23
    Creating an Invoice by Using the Billing Due List - VF04
    Checking Open Billing Documents - VF05
    Create Credit/Debit Memo - FB01
    Please Reward If Really Helpful,
    Thanks and Regards,
    Sateesh.Kandula

  • Need of blocking sales orders?

    Hai all,
            why do we block sales orders, and where can we find these information(tables), indicating that a particular sales order has been blocked, can anybody give me complete scenario of blocking sales orders.
                                             Thank you in advance
                                                Srinivas

    Hi Srinivas,
    Blocking reasons
    1.     The business can have an absolute control over the sales cycle by setting blocks at different levels like on specific customers, sales documents, delivery and billing. You can define different kinds of block, according to the needs of your organization. You can, for example, automatically block all free of charge deliveries and credit memo requests for a certain customer, pending manual approval before further processing can take place.
    2.     Transaction code: VD05 u2013 logistics u2013 sales and distribution u2013 master data u2013 business partner u2013 customer u2013 block (vd05)
    3.     Configuration u2013 IMG u2013 sales and distribution u2013 sales u2013 sales documents u2013 define and assign reasons for blocking (OVAL).
    4.     In the creation of sales orders/sales documents, you can block the document type from being processed or used by a specific customer either in specific or in all sales areas for various reasons such as poor credit history.
    5.     Define order blocking reasons, assign them to sales documents, and then assign the order blocking reasons to customers in easy access.
    6.     In this processu2026..the first step is to define the blocking reasons such as poor credit history, credit limit exceeded or any other reason and give them an order block number.
    7.     The next step is to assign this order block number to the required sales document types where the configuration part of the blocking sales documents ends.
    8.     The rest of the process is left to the end user where he/she can use the transaction code VD05 and block a specific customer from using specific or all sales documents either limiting to a specific sales area or for all the sales areas.
    9.     To set a universal block for a particular sales document for all customers in the sales areas - go to VOV8.
    Regards
    Sai

  • Restrict Sales Order for Delivery Creation

    Dear Experts,
    We are supplying material to our customer (He is our subsidiary company). All the material codes within the two companies (i.e., our customer and us) are same. My customer is creating Purchase Order on us and through BDC program auto sales order is getting generated at our company. Pricing conditions are also copied from the PO to SO. We are not maintaining any pricing conditions for this customer.
    My customer wants to supply the materials only against the sales orders created during the month only. Example: If auto sales orders are created during August'09 till 31st Aug, delivery should be created before 31st August only. From 1st Sept'09 onwards delivery should not create against the open sales orders created till 31st aug'09. When we try to do the delivery, system should not allow for creation of delivery from 1st Sept'09 onwards.
    Can u please guide me whether we have any standard process for this to control the delivery creation? or we need to go for any development?
    Your early reply in this regard is highly appreciated.
    Thanks
    Murthy SD

    hi you can use scheduling aggrement concept for the same.
    Alternatively , you can write logic in the exits .
    program:
    MV50AFZ1
    code:
    loop at xlips.
              select single vbegdat venddat from VEDA into (VEDA-VBEGDAT,VEDA-VENDDAT)
                                                   where vbeln = xlips-vgbel
                                                     and vposn = xlips-vgpos.
                 if sy-subrc = 0.
                 if VEDA-VBEGDAT is initial and VEDA-VENDDAT is initial.
                 else.
                  if sy-datum ge VEDA-VBEGDAT and sy-datum le  VEDA-VENDDAT.
                  else.
                  MESSAGE  'sales order referred is outside validity range' type 'E'.
                  endif.
                 endif.
                 endif.
              endloop.
    the code is to be writeen in exit of delivery i.e whenever delivery is being created wr to order it checks the dates in order
    Rwd points if helpful
    regards
    chandresh

  • Third Party Sale order Billing Before Before MM Billing

    Hi,
    In our company case . we are not dependent for MM billing . Our Sale order billing is independent and it's on the daily bases.
    i have done following changes
    item category to TAS
    VoV7 'TAS'  Billing Relevance to 'B' Relevant for order-related billing - status according to order quantity
    VTFA (Order,to,bill,copying,control)
    But when i am doing SD Billing VF01
    error messages:
    Message no. VF17  Document 15000962 does not contain any items with open quantities
    Message no VF147 1015000962 000010 No open billing quantity has been determined
    plz resolve this problem
    regard
    khurram

    we  don't want to Depend upon MM. Because, we have to update our customers ledger with creation of Sale order and PR.
    What does it mean by don't want to depend upon MM?
    How the vendor delivery the goods if you create only PR ? with ref to PR vendor delivery the goods?
    PR is not a legal document unlike PO which is legal document, in standard with ref to PO , MIGO MIRO are created.
    Also you mentioned
    note: Vender send us hard copy of desptaches after one week. so with that we invocie our PO.
    After one week how does the PO comes into picture will you create PO with ref to PR after dispatch notification comes to you  after one week by vendor then you do MIGO and MRIO?
    Please note : In  3rd party sales we have two kinds of process.
    1. 3rd party sales with out shipping notification( this is SAP standard,  settings already available no need any changes)
    Here we do the customer invoice after vendor payment only...
    2. 3rd party sales with shipping notification(here we need to do small changes as i mentioned above)
    in the process you need not to wait till the vendor payment(MIRO), as per your requirement you can bill the customer before vendor payment(MIRO)...But here MIGO is mandatory.However it is dummy MIGO( no inventory updates).
    Actualy , we  don't want to Depend upon MM. Because, we have to update our customers ledger with creation of Sale order and PR.
    Beacuse we want to update our customer ledger on daily bases.
    Let us assume you are creating customer invoice with ref to sales order and in your case you mentioned you won't do MIGO or MIRO before customer invoice creation so in this case for how much qty you bill the customer on daily basis?
    If the vendor delivery goods lesser qty than order qty then how do you manage with out doing MIGO or MIRO?
    Please answer the above questions?
    You may able to create customer invoice with ref to order with out MIGO or MIRO by changing some copy control but you can't bill the exact qty to the customer if you don't do MIGO or MIGO.
    So i suggest you to go with 3rd party sales with shipping notifications .
    Here sale order( VA01)
    PO (with ref PR).
    MIGO( dummy MIGO)
    VF01( customer invoice)
    MIRO( vendor payment)
    thanks,
    Srinu.

Maybe you are looking for

  • Error while processing a chain

    Hello Experts, I have created a chain which executes a data loading from an other system. while processing the chain stops at the step of loading data for the other system giving the following error: Job started Step 001 started (program RSPROCESS, v

  • Power iPad from Mac Book Air USB or iPhone charger?

    I don't have my iPad charging adapter, but I do have the cord. Should I plug into the USB port on my laptop or the adapter that I got with my iPhone?  I realize the iPhone adapter block only puts out about 2W.   Is there more or less power if I plug

  • How much space does all of my "checked" songs take up?

    I now have more music than my iPod can hold. I had to uncheck the songs that I don't want transferred to the iPod. At the bottom of the screen in iTunes, it shows how many songs I have and how much disk space they take up, however, those values don't

  • HT4980 Adding Tamil Font to an iBook thats created with iBooks Author ?

    I am trying to add Tamil Font ( Used for Indian Regional Language - Tamil ). I Have over 1500 titles on print and would like to digitalize them for iPads. When I opened iBooks Author, I don't see any Tamil Fonts available. How do I get around this or

  • Rotating video 90 degrees

    my wife shot a short 640x480 mpg clip of my son on a digital still camera but was holding it vertically. I used the perspective rotate filter to rotate it correctly but it now is stretched to fit the 640x480 timeline. what I want is the image rotated