Sales order:delivary schedules

Dear All ,
I have enter sales ordr ABC on today's date for qty 40 .
But this sales order i need to deliver in part Qty on date 16.01.2010, 23.01.2010 : Qty 20 each
1) whether we have to enter two line items for the same material .
Or with one line Item the same will be possible ?
2) Also when i am checking material avalibility the System is confirming all qty today only , when thr is no stock available .
Pl guide

> I have enter sales ordr ABC on today's date for qty 40 .
> But this sales order i need to deliver in part Qty on date 16.01.2010, 23.01.2010 : Qty 20 each
> 1) whether we have to enter two line items for the same material .
> Or with one line Item the same will be possible ?
Hi,
For this you need not maintain two line items.With one line item also it is possible.
Select your line item and click on Schedule lines for item icon or follow the path as "Goto>Item>Schedule lines".
Maintain the schedule line here for 20 and 20 quantity with different dates.
Regards,
Krishna.

Similar Messages

  • "difference between sales order and scheduling agreement "

    hi, 
    i want to know difference between sales order and scheduling agreement and where use scheduling agreement & where sales order ?
    please help
    amit

    Hi Amit,
    Its not hard to find this info at help.sap.com
    Sales Order
    Definition: Request from a customer to a company to deliver a defined quantity of products or provide a service at a certain time. The sales area that accepts the inquiry is responsible for completing the agreement.
    Scheduling Agreements
    Purpose
    A customer scheduling agreement is an outline agreement with the customer containing delivery quantities and dates. These are then entered as schedule lines in a delivery schedule. You can either create schedule lines when you create the scheduling agreement or you can create them later.
    You fulfill a scheduling agreement by creating the deliveries in the schedule as they become due. You process deliveries for a scheduling agreement in exactly the same way as you process a normal delivery. After you have carried out the delivery, the system updates the Delivered quantity field in the scheduling agreement item with the delivery quantity. The following graphic shows the document flow for scheduling agreements.
    Integration
    You would use this component if you had outline agreements with the customer that contained future delivery quantities of materials that would be sent at certain times within a fixed time period.
    If you work with scheduling agreements for the component supplier industry you also need to choose the "Electronic Data Interchange" (EDI) component.

  • Need to Create delivery on the basis of sales order and schedule line

    Hi,
    I need to create delivery on for sales order which is splitted in schedule line number (ETENR).
    I am using FM RV_DELIVERY_CREATE and passing sales order number with single line item at a time for different (schedule line) VBEP-ETENR. but it is creating the delivery for all schedule line  items in first time only and in second loop it is not returing any thing even error. can any one please suggest me  urgently what can I do for it.

    Hi Ankit,
    You will have to create your own program to do this.
    There is no standard way todo this.
    Best regards,
    Ramki

  • Link between delivery line item and sales order item schedule line.

    Hello friends,
    This is a continuation of my earlier query - for which I got half the solution, and this is the remaining problem.
    I want to know: from delivery document line item, how to link it to sales order line item's schedule line (when there are multiple schedule lines with identical quantities).
    Thanks for your help.
    - Chetan

    This is the code which i used for the same purpose and its working.
    Hope this will help you too....
    ****it_itab  is my final internal table.
    *Internal table for manupulating the Delivery balance when
    *its used in more than one schedule line
    TYPES: BEGIN OF ty_new,
           vbeln TYPE vbep-vbeln," so no
           posnr TYPE vbep-posnr," so line no
           etenr TYPE vbep-etenr," schedule line
           delno TYPE lips-vbeln,"delivery no
           delposnr TYPE lips-posnr,"del item no
           totval TYPE vbep-wmeng," total del wise value
           val   TYPE vbep-wmeng," del wise used value
           sdval TYPE vbep-wmeng,"schedule wise  del used value
           sdtotval TYPE vbep-wmeng," total Schedule value
         END OF ty_new.
    DATA:it_new TYPE ty_new OCCURS 0,
         wa_new TYPE ty_new.
    DATA: it_vbepvb TYPE TABLE OF vbepvb,
            wa_vbepvb LIKE LINE OF it_vbepvb,
            fvbfa TYPE TABLE OF vbfa,
            fvbup TYPE TABLE OF vbup,
            fvbap TYPE TABLE OF vbapvb.
      LOOP AT it_vbak INTO wa_vbak.
        LOOP AT it_vbap INTO wa_vbap
                WHERE vbeln = wa_vbak-vbeln.
      SELECT * FROM   vbfa INTO TABLE fvbfa WHERE vbelv = wa_vbap-vbeln
                                             AND  posnv = wa_vbap-posnr.
      SELECT * FROM   vbup INTO TABLE  fvbup WHERE vbeln = wa_vbap-vbeln
                                             AND  posnr = wa_vbap-posnr.
      SELECT * FROM   vbap INTO TABLE fvbap WHERE vbeln = wa_vbap-vbeln
                                             AND  posnr = wa_vbap-posnr.
      SELECT * FROM   vbep INTO TABLE it_vbepvb WHERE vbeln = wa_vbap-vbeln
                                             AND  posnr = wa_vbap-posnr.
      CALL FUNCTION 'RV_SCHEDULE_CHECK_DELIVERIES'
        EXPORTING
          fbeleg                        = wa_vbap-vbeln
          fposnr                        = wa_vbap-posnr
      FVERRECHNUNG                  = ' '
      FS073_ALT                     = ' '
      IF_NO_SORT                    = ' '
        TABLES
       fvbfa                         = fvbfa
       fvbup                         = fvbup
       fxvbep                        = it_vbepvb
      FVBLB                        =
        fvbap                        = fvbap
    EXCEPTIONS
      FEHLER_BEI_LESEN_FVBUP        = 1
      FEHLER_BEI_LESEN_FXVBEP       = 2
      OTHERS                        = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      SORT it_vbepvb BY vbeln posnr edatu.
      LOOP AT it_vbepvb INTO wa_vbepvb
                    WHERE vbeln = wa_vbap-vbeln
                      AND posnr = wa_vbap-posnr.
        to write data of schedule line with no delivery
        MOVE wa_vbepvb-olfmng_flt TO wa_itab-openqty.
        IF  wa_vbepvb-bmeng EQ wa_itab-openqty.
          CLEAR wa_itab.
          PERFORM schedule_data.  "schedule line based data to be displayed
          MOVE: wa_vbap-lgort TO wa_itab-lgort.
          MOVE: wa_vbepvb-etenr TO wa_itab-etenr,
                wa_vbepvb-bmeng TO wa_itab-kwmeng,
                wa_vbepvb-olfmng_flt TO wa_itab-openqty.
          APPEND wa_itab TO it_itab .
          CLEAR wa_itab.
        ENDIF.
        LOOP AT it_vbfa INTO wa_vbfa WHERE vbelv = wa_vbepvb-vbeln
                                            AND  posnv = wa_vbepvb-posnr.
          READ TABLE it_likp INTO wa_likp WITH KEY vbeln = wa_vbfa-vbeln.
          CHECK wa_likp-bldat >= wa_vbepvb-edatu.
    check the Delivery doc date with the schedule line confirmed date
          CLEAR: delbal, deltot,wa_new.
          LOOP AT it_new INTO wa_new WHERE vbeln = wa_vbepvb-vbeln
                                         AND       posnr = wa_vbepvb-posnr
                                         AND       etenr = wa_vbepvb-etenr.
            deltot = deltot  +  wa_new-sdval.
          ENDLOOP.
          delbal = wa_new-sdtotval - deltot.
          CHECK sy-subrc <> 0 OR delbal GT 0.
          MOVE wa_vbepvb-olfmng_flt TO wa_itab-openqty.
          CHECK  wa_vbepvb-bmeng NE wa_itab-openqty.
    ****To check whether this delivery is already fully allocated against
    any other schedule.
    LOOP AT it_lips INTO wa_lips WHERE  vbeln = wa_vbfa-vbeln
                                           AND posnr = wa_vbfa-posnn.
            MOVE: wa_likp-bolnr TO wa_itab-vesname.
            MOVE: wa_likp-vbeln TO wa_itab-delno.
            MOVE: wa_likp-wadat TO wa_itab-wadat.
            MOVE: wa_likp-anzpk TO wa_itab-anzpk.
            MOVE: wa_likp-lddat TO wa_itab-lddat.
            MOVE: wa_likp-ernam TO wa_itab-ernam.
    ******end of code added by IVL1 on sep 27 2007 #3618
            PERFORM schedule_data.
            IF wa_lips-umvkz <> 0.
              tempquant = wa_lips-umvkn / wa_lips-umvkz.
            ELSE.
              tempquant = wa_lips-umvkn. "delivery qty
            ENDIF.
            tempquant = tempquant * wa_vbfa-rfmng.
    ***New logic added to get delivery qty schedule wise****
            MOVE: wa_vbepvb-etenr TO wa_itab-etenr,
                  wa_vbepvb-bmeng TO wa_itab-kwmeng,
                  wa_vbepvb-olfmng_flt TO wa_itab-openqty. "jo
    **if delivery qty is less than or equal to schedule line qty******
            IF tempquant LE  wa_vbepvb-bmeng.
              wa_itab-delqty =  tempquant.
              LOOP AT it_new INTO wa_new  WHERE  vbeln = wa_vbepvb-vbeln
                                         AND     posnr = wa_vbepvb-posnr
                                         AND     etenr = wa_vbepvb-etenr
                                         AND     delno  = wa_lips-vbeln
                                         AND     delposnr = wa_lips-posnr.
                MOVE-CORRESPONDING  wa_itab TO wa_new.
                wa_new-delposnr = wa_lips-posnr.
                wa_new-val = tempquant.
                wa_new-totval = tempquant.
                wa_new-sdval  = tempquant.
                wa_new-sdtotval = wa_vbepvb-bmeng.
                MODIFY TABLE it_new FROM wa_new .
                IF NOT sy-subrc IS INITIAL.
                  APPEND wa_new  TO it_new.
                ENDIF.
              ENDLOOP.
              IF sy-subrc <> 0.
                MOVE-CORRESPONDING  wa_itab TO wa_new.
                wa_new-delposnr = wa_lips-posnr.
                wa_new-val = tempquant.
                wa_new-totval = tempquant.
                wa_new-sdval  = tempquant.
                wa_new-sdtotval = wa_vbepvb-bmeng.
                APPEND wa_new TO it_new.
              ENDIF.
             wa_itab-delqty =  tempquant.
             CLEAR tempquant.
            ELSE.
        lips qty > so schedule lineqty
              CLEAR deltol.
              LOOP AT it_new INTO wa_new WHERE    vbeln = wa_vbepvb-vbeln
                                          AND      posnr = wa_vbepvb-posnr
                                         AND     etenr = wa_vbepvb-etenr
                                          AND     delno  = wa_lips-vbeln
                                          AND    delposnr = wa_lips-posnr.
                deltol = deltol  + wa_new-val.
              ENDLOOP.
              LOOP AT it_new INTO wa_new  WHERE    vbeln = wa_vbepvb-vbeln
                                          AND      posnr = wa_vbepvb-posnr
                                          AND     delno  = wa_lips-vbeln
                                          AND    delposnr = wa_lips-posnr.
                MOVE-CORRESPONDING  wa_itab TO wa_new.
                wa_new-val = wa_new-totval - deltol.
                wa_itab-delqty =  wa_new-val.
                wa_new-delposnr = wa_lips-posnr.
                wa_new-totval = tempquant.
                wa_new-sdval  = wa_new-val.
                wa_new-sdtotval = wa_vbepvb-bmeng.
                MODIFY TABLE it_new FROM wa_new .
                IF NOT sy-subrc IS INITIAL.
                  APPEND wa_new  TO it_new.
                ENDIF.
              ENDLOOP.
              IF  sy-subrc <> 0.
                MOVE-CORRESPONDING  wa_itab TO wa_new.
                wa_itab-delqty =  wa_vbepvb-bmeng.
                wa_new-delposnr = wa_lips-posnr.
                wa_new-val =  wa_vbepvb-bmeng.
                wa_new-totval = tempquant.
                wa_new-sdval  = wa_vbepvb-bmeng.
                wa_new-sdtotval = wa_vbepvb-bmeng.
                APPEND wa_new  TO it_new.
              ENDIF.
            ENDIF.
            IF NOT wa_lips-lgort IS INITIAL.
              MOVE: wa_lips-lgort TO wa_itab-lgort.
            ELSE.
              MOVE: wa_vbap-lgort TO wa_itab-lgort.
            ENDIF.
            APPEND wa_itab TO it_itab .
            CLEAR wa_itab.
          ENDLOOP. 
        ENDLOOP.
        CLEAR wa_vbepvb.
      ENDLOOP.
        ENDLOOP.
        CLEAR wa_vbak.
      ENDLOOP.

  • Creation of sales order wrt. scheduling agreement

    how to create a sales order wrt. a scheduling agreement?how to maintain copy control
    anubrota

    Hi
    As per my knowledge the subsequent process of scheduling agreement is delivery
    scheduling agreement contains fixed delivery dates and delivery quantities and the same are mentioned in the schedule lines of the SA
    scheduling agreement means the that itself is on order which is scheduled for delivery on certain fixed dates
    But in some scenarios i have read there is order prepared referring to SA and then delivery
    I havent worked on those scenarios
    For this i think you should take the similar settings of copy controls between Quantity contract QC to OR
    This qn i am also watching for some other friends who come out with better explanation
    Regards
    Raja

  • Creating sales order using scheduling agreement eencountered this error

    Copying SHUM  LPN to OR is not defined
    Message no. V1473
    Diagnosis
    The system does not have any settings for copying from SHUM  LPN to OR.
    System Response
    The system does not copy the item from the reference document.
    Procedure
    If you want to be able to copy an item using the current sales document type and item types, supplement the OR SHUM  LPN entry in copying control in Customizing with:
    Make the appropriate settings in Customizing if you have the authorization to do so.
    If you do not, contact your system administrator.

    Hello,
    Goto Transaction code VTAA and give the source document as your schedule line agreement and the target document as OR which the sales order.
    maintain 051 --HEADER ROUTINE
    Maintai   101--- HEADER BUSINESS DATA
    maintain 001 ---PARTNER DATA
    And then choose the item tab under control and maintain the relevant item categories .
    Hope this will work.
    regards,
    santosh

  • Aseembly order entry in sales order--item schedule line--Procurement tab

    Hi all,
    i created a Sales order which includes BOM explosion under which i am trying to seek Assembly order no under Item -- schedule lines-- procurement tab.
    currently i am not getting any such data in the particular screen at all.
    can anyone suggest if any IMG activity is missing which needs to be configured for geeting the same(assembly order entry inside sales order screen.)
    antipitaing replies.
    -ujjwal

    Hi
    Just try once as below.
    Do not create it as a BOM material first of all.
    For the Main-item, change the Item category group in the Material master to "0001" and save.
    Ensure the Item category assignment in VOV4 as
    Order type + Item category group (e,g. 0001) -
    > Item category (TAK).
    Now, create the new order for the Main-item, manually add the sub-items in the sales order, specify the "Hgh level item number" (item number of the main item) > click enter > save.
    Now, in VA02, check schedule line > Procurement tab.

  • Revision number in sales order and scheduling agreement

    I want revision number in sales order as well as scheduling agreement. for this where we configure or 
    how will it come in VA01 as well as VA31.
    Regards

    Hi Amit,
    Its not hard to find this info at help.sap.com
    Sales Order
    Definition: Request from a customer to a company to deliver a defined quantity of products or provide a service at a certain time. The sales area that accepts the inquiry is responsible for completing the agreement.
    Scheduling Agreements
    Purpose
    A customer scheduling agreement is an outline agreement with the customer containing delivery quantities and dates. These are then entered as schedule lines in a delivery schedule. You can either create schedule lines when you create the scheduling agreement or you can create them later.
    You fulfill a scheduling agreement by creating the deliveries in the schedule as they become due. You process deliveries for a scheduling agreement in exactly the same way as you process a normal delivery. After you have carried out the delivery, the system updates the Delivered quantity field in the scheduling agreement item with the delivery quantity. The following graphic shows the document flow for scheduling agreements.
    Integration
    You would use this component if you had outline agreements with the customer that contained future delivery quantities of materials that would be sent at certain times within a fixed time period.
    If you work with scheduling agreements for the component supplier industry you also need to choose the "Electronic Data Interchange" (EDI) component.

  • Sales order: Two schedule line items for single order item

    Hi,
    I have an issue with the schedule lines in the sales order. When we create a sales order  with today as the delivery date, it creates two schedule lines for the single order item. But if we give future date as the delivery date, then it creates one schedule line only. The confirmed quantity for the first line item (with today we the delivery date) is zero and second line item confirmed quantity (with delivery date as tomorrow) is actual order quantity. So as there is no confirmed quantity on todayu2019s date, it looks like it is creating new line item. But we do we have stock.
    We donu2019t have availability check on and we use custom line item and schedule line categories.
    Please give some hints on what might be the issue.
    There was on post with this kind of issue, but it was closed without answer.
    Thanks,
    Srini

    Hi Srinivas,
    So as there is no confirmed quantity on todayu2019s date, it looks like it is creating new line item. But we do have stock.
    As per my understanding although you have sufficient stock for the material system may be confirming the quantity in future date because of the forward scheduling. As you know system adds different times while evaluating the  confirmed delivery date. Check the route which system is using.

  • Populate Available Promise Date on Sales Order when Scheduling failed: Cann

    Hello ,
    when we are importing orders into Order Management and if the available promise date is greater than Request date then scheduling fails with the message"Scheduling failed: Cannot meet request date or latest acceptable date Available Date:" The order is booked and the ATP items have schedule ship date Null and in the same order I have non ATP items with schedule ship date
    Is there a way to populate the Available promise date when Scheduling fails without ATP override.
    thank you for your time

    Hello ,
    when we are importing orders into Order Management and if the available promise date is greater than Request date then scheduling fails with the message"Scheduling failed: Cannot meet request date or latest acceptable date Available Date:" The order is booked and the ATP items have schedule ship date Null and in the same order I have non ATP items with schedule ship date
    Is there a way to populate the Available promise date when Scheduling fails without ATP override.
    thank you for your time

  • Link between Delivery and Sales Order Schedule Line

    Hi Gurus,
    I have a requirement in which i need to display quantity and amount at schedule line level and also the delivery and delivery item for each schedule line.
    For example, if there is a sales order O1 and item 10 for which we have 3 schedule lines and 3 deliveries as well say D1, D2 and D3.
    Report should be something like this
    Sales Order    Item   Schedule Line    Delivery    Del Item   Confirmed Order Qty
    O1                 10      1                       D1           10            5
    O1                 10       2                      D2            10            5
    O1                 10       3                      D3            10            4
    How can i determine that a particular delivery corresponds to which schedule line of that saler order-item?
    We have the link between delivery and sales order but is there any way that we can get the link of delivery at schedule line level?
    Please help.
    Regards,
    Gaurav

    Hi,
    I suppose you must check with SD functional consultant and the post should also be in the logistics SD forum and not BI. But I suppose there is know specific link between the schedule line of SO to the Delivery. It is more like a bucket flow for ex.
    Sale order   Item    Schedule line  qty
    SO1            Item1     Sch1            10
    SO2            Item1      Sch2           10
    Delivery Item QTy
    DO1       IT1   15
    DO2       IT1    5
    In this case qty 15 is distributed over both SO1 and SO2, and SO2 ITem1 Sch2 has link to both the DOs
    So I am not sure if you can establish a one to one link, please check with your SD consultants.
    Regards,
    Ashwin G

  • Fix Date & Qty Field in Schedule Lines Sales Order

    Dear Friends,
    I want to understand the need and use of the Fix Date & Qty field check in the sales order -> Item -> Schedule Lines.
    Can anybody explain me the need of the same.
    Regards,
    Harsh

    If the availability check for an item determines that the item cannot be delivered fully on the requested delivery date, and, as a result one or more schedule lines have to be created for later delivery dates, the customer can decide whether to accept these delivery dates and quantities.
    You can record the customer's decision either by setting an indicator in the Fixed date and qty field or by leaving this field blank. The field is displayed both on the schedule line overview screen and on the availability screen.
    <b>Customer Accepts the Schedule Line Proposal</b>
    If the customer accepts the schedule lines which are proposed by the system, mark the Fixed date and qty field. The system then transfers the requirements for the schedule lines to material requirements planning.
    <b>Customer Requires Goods Earlier</b>
    If the customer requires the goods earlier than the date that the system can confirm after the availability check, leave the Fixed date and qty field blank. The system then only passes on the requirements for the requested delivery date and does not take the quantities and dates confirmed by the system after the availability check into account. In this case, it is assumed that the requested delivery date can be kept to because, for example, additional production capacity may become free. The system only confirms the sales order once the entire order quantity can be delivered on the requested delivery date. In the subsequent delivery processing, the sales order is only considered to be completed when the entire order quantity has been delivered or when all partial delivery agreements have been fulfilled.
    A fixed item is considered to be completed once the entire confirmed quantity (which can be smaller than the originally requested order quantity)has been delivered. Therefore, it does not make sense to fix the confirmed quantity to 0 as the item is considered to be completed from the start.
    During rescheduling, the fixed quantities and dates are no longer taken into account.
    The same info u can get easily from help.sap.com
    Message was edited by:
            sam masker

  • Schedule Line Issue in Sales order...

    Hello,
    While creating sales order in schedule line two schedule lines are getting created. fisrt line the date of creation of the sales order with out confirm quantity and the second line which is two days later with confirm quantity. When material is available then why schedule line is showing confirm quantity in later days. How to rectify this? please let me know the all possibilities.
    David.

    Eventhough material is available today , it doesnt means that the material can be delivered by today itself. There are other dates also which will affect the delivery date like Transportation planning, availability of truckts to send the materials, based on these transportation plannign and transportation leadtimes, the Goods Issue date and thus the final delivery date will be decided.
    If you want to finetune this functionality
    1. If your route determination is enabled, then you have to configure your transportation lead time for the relevant route.
    2. If routes are not enabled, then you have to define these things in shipping point in logistics execution
    Hope this helps you to solve the problem

  • Sales order schedule line - additional fields

    Folks,
    Need to add some custom fields sales order - at schedule line level.
    Does anyone know any screen exit/ BADI etc for this?
    ECC6.0
    Thanks in advance.

    Hai.
    check this example.
    *& Report ZSAN_BAPI_PURCHASE_ORDER *
    REPORT ZSAN_BAPI_PURCHASE_ORDER .
    DATA: HEADER LIKE BAPIMEPOHEADER,
    " Header
    HEADER_IND LIKE BAPIMEPOHEADERX,
    " Header index
    PO_ITEMS LIKE BAPIMEPOITEM OCCURS 0 WITH HEADER LINE,
    " Item table
    ITEMS_IND LIKE BAPIMEPOITEMX OCCURS 0 WITH HEADER LINE,
    " Item index table
    RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE
    " Message Return table
    SET PF-STATUS 'SANKET'.
    **Initialize Header values
    *HEADER-DOC_TYPE = 'NB'.
    *HEADER-ITEM_INTVL = '00001'.
    *HEADER-VENDOR = '0000001000'.
    *HEADER-PURCH_ORG = '1000'.
    *HEADER-PUR_GROUP = '001'.
    *HEADER-CURRENCY = 'EUR'.
    *HEADER-COMP_CODE = '1000'.
    *HEADER-PMNTTRMS = '00001'.
    **Initialize Index values
    *HEADER_IND-DOC_TYPE = 'X'.
    *HEADER_IND-ITEM_INTVL = 'X'.
    *HEADER_IND-VENDOR = 'X'.
    *HEADER_IND-PURCH_ORG = 'X'.
    *HEADER_IND-PUR_GROUP = 'X'.
    *HEADER_IND-CURRENCY = 'X'.
    *HEADER_IND-COMP_CODE = 'X'.
    *HEADER_IND-PMNTTRMS = 'X'.
    *Initialize Header values
    HEADER-DOC_TYPE = 'NB'.
    HEADER-ITEM_INTVL = '00001'.
    HEADER-VENDOR = '0000003020'.
    HEADER-PURCH_ORG = '3000'.
    HEADER-PUR_GROUP = '000'.
    HEADER-CURRENCY = 'USD'.
    *Initialize Index values
    HEADER_IND-DOC_TYPE = 'X'.
    HEADER_IND-ITEM_INTVL = 'X'.
    HEADER_IND-VENDOR = 'X'.
    HEADER_IND-PURCH_ORG = 'X'.
    HEADER_IND-PUR_GROUP = 'X'.
    HEADER_IND-CURRENCY = 'X'.
    *Initialize Item values
    PO_ITEMS-PO_ITEM = '00001'.
    PO_ITEMS-MATERIAL = '100-100'.
    PO_ITEMS-PLANT = '3000'.
    PO_ITEMS-QUANTITY = '4'.
    PO_ITEMS-NET_PRICE = '1'.
    APPEND PO_ITEMS.
    *Initialize Item index values
    ITEMS_IND-PO_ITEM = '00001'.
    ITEMS_IND-MATERIAL = 'X'.
    ITEMS_IND-PLANT = 'X'.
    ITEMS_IND-QUANTITY = 'X'.
    PO_ITEMS-NET_PRICE = '1'.
    APPEND ITEMS_IND.
    *Initialize Item values
    PO_ITEMS-PO_ITEM = '00002'.
    PO_ITEMS-MATERIAL = '200-200'.
    PO_ITEMS-PLANT = '3100'.
    PO_ITEMS-QUANTITY = '20'.
    PO_ITEMS-NET_PRICE = '3'.
    APPEND PO_ITEMS.
    *Initialize Item index values
    ITEMS_IND-PO_ITEM = '00002'.
    ITEMS_IND-MATERIAL = 'X'.
    ITEMS_IND-PLANT = 'X'.
    ITEMS_IND-QUANTITY = 'X'.
    ITEMS_IND-NET_PRICE = 'X'.
    APPEND ITEMS_IND.
    *Initialize Item values
    PO_ITEMS-PO_ITEM = '00003'.
    PO_ITEMS-MATERIAL = '102-510'.
    PO_ITEMS-PLANT = '3000'.
    PO_ITEMS-QUANTITY = '20'.
    PO_ITEMS-NET_PRICE = '246'.
    APPEND PO_ITEMS.
    *Initialize Item index values
    ITEMS_IND-PO_ITEM = '00003'.
    ITEMS_IND-MATERIAL = 'X'.
    ITEMS_IND-PLANT = 'X'.
    ITEMS_IND-QUANTITY = 'X'.
    ITEMS_IND-NET_PRICE = 'X'.
    APPEND ITEMS_IND.
    *Create Production order
    CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
    POHEADER = HEADER
    POHEADERX = HEADER_IND
    TABLES
    RETURN = RETURN
    POITEM = PO_ITEMS
    POITEMX = ITEMS_IND.
    *Commit BAPI
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'.
    *Display PO number
    FORMAT COLOR 6 INVERSE ON.
    READ TABLE RETURN WITH KEY TYPE = 'S'.
    IF SY-SUBRC <> 0.
    WRITE: /,'Purchase Order not created'.
    ELSE.
    WRITE: /, RETURN-MESSAGE.
    ENDIF.
    FORMAT COLOR OFF INVERSE OFF.
    2----
    *& Report ZSAN_BAPI_TEST1 *
    REPORT ZSAN_BAPI_TEST1.
    DATA: ORDER_HEADER LIKE BAPISDHEAD,
    " Sales and Distribution Document Header
    ORDERPARTNER LIKE BAPIPARTNR OCCURS 0 WITH HEADER LINE,
    " SD Document Partner
    ORDER_ITEM_IN LIKE BAPIITEMIN OCCURS 0 WITH HEADER LINE,
    " Create SD Document Item
    HEADER_IND LIKE BAPISDHEADX,
    " Checkbox Fields for Sales and Distribution Document Header
    RETURN LIKE BAPIRETURN1 OCCURS 0 WITH HEADER LINE,
    " Return Parameter
    W_ORDER LIKE BAPIVBELN-VBELN.
    " Sales Document
    *Initialize values
    ORDER_HEADER-DOC_TYPE = 'TA'.
    ORDER_HEADER-SALES_ORG = '5555'.
    ORDER_HEADER-DISTR_CHAN = '55'.
    ORDER_HEADER-DIVISION = '55'.
    ORDERPARTNER-PARTN_NUMB = '0000003002'.
    ORDERPARTNER-PARTN_ROLE = 'SP'.
    APPEND ORDERPARTNER.
    CLEAR ORDERPARTNER.
    ORDER_ITEM_IN-MATERIAL = 'MAT1'.
    ORDER_ITEM_IN-REQ_QTY = '2.000'.
    APPEND ORDER_ITEM_IN.
    CLEAR ORDER_ITEM_IN.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
    EXPORTING
    ORDER_HEADER_IN = ORDER_HEADER
    CONVERT_PARVW_AUART = 'X'
    IMPORTING
    SALESDOCUMENT = W_ORDER
    RETURN = RETURN
    TABLES
    ORDER_ITEMS_IN = ORDER_ITEM_IN
    ORDER_PARTNERS = ORDERPARTNER.
    *Commit BAPI's process
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'.
    FORMAT COLOR 6 INVERSE ON.
    READ TABLE RETURN WITH KEY TYPE = 'E'.
    IF SY-SUBRC = 0.
    WRITE: 'Sales order not created' .
    ELSE.
    WRITE: ' Sales order NO.',W_ORDER COLOR 5, 'created successfully'.
    ENDIF.
    FORMAT COLOR OFF INVERSE OFF.
    3----
    *& Report ZSAN_BAPI_PROFIT_CTR *
    REPORT ZSAN_BAPI_PROFIT_CTR .
    PARAMETERS: PR_CTR LIKE BAPI0015ID2-PROFIT_CTR,
    VLD_TO LIKE BAPI0015_3-DATE.
    DATA: PROFITCENTERID LIKE BAPI0015ID2 OCCURS 0 WITH HEADER LINE,
    VALID_FORM LIKE BAPI0015_3-DATE,
    VALID_TO LIKE BAPI0015_3-DATE,
    BASICDATA LIKE BAPI0015_4 OCCURS 0 WITH HEADER LINE,
    RETURN LIKE BAPIRET2 ,
    PROFITCENTER LIKE BAPI0015ID2-PROFIT_CTR,
    CONTROLLINGAREA LIKE BAPI0015ID2-CO_AREA.
    *Fill PROFITCENTERID
    PROFITCENTERID-PROFIT_CTR = PR_CTR.
    PROFITCENTERID-CO_AREA = '1000'.
    APPEND PROFITCENTERID.
    *Fill VALID_FORM
    VALID_FORM = '19940101'.
    *Fill VALID_TO
    VALID_TO = VLD_TO.
    *Fill BASICDATA
    BASICDATA-PRCTR_NAME = 'Sanket'.
    BASICDATA-PRCTR_HIER_GRP = 'H1010'.
    BASICDATA-IN_CHARGE = 'Sanket'.
    APPEND BASICDATA.
    *Get Profit center
    CALL FUNCTION 'BAPI_PROFITCENTER_CREATE'
    EXPORTING
    PROFITCENTERID = PROFITCENTERID
    VALIDFROM = VALID_FORM
    VALIDTO = VALID_TO
    BASICDATA = BASICDATA
    IMPORTING
    RETURN = RETURN
    PROFITCENTER = PROFITCENTER
    CONTROLLINGAREA = CONTROLLINGAREA.
    *Commit BAPI
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT = 'X'.
    *Display profit center
    FORMAT COLOR 6 INVERSE ON.
    IF RETURN-TYPE = 'E'.
    WRITE: /,RETURN-MESSAGE.
    ELSE.
    WRITE: /,RETURN-MESSAGE.
    ENDIF.
    FORMAT COLOR OFF INVERSE OFF.
    REPORT ZVRDOC0 no standard page heading
    line-size 300
    line-count 50(5).
    TABLES : vbak, "Sales Document Header Level
    vbap, "Sales Document Header Level
    kna1. "General Data in customer Master
    *INTERNAL TABLE T_VBAP
    DATA : Begin of t_vbap occurs 0,
           vbeln like vbap-vbeln,
           matnr like vbap-matnr,
           posnr like vbap-posnr,
           arktx like vbap-arktx,
           kwmeng like vbap-kwmeng,
           cmkua like vbap-cmkua,
           end of t_vbap.
    *INTERNAL TABLE T_TAB.
    DATA : Begin of t_tab occurs 0,
            vbeln like vbak-vbeln,
            kunnr like vbak-kunnr,
            audat like vbak-audat,
            netwr like vbak-netwr,
            vkorg like vbak-vkorg,
            name1 like kna1-name1,
            land1 like kna1-land1,
            end of t_tab.
    *INTERNAL TABLE T_FINAL.
    DATA : Begin of t_final occurs 0,
            vbeln like vbap-vbeln,
            kunnr like vbak-kunnr,
            matnr like vbap-matnr,
            posnr like vbap-posnr,
            arktx like vbap-arktx,
            kwmeng like vbap-kwmeng,
            cmkua like vbap-cmkua,
            audat like vbak-audat,
            netwr like vbak-netwr,
            vkorg like vbak-vkorg,
            name1 like kna1-name1,
            land1 like kna1-land1,
            end of t_final.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-bO3.
    parameters : P_kunnr like vbak-kunnr.
    select-options : S_vbeln for vbak-vbeln,
                     S_audat for vbak-audat.
    SELECTION-SCREEN END OF BLOCK B1.
    start-of-selection.
    select vbeln  matnr posnr arktx kwmeng cmkua  from vbap
    into corresponding fields  of table  t_vbap  where vbeln in S_vbeln .
    IF sy-subrc EQ 0.
    select  vbakkunnr vbakvbeln vbakaudat vbaknetwr vbak~vkorg
            kna1name1 kna1land1  into  table   t_Tab   from
            vbak   join  kna1   on kna1kunnr  = vbakkunnr
            FOR ALL ENTRIES IN t_vbap
            where vbak~vbeln = t_vbap-Vbeln and
            vbak~kunnr = p_kunnr and
            vbak~audat  in  S_audat .
    ENDIF.
    *end-of-selection.
    loop at t_vbap.
    read table t_tab with key vbeln = t_vbap-vbeln.
    move :
    t_vbap-vbeln to t_final-vbeln,
    t_vbap-matnr to t_final-matnr,
    t_vbap-posnr to t_final-posnr,
    t_vbap-arktx to t_final-arktx,
    t_vbap-kwmeng to t_final-kwmeng,
    t_vbap-cmkua to t_final-cmkua,
    t_tab-kunnr to t_final-kunnr,
    t_tab-audat to t_final-audat,
    t_tab-netwr to t_final-netwr,
    t_tab-vkorg to t_final-vkorg,
    t_tab-name1 to t_final-name1,
    t_tab-land1 to t_final-land1.
    append t_final.
    clear t_Final.
    endloop.
    sort t_Final by vbeln   Kunnr    matnr posnr  .
    loop at t_final.
    at new vbeln.
    write : /1 SY-VLINE, 2 t_final-vbeln color 5 inverse.
    ULINE /1(250).
    endat.
    write : /1 SY-VLINE, 2 t_final-vbeln color 5 inverse,
    20 SY-VLINE, 21 t_final-posnr color 5 inverse,
    40 SY-VLINE, 41 t_final-matnr color 5 inverse,
    60 SY-VLINE, 61 t_final-arktx color 4 inverse,
    80 SY-VLINE, 81 t_final-kwmeng color 4 inverse,
    100 SY-VLINE, 101 t_final-cmkua color 4 inverse,
    120 SY-VLINE, 121 t_final-kunnr color 3 inverse,
    140 SY-VLINE, 141 t_final-audat color 3 inverse,
    160 SY-VLINE, 161 t_final-netwr color 2 inverse,
    180 SY-VLINE, 181 t_final-vkorg color 2 inverse,
    210 SY-VLINE, 211 t_final-name1 color 1 inverse,
    230 SY-VLINE, 231 t_final-land1 color 1 inverse,
    250 SY-VLINE.
    at end of vbeln.
    sum.
    ULINE /1(250).
    write: /60 SY-VLINE, 'Total' ,
    81 t_final-kwmeng color 4 inverse ,100 SY-VLINE,
    101 t_final-cmkua color 4 inverse,120 SY-VLINE.
    ULINE /1(250).
    endat.
    at last.
    SKIP 2.
    sum.
    ULINE /1(250).
    write: /1 SY-VLINE, 60 SY-VLINE, 'Grand Total' ,
    81 t_final-kwmeng color 4 inverse , 100 SY-VLINE ,
    101 t_final-cmkua color 4 inverse,120 SY-VLINE.
    ULINE /1(250).
    endat.
    endloop.
    TOP-OF-PAGE.
    ULINE /50(24).
    WRITE : /50 SY-VLINE , 52 'SALES ORDER DETAILS' COLOR 5,
    73 SY-VLINE.
    ULINE /50(24).
    ULINE .
    WRITE: /10 'CURRENT DATE :', 25 SY-DATUM COLOR 1 INVERSE,
    100 'CURRENT TIME :', 115 SY-UZEIT color 5 INVERSE.
    WRITE: /10 'USERNAME :', 25 SY-UNAME COLOR 1 INVERSE,
    100 'PAGE NO :', 113 SY-PAGNO COLOR 5 INVERSE.
    WRITE: /10 'LOGON CLIENT :', 25 SY-MANDT COLOR 1 INVERSE,
    100 'COLON N0 :', 114 SY-COLNO COLOR 5 INVERSE.
    WRITE: /10 'CURRENT REPROT:', 25 SY-REPID COLOR 1 INVERSE,
    100 'LANGUAGE :', 116 SY-LANGU COLOR 5 INVERSE.
    ULINE.
    ULINE /1(250).
    write : /1 SY-VLINE, 2 'SALES DOC NO' color 6 inverse,
    20 SY-VLINE, 21 'SALES DOC ITEM' color 6 inverse,
    40 SY-VLINE,41 'MATERIAL NO' color 6 inverse,
    60 SY-VLINE, 61 'SHORT SALES TEXT' color 6 inverse,
    80 SY-VLINE, 81 'CUMM ORDER SALES' color 6 inverse,
    100 SY-VLINE, 101 'CREDIT DATA' color 6 inverse,
    120 SY-VLINE, 121 'CUSTOMER NO' color 6 inverse,
    140 SY-VLINE, 141 'DOC DATE' color 6 inverse,
    160 SY-VLINE, 161 'NET VALUE SALES' color 6 inverse,
    180 SY-VLINE, 181 'SALES ORG' color 6 inverse,
    210 SY-VLINE, 211 'CUSTOMER NAME' color 6 inverse,
    230 SY-VLINE, 231 'CUSTOMER CONTY' color 6 inverse,
    250 SY-VLINE.
    ULINE /1(250).
    END-OF-PAGE.
    ULINE.
    WRITE: /45 ' THIS IS END OF PAGE FOR SALES DOCUMENT DETAILS'
    COLOR 6 .
    regards.
    sowjanya.b

  • Sales order schedule date is a (working) day before Scheduled ship date

    In MRP/MPS planning, the forecast consumption is occuring for all sales orders at a date (sales order schedule date) which is always a working day before the Scheduled Ship Date (SSD). What is the logic?
    Time fences are not used.
    E.g. Sales order is scheduled to ship (SSD) on 30th Nov, in forecast set > Forecast items > Consumptiion > Detail, the sales order schedule date is a day before SSD.

    Hi,
    This is a complex issue; best solution is by using APO/GATP.
    If not, then in ERP only, the second best is:
    1) Work with assembly processing in SO, meaning that a production/planned order is automatically created in the customer order during order creation.
    2) Then, after the order is created it is scheduled, and the delivery date proposal is based on that.
    3) Now you can check in the order that there are no capacity overloads, and all capacity required to produce on the proposed date is available. If yes, you're done. If not, it gets a bit complex, since you actualy need to switch to capacity planning, do capacity leveling and dispatch (PP), and the you get a new feasible schedule proposal based on that.
    APO/GATP could do all that automatically!
    Regards,
    Mario

