MULTIPLE LEAD TIME FUNCTIONALITY

Hi Guys,
can anyone explain about "Multiple lead time functionality in SAP".
whether its related to any particular modules.pls provide any inputs or send some link were i can get this requirements,

hi
please refer to this document
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0901cba-f49e-2910-748c-d7ce4c0c4c1c
you may find it helpful
regards
Aakash Banga

Similar Messages

  • Function module to calculate Estimate delivery lead time

    Hi Experts,
    It's ugrent.
    In APO System,
    I need a function module to calculate the estimated delivery lead time, The estimate delivery lead time is the time in weeks between the current date and the estimated delivery date. This is rounded up to the next integer value.
    Thanks in advance,
    Regards
    Adil

    Hi Vishal,
    I've declared two variables
    DATA: LDATE(20),
               LTIME(20).
    CALL FUNCTION 'GET_SYSTEM_TIME_REMOTE'
    IMPORTING
      K_DATE        =
      K_TIME         =
       L_DATE         = LDATE
       L_TIME          = LTIME
    AND IN THE FORM HEADER I'VE GIVEN IT AS,
    WA_HEADER-TYP  = 'S'.
    WA_HEADER-INFO = ': Date'.
    WA_HEADER-KEY  = LDATE.
    APPEND WA_HEADER TO IT_HEADER.
    WA_HEADER-TYP  = 'S'.
    WA_HEADER-INFO = ': Time'.
    WA_HEADER-KEY  = LTIME.
    APPEND WA_HEADER TO IT_HEADER.
    STILL IM NOT GETTING WAT ELSE IS REQUIRED ?

  • Wired problem with LEAD Analytical function

    I am having wired problem with LEAD Analytical function. It works fine as a standalone query
    but when used in sub-query it is not behaving as expected (explained below). I unable to troubleshoot
    the issue. Please help me.
    Detail explanation and the data follows:
    ========================= Table & Test Data =======================================
    CREATE TABLE "TESTSCHED"
    (     "SEQ" NUMBER NOT NULL ENABLE,
         "EMPL_ID" NUMBER NOT NULL ENABLE,
         "SCHED_DT" DATE NOT NULL ENABLE,
         "START_DT_TM" DATE NOT NULL ENABLE,
         "END_DT_TM" DATE NOT NULL ENABLE,
         "REC_STAT" CHAR(1) NOT NULL ENABLE,
         CONSTRAINT "TESTSCHED_PK" PRIMARY KEY ("SEQ")     
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (1, 39609, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 07:00:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 11:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (2, 39609, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 11:00:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 11:30:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (3, 39609, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 07:00:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 11:30:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (4, 39609, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 07:15:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 11:30:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (5, 39609, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 07:15:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 11:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (6, 39609, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 07:00:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 11:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (7, 39609, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 07:00:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 11:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'U');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (8, 39609, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 07:00:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 11:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (9, 118327, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 17:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 22:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (10, 120033, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 19:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('04-03-2008', 'dd-mm-yyyy'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (11, 120033, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 19:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('04-03-2008', 'dd-mm-yyyy'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (12, 120033, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 17:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 19:30:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (13, 120033, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 17:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 19:30:00', 'dd-mm-yyyy hh24:mi:ss'), 'U');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (14, 126690, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 18:45:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 21:15:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (15, 126690, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 12:45:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 16:45:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (16, 126690, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 12:45:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 21:15:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (17, 126690, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 16:45:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 18:45:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (18, 126690, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 16:45:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 18:45:00', 'dd-mm-yyyy hh24:mi:ss'), 'U');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (19, 169241, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 05:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 14:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (20, 169241, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 05:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 14:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (21, 169241, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 17:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 22:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (22, 169241, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 17:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 22:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'U');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (23, 200716, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 17:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 22:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (24, 200716, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 17:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 22:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (25, 200716, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 17:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 22:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'U');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (26, 252836, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 19:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 22:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (27, 252836, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 17:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 22:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (28, 252836, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 17:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 19:30:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (29, 252836, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 17:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 19:30:00', 'dd-mm-yyyy hh24:mi:ss'), 'U');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (30, 260774, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 07:00:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 10:30:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (31, 260774, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 10:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 14:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (32, 260774, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 05:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 07:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (33, 260774, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 07:15:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 10:35:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (34, 260774, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 07:15:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 10:35:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (35, 260774, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 05:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 14:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (36, 260774, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 07:00:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 10:30:00', 'dd-mm-yyyy hh24:mi:ss'), 'U');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (37, 289039, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 16:30:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 22:15:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (38, 289039, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 13:45:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 22:15:00', 'dd-mm-yyyy hh24:mi:ss'), 'I');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (39, 289039, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 13:45:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 16:30:00', 'dd-mm-yyyy hh24:mi:ss'), 'A');
    insert into testsched (SEQ, EMPL_ID, SCHED_DT, START_DT_TM, END_DT_TM, REC_STAT)
    values (40, 289039, to_date('03-03-2008', 'dd-mm-yyyy'), to_date('03-03-2008 13:45:00', 'dd-mm-yyyy hh24:mi:ss'), to_date('03-03-2008 16:30:00', 'dd-mm-yyyy hh24:mi:ss'), 'U');
    ========================= Problem Statement =======================================
    Problem Statement:
    Select all employees whose active schedule (rec_stat = 'A') start date & time falls
    between "16:30" and "17:45".
    An employee may be having multiple schedules on a day. It may be continuous or may be
    having breaks in between the schedules.
    If an employee schedule is continuous then the minimum schedule start date & time is
    considered as the start date & time of the work.
    If an employee is having breaks in the schedule, then each schedule start date & time is
    considered as start date & time.
    e.g:-1
    1     39609     2008/03/03     2008/03/03 07:00:00     2008/03/03 11:00:00     A
    2     39609     2008/03/03     2008/03/03 11:00:00     2008/03/03 11:30:00     A
    In above case, the employee schedule is continuous. The start date & time is 2008/03/03 07:00:00
    e.g:-2
    19     169241     2008/03/03     2008/03/03 05:30:00     2008/03/03 14:00:00     A
    21     169241     2008/03/03     2008/03/03 17:30:00     2008/03/03 22:00:00     A
    In above case, the employee is having a break in between. Then both records
    start date & time (i.e. 2008/03/03 05:30:00, 2008/03/03 05:30:00 ) is considered
    as start date & time.
    e.g:-3
    30     260774     2008/03/03     2008/03/03 07:00:00     2008/03/03 10:30:00     A
    31     260774     2008/03/03     2008/03/03 10:30:00     2008/03/03 14:00:00     A
    32     260774     2008/03/03     2008/03/03 05:30:00     2008/03/03 07:00:00     A
    In above case, the employee schedule is continuous. The start date & time is 2008/03/03 05:30:00
    ========================= Query to test Individual Employees =======================================
    Query-1: Test query to see the CASE and LEAD function works fine. If "CAL = 0" means that all
    schedules are continuous and the employee needs to ignored.
    SELECT fw.*,
    CASE WHEN LEAD(FW.END_DT_TM, 1)
    OVER(ORDER BY FW.START_DT_TM DESC ) IS NULL AND
    fw.start_dt_tm BETWEEN
    TO_DATE('03/03/2008 16:30:00','mm/dd/yyyy hh24:mi:ss') AND
    TO_DATE('03/03/2008 17:45:00','mm/dd/yyyy hh24:mi:ss')
    THEN Fw.seq
    WHEN LEAD(FW.END_DT_TM, 1)
    OVER(ORDER BY FW.START_DT_TM DESC) != FW.START_DT_TM AND
    fw.start_dt_tm BETWEEN
    TO_DATE('03/03/2008 16:30:00','mm/dd/yyyy hh24:mi:ss') AND
    TO_DATE('03/03/2008 17:45:00','mm/dd/yyyy hh24:mi:ss')
    THEN Fw.seq
    ELSE 0
    END AS "CAL"
    FROM TESTSCHED fw
    WHERE fw.empl_id = 289039
    and fw.rec_stat = 'A'
    Query Results
    SEQ     EMPL_ID     SCHED_DT     START_DT_TM          END_DT_TM          REC_STAT     CAL
    37     289039     2008/03/03     2008/03/03 16:30:00     2008/03/03 22:15:00     A          0
    39     289039     2008/03/03     2008/03/03 13:45:00     2008/03/03 16:30:00     A          0
    Since all "CAL" column is zero, the employee should be ignored.
    ========================= Query to be used in the application =======================================
    Query-2: Actual Query executed in the application which is not working. Query-1 is used as subquery
    here.
    SELECT
    F1.SEQ,
    F1.EMPL_ID,
    F1.SCHED_DT,
    F1.START_DT_TM,
    F1.END_DT_TM,
    F1.REC_STAT
    FROM TESTSCHED F1
    WHERE F1.SEQ IN
    (SELECT CASE
    WHEN LEAD(FW.END_DT_TM, 1)
    OVER(ORDER BY FW.START_DT_TM DESC) IS NULL AND
    FW.START_DT_TM BETWEEN
    TO_DATE('03/03/2008 16:30:00', 'mm/dd/yyyy hh24:mi:ss') AND
    TO_DATE('03/03/2008 17:45:00', 'mm/dd/yyyy hh24:mi:ss') THEN FW.SEQ
    WHEN LEAD(FW.END_DT_TM, 1)
    OVER(ORDER BY FW.START_DT_TM DESC) != FW.START_DT_TM AND
    FW.START_DT_TM BETWEEN
    TO_DATE('03/03/2008 16:30:00', 'mm/dd/yyyy hh24:mi:ss') AND
    TO_DATE('03/03/2008 17:45:00', 'mm/dd/yyyy hh24:mi:ss') THEN FW.SEQ
    ELSE 0
    END
    FROM TESTSCHED FW
    WHERE FW.EMPL_ID = F1.EMPL_ID
    AND FW.REC_STAT = 'A')
    Query-2 Results
    SEQ     EMPL_ID     SCHED_DT     START_DT_TM          END_DT_TM          REC_STAT
    9     118327     2008/03/03     2008/03/03 17:30:00     2008/03/03 22:00:00     A
    12     120033     2008/03/03     2008/03/03 17:30:00     2008/03/03 19:30:00     A
    17     126690     2008/03/03     2008/03/03 16:45:00     2008/03/03 18:45:00     A
    21     169241     2008/03/03     2008/03/03 17:30:00     2008/03/03 22:00:00     A
    24     200716     2008/03/03     2008/03/03 17:30:00     2008/03/03 22:00:00     A
    28     252836     2008/03/03     2008/03/03 17:30:00     2008/03/03 19:30:00     A
    37     289039     2008/03/03     2008/03/03 16:30:00     2008/03/03 22:15:00     A
    Problem with Query-2 Results:
    Employee IDs 126690 & 289039 should not appear in the List.
    Reason: Employee 126690: schedule start date & time is 2008/03/03 12:45:00 and falls outside
    "16:30" and "17:45"
    14     126690     2008/03/03     2008/03/03 18:45:00     2008/03/03 21:15:00     A
    17     126690     2008/03/03     2008/03/03 16:45:00     2008/03/03 18:45:00     A
    15     126690     2008/03/03     2008/03/03 12:45:00     2008/03/03 16:45:00     A
    Reason: Employee 289039: schedule start date & time is 2008/03/03 13:45:00 and falls outside
    37     289039     2008/03/03     2008/03/03 16:30:00     2008/03/03 22:15:00     A
    39     289039     2008/03/03     2008/03/03 13:45:00     2008/03/03 16:30:00     A

    Your LEAD function is order by fw.start_dt_tm, in your first sql, the where clause limited the records return to REC_STAT = A and EMPL_ID = 289039.
    In your 2nd query, there is no where clause, so to the LEAD function, the next record after seq 37 is seq 38 which has an end date of 2003-03-03 10:15 pm, not equal to the start time of record seq 37.
    Message was edited by:
    user477455

  • Sales order is not taking shipping transit lead time into consideration

    Hi,
    We have following scenario -
    1. Sales order is created in AT organization.
    2. There is no onhand in any of the organizations including AT.
    3. The scheduled ship date for sales order comes as order creation date + item lead time = 15-Sep-2011.
    3. PO for sufficient quantity is available at UK org with need-by date as 01-Jun-2011.
    5. Post processing item lead time for this item is 1 day.
    4. intransit shipment is setup between UK and AT.
    5. Shipment Transit lead times are also set up at 3 days between locations of UK and AT.
    6. ASCP plan is run.
    7. Sales Order is unscheduled and rescheduled via API MSC_ATP_PUB, which takes the ATP details from UK (based on the sourcing rules). The sheduled ship date comes as 02-Jun-2011 (PO need-by date + 1 day of post processing).
    8. Expectation is that API should also take transit lead time into consideration while calculating the ATP dates and hence the Expectation is that scheduled ship date should come as 05-Jun-2011 (PO need-by date + Transit lead time + 1 day of post processing).
    Please let me know
    a. if this is standard functionality of oracle or not.
    b. if this is standard functionality then what setups are missing required for the same to be achieved.
    UAT is held up for this issue. Please help urgently.
    Regards.

    Oracle is supposed to take the in-transit time into consideration.
    Are you running a constrained plan or an unconstrained one?
    Make sure you defined the inter-org network as described in http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/inv/shipne01.htm.
    or go to Inventory > Setup > Organization > Inter-Location Transit Times and enter it there.
    Sandeep Gandhi

  • User exit or Badi for changing the lead time in ATP check in VA01/VA02

    Hi All,
    Currently, SAP standard functionality takes up the lead times maintained in material master to create the schedule lines in the sales order in VA01. I am looking for some user exiit/Badi/Enhancement point where I can change the lead time. This is somewhat urgent so any help in this regard is appreciated.
    Regards,
    Sandeep
    Edited by: Sandeep Gaitonde on Sep 1, 2011 9:16 PM

    Hi Sandeep,
    These are the user exits will trigger in va01 .
    SDTRM001 Reschedule schedule lines without a new ATP check
    V45A0001 Determine alternative materials for product selection
    V45A0002 Predefine sold-to party in sales document
    V45A0003 Collector for customer function modulpool MV45A
    V45A0004 Copy packing proposal
    V45E0001 Update the purchase order from the sales order
    V45E0002 Data transfer in procurement elements (PRreq., assembly)
    V45L0001 SD component supplier processing (customer enhancements)
    V45P0001 SD customer function for cross-company code sales
    V45S0001 Update sales document from configuration
    V45S0003 MRP-relevance for incomplete configuration
    V45S0004 Effectivity type in sales order
    V45W0001 SD Service Management: Forward Contract Data to Item
    V46H0001 SD Customer functions for resource-related billing
    V60F0001 SD Billing plan (customer enhancement) diff. to billing plan
    Please check this and post .
    Regards,
    Madhu.

  • How to store lead-time and price per MPN for a single Item

    We are probably one of the only CEM's that use Oracle Applications in a one-to-one MPN-IPN (Oracle Item Part Number) relationship. We do not currently store multiple Manufacturers under a single Item. Rather, we use the Customer Item Cross Reference to rank the customer's AML, with each IPN tied to a single MPN.
    We are looking at moving into a one-to-many "world" in Oracle but are not sure how we can handle different pricing, lead-time, preference, status (prototype, production, obsolete, do not use), etc. for each Manufacturer's Part Number under a single Item. How are other CM's handling this???

    Hi Greg,
    Unfortunately, DIAdem Datafinder doesn't really support much in the way
    of Date/Time search outside of the File Level Creation Date property.
    In order to make the creation time of the Channels searchable you would
    want to create some custom properties (or use the existing RegisterInt1
    - RegisterInt6) to define your own searchable properties.
    For example, since you know that you have one TDM file per day, you can
    start your search by find the desired day on the File Property Level,
    searching the "Creation Date" property. When you store your TDM
    properties, you could store the hour creation as an integer (and
    thereby searchable) in one of the RegisterInt properties of the
    channel, or create your own custom "Hour" channel. You could similarly
    save the minute and second property in their own custom properties.
    Then, since you're saving integer values, you can then search those
    values to determine the time that the channel was created.
    I realize that this isn't ideal or elegant, as in total it requires 4
    searches (date, hour, minute, second). But that is the most
    straightforward way of searching your channels by creation date/time.
    Hope this helps Greg, let me know if you have any other questions.
    Dan Weiland

  • Sales Order - How to make Delivery Date default to Lead Time?

    My scenario is this:
    - We have items that go thru several production stages before it is a finished item that can be sold.
    - Each production item has its lead time loaded.
    - I would like the delivery date of a finished item to equal the sum of the productions items lead times.
    I dont want my sales people to have to look at calendars are calculate how long until something is ready for delivery.
    I would like my sales orders delivery date to default to a date that sales people can use.
    Is this possible? I would think this would be part of core functionality but I do not see this.
    Thank you,
    John Sefton

    John,
    Knowing what Items are added to the Sales Order at the time of entry would not be possible without SDK since the line level details are stored internally in temp location.
    Only on Submitting the Sales Order would it be possible to calculate the date.
    Let me know how you would want to move on this
    Suda

  • Multiple message deletion functionality disappears

    My iPhones 5S with iOS 8.1 loses multiple message deletion functionality. I tap a message in communication thread, chose more options, mark messages to be deleted and push waste bin. When used a few times the waste bin is replaced with camera options and deleting multiple messages is not possible; see screenshot. In order to re-establish the functionality, I have to close the message app down and restart it. Are there any solutions or work around to this?

    Hi Kare Gronholt,
    If you are having issues with your iPhone's ability to delete multiple messages, you may want to try some things to troubleshoot.
    First, quit all running applications and test again -
    OS: Force an app to close
    Next, I would try restarting the iPhone -
    Turn your iOS device off and on (restart) and reset
    If the issue is still present, you may want to restore the iPhone as a new device -
    How to erase your iOS device and then set it up as a new device or restore it from backups - Apple Support
    Thanks for using Apple Support Communities.
    Best,
    Brett L  

  • Calculating Lead time.... Help......

    We have two field in qals
    QALS: Lot created     (ENSTEHDAT)
                Time                (ENTSTEZEIT)
    Similarly we have two field in QAVE
    QAVE: UD Code Date
                Time            (VEZEITERF)
    I need to calculate the lead time
    i.e.
    Lead time = (Lot Created date & time - Date of UD & Time - Holidays as per factory calendar) / 24:00:00 hrs.
    How to proceed????

    hi Uttamagarwal,
    Please check the below sample Code. You need to do declare the Appropriate Variable and ITAB.
    "as NSTomar  said , First use the FM to get the Date and Time difference
    call function 'SD_DATETIME_DIFFERENCE'
      exporting
        date1                  =  enstehdat  "Lots Created Date
        time1                  =  entstezeit " Lots Created Time
        date2                  =  vaedatum  " UD Change Date
        time2                  =  vezeitaen  " UD Change TIme
    importing
       datediff               =  date_diff
       timediff               =  time_diff
    *   EARLIEST               =
    * EXCEPTIONS
    *   INVALID_DATETIME       = 1
    *   OTHERS                 = 2
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    * then Please use the below  FM To get the Number of Holidays
    * between the Lots Created date and UD Changed date
    call function 'HOLIDAY_GET'
    EXPORTING
    *   HOLIDAY_CALENDAR                 = ' '
       FACTORY_CALENDAR                 = fac_cal   " Pass the Factory calendar here 
       DATE_FROM                        =  enstehdat      " Lots Created Date
       DATE_TO                          =   vaedatum       " Ud Changed date
    * IMPORTING
    *   YEAR_OF_VALID_FROM               =
    *   YEAR_OF_VALID_TO                 =
    *   RETURNCODE                       =
      tables
        holidays                         = it_holidays
    * EXCEPTIONS
    *   FACTORY_CALENDAR_NOT_FOUND       = 1
    *   HOLIDAY_CALENDAR_NOT_FOUND       = 2
    *   DATE_HAS_INVALID_FORMAT          = 3
    *   DATE_INCONSISTENCY               = 4
    *   OTHERS                           = 5
    if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    "Check the Number of Entries in it_holidays which is equal to Number of Holidays
    describe_table it_holidays lv_count.
    if you want to find the date difference i.e., Lead Date
    Lead date = date_diff + lv_count
    if you want to find the time difference i.e., Lead Time
    Lead Time = ( ( date_diff + lv_count ) * 24 ) +  time_diff
    Edited by: Rob Burbank on Aug 5, 2010 9:26 AM

  • Lead time reffering to open SO- - -***** URGENT ***

    Hello
    When we create a brand new PO, the materials due date should be automatically
    calculated using the  materials standard Lead Time.  For example, if we are to create a PO on 10/1/07 for a part that has standard Lead Time 65 days, the materials due date shouldbe automatically calculated as 10/1/07 + 65 days = 12/5/07 and the PO shouldshow that the part's statistical due date and delivery date is 12/5/07.However, recently SAP has been checking a pending sales order's furthest duedate and stretch the PO's due date to match the sales order's due date.  Forexample, in the previous example the PO's due date should be 12/5/07 but if there is a sales order that is not due till 3/7/08, SAP calculates that the part
    on this PO is not due till 3/6/08.  This new function is affecting our PO
    creation and its due date.  Could you advice so that POs automatically use a
    part's standard LT to calculate the part's due date instead of using SO's due
    date?
    I checked planned delivery time in MMR ,INFO RECS,VENDOR Checked the availability check and checking rules what could be the reason...?????
    Will AWARD FULL POINTS URGENT

    If you used a remove personal settings option from Windows or Firefox,you may well have permanently lost those bookmarks.
    * Undelete<br>If you did that then timely use of a file undelete utility and a good helping of luck are likely to be required to attempt recovery (probably best to stop using
    the computer entirely, until you have such utility).
    *Your Own Backups<br>You could have a backup system in place that backs up such files or the firefox profile, and you may be able to use that.
    * Synced to another machine<br> you may have the bookmarks synced on another machine, or even on an external server
    **see [[what is firefox sync?]]
    See also [[lost bookmarks]] but I am not sure any of that applies in this case, it is worth reading it though
    Normally

  • Lead time

    Dear friends,
    Is there any report in SAP LE which can give the total lead time for delivery of materials from the plants to the destinations(customer)
    Your valuable reply is highly appreciated.
    Regards,
    Sampath

    Sampath,
    I am not aware of such a report.
    The duration of time scheduled in a Sales order between the shipping point and the destination is carried in the Sales routes (configuration transaction OVTC).  The routes that your company uses can be determined in a number of ways.  Information (including duration) can be seen in Table TVRO.  Information concerning determination (which route is associated with a source-destination pair) are usually contained in table TROLZ.  This configuration is in IMG>SD>Basic Functions>Routes>Route Determination>Maintain Route Determination. 
    If you actually interested in the 'lead time', which also includes manufacturing/procurement time, Pick/Pack Processing time, etc, this is a bigger task.  More data needs to collected.
    In either case, I believe you will have to commission your ABAPers to create a Z report.
    Regards,
    DB49

  • Ordering BT Infinity (Lead Times)

    Hello,
    I am renovating my new property and I am planning to move-in in around 6 - 8 weeks. I am led to believe that lead times to get a BT infinity engeneer in to install the broadband is around 2 - 3 weeks.
    I am happy to order it as soon as possible but my questions are:
    1) How far in advance can you book an engeneer?
    & 2) When does you contract start? Am I required to start paying for the services from the date of the order and therefore id so will I be required to pay for 1 1/2 months or does the contract start when the broadband is installed and up and running?
    If anyone can help me with these questions I would be very greatful.
    Cheers
    Paul
    Solved!
    Go to Solution.

    Hi Batchy and welcome,
    It's best to place the order a few weeks in advance so if there are any problems we can get it sorted. The contract will start as soon as the service are up and running.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Bapi for Mass change of Purchasing Lead Time

    Hi All,
    Could you please suggest whether is there any BAPI to perform mass change of
    purchasing Lead Time within the material master.
    The field is Planned delivery time(marc-plifz) in MRP2. The changed value should reflect to all the Material numbers in the selection screen.
    Thanks & Regards,
    Rayudu.

    Hi Lakshmi,
    From ECC 6.0, SAP has got the functionality of Mass cahnge of contract,
    using the tcode MEMASSCONTRACT. from which u can maintain it.
    Hope it wud have answered ur question
    Reward if useful
    Aasif

  • Lead Time - Customizatiou0131n steps: Shipping point, route, and loading group

    It says about delivery scheduling that "The lead time considers the shipping point, route, and loading group". Can anybody explain me briefly the customization menu steps about this sentence?
    Thanks in advance.

    Please go through this document it will help you
    1) Maintain transportation planning point through Menu as follows:
    IMG Maintain&#61664; Logistic Execution &#61664; Definition &#61664;Enterprise Structure &#61664; transportation planning point.
    Create your own like BP01 enter the general data¡¯s required
    2) Defining modes of transport:
    &#61664;IMG Routes&#61664;Basic Transportation Functions &#61664; Transportation &#61664;Logistic Execution Define modes of transport&#61664;Define routes&#61664;
    Use the standard like:
    Shipping type: 01
    Description: Road
    3) Define shipping types :
    Basic Transportation&#61664; Transportation &#61664;Logistic Execution&#61664;IMG Define shipping types&#61664; Route &#61664;Functions
    Or through T-code: SM30
    PT: 01
    Description: Truck
    Mdtr: 01
    STPG: 0001
    4) Define transportation connecting point :
    Logistic&#61664;IMG Define&#61664;Routes &#61664; Basic Transportation Functions &#61664; Transportation &#61664;Execution Define transportation connection points&#61664;routes
    Copy the std point and make it FB01 as departure zone and FB02 as destination zone
    5) Define routes and stages.
    &#61664; Logistic Execution &#61664;IMG Define&#61664; Define routes &#61664;Routes &#61664; Basic Transportation Functions &#61664;Transportation routes and stages
    Use the standard route and copy it as FB0001 and enter the departure zone and destination as what we created.
    6) Defining Transportation Zone:
    Basic&#61664; Transportation &#61664;Logistic Execution &#61664;IMG Define transportation&#61664; Router determination &#61664; Route &#61664;Transportation Functions zones
    Use the standard transportation zone depending on the route so as for the example use 0000000003 - Southern Region
    7) Maintain country or transportation zone for shipping points
    &#61664; Logistic Execution &#61664;IMG &#61664; Route determination &#61664; Route &#61664; Basic Transportation Functions &#61664;Transportation Maintain country and transportation zone for shipping point
    Shipping point be ASH1 and route as 0000000003 which is assigned to country India
    8) Maintain route determination:
    Logistic Execution&#61664;IMG Route determination&#61664; Route &#61664; Basic Transportation Functions &#61664; Transportation &#61664; Maintain route determination&#61664;
    Country of departure: India
    Departure Zone: 0000000003
    Country of destination: India
    Destination Zone: 0000000003
    And enter the data’s needed like shipping condition 01, etc.
    Maintain Transportation relevance for shipping point, sales document type and delivery types.
    9) Now create shipping types
    &#61664;IMG Define shipment&#61664; Shipments &#61664; Transportation &#61664;Logistic Execution types
    Copy the standard 0001 and make it to AFIL
    10) Define and assign traffic zones through T-Code: T_76 (or) thru menu as follows
    &#61664;IMG Define&#61664; Basic functions &#61664; Shipments cost &#61664; Transportation &#61664;Logistic Execution and assign tariff zones
    Copy the standard and make it to FABTARIFF and assign our transportation planning point as ATP1, ATP2 assign tariff zone to every particular transportation planning point
    11) Define and assign pricing procedures
    Shipments&#61664; Transportation &#61664; Logistic Execution &#61664;IMG define and assign pricing&#61664; Price control &#61664; Pricing &#61664;cost procedures
    Copy the standard shipping cost pricing procedure SDFC00 to FBSC01
    12) Assign purchasing data:
    &#61664; Logistic Execution &#61664;IMG Assign purchasing data&#61664; Settlement &#61664; Shipments cost &#61664;Transportation
    13) Assign transportation planning point to shipping condition, purchase organization, purchasing group and to plants.
    14) Define Automatic G/L account determination:
    &#61664; Transportation &#61664; Logistics Execution &#61664;IMG Automatic G/L Account Determination&#61664; Settlement &#61664;Shipment Costs
    Or through T-code: OMWB
    Use G/L account 614000 as used in standard
    15) Automatic determination of CO assignments:
    &#61664;IMG Automatic&#61664; Settlement &#61664; Shipment Costs &#61664; Transportation &#61664;Logistics Execution Determination of CO Assignments
    Or T-code: OKB9
    16) Maintain shipping point address.
    &#61664; Logistics Execution &#61664; Definition &#61664;Enterprise Structure Define, copy, delete, check shipping point
    17) Creating G/L account centrally.
    Financial Accounting&#61664;Accounting &#61664; Master Records &#61664; General Ledger &#61664;
    &#61664;Individual Processing Centrally
    Or through T-Code: FS00
    18) Enter the G/L account 614000 to the company code AFIL
    19) Create transportation condition records:
    &#61664; Shipment cost &#61664; Transportation &#61664; Master data &#61664;Logistic Execution create&#61664;Prices
    Or thru T-code: TK11
    Enter condition type FB00 that is freight condition type, which is used as standard in the shipping cost pricing procedure.
    Enter the price and save it
    Process:
    1. The system determines the pricing procedure for the shipment cost item-using transportation planning point, service agent and shipment cost item category
    2. Calculation Basis
    3. Condition Record
    4. Access sequence.
    For the sales order, create a delivery using VL01N and pick the goods. Now create a shipment using VT01N and assign the delivery to the shipment document. Make sure to enter the carrier and other details before performing the transportation planning and execution. Save the shipment document and PGI for the delivery would be done automatically.
    A shipment represents a physical goods movement between two or more locations.
    For the system to create a shipment, shipping-relevant deliveries must exist.
    You use Transportation Planning to group pending deliveries into shipments and then to perform the shipments.
    The outbound delivery documents contain routes that the system calculates in route determination, and a transportation planning date for the delivery.
    Dynamic transportation planning is responsible for grouping together outbound deliveries into shipments that have at least the same route, visit plan type and the same transportation planning date.
    The following restrictions can be taken into account for a shipment in Dynamic Transportation Planning:
    • Weight
    • Volume
    • Variable capacity
    • Number of stops
    • Maximum duration
    • Loading units
    Create Shipment Document
    Use
    After the status of the delivery is open for transportation planning, it is possible to create a shipment document to schedule the transportation.
    Transportation&#61664; Create &#61664;Single document Logistics&#61614; Logistic Execution &#61664; Transportation&#61664;Planning
    T.code: VT01n
    Enter your transportation planning point and shipment type. Press enter.
    Creating the shipment cost document
    Use
    After the deliveries are scheduled by shipment and the shipment is executed, now it is time to maintain and close the shipment document in order to record all relative information and ready for the shipment cost settlement.
    &#61664;Single document Logistics&#61614; Logistic Execution &#61664; Transportation&#61664; Shipment cost &#61664;Create
    T.code: VI01.
    After creation of shipment cost doc. You settle the Shipment cost.
    Go to VI02, enter shipment cost no.and press enter.
    Then go to Overview -- Fright cost items, Select the line item and double click it.
    Go as main menu: Item --> Acc. assignment, you enter G/L acc. and cost center to which the transportation cost will be posted.
    On the Standard change, details – Freight cost items screen, then check the check box “Transfer”, which means you will transfer the relative transportation cost to FI/CO, in this case, the system should determined which Purchase Order will used to settle the cost, so after you check the “Transfer” check box.
    Press save button on the current screen.
    Shipment cost settlement and documents:
    Use
    After the shipment cost settled in shipment cost document, it has the following affects:
    It creates a service entry sheet that refers to the purchase order determined.
    It posts acceptance of services performed.
    It creates an accounting document for the accruals.
    Further subsequent documents are created in FI.
    Create Delivery:
    T.code: Vl01n
    Create TO:
    T.code: LT03
    Create Shipment Document
    Use
    After the status of the delivery is open for transportation planning, it is possible to create a shipment document to schedule the transportation.
    &#61664; Transportation Planning &#61664; Create &#61664;Single document Logistics&#61614; Logistic Execution &#61664;Transportation
    T.code: VT01n
    Enter your transportation planning point and shipment type. Press enter.
    Creating the shipment cost document
    Use
    After the deliveries are scheduled by shipment and the shipment is executed, now it is time to maintain and close the shipment document in order to record all relative information and ready for the shipment cost settlement.
    &#61664;Single document Logistics&#61614; Logistic Execution &#61664; Transportation&#61664; Shipment cost &#61664;Create
    T.code: VI01.
    After creation of shipment cost doc. You settle the Shipment cost.
    Go to VI02, enter shipment cost no.and press enter.
    Then go to Overview -- Fright cost items, Select the line item and double click it.
    Go as main menu: Item --> Acc. assignment, you enter G/L acc. and cost center to which the transportation cost will be posted.
    On the Standard change, details – Freight cost items screen, then check the check box “Transfer”, which means you will transfer the relative transportation cost to FI/CO, in this case, the system should determined which Purchase Order will used to settle the cost, so after you check the “Transfer” check box.
    Press save button on the current screen.
    Shipment cost settlement and documents:
    Use
    After the shipment cost settled in shipment cost document, it has the following affects:
    It creates a service entry sheet that refers to the purchase order determined.
    It posts acceptance of services performed.
    It creates an accounting document for the accruals.
    Further subsequent documents are created in FI.
    Generally process is-
    1) VL01N
    2) VT01
    3) VL02N - PGI
    4) VI01
    5) ML81N – Service Entry Sheet
    6) MIRO – Invoice Verification
    Shipping docs (VT01) are created before PGI...
    You cannot carry out transportation planning or creation of shipment after the goods issue has been executed. Once goods issue is done it means that the material has left your premises so there is no need for a transportation planning after it.
    In case you need carry out the shipment documents at the end of the day you could just create the delivery documents during the day and at end of the day create the shipment documents and the goods issue
    This link is also usseful:
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LETRA/SDTRA.pdf
    Hope this helps you.
    Regards
    nitin

  • Difference between Req with insufficient lead time and lead time const

    Hi ,
    1) Can anyone explain the difference between Requirement with insufficient lead time and Requirement lead time constraint exception messages. Both seems to be similar for me with the compressed time.Also at what situations these exceptions are generated.
    2) what is minimum lead time required ,actual lead time and its calculation.
    Thanks...

    Check out
    http://help.sap.com/saphelp_scm50/helpdata/en/99/ed3a981d0f11d5b3fc0050dadf0791/content.htm
    particularly the section "Which functions of the operations relevant to scheduling are supported?"
    It will give you a flavour of what can lead to difference in planning.

Maybe you are looking for