Add new line item to free sales order

HI All,
I have new requirement in creation of sales order . Here we have free promotion sales . Here if customer buy one material then he will get some other material as free .In standard sap we can give only one line item as free not more than that .
Here our requirement is more than one line item . I suggested them maintain all the free materials in one Ztable when ever the original material will come for sales order then i have to fetch these materials from ztable automatically and it should create sales order. I started doing this using user exit FORM USEREXIT_MOVE_FIELD_TO_VBAP.
These are the below links i checked in our sdn. Adding Line items to sales order on creation using User-Exit in VA01.
Please give me some idea on this .Please tell me if it is possible with configuration.
Regards,
Madhu.

Hi,
We also had a requirement where we needed to give some items free of charge in a standard sales order.We end up using the tann item categories for the item which are suppose to go free. Please note user will need to manually change the item category of the line items intended as free of charge.
thanks

Similar Messages

  • Restricting new line item of completed sales order in VA02

    Hi,
    My requirement is to restrict the user to add new line items for Sales Order if the <b>Header status</b> is completed in VA02 transaction.
    I have done the coding in "<b>userexit_move_field_to_vbap</b>" as it is displaying pop up an error message and stop the users from adding a new line item.
    Popup message contains 2 buttons 'Continue' & ‘Exit’.
    If user clicks ‘<b>Continue</b>’ it should be stay in same transaction (Va02) and if user clicks '<b>Exit</b>' it should exit the VA02 transaction.
    But when I click the '<b>Continue</b>' button it is staying in the same transaction and newly entered line item values are not clearing. But these values should not appear after clicking '<b>Continue</b>' button.
    Can any body please help me in this regard?
    Thanks in advance.
    Ranjith.

    Hey,
    Is this ranjith tavidisetty.... if yes please call me on 09974440499...
    need to speak to you.....
    regards,
    naveen.

  • Add new line item in VA02 by copying same Order line details

    Hi All,
    I've a requirement where i need to add new line items in the Sales Order (T Code VA02) with reference to the same Order lines . For e.g an Order 80000100 which has 2 line items and the requirement is to create a new line i.e. line item 0030 by copying the details from the existing line item 0010 of the same order .
    I've checked the BAPI - BAPI_SALESDOCUMENT_COPY which is for Order Creation T Code VA01 . I'm looking out for Sales Order Change BAPI where i can give the reference as Order no and Order line item which will create a new line item in the same Order with the same details of the reference Order line item .
    Do let me know your thoughts !!!!
    Thanks,
    Bintu

    Hi -
    Please check these two FM's BAPI_SALESORDER_GETDETAILBOS & BAPI_SALESORDER_CHANGE.
    Regards,
    Atul Mohanty

  • Line item creation in sales order

    Hi
    I am working on User Exit USER_EXIT_SAVE_DOCUMENT_PREPARE. On saving a sales order i need to do some validations and based on the validations i need to add a line item to the sales order in the user exit.
    What are the ways that i can create the line items through the user exit

    Hi,
    It is not a straight forward thing. Adding data to table XVBAP won't work. It will create inconsistency. There are so many other tables involve here too, like, VBPA, VBUP, VBKD, KONV. There can be other tables too based on how your sales order is configured.
    Also, modifying these tables (XTAB, YTAB ) in this user-exit may cause database inconsistency.
    Regards,
    RS

  • Creating new sub line items before a Sales Order is saved (in CRM)

    Hi CRM Experts,
    I am pretty new to CRM system. I have a scenario.
    The actual business scenario behind this is: the customer can only choose a dummy material while placing an order. The customer will not be able to choose what all materials that will make up this order. So he can place an order for a "Pack" with say Qty as 50 units. The business contains some rules based on which the actual materials are mapped to this dummy material.
    User creates a SO in CRM system (using txn CRMD_BUS2000115). Assume a dummy material is added as first line item. The system displays it as line item 10. At this stage I need to create sub line items for this high level line item (item 10) based on what all actual materials can fulfill this. I need to do it programmatically. Is there any BAdI that can be used to do this? Also I need some hints on how to go about this? That is how to do it programmatically. For every sub-item material I need to carry a ATP check and only if the stock is available then add it as a sub line item.
    Basically what I need is to create sub line items programmatically exactly in the same way as it would have been created manually. The system is configured to put the sub line item numbers automatically. That is, if the high level item is 10, then sub line items will be automatically numbered as 11, 12 so on.
    Please feel free to throw me questions if you need more info.
    Thanks a lot in advance.
    Regards,
    Shyam

    Hi,
    I have a similar kind of a requirement.
    I need to add new line items to the order through the program.
    Can you please suggest how did you resolve your issue ?
    Thanks in advance!

  • Sample Material in the 3rd Line item of the Sales Order

    Hi,
    We have configured the system in the sales order as follows.
    1. Commercial Material
    2. Bonus Material.(ie Free Material)
    Now, i want to add the 3rd line item in the sales order as Sample with different Material number. How go about this. kindly let me.
    Regards
    Ravi

    Hi there,
    Enter the material in the sales order & change the item catg manually in VA02.
    But free goods & sample materials are dealt differently..
    Freegoods is entered as TANN item catg along with nornam TAN item in standard order OR.
    But sample materials or free of charge items are processed through different order type FD for eg.
    Even thought the item catg proposed in FD is TANN,, the whole process will not have pricing as TANN items arenot relevant for pricing.
    Regards,
    Sivanand

  • How to add new line item to SO using BAPI_SALESORDER_CREATEFROMDAT2

    Hi,
    I have sales order A with 1 line item, now i want to add new line item with material x and quantity y to the existing sales order A
    using BAPI_SALESORDER_CREATEFROMDAT2.
    Line item no for new line item should be generated by SAP internally.Please let me know the mandatory parameters to be passed to the BAPI to fulfill the requirement.
    DATA: order_header TYPE bapisdhd1,
               order_inx TYPE bapisdhd1x,
               partners TYPE TABLE OF bapiparnr,
               wa_partners TYPE bapiparnr.
    CLEAR: salesdocument,order_header_inx,wa_in, wa_inx.
    REFRESH: item_in, item_inx.
      salesdocument = wa_vbup-vbeln.
      order_header_inx-updateflag = 'X'.
      wa_in-itm_number = ' '.
      wa_in-material = p_nmatnr.
      wa_in-target_qty = gv_menge - gv_wemng.
      APPEND wa_in TO item_in.
      wa_inx-itm_number = ' '.
      wa_inx-updateflag = 'U'.
      wa_inx-target_qty = 'X'.
      APPEND wa_inx TO item_inx.
          CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
          EXPORTING
           salesdocumentin               = salesdocument
           order_header_in               = order_header
           order_header_inx              = order_inx
          IMPORTING
           salesdocument                 = salesdocument
          TABLES
           return                              = return
           order_items_in                = item_in
           order_items_inx               = item_inx
           order_partners                = partners.
    Thanks
    Bhuvana

    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 add new line item to PO using BAPI_PO_CREATE1

    Hi,
    I have a purchase order with 2 line items, now i want to add new line item to the same PO using BAPI_PO_CREATE1.
    Here new line item should be created with reference PR line item.But this PR line item is Dynamic it get generated once the Sales order line item get changed.
    Please let me know how can i pass the PR doc no, PR line item no as reference to create the new PO line item.
    Thanks
    Bhuvana

    Hi,
    I think you need to use BAPI: BAPI_PO_GETDETAIL, then BAPI:BAPI_PO_CHANGE.
    BAPI_PO_CREATE1 equals ME21N, but adding new line item needs to be done in ME22N.
    Cheers,

  • I want a push button for line items in my sales order entry screen.

    Hi,
    I want a push button for line items in my sales order entry screen.
    How can I do so?
    Thanks.

    Hi Kumar ,
    To have a push buttons you need to first assign a pf-status .
    here a sample code for a push button and its handling :
      set pf-status 'SELECT' .
    at user-command .
      describe table t_lpr lines w_lines .
      case sy-ucomm .
        when 'SELECTALL' .
          set pf-status 'SELECT' excluding 'SELECTALL' immediately.
          do w_lines times .
            read line w_line field value w_check . " INTO W_CHECK .
            if w_check = space .
              w_check = 'X' .
              modify line w_line field value w_check.    "INTO W_CHECK .
              add 1 to w_line .
            endif .                        " IF W_CHECK = ' '
          enddo .
    Thus when you say pf-status say 'select' , Double click on that and you find a screen eher you can select icons and assign a function code to it!
    Hope it helps!
    Much Regards,
    Amuktha .

  • Unconfirmed line items of a sales order into account in credit management

    Hi Gurus
    Updated the customer orders via prog. RVKRED09.
    There is only one open order for this customer = 720662. My question is: in the credit master the sales value/credit exposure is USD 77.100,00. The order is for USD 105,900.00 .
    Found out that line item 20 is not confirmed in the schedule lines. So the value in the sales value/credit exposure  equals item 10 and 30. So my 1question is: Where is the setting that  does not take unconfirmed line items of a sales order into account in credit management?
    Thanks in advance
    Regards
    Nalini Iyer

    Hi nalini
    Even though , you create a sales order for that line item , but if that item is not confirmed then the value  wont be considered.  into credit exposure. .
    But once it gets confirmed then the value will be taken into credit exposure..
    Regards
    Srinath

  • Route schedule not updated in some line item of a sales order

    Hi Gurus,
    All order are processed through the EDI interface automatically. Order
    XXXXXXXXX for USA customer 40000XXXX is maintained in route reschedule
    setup T-code VL52 on specific departure day thursday.
    above are line item of same sales order, with same shipping point and route .
    Why only some salesorder lines missing the route schedule ?? 
    Please Help
    Regards
    Abhilash

    When you post a query here, you need to have patience until some members go through your post.  Please dont expect somebody should respond to you immediately as everybody has their own priorities.
    Coming to your query, it could be due to many reasons as per the following note:-
    Note 1750978 - Route Schedule does not populate on sales order
    Go through the Resolutions given in the above note and check with your system
    G. Lakshmipathi

  • Send all line items of a sales order to IPC along with condition lines data

    We wrote some pricing routines in R/3, where while doing he calculations for condition line item, we needed to pull in the material information for previous line items. So we exported vbap and imported it inside the routine to be able to have access to all the line items in the sales order. Now, we need to put in the same kind of logic in CRM/IPC. My question is what would be the equivalent of SAP's(import/export) commands for internal tables in case of IPC. I looked at the BADI CRM_COND_COM_BADI but still do not see how I can send all the line items  data to IPC. So I guess, the question comes down to, how do I send all the line items of the sales order (whole VBAP in R/3 terms) to IPC along with the condition line data? Can someone please help?
    Thanks

    Hi Vaibhav,
    If you can get the list of Sales orders which has deleted line items and force completion status. You can manage them in BI via lookup  or navigation attribute.
    Just my views I am sharing .
    Thanks,
    KDJ

  • Keep Quote line item numbers in Sales order

    While creating a Sales order from Quote, SAP always creates line items with 100,200,300...and so on.
    If quote has 3 line items say 100,110, & 120 and we create a sales order with reference to this quote in VA01. The sales order line items become 100,200 & 300.
    The requirement is for Sales order to also have same line item numbers i.e. 100,110 & 120.
    To retain quote line item numbers in Sales order the ABAP change will be in VOFM or user exit?

    Hi,
    It is not a straight forward thing. Adding data to table XVBAP won't work. It will create inconsistency. There are so many other tables involve here too, like, VBPA, VBUP, VBKD, KONV. There can be other tables too based on how your sales order is configured.
    Also, modifying these tables (XTAB, YTAB ) in this user-exit may cause database inconsistency.
    Regards,
    RS

  • How to delete a line item from the sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi
    U can do this in two ways one u can short close the order by entering Reason for rejection in VA02 at header level and if yr order is multiple line item order u can enter the reason for rejection in any of the line item which u don't want to deliver.
    This is called short close ( as the qty is not delivered fully).
    Thx.

  • How to delete the line item from a sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi Kumar,
    I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
    Regards,
    Rachel

