BAPI_SalesOrder_CreateFromDat2 fails for items with free goods

Hi all, I have a very weird problem when I am trying to create a sales order using SAP .net connector with the BAPI function BAPI_SalesOrder_CreateFromDat2().  The problem happens through the following scenario:
1 - Item X has a free good rule on it that states "If user buys 5 Cartoons of Item X he will take 1 pack of Item Y free of charge" while Item Z has no rules like this
2 - using BAPI and .net connector, an order is needed to be created with following details:
        a - Item X with quantity 6 Cartoons.
        b- Item Z with quantity 3 Cartoons
3 - If BAPI_SalesOrder_CreateFromDat2() assigns these details to Order_Items_In with the same order (a then b),  SAP will return an error for Item z that states "No item category available (Table T184 ZKE NORM  KEN)."; while if the function tries to create the order with details in reverse order (b then a ), the order will be created successfully.
I have done the following steps:
1 - Tried the same order in SAP GUI but it succeeded. (So no problem in Item Category Determination)
2 - Tries the same order with the suspicious order in the BAPI function Test inside SAP GUI (using tcode BAPI or SE37) but the function had not return any errors also.
3 - Tried to send Item Category in code when calling the bapi function (Forced the code to KEN), but the same message appeared as SAP insist on redetermining the Item Category and return this meaningless message.
thanks

Hi Mohamed Abd Elbaset,
I am facing the same issue while creating the Sales order through "BAPI_SALESORDER_CREATEFROMDAT2" All is going well in normal cases but when I process the contract with FREE GOODS line items for which free goods condition record is maintained it fails
to create the Sales order. Is there any special treatment for this Free goods case..
Regards,

