How to get schedule line date copied to "First date" in sales order

Dear forum
I am creating a sales order as normal and put in a Requested Delivery Date (KETDAT) for the order.
This requested delivery date is then copied to the "First date" (ETDAT).
Now, the ATP is checked for each line item in the order and a Schedule line date / material availability date is calculated for each line item.
My question is: Is there any way to have the "First date" field of the line item in the sales order populated by the first material availability date (calculated by ATP), instead of copying the Requested  Delivery Date? Any user exit? Any config?
It would mean that every time I rerun ATP check in the sales order line item, the "First date" field would change if the material availability date change. If there is multiple material availability (multiple schedule lines) dates per line item, then the earliest date would be copied to the "First date" field.
Is there such functionality? Or possibility to config/program?
/Ola

Kannan
OK. Unfortunately reservations cannot be created at the serial number level. So the unsupported way of doing this is updating the mtl_serial_numbers tables. I hope you would know (by some means) which serial numbers you want to allocate to a specific sales orders. If you know, update group_mark_id column in mtl_serial_numbers table with your order_line_Id, This will avoid any one from picking the serial numbers (they will not come up in the LOV or will not be auto allocated).
But you have to make sure to take it off when you actually want to pick this order line and allocate this serial number. So just before you pick release/ confirm this order line you need to update column back to null so that you can allocate that serial number.
Thanks
Nagamohan

