B2CBasket- Sales Order  How to add Vendor partner and new line item of SO

Hi,
I want to add the following BEFORE the sales order creation process starts:
Add a VENDOR partner
Add a new line item to ORDERADM_I
I suspect in BADI CRM_ISA_BASKET_ITEMS and CRM_ISA_BASKET_HEAD. I have user 'HEAD' to add extension fields but cant figure the creation of NEW partners and NEW line item.
regards,
Dave

Thank you for feedback Shantoor,
The CRM_ORDER_MAINTAIN need not be called as this FM is called immediately following almost all of the CRM_ISA_* BADI's.
For clarification I just want to expand on the solution..
In all of these BADI's SAP uses the CT_INPUT_FIELDS parameter. This is where you should enter WHICH fields you have made changes to in the exit. CRM_ORDER_MAINTAIN uses the same parameter.
However the challenge is .. WHAT do you enter in the CT_INPUT_FIELDS. This is where you have to follow a strategy. I yused the following:
1. Looked where the structure was used in programs/class to see how SAP used it
2. Set breakpoints at the call of the BADI. Check what CT_INPUT_FIELDS content is (SAP uses same technique)and try and replicate for your new entries.
I hope this helps those that, like me, battled a bit with the use of these BADI's.

Similar Messages

  • Offsetting account in Vendor, Customer and GL line item report

    Hi All,
    There is one requirement from our client. They want offsetting account in Vendor, Customer and GL line item report.(FBL1n, FBL3n and FBL5n).
    As this field is there in selection screen in lay out setting but field coming as blank no off setting account is coming. It was coming in old SAP 4.7 system but same is not coming in ECC6.0.
    Kindly let me know if any development is requirement, if yes than which tables we have refer for the same.
    Thanks and Regards,
    Abhinav Sharma

    Hi Abhinav,
    There is a SAP not and you can refer to that - SAP OSS note 112312
    T.Code: FIBF
    After entering in above T.code
    Follow Path
    Settings  Products of a customer
    Product   : XXXX
    Text        :  XXXX
    Active     :  Tick it
    Click on Back i.e. F3
    Follow Path
    Settings >P/S Function Modules > of a customer
    Event: 00001650
    Product: XXXX
    Function Module: LINE_ITEMS_GET_GKONT
    Now Go to FBL3N display of any account
    After opening the account display click on Change Layout i.e. CTRL+ F8
    And Select
    Offsetting A/C Type & Offsetting A/C no.
    Regards,
    SAPFICO
    Edited by: SAPFICO on Dec 1, 2010 8:26 AM

  • Is there any way to add PO no and  corresponding line item of PO in VL32N?

    Hello,
    The scenario is, we have created the IBD and deleted one of the line item and saved it.
    We went to VL32N and added the missing line item to IBD but PO number and corresponding item number of PO field of newly added line items are grayed out. We are not able to add PO number in VL32N screen.
    Is there any way to add PO number and corresponding line item of PO in VL32N screen of IBD? Our client does not want to create new IBD for same PO. He wants to add the line item in same IBD.
    Thanks,
    Milind
    Edited by: Csaba Szommer on Aug 27, 2011 4:52 PM

    Hello,
    This thread is pending since long time. No body has answered my question. Can any body suggest me?
    Thanks
    Milind

  • Sales order: How to add pricing conditions at item level in BDC of VA01

    Hello Experts,
    Am writing BDC for sales order, in this process I need to add ITEM PRICING CONDITIONS, so, am selecting item and pressing the DOLLAR symbol button and am adding the conditions by pressing PLUS button in loop!! but am getting this erorr- Field KOMV-KMEIN (2) is not an input field!! when I execute it in we19-BACK GROUND only!! if I execute the same CODE IN we19-Fore ground, I dont have any issue!!  I checked this SDN (field status in config), Google, but did not helped me!
    Pls. let  me know is there any other way to add conditions at item level in VA01 in BDC code?
    THank you

    Hi,
    It is happening because the second row of the item level data screen is becoming display only. Please check whether In foreground mode you are pressing an extra enter to give data in the second row of the item level data after giving data in the first row and in BDC recording you have not recorded that 'Enter'.
    Regards,
    Gargi

  • User Exit during Sales Order Creation - New Line Item needed

    I have a situation during the process of sales order creation. If a Material in a line item has say 27 EA and the Base Unit is EA. But the Sales Unit is CSE. Then whenever the user enters 27 EA and presses enter he should get two line items.
    The first line item needs to convert to maximum number of CSE posible and the rest will be the second line item with the remaining EA. The order isn't important but that is what is needed. Question is how do I approach this problem and code my user exit accordingly and where do I code it.
    I was looking at SAPMV45A and saw the program MV45AIZZ which is meant as a user exit for any PAI event handling. If anybody has encountered this kind of requirement can you please share your view on this.
    I will definitely reward points for useful answers.
    Clark

    Hello Mahendra
    The requirement is as follows :
    PART 1:
    Sales Order Enter: 
    1.     When a line item is entered on a sales order (VA01 or VA02), at enter, check the sales unit of measure (VBAP-VRKME).
    •     Do not check line items where item category (VBAP-PSTYV) = TANN, TAPS or ZTAP.  TANN are free goods that should not be considered for consolidation.  TAPS & ZTAP are lower level materials as a result of product selection.  They will be attached to a higher-level material with an item category of TAX, which is relevant for consolidation.
    •     Do not check items where VRKME <> EA
    2.     If VRKME = EA, go to MARM for MATNR.
    3.     Go to record where alternate unit of measure (MEINH) = CSE, get the value from the numerator field (UMREZ).
    4.     Divide the order quantity (VBEP-WMENG) by UMREZ.
    5.     If the result is greater than 1.0, the customer has ordered more than one case and a new line item needs to be added to the sales order for the case quantity.
    6.     Add a new line to VBAP for the same material with the case quantity.  If not a whole value, the remainder of eaches (bottles) should update the qty on the first item on VBAP.
    •     Part 1 is relevant for order types ZCA, ZOR, ZSO, RE, ZSM
    PART 2:
    Batch Job to run prior to the Delivery Due List:
    1.     Read VBUK for Delivery Status (LFSTK) = A (delivery not processed).  Get all of the document numbers (VBELN).
    2.     Go to VBEP for those document numbers to get the goods issue date for the order.  There will be many records in VBEP for the same sales order.  Look at all orders with a goods issue date (WADAT) of next day.
    3.     Go to VBAK for those document numbers to see if there are multiple sales orders for the same Sold To party (KUNNR).
    4.     For customers who have more than one order in VBAK, search all line items (for all orders).  If there are no duplicate materials across sales orders, do nothing.
    •     Do not check line items where item category (VBAP-PSTYV) = TANN, TAPS or ZTAP.  TANN are free goods that should not be considered for consolidation.  TAPS & ZTAP are lower level materials as a result of product selection.  They will be attached to a higher-level material with an item category of TAX, which is relevant for consolidation.
    •     Do not check line items where reason for rejection (VBAP-ABGRU) is not blank
    5.     If there are duplicate materials, go through the same logic as in part 1.  If the quantity across the sales orders adds up to greater than one case, add the appropriate quantity to a new line item on the first sales order.   If there is a remainder qty, update the line item on the first sales order with this qty. In this case, the quantities on the second sales order needs to be closed out with a reason for rejection code of 50, ‘Line Item Consolidation’. If there is no remainder,  update the qty on this item directly.
    •     Part 2 is relevant for order types ZOR, ZCA, ZSM
    •     This batch job will have to be run manually for Day Pick orders.  The end of this program should automatically kick off the delivery due list for Day Pick orders, shipping condition 02.
    Business Justification:
    The business requires that like order line items be consolidated to one line item prior to the order going to the warehouse for picking.  This will aid in picking at the warehouse as well as result in the customer invoice not reflecting more than one line item for the same material.  In the case where the customer has truly ordered more than a case, i.e;, 1 case, 2 bottles, the documents in SAP will still reflect 2 lines.

  • Pricing Date on New Line Item Added to Order

    We have a requirement, for example, if we create an order for 07/19/2010, the pricing date comes in as 07/19/2010 which is correct.  The customer calls back and wants to add a line item or 2, to the order on 07/22/2010.  The new line items are priced as of the original pricing date 07/19/2010.  How do we automatically update the new line items with today's pricing date instead of the old date.  Is there an automated way to do this thru configuration.  Or do we need to use user exits:
    MV45AFZZ - USEREXIT_PRICING_PREPARE_TKOMK
    MV45AFZZ - USEREXIT_PRICING_PREPARE_TKOMP
    Thanks,
    Mark

    Hi,
    There is no automatic way to populate the pricing date for item when item is added at later point of time. In this case, the pricing date at header is copied to the item.  This cannot be achived by configuration.
    As you have mentioned, you have to use the user exits relevant for pricing. The user exits you have mentioned are not correct for this purpose. The purpose of these user exits are different. You need to find the correct one with the help of an ABAPer.

  • How can I add a new line item for production order?

    HI all,
    How can I add a new line item for production order through BAPI/FM? Thanks in advance.

    Hi Mil,
      Unfortunetly SAP is not in front of me.
    But if possible go to BAPI transaction , check for any production order's bapi for CHANGE purpose. Where you will be able to add your new line.
    Reward if useful!

  • Next date in sales order, how to change it? if change it does it triggres

    Quick and simple question... what can change a Sales Order Next Date (field VBAK-CMNGV)?? it got changed for one of my Sales Orders according to the changes log via VA02, but no idea how... as I can not see the field via VA03.
    Appreciate any help in this regard,
    Next date in sales order, how to change it? if change it does it triggres credit check
    Thanks
    Krishna

    Hi,
    The next date available if you activated payment card processing
    In the sales order header, this field specifies the next planned delivery date and In the delivery header, the field specifies the next planned picking or goods issue date.
    This field is used in connection with next delivery/service
    If you are not using payment cards in sales order then this will not impact any of your business transaction
    Go to HEADER >> Tab PAYMENT CARDS
    kapil

  • MSRV* Reports: How to add Vendor name?

    howdy gurus!
    Appreciate very much for any guidelines on how to add vendor name in MSRV* reports.
    Cheers,
    Ron

    Thanks for the inputs guys.
    So there's no technique yet to include it (similar to FBL*N and CJI3/KSB1).
    No available note also in SAPNotes.
    I already developed the Z*  report but the key user requests the possiblities in MSRV*.
    Cheers,
    Ron

  • User exit - VA01 - Adding new line items while Sales Order Creation

    Hi All ,
    I have a requirement where : in VA01 , i have to add new line items using USER EXIT or BADI.
    The scenario is : we maintain Characteristics for Material. When we select a particular characteristics, Factor and length will be displayed in a Popup. we can specify the Factor and lenght.
    Here , if i specify Factor as 10 and lenght as 1000. the Material has to be cut / split into 10 items of 1000 mts each. and the ITEMs table control should get 10 ITEMS .
    How to add new items using User exit or Badi in VA01 while creating a sales order.
    i have identified the user exit . What code should be used to add new line items.
    kindly help me in solvng this.
    Waiting for your replies.
    Thanks in advance.
    Suki.

    hi
    wich user exit do you take for that ???

  • Inserting new line item in Sales order

    Hi,
    We are doing a feasibility check to find out whether a new line item can be successfully inserted into a sales order based on certain pricing conditions that is received through an ORDERS05 inbound idoc.
    I tried adding a new segment E1EDP01 to the existing idoc in the user exit EXIT_SAPLVEDA_011 assuming that the VA01 posting program would accept the new line item but that approach is not working.
    Looking at various posts in the forum, I gather that the best way is to use the function 'BAPI_SALESORDER_CHANGE'. Can anyone please let me know how exactly a new item can be inserted using this function module?
    Any help would be appreciated.
    Thanks

    Hi Sneha,
    Please use the FM 'BAPI_SALESORDER_CHANGE' to add a new line item as under:
    CALL 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument               = "Pass the Sales order no here"
          order_header_inx            =  "Pass the value of update flag as I as u need to "
                                                   "insert a new line item"
        TABLES
          return                             =  "Will contain the error/success messages"
                                                   "after the processing"
          ORDER_ITEM_IN            =  "Here pass the item info tht needs to be added"
    Also do a Commit Work after this FM call to reflect the changes in database.
    Regards,
    Chetan.
    PS: Reward points if this is helpful.
    Message was edited by:
            Chetan H. Dubey

  • 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,

  • 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

  • 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.

  • 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

Maybe you are looking for

  • Open VI reference for VITs and VIs

    Hi I have a VIT and I get the reference using the Open VI reference. When I change (rename) this back to a VI, and get the reference for it, its much faster. Does the open VI reference takes longer for VITs than VIs in obtaining a reference? Another

  • AVCHD Footage in Final Cut Pro 7

    I recoreded and event with my Sony hrx 5u. I let the camera record until the event was finished so i ended up with one large file to transcode into final cut my problem is when i went into the memory card the footage had cuts but when in log and tran

  • Dletetion of line item in PR after release..?

    Hi all Can anybody explain me , I have created PR with 8 line item nad PR is released , now i want to delete 1 lint item in that PR after release ..? Pls explain me som solution to rectify this problm.. Thanks sap-mm

  • How to shorten my address?

    I publish my iweb to a folder, then host it on Godaddy.com. If I type in http://www.johnsenclan.com, it takes me to http://johnsenclan.com/Home/Home.html. Any reason why? Why doesn't it just go to johnsenclan.com, or even http://johnsenclan.com/home.

  • Problem creating  image from a data vector

    Hello i have a problem in this aplication. I get a image from a web cam. I want to put the original image in a file and the negative image in another file (in this example is not the negative image, is just a white image). The problem is when i use s