Similar Messages

  • Filling of S table fails for fields with free form text or description

    Hello Everyone,
    We are trying to rollup a new InfoCube into our BWA system and it fails with a short dump CONVT_CODEPAGE with exception being CX_SY_CONVERSION_CODEPAGE when filling up S table for a description field.
    The only difference between the new InfoCube we are trying to load and the other existing InfoCubes is that, the new InfoCube we are trying to load has a field/InfoObject which is free form description for a line item field.
    Also, when I checked the application log the system gives out the message "A Character Set conversion is not possible".
    Did anyone encounter this issue when trying to create BWA indexes for InfoCubes which have text columns in the InfoCube.
    We are currently at revision 52.
    Thanks in advance.

    Hi Dharma,
    It's an interesting and new BWA case for me, so sorry no direct answer. I'll try to replicate it in free time I hope you opened a message with SAP Support for this.
    From pure BW modeling perspective I normally model this in a way that this "description" Characteristic A is marked as "Attribute-only" and then used as a display attribute of another Characteristic B, e.g. Line Item Number. From BWA perspective it means that A is not indexed into the accelerator and joined only for display during OLAP time.
    Regards,
    -Vitaliy

  • Goods Receipt entry for items with serial number

    Hi All,
    When I try to create a Goods receipt entry, for items with serial number, i'm always getting the following error message.
    [OSRI] , 'The selected quantity of serial/batch numbers is greater than the quantity in row Id'
    The following is the code that I'm using
    Dim oInvetoryGenEntry As SAPbobsCOM.Documents
    Dim oSerialNumber As SAPbobsCOM.SerialNumbers
    Dim ErrCode As Long
    Dim ErrMsg As String
    Dim ret As Long
    Set oInvetoryGenEntry = oCmp.GetBusinessObject(oInventoryGenEntry)
    Set oSerialNumber = oInvetoryGenEntry.Lines.SerialNumbers
    oInvetoryGenEntry.DocDate = Now
    oInvetoryGenEntry.DocRate = 1
    oInvetoryGenEntry.TaxDate = Now
    oInvetoryGenEntry.PaymentGroupCode = "3"
    oInvetoryGenEntry.Comments = "GRN Entry11"
    oInvetoryGenEntry.Lines.ItemCode = "A00004"
    oInvetoryGenEntry.Lines.Price = 100
    oInvetoryGenEntry.Lines.Quantity = 1
    oSerialNumber.SystemSerialNumber = 55555
    oSerialNumber.InternalSerialNumber = "2354"
    oSerialNumber.BatchID = "bt1"
    oSerialNumber.Add
    ret = oInvetoryGenEntry.Add
    If ret <> 0 Then
            oCmp.GetLastError ErrCode, ErrMsg
            MsgBox ErrCode & " " & ErrMsg
        Else
            MsgBox "GRN Entry made."
        End If
    It would be wonderful if anyone help me out to trace the exact reason for this issue.
    Thanks
    John

    Hi John I'm almost sure that your working with SDK 6.5 with SP1 or lower, visit this address
    https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode6-1&contenttype=url&content=https://DI: Add more than one serial numbers in Invoice
    Maybe you can find your answer if you can fix it let me Know my email address is [email protected] because i had the same problem.
    Regards

  • VPRS with Free Goods and Batch Determination

    Dear Experts,
    I have a problem on the products billing with Free Goods.
    I will explain this, before the implementation of Batch Management (with batch split) the billing document show the condition VPRS on the main item (TAN) and the free goods item (TANN).
    Now, when the Batch Management was up, the condition VPRS disappeared on the TANN item, I checked the order and it does shows the VPRS conditions. When i check the conditions on the billing document it shows me the following message when i check the VPRS condition
    Condition ignored (requirement 004 not fulfilled)
    Then I tried to debug the price determination and i realized that only on the TANN position the field komp-evrwr (price determination on the item category) is not 'X'.
    Aditionally i can mention thar the batch split item category is defined as YG05.
    Actually i only managed to show the cumulated VPRS cost on the main item.
    Please someone say to me if this correct or there is a way to put the VPRS on the free goods item.
    Javier Sandoval Vera
    Ecuador

    Dear Javier Sandoval Vera,
    As per the standard pricing Routine 4-Cost system may calculate the cost only for the pricing related materials,here TANN item is not relavent for pricing so system is giving that message.
    If you want consider non priced item also in the cost calculation then you can develop new routine as per your requirement with the help of ABAPer. (by copyingh the existing routine 4 then do the changes accordingly).
    Or
    You can maintain R100 -100% discount condition type in your pricing procedure,maintain settings as manual condition.
    Now maintained the price relevant check for free item also then give the 100% -discount by entering R100 condition type manually with 100% discount for that specific item to make the item price as zero.
    Now sytem will calculate the VPRS value without fail.
    I hope this will help you,
    Regards,
    Murali.

  • VPRS with Free Goods and Batch Management

    Dear Experts,
    I have a problem on the products billing with Free Goods.
    I will explain this, before the implementation of Batch Management (with batch split) the billing document show the condition VPRS on the main item (TAN) and the free goods item (TANN).
    Now, when the Batch Management was up, the condition VPRS disappeared on the TANN item, I checked the order and it does shows the VPRS conditions. When i check the conditions on the billing document it shows me the following message when i check the VPRS condition
    Condition ignored (requirement 004 not fulfilled)
    Then I tried to debug the price determination and i realized that only on the TANN position the field komp-evrwr (price determination on the item category) is not 'X'.
    Aditionally i can mention thar the batch split item category is defined as YG05.
    Actually i only managed to show the cumulated VPRS cost on the main item.
    Please someone say to me if this correct or there is a way to put the VPRS on the free goods item.
    Javier Sandoval Vera
    Ecuador

    Hi Javier,
    what do you do with the VPRS in your calculation- system ?
    If you need i, you delete the requirement 004 in your calculation -system.
    on the other hand, you can change TANN to komp-evrwr (price determination on the item category) is  'X'. Then you have to add an 100% rabate for TANN and the resukt will be free good.
    Hans

  • Bom with free goods

    hi
    am not tht experience in sap as well not tht expert as u guys but i was just wondering while practicing sap tht can v do bom with free goods as even my faculty who is a reall timmer couldnt solve this probs
    i did tried every possible way tried item category determinatino n all but couldnt
    it would b great if u solve this n email me back witht the solution
    can mail me the solution on
    [email protected]
    thnks a lott

    well exactly true i just wanted to see tht this forum really works n it does with some great experts neways mr ram very much thankful to u n basically i been trying this for 4 months but couldnt ya can do it 1 way u can do it manually in the sales order by changing the item category to tann at item level
    try this 1 n ya mr ram do u work in us
    if so thn b in touch
    bye irfan
    [email protected]

  • Issuing more then one item in free goods

    Hi SD gurus,
    My client is asking to issue more then two items as free goods along the main item. Example material A is sold along with material B and C as free goods.As far as my trails, I'm able to configure only one item as free goods but not the second one. Can any one suggest to configure the above scenario?

    Hi Ravi krishna,
    Free goods can only be supported on a 1:1 ratio. This means that an order item can lead to a free goods item. if you want to give free goods X & Y for material A, then you need to enter material Y in order, simply change the item category as TANN.
    As of my knowledge there is no alternative to it.
    these are the constraints for free goods:
    Free goods are not supported in combinations with material structures (for example, product selection, BOM, variants with BOM explosion).
    Free goods are only supported for sales orders with document category C (for example, not quotations).
    Free goods are not supported for deliveries without reference to a sales order.
    regards
    Sunil

  • How to combine BOMs with Free Goods?

    Dear all.
    I am currently working on setting up a retail store in SAP ERP (6.0). Our client requires from us creating a functionality that would allow to create sets and add free goods to a certain set. For example: if you buy a set consisting of a hammer and a drill at a regular price, you get a pair of gloves free of charge.
    We used BOMs to create the sets and attempted to combine them with Free Goods, which prooved impossible -- FGs don't work with BOMs. We also tried to use Bonus Buys, but these seem to be working only with SAP Retail, which is not available to us.
    Do you know any way around this problem?
    Grzegorz

    Shantanu
    It sounds pretty helpful, however, what we just found out it is impossible to give away free goods according to the local tax standards - so we have to give them away for a fraction of the price rather than free of charge. This forced us to create a separate logic to deduce different item categories in a sales order and different prices according to that.
    Thanks anyway.
    Grzegorz

  • Invoice split with Free Goods !

    Hi All,
    I am having a invoice split when i am generating a sales order with free goods.
    Item category i am using is TAN & TANN
    Sales order -> Delivery -> Invoice (it is splitting to 2 deliveries) and 2 items are getting billed separately, i want in one invoice.
    Need help Please.
    Thanks & Rgds
    Naveen

    Delivery split can occur when the following are different:
    1. ship-to-party
    2. shpping point
    3. route
    4. incoterms
    5. transportation zone
    etc
    Delivery split happens based on not only on different shipping points,but it depends on your business logic which supports thru order to delivery copy controll.
    at item category level.if you do not have different shipping points for multiple line items ,but if you have for example business logic of say "any line items with 10 tons and above gross weight' can be split into multiple deliveries.
    Regards
    AK

  • Return Item and Free goods check box in purchase order

    Hi Guru:
    I just got the question regarding the return item and free goods check box,my question is that if I check the free good check box,then the price of the matieral will be charged to zero,however,if I want to issue the return purchase order to the vendor,does I need to check the return box first and then issue the return order to the vendor? Then go to MIGO transaction to select the movement type 122 to return the goods,what's the whole precedure for returning the goods to the vendor,can anybody tell me,very appriated!

    Hi,
    Retun to vendor through have two types....
    One is you have Po created, vendor send the item in that few items have rejected so you need to return the item to vendor......
    here in MIGo chose returrn to vendor selce the PO numbere.... system automaticaly take the movent type 122....
    sencond type is Retun PO..... In Po while creting the PO tick the return indication..
    If you do the GR system will pick 161mopvent type.. ( GR returns)...
    REgards
    anand

  • Add Item "With Free Description" in shopping cart

    Hello Everyone,
    We have the following requirement in SRM 7.0.
    During creation of a Shopping cart, we use "Add Item with Free description" to add a new item
    When we click "Add Item with Free description" a pop up appears, and in this pop we needs to be updated with a new field called Supplier Product Number which is already available as a standard field in Item Data Tab of shopping cart when we click on Details button.
    Requirement is that, customer wants to enter this Supplier Product Number in this pop up screen along with item details, rather than entering it at item data tab. Could anybody suggest me the steps how to achieve this and also once the Supplier Product Number is entered in the Add Item with free description Pop up screen, it need to be synced and should appear in Item Data tab of shopping cart.
    Regards,
    Venkat

    Hi Venkat,
    This would require modification of the guided application framework view V_SC_DOFC_I_DESCRIBE to add a new field to the Window, please then check the WD ABAP Documentaiton for details on mapping this new field name to the supplier part number in the shopping cart, I would suggest however to simply fill it in after the fact, the pop up is designed to provide the minimum amount of information required to create the shopping cart, as supplier part number is not a required field in SRM, it is not available in this view. See below for details of the modification point:
    Application: /SAPSRM/WDA_L_FPM_GAF
    Web Dynpro Component: /SAPSRM/WDC_DODC_SC_I_DES
    Window Information: IV_L_FPC_POPUP
    View Information: V_SC_DOFC_I_DESCRIBE
    Configuration ID: /SAPSRM/WDCC_SC_I_DES_WIZARD
    Regards
    Jason

  • Hostname Verification failed for certificate with CommonName 'gawlsdev02.ss

    Hi All,
    I want to know the meaning and the reason of this exception:
    <Jun 17, 2010 2:05:52 PM EDT> <Warning> <Security> <BEA-090504> <Certificate chain received from gawlsdev02 - 147.141.83.104 failed
    hostname verification check. Certificate contained gawlsdev02.ssga.statestr.com but check expected gawlsdev02>
    <Jun 17, 2010 2:05:52 PM EDT> <Debug> <TLS> <000000> <Hostname Verification failed for certificate with CommonName 'gawlsdev02.ssga.
    statestr.com' against hostname: gawlsdev02>
    thanks in advance.

    When Webloigic Server tries to validate the certificate, it compares te CN of the certificate with the hostname from where the request is coming from.
    If they don't match, hostname verfication fails and SSL connection is not established.
    In your case I see the CN is gawlsdev02.ssga.statestr.com whereas WLS is expecting it to be gawlsdev02.
    U can use this option to ignore host name verification
    -Dweblogic.security.SSL.ignoreHostnameVerification=true
    To know about other SSL issues, u can refer this
    http://weblogic-wonders.com/weblogic/2010/01/28/troubleshooting-ssl-issues/
    -Faisal

  • Goods Receipt Not Possible for PO with Free Item Checked (Tick Mark)

    Hi Team,
    We have a PO with one line item where the free item check box is ticked and net price is blank.
    When we try to make GR with respect to the PO via T Code MB01 we are getting error as " No goods receipt possible for purchase order xxxxxxxxxxx  for item xxxx "
    Thanks
    Vijay

    Hello,
    You can find confirmaton control under following customization path;
    SPRO>>Materials Management>>Purchasing>>Confirmations>>Set Up Confirmation Control
    Execute and select 004 (Inbound delivery) and double click on confirmation sequence.
    004 is inbound delivery.
    Also make sure that you first need to go to ME22N and then in item detail of purchase order tick the check box of confirmation required. Once this this is ticked you can create inbound delivery.
    You need to create inbound delivery with VL31N.
    Go to VL31N >>Enter PO number and execute. and save the delivery.Now confirm the transfer order with LT12 which is created and do the post goods reciept.
    BR,
    Tushar

  • Sereval line item of Free Goods

    Hi experts,
    I have 2 questions about free goods;
    •     Currently Free Goods is only working at the line item level, Is there a way that Free goods are determined based multiple line item quantities? I’m using R3 not Retail R3.
    •     I need to have two free goods items for one item, Is there a way? (example: I have 1 item that can give 2 lines of free goods)
    Thanks
    Nuno

    Hi Nuno,
    There is no way in standard SAP for giving two free items for one item.. and also no way to give a free good with ref to two line items.
    Its only possible in IS Retail.... with Bonus buy
    Reward points if helpfull
    Muthupandiyan

  • A problem with return order with free goods

    Hello
    I am working on ECC 6.0
    I am facing a problem with the return order the case is I created an order of 1000 pc with inclusive free goods (w/o item generation) condition record that for every 10 pc over the 100 the customer will take  1 free pc
    1 pc = 10 $
    100 pcs = 900 $
    120 = 1080 $
    the problem when I am creating a return order with 30 pcs the system  calculate the price as if there are free goods the system returns the 30 pcs with 270 $ instead of 180 $ and it should not calculate the free goods because the remaining items are 90 pcs that should not take a free goods discount
    Regards
    Jacopo Francios

    hi ,
    Such scenerios can be tackled by different pricing procedure in return scenerio.
    See Pricing procedure Depends on sales area + customer pricing procedure + Document pricing procedure .
    So for Return document type please maintain different pricing than the normal scenerio this will solve ur problem.
    This is generally done also for tackling such scenerios.
    Thanks & Regards

Maybe you are looking for