How to pass Schedule lines of an item Line to 'BAPI_QUOTATION_CREATEFROMDAT

Hi Friends,
I am trying to create Sales Quotation using the  'BAPI_QUOTATION_CREATEFROMDATA2'  from Webdynpro Application.
I am able to create the quotation with Line items, but I am not able to pass the multiple schedul line for an Item line.
it takes,but it checks the item availabilty and propses the delivery propsal dates.
but my requirement is It should take only the schedule line items which I am passing to BAPI,because I do the availability check in my application and pass those schdule line items to BAPI.
If I pass only one schedule line item then should create only with one schdule line item,If I pass Muliple then it should create schedul lines for item line.
Please help me in solving the issue.
Regards,
Xavier.P

Hi max,
loop at lt_nd_quote_items into ls_nd_quote_items.
    lv_item = lv_item + 10.
*Check weather Availablity check is done or not.
    read table lt_nd_schedule_lines into ls_nd_schedule_lines
                       with key matnr = ls_nd_quote_items-matnr.
    if sy-subrc = 0.
      loop at lt_nd_schedule_lines into ls_nd_schedule_lines
                        where matnr = ls_nd_quote_items-matnr
                        and   kwmeng = ls_nd_quote_items-kwmeng.
        lv_sch_line = lv_sch_line + '0001'.
        wa_order_schedule-itm_number         = lv_item.
        wa_order_schedule_inx-itm_number     = lv_item.
        wa_order_schedule-sched_line         = lv_sch_line.
        wa_order_schedule_inx-sched_line     = lv_sch_line.
        wa_order_schedule-req_date           = ls_nd_schedule_lines-delv_date.
        wa_order_schedule_inx-req_date       = c_abap_true.
        wa_order_schedule-req_qty            = ls_nd_schedule_lines-kwmeng.
        wa_order_schedule_inx-req_qty        = c_abap_true.
        wa_order_schedule-SCHED_TYPE         = 'BP'.
        wa_order_schedule_inx-SCHED_TYPE     = 'X'.
        wa_order_schedule-MS_DATE = ls_nd_schedule_lines-delv_date.
        wa_order_schedule_inx-MS_DATE = 'X'.
        wa_order_schedule_inx-updateflag     = 'I'.
        append:wa_order_schedule to  it_order_schedule,
               wa_order_schedule_inx to it_order_schedule_inx.
        clear:ls_nd_schedule_lines.
      endloop.
    else.
*If no Availablity check is done,pass the item details to schedule lines.
      lv_sch_line = lv_sch_line + sy-tabix.
      wa_order_schedule-itm_number         = lv_item.
      wa_order_schedule_inx-itm_number     = lv_item.
      wa_order_schedule-sched_line         = lv_sch_line.
      wa_order_schedule_inx-sched_line     = lv_sch_line.
      wa_order_schedule-req_date           = ls_nd_quote_items-delivery_on.
      wa_order_schedule_inx-req_date       = c_abap_true.
      wa_order_schedule-req_qty            = ls_nd_quote_items-kwmeng.
      wa_order_schedule_inx-req_qty        = c_abap_true.
      wa_order_schedule_inx-updateflag     = 'I'.
      append:wa_order_schedule to  it_order_schedule,
             wa_order_schedule_inx to it_order_schedule_inx.
    endif.
    clear:ls_nd_quote_items,lv_sch_line.
  endloop.
Max,  the internal table lt_nd_schedule_lines  is containg my schedule lines,if there are no lines in that table i am just passing the default line item details so that the BAPI take care of schdule line for that Line item.
Could you please help me in figuring the issue?
Regards,
Xavier.P