Similar Messages

  • How to Get Each line item Create and Approval dates for a SHOPPING CART in SAP SRM (ABAP Programming)

    Hi All,
    I have to Get Each line item Create and Approval dates for a SHOPPING CART in SAP SRM. Either a table, or any Function module, Method, please let me know ASAP. Same i can use in my Program.
    Thank you Very much.
    Regards,
    Ramesh J.

    Hi,
    Refer the below wiki link it may help you.
    Product catlog configuration for ECC - CRM - SCN Wiki

  • Retaining the old schedule lines after the ATP check in the sales order....

    Hi Experts,
    I would like to retain the old schedule lines after the ATP/GATP check in the sales order for certain conditions.
    I don't want to change XVBEP,IVBEP,VBEP contents in the user-exit..
    Is there any standard sub-routine or function module to reatain old schedule lines in the sales order so that the schedule lines will not update with the new values after the ATP check ?
    Thanks
    Rayudu

    In Include LV03VFMM, you have:
    * Userexit availability
          PERFORM USEREXIT_AVAILABILITY_IN USING DA_ATPPR.
    There may be an option to implement some logic in here. However, I tried changing the value of MVERF_POS-EINTEIL[1]-VFPKZ to initial. This will ensure that when FM AVAILABILITY_CHECK_CONTROLLER is called that the following IF statement is untrue:
    CHECK NOT P_ATPCSX[] IS INITIAL.
    as P_ATPCSX[]                     Table[0x648].....
    However, this will just mean that the 2nd confirmed schedule line (assuming we have > 1 schedule lines) will have a confirmed quantity to zero.
    EXIT_SAPLATPC_001 could also be used. However, when I removed the "X" from CHKFLG, I get the same result; the 2nd schedule line will revert to zero.
    They were the only tests I tried; I cannot think of any other ways around this....

  • How to get schedule data in method process_item

    hi, in ME21N, when creating a new PO I need the value of "Statics-relevant delivery date", in "Delivery Schedule" detail (SFLDT). I'm trying to get it like this (in method process_item):
    DATA: wa_meposchedule TYPE purchase_order_schedules,
              wa_sched type meposchedule.
    wa_meposchedule = im_item->get_schedules( ).
    at this point i don't know how to continue....
    I've also implemented method PROCESS_SCHEDULE like this:
    DATA: lw_schedule TYPE REF TO if_purchase_order_schedule_mm,
               l_schedule TYPE meposchedule.
    mmpur_dynamic_cast lw_schedule im_schedule.
    l_schedule = lw_schedule->get_data( ).
    EXPORT l_schedule FROM l_schedule TO MEMORY ID 'L_SCHEDULE'.
    In method PROCESS_ITEM, i tried this:
    DATA: l_schedule TYPE meposchedule,
    IMPORT l_schedule TO l_schedule FROM MEMORY ID 'L_SCHEDULE'.
    But in me21n it didn't work...
    thanks in advance !

    Hi Maria,
    I'm facing the same road block. Did you figure out how to get schedule line data into Process_Item?
    Thanks,
    K

  • Schedule line tab combined with Aditionnal Data B item tab

    Dear people,
    Do you know if there is a user exit (or another thing) that works before the schedule line tab for an item of a sales order is displayed.
    Specifically the functionnality we are developping is:
    We are creating SCH line in the standard tab
    Then in Aditionnal Data B (item) the schedule lines entered are displayed
    User fill aditionnal data related tio the SCH line in Aditionnal data B
    We need that the data previously entered in Aditionnal data B overwrites sch lines values and display the shedule line grayed (<u>on line will be great)</u>Thank you for any help you could provide.
    Best Regards
    Maximiliano

    Check include MV45AFZZ. This a common user exit for VA01/02/03.
    As far as I know, you can't gray out the Sch Lines in the standard tab, unless of course you go for a screen modification, but probably can update with the data from Add Data B Screen.

  • No Schedule Lines for Delivery upto selected date

    Hi,
    I have a scenario for Repairs order. Following are the steps of my scenario:
    1. Create a Repair Order.
    2. Create return delivery to recieve the faulty item.
    3. Create Outbound Delivery to send a loaner item to customer (This item would be returned once the returned item is repaired and sent to customer)
    4. Send the item after repairing.
    5. Receive the loaner item.
    When I am trying to create outbound delivery for Loaner item, i am getting an error "No Schedule Lines for Delivery upto selected date".
    I have checked and verified the schedule line date.
    I have checked for Confirmed Quantity.
    Below are the screenshots. Please let me know how can this issue be resolved.

    Hi,
    With reference of your screens,I can see there is no qty in the field loner hence you are getting issue.
    1.May I know ,why you have checked indicator -Repair?
    because ,you are not going to repair the goods.You are just sending loner items to customer.In this case what is the use of to indicate repair ?.
    Thanks,
    Naren

  • METHOD to get schedule line item in ME_PROCESS_PO_CUST

    Hi all,
    i am using BADI: ME_PROCESS_PO_CUST. i am using method PROCESS_POST.
    i am getting header data & item data using some methods.
    which method i should use to get schedule line data
    how to find what are the methods are there to get all the PO operations like to get heder data, to get item text, to get condition item. plz give me all methods.
    Thanks
    pabi

    Hi  Peter,
    Thanks body. Ur reply is a great help.
    Is there any method to change the item data?
    once changed, need to commit also.
    my requirement
    i will change the schedule line quantity of PO item. Then i need to compare this new schedule qty with
    the old scheduled qty in this BADI. if qty is not same, then i need to put a item text in that item, saying that qty
    is changed.plz give me the detail coading for this.
    shall i use write_text FM to put item text or is there any method??
    is there any method for commit the changes?
    Thanks
    pabi

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • How to get 2nd line in smartforms using template

    how to get 2nd line in smartforms main window using template. i have also defined loop .

    if possible can you try with the TABLES..
    Put one TABLE in your MAIN window
    create table lines as per your requirment...consider all lines like 6 for header, 1 for main, 1 for total
    Now, you will find three section under the tables: header, main, footer...
    in header section, create a table line, assign one of the proper lines from the line types.. repeat for your all lines.
    in main section, you can access your data form the loop.
    the footer secion will be called, just after the main will be finished.
    Regards,
    Naimesh Patel

  • How to get trending line in the graph

    Hi,
    I am using 10g. I have requirement as the following :
    Name Date Metric
    I can have bar graph against Date and Metric. My requirement is to have a trending line, so I calculated slope and regression line y=mx+c but I am not getting the right trend line. I can use regr_slope function to create a view in rpd but it doesnt support date values. Can you guys let me know how to get trending line like same in Excel.
    Thanks

    Hi,
    It's better to do at UI level.
    Can you please check the below link:
    http://kpipartners.blogspot.in/2009/04/linear-regression.html
    Hope this helps.
    Thanks,
    Pramod.

  • How to get file line count.

    Hey guys,
    How to get file line count very fast? I am using BufferedReader to readLine() and count. But when dealing with big file, say several GB size, this process will be very time consuming.
    Is there any other methods?
    Thanks in advace!

    What I'd do is you create an infofetcher, register a listener, implement gotMore() and have that scan for '\n'
    Some might suggest getting rid of the listener/sender pattern or use multiple threads to make ii faster. This might help a little, but only if your I/O is super-duper speedy.
    you are welcome to use and modify this code, but please don't change the package or take credit for it as your own work.
    InfoFetcher.java
    ============
    package tjacobs.io;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.ArrayList;
    import java.util.Iterator;
    * InfoFetcher is a generic way to read data from an input stream (file, socket, etc)
    * InfoFetcher can be set up with a thread so that it reads from an input stream
    * and report to registered listeners as it gets
    * more information. This vastly simplifies the process of always re-writing
    * the same code for reading from an input stream.
    * <p>
    * I use this all over
         public class InfoFetcher implements Runnable {
              public byte[] buf;
              public InputStream in;
              public int waitTime;
              private ArrayList mListeners;
              public int got = 0;
              protected boolean mClearBufferFlag = false;
              public InfoFetcher(InputStream in, byte[] buf, int waitTime) {
                   this.buf = buf;
                   this.in = in;
                   this.waitTime = waitTime;
              public void addInputStreamListener(InputStreamListener fll) {
                   if (mListeners == null) {
                        mListeners = new ArrayList(2);
                   if (!mListeners.contains(fll)) {
                        mListeners.add(fll);
              public void removeInputStreamListener(InputStreamListener fll) {
                   if (mListeners == null) {
                        return;
                   mListeners.remove(fll);
              public byte[] readCompletely() {
                   run();
                   return buf;
              public int got() {
                   return got;
              public void run() {
                   if (waitTime > 0) {
                        TimeOut to = new TimeOut(waitTime);
                        Thread t = new Thread(to);
                        t.start();
                   int b;
                   try {
                        while ((b = in.read()) != -1) {
                             if (got + 1 > buf.length) {
                                  buf = IOUtils.expandBuf(buf);
                             int start = got;
                             buf[got++] = (byte) b;
                             int available = in.available();
                             //System.out.println("got = " + got + " available = " + available + " buf.length = " + buf.length);
                             if (got + available > buf.length) {
                                  buf = IOUtils.expandBuf(buf, Math.max(got + available, buf.length * 2));
                             got += in.read(buf, got, available);
                             signalListeners(false, start);
                             if (mClearBufferFlag) {
                                  mClearBufferFlag = false;
                                  got = 0;
                   } catch (IOException iox) {
                        throw new PartialReadException(got, buf.length);
                   } finally {
                        buf = IOUtils.trimBuf(buf, got);
                        signalListeners(true);
              private void setClearBufferFlag(boolean status) {
                   mClearBufferFlag = status;
              public void clearBuffer() {
                   setClearBufferFlag(true);
              private void signalListeners(boolean over) {
                   signalListeners (over, 0);
              private void signalListeners(boolean over, int start) {
                   if (mListeners != null) {
                        Iterator i = mListeners.iterator();
                        InputStreamEvent ev = new InputStreamEvent(got, buf, start);
                        //System.out.println("got: " + got + " buf = " + new String(buf, 0, 20));
                        while (i.hasNext()) {
                             InputStreamListener fll = (InputStreamListener) i.next();
                             if (over) {
                                  fll.gotAll(ev);
                             } else {
                                  fll.gotMore(ev);
    InputStreamListener.java
    ====================
    package tjacobs.io;
         public interface InputStreamListener {
               * the new data retrieved is in the byte array from <i>start</i> to <i>totalBytesRetrieved</i> in the buffer
              public void gotMore(InputStreamEvent ev);
               * reading has finished. The entire contents read from the stream in
               * in the buffer
              public void gotAll(InputStreamEvent ev);
    InputStreamEvent
    ===============
    package tjacobs.io;
    * The InputStreamEvent fired from the InfoFetcher
    * the new data retrieved is from <i>start</i> to <i>totalBytesRetrieved</i> in the buffer
    public class InputStreamEvent {
         public int totalBytesRetrieved;
         public int start;
         public byte buffer[];
         public InputStreamEvent (int bytes, byte buf[]) {
              this(bytes, buf, 0);
         public InputStreamEvent (int bytes, byte buf[], int start) {
              totalBytesRetrieved = bytes;
              buffer = buf;
              this.start = start;
         public int getBytesRetrieved() {
              return totalBytesRetrieved;
         public int getStart() {
              return start;
         public byte[] getBytes() {
              return buffer;
    ParialReadException
    =================
    package tjacobs.io;
    public class PartialReadException extends RuntimeException {
         public PartialReadException(int got, int total) {
              super("Got " + got + " of " + total + " bytes");
    }

  • How to get the line in the template (smartform) with out using under score

    Hi,
         How to get the line in the template (smartform) with out using under score,
         and how to print the box (line the check box - small squre box (which is used ot mark the tick by the user in front of the item).
         Please provide the valueble answer as early as possible.
    Thanks,
    Ravi

    Hi Ravi,
    Line -
    Use a SMATSTYLE for this purpose.in the smartstyle create a paragraph or character with underline atribute.Then call the smartstyle in the text.
    Search SDN with Key <b>UNDERSCORE</b>.. will get few more posts on the same.
    For Checkbox - refer link
    Re: Quick Question on Smartforms
    Re: putting tick mark into check box in smartform
    Reward points if this Helps.
    Manish
    Message was edited by:
            Manish Kumar

  • How do I schedule regular daily/weekly/monthly/quarterly data uploads?

    Hello gurus!
    How do I schedule regular daily/weekly/monthly/quarterly data uploads?  How can I make it "automatic"?
    Thank you very much!
    Philips

    Hi,
    There are lots of documents available on how to design a process chain. It is basically your requirement what is needed.
    for eg.. You have  a daily masterd ata loaded into BW from R/3 and then the transaction data. So we create a chain where in we create anothe meta chain (for Master data) and drag the option of Load IP ( give variant as ur IP name you have created for that Particluar master data) , same for texts and hierarchy, for hierarchy use save option after the hierarchy process. and then use a attribute change run proces step to activate the master data. and then create another meta chain that loads transactiond data. Normally you have a IP that loads data into ODS here from source system, so Use IP process for that , next a process step to activate the ODS data and then use another IP to send the data to a cube. If you have aggregates built on that cube, use roll up process to roll up the data.
    If you can gimme your mail ID , I can send some docu's on process chains
    Regards
    Srini

  • Qry:How to get different price for each price list (variable area) in order

    1-How to get different price for each price list (variable area) in order for sale. for the opportunity to display and select multiple prices.
    2- I add a location store from a table in line item and I want to see this area in order,.
    I 'm created 2 field location(item line and order), 1 table location
    I tried this for exemple : select $ [userfieldlocation.OITW]

    Thanks Suda for your answer,
    the Formatted Search for prices is OK, but for the Item locations in warehouse this is not so simple,     
    I must have several (at least 2) locations for the item in the Warehouse and a track of this location and search possibilities.
    read carefully and imagine how (Management warehouse locations)
    I added a user table '@Location' who linked to a user field 'U_Location in Item master data --> lnventory data  line and an ather user field 'U_Location' in sales order
    I met the value of location in the table (list of locations for any warehouse), I select the location of each item while receiving merchandise in the user field of inventory data line (Item M data) and this value appears in the sales order 'U_Location' user field ( only the location value in the default warehouse for this Item)
    or
    create an user field 'location' in Good receipt PO to fill it while receiving merchandise that appears in the sales order to give possibility to find/select the location of the item at this order and in Item master data
    I think we will use all these tables
    @LOCATION
    PDN1
    OITM
    OITW
    OWHS
    RDR1
    Juste a another question : where you found this and What is: ' 38.1.0 '
    Is it in document (System information):Item=38 Pane=1 ??
    Thanks,
    Ouchen

  • How to get Value of a item of first record when current record is second

    How to get Value of a item of first record when current record is second in Form6i ?
    get_item_instance_property dose not allow to get value.

    Gerd,
    You're right, there are several other triggers that must be coded, but I was responding to Steve's statement about Inserting or deleting records from the multi-record block. For the record, I use the following to manage a Record Group:
    * When-New-Block-Instance - Initialize the RG
    * block Post-Query - populate the RG
    * When-Create-Record - add new record to RG
    * When-Remove-Record - remove record from RG
    * block When-New-Item-Instance - capture previous value of the item or row
    * When-Validate-Item - Item specific Insert, Update, Delete of values in the RG
    There are a few other places as well, but these are the minimum. It might seem like a lot of code, but then again, I don't use this solution for every multi-line block. Like all tools, you use the right tool for the job. :-)
    Craig...

Maybe you are looking for