Maybe you are looking for

  • SCardConnect returns 1

    Hi! I have a smart card reader EZ100PR. I can do ScardEstablishContext and SCardListReaders, but when I do ScardConnect, I get an error with value '1'. Can anybody tell me what I am doing wrong? rv = CasEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL

  • Org unit differring & Pay scale issue

    Hi experts, i hav e an issue ..... when i executed new office orders i am getting one org unit. & when i executed for the same employee no for existing office order i am getting diff org. unit & i am not getting Pay scale amount also......... how can

  • C6-01 audio problem , please help =D

    my c6-01 cannot work with some 3.5mm audio jack headset .  long time ago i tried to use apple headset ( ipod shuffle 3rd gen , headset with control button ) , it works but the sound is not nice . after few month ( now ) , i bought a logitech UE 200vi

  • Re: Satellite A200 PSAE6E: Cannot install Flash Cards - invalid serial number

    PLEASE I CAN'T INSTALL THE FLASH CARDS SUPPORT UTILIY, ALL THE TIME AT THE END IT SAY'S "THE SERIALNUMBER IS INVALID" PLEASE I NEED YOUR HELP TO INSTALL FN KEY IS NOT WORKING PLEASE HELP ME. WHAT CAN I DO PLEASE ? I'M USING VISTA HOME BASIC 32 BIT PL

  • Can the WAP4410N be setup with WPA2-Enterprise and also be repeater by another WAP4410N?

    I have AP1 setup with WPA2-Enterprise. How would I setup AP2 (WAP4410N) to be a repeater for AP1?