Similar Messages

  • How to delete schedule line item

    Hi All,
    I want to delete schedule line entry for an item in R/3.
    How can i do this?
    Thanks,
    Nabha

    Hi,
    For some of the business documents schedule line item deletion would be partially which means mark for deletion-specially when the case of POs and so on
    other in general you need to goto the change document t-code and select the line item and you find the delete row mark in the same screen and select..
    Hope this helps..
    assign points if useful.
    cheers
    Pattan.

  • How to upload  schedule line from flat files to sap file

    dear all,
    i want to upload the schedule lines from flat files to sap schedulle lines
    but the flat files have 15 schedule lines and the data is as per date
    so how to upload that and the fields available in flat files are more than the sap screen
    we are having more than 6 items
    and 15scedule lines its abt 90data to be upload
    for one customer in every 15 day
    so how to do this
    is there any direct use in functional side
    with out the help of any abap
    but my user will do it
    so he need a permanent solution
    with regards
    subrat

    Hi Subrat ,
    u can upload the data either ( Master /Transaction) data with the help of lsmw. for that all u need to do is go through the lsmw and do it. in that u can go Batch input recording/ BAPI/ IDOC any of that. here i am sending the LSMW Notes go through it and do the work.
    once u create the LSMW project then u can ask the data from user or u can explain the user about the program and can run the flat file to upload the data.
    if u require LSMW material Just send me blank mail from u. my mail id is [email protected]
    Reward if Helpful.
    Regards,
    Praveen Kumar.D

  • How to Change Schedule line Quantity in BADI 'ORDER_SAVE'

    Hi,
    I need to change the Schedule line quantity While Order saving. I am writing the code in ORDER_SAVE BADI. Using the Header guid i am reading the details and changing the quantity in Schedule line structure. How can i pass those values in to Memory so that order quantity will change. I try to Use CRM_ORDER_MAINTAIN but not able to change the quantity. Can an

    Hi,
    You need the One Order Function Module - CRM_ORDER_MAINTAIN to update the Schedule line value. So, you need to have a look at all the fields that are necessary to fill using the Tables and Structures. If you have the header guid, then you can probably pass the guid to CRM_ORDER_READ to read the values and then fill in the entries necessary to make the changes.
    You can also debug the order code to get a feel of the necessary changes.
    Hope this helps.
    Thanks,
    Samantak.

  • How to check schedule line PO text before PO saving.

    How can i check the schedule line PO text before po saving. My idea is add a trigger in user exits. but i don't know how to check this data. I can't check the table stxh or stxl because those data are stored after PO saved. I think before that the data is stored in memory or somewhere. Could you give me some advise? thanks

    Hi
    Search for a correct user exit or BADI and you can check the text of the PO schedule line
    Use the READ_TEXT fun module to fetch the text by passing the parameters OBJECT,OBJECTNAME,ID and LANGUAGE and fetch it and check it
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to put schedule lines for one year  in a schedule line agreement

    dear all
    thanks for the support till now from the forum
    now i need some seetings by which the scheduling agreement will autoumatically take the schedule line for one year automatically
    in my client we are getting open PO so
    we have to make one agreement acording to that PO and thats for one year
    and this one yr will have same quantity to be produced everyday
    means 12nos of material every day for 12 month and this will be for every day
    and as per that it should generate a sales order.i need to put schedule line automatically not mannually one by one for each date.so wat is the settingand how to reffer this scheduling agreement we can produce sales order.
    please help
    subrat
    Message was edited by:
            subrat panda

    Dear Subrat,
    you cannot create a yearly schedule line in the scheduling agreement. It is not possible due to format restrictions of the date field. But what you can do is the follows (it is the modification, but it should work with the help of user-exits):
    1. You can split the year schedule line to the monthly schedule lines. There are two ways to do it. If you apply the DELINS IDOC, then you can do it already during transfer of the data to the application (itr is the best way). Here you can use, for example, user-exit USEREXIT_ZUORDNEN_IDOCS (include LVED4FZZ) or customer function EXIT_SAPLVED4_002, called from the subroutine USEREXIT_DYNPRO (Include LVED4F0U). Alternatively, you can use the user-exit USEREXIT_MOVE_FIELD_TO_VBEP (Include MV45AFZZ) within the call transaction, then it will work also in the dialog case.
    2. After getting the monthly schedule lines, you can create a planning delivery schedule, where you can split mothly schedule lines automatically to daily schedule lines according to the customer factory calender.The settings for generation of planning delivery schedules can be found under:
    Customizing SPRO: Sales and Distribution => Sales => Sales Documents => Scheduling Agreements with Delivery schedules => Maintain Planning Delivery Sched. Instruct./Splitting Rules
    It is the only ways, how you can reach your aim. I hope, this information will help you further.
    Kind Regards,
    Akmal Vakhidov
    Development Support SD, SAP, Walldorf/Germany

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

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

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

  • How to gen Schedule line automatical.y by BAPI_SALESORDER_CREATEFROMDAT2

    Dears,
       I am using BAPI_SALESORDER_CREATEFROMDAT2 to create Sales Order,
    everything goes on well, but the only problem is i have to input the schedule line myself by providing the   SCHEDULE_LINES& SCHEDULE_LINESX parameter.
      Just wondering...is there any way to let 
      BAPI_SALESORDER_CREATEFROMDAT2  create schedule line automatically,
      just like what we do in frontend, after we input the order quantity in line item , the
      schedule line will be generated automatically...

    Hello,
    You can use FM: BAPI_SALESORDER_CHANGE with update indicator I (insert)
      call function 'BAPI_SALESORDER_CHANGE'
        exporting
          salesdocument    = l_vbeln
          order_header_inx = l_wa_order_header_inx
          simulation       = l_simulation
        tables
          return           = l_i_return
          order_item_in    = l_i_order_item
          order_item_inx   = l_i_order_item_inx
          partners         = l_i_partners
          schedule_lines   = l_i_schedule_lines
          schedule_linesx  = l_i_schedule_linesx
          extensionin      = l_i_extensionin.
    Thanks
    Subhankar

  • How to Count schedule lines in IDoc ORDERS05 using XSLT Mapping

    Hi Experts,
    In a Scenario where we are sending Purchase order (ORDERS05) to SAP SNC using XSLT Mapping,
    where in we need to count the no. of schedule lines against the Purchase Order line.
    As in Schedule line segment there is no such provision, so it needs to be handle in XSLT mapping to count the schedule lines.
    Can you all please guide me how to go about the same.
    Regards,
    Nitin P

    Hi Satish,
    Thank you very much for the reply,
    as there is only Quantity and other information is maintained against schedule lines how we can count the schedule line repeatation against PO line ? Is that very simple as you suggested or some other consideration also needs to be taken.
    Please clarify the same and let me also know if there are some standard documents also for the same.
    Regards,
    Nitin P

  • How to deactivate schedule line in sales order

    hi friends,
    how can i deactivate the schedule line in sales order so that we can deliver the sales order after the schedule date. i can uderstand that system is not allowing before schedule date. but what if i want to deliver after that.
    Thanks in advance.
    Regards,
    Solomon

    hi,
    this is to inform you that,
    here you need to switch off:
    schedule lines allowed
    in schedule lines control data - remove or un check - availability/TOR
    In SPRO - Availability Check settings.
    but i have a question here:
    what is the business logic.
    do you want to do the same with all the sales orders or not.
    please update the forum
    then answer will be different
    balajia

  • How to pass Text Lines to z-table..?

    Hi All..
    I have a custome screen, where user inputs text of length 250 Char.
    How to pass this value to Z-table, where i have created a Field with CHAR type and 250 Length..???
    Pavan

    Hi,
          Use below logic.
          data itab like ztable occurs 0 with header line.
          itab-text = screen-text.
            append itab. 
          insert ztable from table itab.
    Regards,
    Amole          
    Regards
    Amole

  • How to change schedule line fields when save sales documents in va01/va02

    Hi, every Experts,
    I want to change schedule line when save the sales documents in va01 or va02, such as change delivery block or schedule line category.
    of course, can use user exit USEREXIT_SAVE_DOCUMENT_PREPARE, but I do not know to use this user exit, I am newer about ABAP.
    Please help me , thanks.
    best regards
    Passion Wu

    Hi,
    For changeing schedule line: select line item, GOTO --> item --> schedule lines --> enter the confirmed qty.
    USEREXIT_SAVE_DOCUMENT_PREPARE program is MV45AFZZ
    For your reference
    USEREXIT_SAVE_DOCUMENT_PREPARE - Can I use in button, but skip
    regards,
    Mohanprabu C

  • How to Pass Command line arguments to an exe created in LV8.0

    Hi Friends,
    I have Created an exe in LV8.0, which accepts the Folder path as input and executes.
    I want to call this exe passing the parameter (i.e folder path in my case)  from the command line argument. How to pass arguments to the exe ?
    Generally we may be having different types of input parameters to a vi like numeric control, string, boolean etc..If we create an exe that needs three input parameters among which one is boolean, other is string and third is a numeric value.
    How to pass these different types of input controls to the exe as parameters in command line at the same time?
    Thanks and Regards,
    SODLB

    I don't have any experience with the 8.x application builder, but the 7.x one has a checkbox for passing the arguments to the executable.
    As for reading them, there should be an example in the example finder (Help>>Find Examples) which shows how to do this. If you want to pass multiple parameters, I suggest you use a structure similar to NAME=VALUE, so that you can parse each element to find the = and then use a case structure to decide what to do with the parameters. This allows your users to enter or not enter any of the switches.
    Try to take over the world!

  • How to pass command line arguments to Web Start appclient?

    Hi,
    I would like to pass arguments to appclient, but "javaws" unable to do that.
    Do I have to overwrite the JNLP? I use Sun Appserver 9.0, it creates JNLP on the fly!!!
    Please help, thanx!
    MB

    Hi, MB.
    If you are talking about the automatic Java Web Start support for launching app clients in GlassFish, you can pass the equivalent of command line arguments using the query string of the URL you use to launch the app client.
    Briefly, use
    http://host:port/client-path?arg=first-arg&arg=second-arg& ...
    specifying the argument values in the order that you want them passed to the client.
    The GlassFish server will do the right thing and generates the correct JNLP so your arguments are passed to the app client.
    The GlassFish developer's guide http://glassfish.dev.java.net/nonav/javaee5/docs/AS91DG.pdf discusses this and all aspects of the Java Web Start support. You can also take a look at this blog entry http://blogs.sun.com/quinn/entry/command_line_arguments_and_properties that focuses on how to pass arguments.
    Since this technique deals with argument passing in the URL, it works no matter how you launch the app client: a URL in a browser, the javaws command, etc.
    - Tim

  • How to pass command line parameters During server start up

    Hi,
      I am trying to use Net Beans profiling tool.On the server side i required to pass a command line option to enable remote profiling.
    Regards,
    Kiran.

    Hi, MB.
    If you are talking about the automatic Java Web Start support for launching app clients in GlassFish, you can pass the equivalent of command line arguments using the query string of the URL you use to launch the app client.
    Briefly, use
    http://host:port/client-path?arg=first-arg&arg=second-arg& ...
    specifying the argument values in the order that you want them passed to the client.
    The GlassFish server will do the right thing and generates the correct JNLP so your arguments are passed to the app client.
    The GlassFish developer's guide http://glassfish.dev.java.net/nonav/javaee5/docs/AS91DG.pdf discusses this and all aspects of the Java Web Start support. You can also take a look at this blog entry http://blogs.sun.com/quinn/entry/command_line_arguments_and_properties that focuses on how to pass arguments.
    Since this technique deals with argument passing in the URL, it works no matter how you launch the app client: a URL in a browser, the javaws command, etc.
    - Tim

Maybe you are looking for

  • Index/Key Insert Design Question

    Assume I am dealing with a customer object, and its properties which I'm attempting to insert into the database; one table called customer, with a key/index called id which is a unique number for each customer. As I understand it, this is a typical s

  • I can't download Firefox, HELP!!!!!

    Iam trying to install Firefox on my Windows 7 laptop. I can not see the download icons, they are being blocked. HELP!!! I dislike Internet Explorier

  • Transferring AE CS6 file to CS5.5?

    Hi I have a file that opens only in CS6 and I need to open the same file in CS5.5, is it possible to save the file in CS6 as a format that will open in CS5.5? This is urgent as my cs6 trial will run out soon. The file was oroginally started in cs5.5

  • Where can i find .lso files for the motif XF keyboard

    I been searching for over a year for the .lso for the Motifi XF, can anybody direct me by link where I can find them please? I see them everywhere for Motif XS, but the XF is different. Thx, DG

  • Adding 2 primary keys in mdf database in VS Community 2013 from Server Explorer

    Hello, I have to update a Windows Forms application using VS Community 2013. I have to add a little database with customers and installations, so 1 customer can manage many installations and 1 installation can be managed by many customers. It is the