Maybe you are looking for

  • Mac mini shut down when start

    Hi all, My Mac mini doesn't want to start anymore ... I have run the Apple Hardware Test from the CD and all seems ok (all test are ok) but when I try to start on the hard drive, the mac mini suddenly shut down Where it can comes from ? hard drive fa

  • Firefox keeps crashing. May be a plugin or flash issue.

    Firefox crashes from time to time. Its hard for me to troubleshoot this because I can't reason out why it is crashing. Usually happens when flash related things are concerned. Sometimes it also crashes in general. I already tried most of the suggesti

  • Copy folder in iPhoto on one mac to another mac

    I've read a lot of posts but they all seem too complicated for me to understand. I want to move (from my iMac) a folder in iPhoto with about 1500 photos in it, to my daughters macbook. I DON'T want to move the entire iPhoto library. The iMac uses iPh

  • ME21N add new line item when creating a PO

    Hi guys, I am new to badi & oop. I want to add a PO line item after clicking the save button in ME21n. I found the BADI IF_PURCHASE_ORDER_MM. I have coded in the method POST by using method create_item. However, it still does not work? Any ideas how

  • TS3297 Redeem Code page keeps asking for iTunes password

    Windows 8. I've bought one movie, but on the second try, the Code redemption keeps asking for my password. Thanks for your advice.