Reg... spliting of schedule qty(Urgent.......

I have CPD, CSD, and CRD quantities with date given as follows....
CPD date & qty is initially given as 11/9/2008  500,
19/01/2008  500, 23/01/2008  600,  30/01/2008  400.
CSD qty  11/01/08   1000,       22/01/2008   1000
CRD qty  10/01/2008  2000.
Depending on the CPD qty given .....
From the remaining 2 CRD and CSD, we need to find which is having more no of schedule lines. once this is found  the highest which is having more schedule line is selected.
Now subtracting the CPD quantities from the scheduled quantity of the highest we get the result like as follows......
CSD is having 2 schedule lines hence....
1000 - 500  = 500.
  500 - 500  = 0
1000 - 600  = 400.
  400 - 400  = 0
***are the CPD  qty.
similarly CSD qty is splited as follows
2000 - 500  = 1500
1500 - 500 = 1000
1000 - 600 = 400
400 - 400  =  0
Rule of Sequence: The purpose of split is to make the number of schedule lines of CRD, CSD and CPD schedules in harmony. The two with more  schedule lines are split first. Afterwards, the third one is split with the first two which are already in harmony in terms of schedule lines.
Rule of Quantity: The schedule line with larger qty is split into 2 schedules, the qty of the 1st schedule is the same as the qty of the other schedule; the qty of the 2nd schedule is original qty less qty of the 1st schedule. If qty of both schedules are the same, there is no split and both schedules stay put.
Rule of Date: When a schedule is split into 2 schedules, the original date applies to both schedules. 
Now i need to build a code how to subtract the CPD qty  from CRD and CSD qty..
I have developed the code but not working properly for all scenarios..
describe table it_crd lines v_sch_lines_crd.
describe table it_csd lines v_sch_lines_csd.
if v_sch_lines_csd ge v_sch_lines_crd.
loop at  it_csd.
loop at it_cpd.
    v_temp_csd = it_csd-bmeng - it_cpd-zwmeng_cpd.
   it_csd-bmeng = v_temp_csd.
if v_temp_csd ge 0 ."and v_cnt1_csd le v_sch_lines_csd.
*v_cnt_csd =  v_sch_lines_csd - 2.
*v_cnt1_csd = v_sch_lines_csd - v_cnt_csd.
*v_cnt_csd = v_cnt_csd + 1.
*read table it_csd index . "v_cnt1_csd .
it_csd-bmeng = it_csd-bmeng + v_temp_csd.
endif.
endloop.
*if v_cnt1_csd ge v_sch_lines_csd.
*exit.
*endif.
endloop.
endif.
if v_sch_lines_crd le v_sch_lines_csd .
loop at it_crd.
loop at it_cpd.
v_temp_crd = it_crd-wmeng - it_cpd-zwmeng_cpd.
it_crd-wmeng = v_temp_crd.
if v_temp_crd = 0 and v_cnt1_crd le v_sch_lines_crd.
  v_cnt_crd =  v_sch_lines_crd - 2.
  v_cnt1_crd = v_sch_lines_crd - v_cnt_crd.
  v_cnt_crd = v_cnt_crd + 1.
read table it_crd index v_cnt1_crd .
endif.
endloop.
if v_cnt1_crd ge v_sch_lines_crd.
exit.
endif.
endloop.
endif.
can any one suggests the code.
answers will be rewarded with points
Edited by: ms kumar on Jan 18, 2008 7:38 AM

Your help/suggestions in this regard will be greatly appreciated with the points.
Please this is urgent.
~LB

Similar Messages

  • Based on document type , editable schedule qty in me22n, me52n

    Dear Gurus,
    based on document type , the schedule qty field under delivery schedule tab to be editable, at present it is in greyed out mode, is there any config settings are dev if so whatever please share with more details

    Hi,
       As of my knowledge, the change mode screen layout cant be defined based on document type. You can make the field as editable or non editable  in the field selection key AKTV (for both PR and PO).
       An alternate method is explained in the KBA: 2048405 - How to control the field layout
       If you still want to make the field selection based on document type in ME22N / ME52N, then you may go for development.
    Regards,
    AKPT

  • Reg:back ground scheduling

    Hai to all,
    I am executing report in backgroung .
    using selection-screen:   program----
    >execute in backgound(f9)
    but when i was scheduling in background with start time 11:00:00 pm
    its showing the error message:
    "Internal error with background job scheduling "
    i dont why its showing
    could any body suggest me.
    please its very urgent.
    regards,
    Chaitanya

    Hi Chaitu
    internal error while running background job (progname) is due to authorisation issue. where we have to check the background in one of the object. I had got this error & corrected it in authorisation. Ask the user to send a su53 screen shot when he/she gets the error
    reward points to all helpful answers
    kiran.M

  • How to use parallel sequence for split the operation qty. urgent or other o

    PP guru
    My scenario is as follows.
    I ve one material suppose…xyz.
    For that material I' ve created bom, routing.
    In routing I' ve mention only one operation. 0010.
    Now I' ve the production order of 1000 kg.
    I want to use two work centers to run this production order. ( e.g.work center a and b)
    In routing I used work center a.
    In short I want split that operation.
    So what I ve to do or use parallel sequence and how???
    or else is there any other option to split the order to two or more machines/work center?
    Pls explain me in brief.
    Regards,
    Ram

    Hi,
      If you want to carry the production with two different work centers , first you need to split the operation qty.
    For this in the order type dependent parameters OPL8
    in the controlling tab page enable the indicator Cost collector
    and set the default rule as PP2.
      Create a Product cost collector with KKF6N.
       Now in the production order , select the operation and choose functions--->>> split.
       Now enter the operation split quantity and execute.
       Now in MD04 you can see two production order.
       In the second production order change the work center in the operation overview as desired and save.
      Regards,
    nandha

  • Display schedule qty - Month wise in ALV Grid

    Hi Experts,
    I have a requirement to display the schedule line quantities month wise in ALV  Grid. The columns sholud be dynamic columns based on the input date range. I got some idea about how to create dynamic ALV but it is not clear to implement in my requirement.
    Please Guide me in achiving the same.
    Example:
    Jan 2011      Feb 2011     March 2011
    100               2000            300
    Thanks&Regards,
    Karthik

    Hi.,
    Create field catalog dynamically as like this.,
    select-options s_date for sy-datum.
    data: n type i,
          count type i,
          cnt type string,
          field type string,
          descr type string.
    DATA: m TYPE t247-mnr,
          month_name type char10,
          m1 type i.
    n = s_date-high+4(2) - s_date-low+4(2) .   " getting number of months
    m1 = s_date-low+4(2).
    m = m1.
    n = n + 1.
    DO n TIMES.   " building field catalog dynamically
      m = m + 1.
      count = count + 1.
      cnt = count.
      concatenate 'FIELD' cnt into field.
      CALL FUNCTION 'ISP_GET_MONTH_NAME'    " FM to get month name
          EXPORTING
            LANGUAGE           =  sy-langu
            MONTH_NUMBER       =   m
         IMPORTING
    *    LANGU_BACK         =
           LONGTEXT           =  month_name .
      concatenate month_name s_date-low+0(4) into descr separated by ''.
      wa_fieldcat-col_pos = count.
      wa_fieldcat-row_pos = '1'.
      wa_fieldcat-fieldname = field.
      wa_fieldcat-seltext_m = descr.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
    ENDDO.
    After this create dynamic table using,
    CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = t_fldcat
        IMPORTING
          ep_table        = t_newtable.
    then loop the internal table and assign the component to final internal table,.
    like .,
    CONCATENATE 'FIELD' index INTO  fieldvalue.     " do same like fieldcatalog
        ASSIGN COMPONENT  fieldvalue   OF STRUCTURE <fs_dyntable> TO <fs_fldval>.
        <fs_fldval> = wa-fieldvalue.
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Bursting Scheduling Error - Urgent

    Hi,
    Can anyone help? I have scheduled a report for bursting and see the following errors in schedule history:
    Error!! Can not find the delivery details for the delivery Id :Commercial Data Ltd
    When I check the bursting query this delivery id(Commercial Data Ltd) does exist and there is an email address.
    Can anyone help understanding why this error appears, is the email address invalid?
    Also where can I locate the log file on the server containing the details of the delivery:
    Error!! Could not deliver the output for Delivery channel:EMAIL . Please check the Log for error details..
    Thanks
    Edited by: sliderrules on 07-Oct-2010 02:03

    Hi,
    Can anyone confirm if the email address needs to be valid for the bursting schedule to process successfully, I see these errors in the schedule history:
    Delivery Key ASSET LTD
    Delivery Type
    Status Failed
    System Message Error!! Can not find the delivery details for the delivery Id :ASSET LTD
    The delivery key does exist and there is an email address?

  • Reg: Error in scheduling of production order

    Hi experts,
    I have an issue during creation of production order. During production order creation, if i am giving todays date as start data and scheduling type as forwards (1) and executing it, it is showing the following error message and it is automatically taking the start date as 2 days forward date (if i am creating order on 06.02.2012 it is taking 08.02.2012).
    Start date is in the past: today scheduling
    Message no. C7030
    Diagnosis
    The start date determined in scheduling is in the past.
    In customizing, you have defined the number of days that the start date is allowed to be in the past.  This number is exceeded.
    System Response
    "Today" scheduling is carried out.Hallo
    Please suggest me a possible solution.
    Regards,
    Krishna Chandra

    Dear Krishnachandra,
    If my understanding is correct then I guess you are mentioning the start date as a date which is more than 2 days older(more
    than 2 days in the past) and so the system is automatically switching over to today's scheduling as you might have mentioned
    in OPU3 the number of days allowed in past as 2.
    Check if this setting is defined as I have mentioned,if so means tiher you can only mention a date within the allowed range or
    else use today's date and carryout a forward scheduling.
    Check and revert back.
    Regards
    Mangalraj.S

  • Condition Types in Scheduling Agreement(Urgent)

    Dear Experts.
    This is a query with reference to my earlier issue Changes in Condition ME32L.As per suggestions, to get validity periods i have clicked on Time dependent Condition In SPRO settings Under Define document Types.
    After that i am not able to enter Custom Conditions while creating a Scheduling Agreement.So i tried by removing this Time dependent setting,then was able to enter Custom Conditions...
    But i need to see validity periods too when i change condition types through ME32L...
    So,Please give me appropriate Suggestion....
    Thanks and Regards
    MK

    I'm not sure about your own pric proc, but in standard it should works, and also its apply per organization level.
    RM0000 and RM1000                                                      
        Control the price determination process in POs, quotations, and    
        scheduling agreements.                                             
        Both calculation schemas require 2 condition types for the gross   
        price: one for automatic price determination (standard: PB00) and  
        one for manual maintenance (standard: PBXX).                                                                               
    RM0001 and RM1001                                                      
        Determine which condition types you can enter in purchasing document
        headers with time-dependent conditions (e.g. contracts).

  • Reg LPA Delivery schedules - MRP

    Hi
    Delivery schedules got created via MRP - LPA document type
    We haven't released to vendor [JIT or Forecast]
    When i manually change quantity in generated delivery schedule, Firmed indicator is ticked as expected
    i am unable to uncheck this indicator when go there change mode it is grayed out
    Please suggest

    SAP Help says 'You can only change it from the planning result. To do this, double-click on the schedule lines in the planning result.'
    Planning result ??
    How do i make changes to firm indicator, Please help

  • Availability check-----stock confm qty--Urgent reply.....

    Hi
    We have a below requirement..
    While creating sales order if the available stock is zero after doing ATP check,then we should not be able to save the sales order...(if confimed qty is zero,then saving of that particular item should not be done.It should throw out error message saying stock not available for that particular item).We should be able to delete that item and save remaining items in sales order.....
    Is there any standard config available for the same....

    hi
    http://help.sap.com/saphelp_crm40/helpdata/en/b6/de3efc6bbcdc4b948d466857a10323/content.htm
    reward if useful
    thanx & regards.. Naren

  • Reg Price block and Qty block in MM Invoice docs Tolerence Keys adjustment

    Hi Friends,
    Related to MM Invoice documents gets blocked with Price block and Qty block,based on this FI doc also gets blocked with Payment block indicator"R".As per Std SAP we can remove these blocks thru MRBR. Right now my users are asking not required to remove these blocks with MRBR Tcode.
    So i checked the Tolerence Limits defined for the co code and Tolerence keys.
    As per my understanding Tolerence Keys "PP-Price variance",  "DQ-Exceed amount: quantity variance" need to adjust with upper llimits and Lower Limits.
    here i can see Upper and Lower check limit Tolerance limit 5.00%  for  Tolerence Key "PP-Price variance"
    Tolerence limit 0.01%  for  Tolerence key "DQ-Exceed amount: quantity :quantity variance         
    Instead of changing the Tolerence Limits can i select the DO NOT CHECK Radio button for the bothe Price and Qty block.
    If i selected the DO NOT check button what will happen,how it works.
    How i can maintain the Tolerence keys,is there any other Tolerence keys also need to maintain.  
    Please suggest me with your valuable inputs.  
    Brgds,
    RK
    Edited by: RK.SAP on Nov 17, 2010 7:02 AM

    hi,
    If you do not want to check the Invoice for tolerance keys like quantity variance and price varaince then tick on don't check .In this case system will not block any invoice and invoice will post Automatically without any error.
    Please check other tolerance keys in SPRO: OMR6
    One more blocking is defined in the vendor master also under payment transactions accounting screen.There you are defining the tolerance group for Invoice Verification.
    Regards,
    Amit

  • Reg: WE19 - IDOC (time_out error) Urgent

    Experts,
       I'm repushing the IDOC using WE19 manually.
       Since there is more than 1 lakh of segments in the idoc , it gives me "Time-limit exceeded" dump.
       Please let me know is there any other way to push the idoc ??? any background schedule...
       any inputs on this will be highly rewarded & appreciated
    Rgds
    Lakshmiraj

    Hi,
    Is it inbound or outbound IDOC
    Thanks
    Naren

  • Reg Process chain scheduling.

    Hi.
    Here is a situation: I have a process chain named  Process chain1 . Which will  run on weekly basis.  Now i wanted to run this procss chain in every month 5 th working day. I will create new chain as process chain2 and i will add my Process chain1 as local process chain.
    My question is :
    Is it possible to use Process chain1 for individual run on weekly basis and as a local process in Process chain2 for the 5 th working day run?
    But for any start variant there are only 2 options
    1) Direct scheduling
    2) start using meta chain
    What I shd to in this situation
    Thanks,
    Harish

    Hi Harish,
    Yes it is possible without creating a new process chain.
    Schedule it to rum every week. If it is already have done get the exact job name which is scheduled (you can can get this by right click on start variant and display scheduled jobs).
    Copy this job and schedule it as you wanted to run monthly on 5th.
    Hope this helps,
    Anil Kamsala

  • Reg:Copying the Delivered qty to picked qty in delivery(vl01n) transaction

    Hi Experts,
               While creating the delivery i need a user exits to copy the delivery qty to picked qty .
               so that when the user enters in the transaction vl01n the delivery qty and picked qty will be
               same and if any changes in picked qty he will change manually.
    Regards,
    Vikram

    hi,
    these r the total exits for vl01n and i don;t find any exit for this requirement.
    Exit Name           Description
    V02V0001            Sales area determination for stock transport order
    V02V0002            User exit for storage location determination
    V02V0003            User exit for gate + matl staging area determination (headr)
    V02V0004            User Exit for Staging Area Determination (Item)
    V50PSTAT            Delivery: Item Status Calculation
    V50Q0001            Delivery Monitor: User Exits for Filling Display Fields
    V50R0001            Collective processing for delivery creation
    V50R0002            Collective processing for delivery creation
    V50R0004            Calculation of Stock for POs for Shipping Due Date List
    V50S0001            User Exits for Delivery Processing
    V53C0001            Rough workload calculation in time per item
    V53C0002            W&S: RWE enhancement - shipping material type/time slot
    V53W0001            User exits for creating picking waves
    VMDE0001            Shipping Interface: Error Handling - Inbound IDoc
    VMDE0002            Shipping Interface: Message PICKSD (Picking, Outbound)
    VMDE0003            Shipping Interface: Message SDPICK (Picking, Inbound)
    VMDE0004            Shipping Interface: Message SDPACK (Packing, Inbound)

  • Reg.File Adaptor scheduling

    Hi,
           I have the follwoing questions for you:
    How can I configure the file adapter so that it can pickup a file at every midnight?
    How can I configure the file adapter so that it can pickup a file on every Thursday(i.e. Weekly once)?
    Is it possible to configure the File adaptor as asked above?
    I would be very much thankful to you if you could answer my question ASAP.
    Regards,
    Murthy

    Hi,
    Note:You will need to have the authorizations of the user group SAP_XI_ADMINISTRATOR with the role modify.
    Go to Runtime Workbench -> Component Monitoring -> Communication Channel Monitoring
    Locate the link Availability Time Planning on the top right corner of your Communication Channel Monitoring page.
    In your case, the requirement is to schedule the Sender file adapter daily once at Specified time.
    In Availability Time Planning, choose the Availability time as daily and say create.
    Provide the details like the time “   “
    Then select the communication channel , goto the Communication Channels tab and filter and add the respective channel (File Sender).
    Once all the above has been done 'Save' the changes.
    /people/shabarish.vijayakumar/blog/2006/11/26/adapter-scheduling--hail-sp-19-
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7f87505211d189550000e829fbbd/content.htm
    Reward Points If Helpful
    Regards
    Sesha

Maybe you are looking for

  • JNI call seem to be very slow

    Hello, I have an optimized JPEG decoder written in C++, I have a JNI bridge to that codebase with this method: Java-side: public static native byte[] readJPEG(String name);C++ side: JNIEXPORT const jbyteArray JNICALL Java_IPPJPEGDecoder_readJPEG(JNIE

  • Compare iMovie08 Video Capture/Categorizing to FootTrack and iDive

    Can anyone compare the iMovie08 video capture and categorizing capabilities to FootTrack and iDive?

  • SAP CRM  Middleware flow from R/3 to CRM

    hi I am new to CRM middleware   I have some doubt about the replication from the R/3 to CRM. I have some 4 basic questions Kindly help me out 1.in initial  down lode how to know which object for which requirement? There is any list like these objects

  • Where is completed faxes log location?

    console does not show this file in the list of fax logs. want to restore from a backup.

  • Cannot delete communication structure

    Hi Gurus! I am having problems deleting the communication structures. I installed some Business Contents using the In Dataflow before and afterwards. Consequently, some installed objects are irrelevant to what I need. I am doing some clean-up but I c