Changes to sales order item not reflected if Call Transaction is used

I m updating another Sales Order item quantity and reason for rejection programmatically from another sales order.
The code is working fine and the quantity does get changed as well as the reason for rejection flag get set (if required). But if I go to the change log from the menu in VA02 for the order item which has been changed. It does not record the changes.
I have tried using both BDC call transaction method as well as BAPI_SALESORDER_CHANGE in neither case the change log for the order which has been changed reflects the programmatically made changes?
What m I doing wrong. Here is the code.
IF v_update_order_flg = 'X'.
      REFRESH t_bdcdata.
      CLEAR s_bdcdata.
      REFRESH t_messtab.
      PERFORM bdc_dynpro USING 'SAPMV45A' '0102'.
      PERFORM bdc_field  USING 'VBAK-VBELN' <wa_r_rtb_posnrs>-zrtbvbeln.
      PERFORM bdc_field  USING 'BDC_OKCODE' '/00'.
      PERFORM bdc_dynpro USING 'SAPMV45A' '4001'.
   For Going to  specific Item Number
      LOOP AT t_schedule_lines.
        PERFORM bdc_field  USING 'BDC_OKCODE' '=POPO'.
        READ TABLE t_item_in WITH KEY itm_number = t_schedule_lines-itm_number.
        PERFORM bdc_dynpro USING 'SAPMV45A' '0251'.
        PERFORM bdc_field  USING 'RV45A-POSNR' t_schedule_lines-itm_number.
        PERFORM bdc_field  USING 'BDC_OKCODE' '=POSI'.
        PERFORM bdc_dynpro USING 'SAPMV45A' '4001'.
        v_ro_qty = t_schedule_lines-req_qty.
        CONDENSE v_ro_qty.
        PERFORM bdc_field  USING 'RV45A-KWMENG(01)' v_ro_qty.
        PERFORM bdc_field  USING 'VBAP-ABGRU(01)' t_item_in-reason_rej.
      ENDLOOP.
      PERFORM bdc_field  USING 'BDC_OKCODE' '=SICH'.
      v_call_transaction_flg = 'X'.
      EXPORT v_call_transaction_flg TO MEMORY ID 'call_transaction'.
      CALL TRANSACTION 'VA02'
                   USING t_bdcdata
                   UPDATE 'S'
                   MODE   'N'
                   MESSAGES INTO t_messtab.
      v_call_transaction_flg = space.
      FREE MEMORY ID 'call_transaction'.

Hi Srikrisna,
This is a typical problem with BDC for updating QUANTITY and CURRENCY fields.
You need to create a character variable of the same length as your quantity field. Move your quantity value to the newly created Character variable.
Now use this new char variable in the BDC.
This correction should solve your problem.
NOTE: BDC RECOGNIZES CHARACTER FIELDS ONLY.
Regards,
Prakash Pandey

Similar Messages

  • Purchase Requisition number not changing when sales order item is rejected

    Hi all,
    I have a requirement to change the sales order status to 'TECO' when ever some reason for rejection is selected in the status tab at the item level.The status should change from 'TECO' when i remove the reason for rejection.
    The status change is happening correctly.I have achieved it using user exit.
    CASE 1 : Initially, when a new item is added in the Sales order the purchase requisition number appears in the schedule lines tab of the item level. This is as expected.
    CASE 2 :When the same item is blocked (by entering a reason for rejection in status tab of VA02 ) then the purchase requisition number is not present in the schedule lines tab.This is as expected.
    But i face the following issue.
    CASE3 : Again if the blocked item is unblocked (By removing the reason for rejection in status tab of VA02 ) then the purchase requisition number does not appear again in the schedule lines tab.The purchase requisition number is expected to appear again.
    This happens in case of DROP SHIPMENT scenario. I understand that in case of dropshipment scenario the purchase requisition number is triggered by item category and schedule lines only.
    I tried to make the changes(to change the status ) in user exits 'MV45AFZZ' and also 'MV45AFZB'.But i face the issue in both the exits.Please let me know if there are any means to solve this issue(as mentioned in case 3).
    Regards,
    S.Suba

    Many thanks for your answer. It help me to solve the issue.
    So applying note 738171, with transaction OVB5 (or VOFM, requirements->subsequent functions->Purch.requisitions) we create one new requirement, ie RV07A900, and then we apply the rule that if we have delivery or billing block, that is, VBAK-LIFSK or VBAK-FAKSK not empty, then we set an error with a code similar to this:
                da_sy-msgid = 'Z1'.    (message class)
                da_sy-msgno = '001'.  (message number)
                error_exception = true.
    and then the PR is not created.
    Regards.

  • Changing Rejected Sales Order Items with BAPI?

    Hi Forum,
    I have the following challenge, would be great if someone of you could help me out. Will help me solve some of my performance problems.
    I have sales orders which are temporary and have 'rejected order items'. Now the requirement is that I have to change the 'rejected order items' (quantity and Delivery dates) based on some XYZ criteria. Now using the BAPI_SALESORDER_CHANGE bapi I have to
    1. first get rid of the 'REJECTION REASON'
    2. Change the order item and then reset the above.
    I tried doing it by populating the order_items internal table with two entries but to my surprise it works once and fails twice!!! I get some errors that are totally irrelated and wierd.
    As for now, I've just adjusted the program(dirtily??) and will be calling the BAPI twice for a change !!!(Huh!)
    Now if anybody knows how to deal with the above problem just drop a few lines, will be of good help to me.
    Thanks and regards,
    ZAM

    Hi Srinivas,
    Thanks for the reply. The rejection reason is set manually, when creating the sales order. I do set the update flag to 'U' and also activating all the X structures. But still it did not work.
    Let me put it very simple. Is it possible to change the rejected order items, through BAPI's? If yes, how?
    Regarding the error messages I will have to change the code again to recreate the messages will let you know as soon as I am finished with some things. But however here are some errors
    Field 'WMENG' cannot be changed, VBEPKOM 000100 0001 ready for input
    Field 'WMENG' cannot be changed, VBEPKOM 000100 0001 ready for input
    Sales document 0030000031 was not changed                           
    there are few others which appear now and then indicating a system error !!
    thanks,
    ZAM

  • Sales Order - Returns change the sales order item delivery status

    Hi All,
    we have the following requirement from our users:
    after creating a return, the original sales order should have the
    delivery item status changed.The system should permit that a new
    delivery can be created for sales order item already delivered / billed (a new delivery with the quantity that has being returned) but has a return document,
    without increasing the sales order quantity.
    Does any body got the same requirement ?
    Thanks in advance,
    Marcus

    Hi Marcus,
      After creating return order you have to do the goods receipts.But this doesn't mean that you will be able to create a delivery with the old order itself.
      You have to create the order again and ahve to create a new delivery,goods issue and billing.
      Another option is as Roberto said that you have to reverse the goods issue thru VL09 and then cancel(delete) your delivery and then you can create a new delivery wr.t to your original sales order.
      Reward points if it helps.
    Regards
    Karan

  • How to restrict the user from making any changes in Sales order- item level

    Hi to all
    How to restrict the users from making any changes in sales order at item level if the same sales order is released by senior user through status profile.
    Regards
    Anish Parikh
    Edited by: anish parikh on Jan 24, 2008 5:16 AM

    Hi Anish,
    This can be achieved through the roles and authorization.
    This can be done through the basis team. they can create user profiles and roles.
    For the roles they assign some transaction codes so that they can view the only assigned tr. codes.
    Like that ur requirement can be done.
    Also u can prevent the user to change any fields in the sales order screen (VA02). for that please modify the authorisations.
    Hope i answers.
    Reward points if useful.
    Edited by: kaleeswaran bhoopathy on Jan 24, 2008 9:57 AM

  • Sales order item not deleted

    Hi,
    I am trying to delete the item from sales order, but following message display- for the reason of cost management it is not possible to delete the item.
    Regards
    Deven

    HI,
    Check the requirement type in ur sales order.
    For requirement type check cost manage is possible or not
    KK

  • Pricing condtion value of sales order is not reflects in Delivery doc !!

    Hi SAPients,
    I have an issue like my client is maintained condition record for a certain material valid from eg: 01.06.08 to 03.06.08.
    Now he has done a sales order on 03.06.08 and required delivery date is 04.06.08 but pricing date is 03.06.08. In conditions tab pricing is picking from condition record maintained for PR00.
    While doing delivery on 04.06.08, the system throws a an error like pricing error mandatory PR00 is missing and in analysis we found like condition record is missing or field overflow and displays message no:V1801.
    And Delivery document is saved after PGI.
    In Invoice the system is picking the price as on 03.06.08 as per the client requirement.
    Note: In Copycontrols VTFL we have used pricing type 'C" and Pricing Source as "E"
    Kindly suggest genuine reason to get PR00 from sales order to delivery with effect to previous pricing condition record.
    Thanks & Regards,
    kodalisreedhar
    9866033269

    Dear Jyoti
    If you want the pricing procedure to be flown into your delivery, then you have to assign in IMG where you have indicated.  Other than this, there is no other place to define.
    Of course, in billing, based on sale order, it will flow.
    thanks
    G. Lakshmipathi

  • ATP check on Sales order items not due for delivery?

    All,
    In our Sales order, we have a number of dummy material lines. Now, when I use the normal sales order ATP check button, SAP does nothing. However, we have a custom program that does an ATP check, and it returns a zero qty.
    My question is, how do we know if a material is due for delivery, before an ATP check is done? The only suggestion I have is to look at the schedule line, and see if there is a material movement behind it.
    Any other ideas?

    Mark
    This is a classic SD Professional's dilemma, though it manifests differently at different clients. Mostly customers crib about future requirements stopping current sales orders from being delivered or Scheduling agreements with future delivery dates 'stealing' stock from Sales orders.  Another manifestation is production orders usurping components from sales orders for spares and so on. ATP functionality in SAP is pulled in various directions by conflicting demands and it is difficult to satisfy everyone. Companies with chronic probelms often end up with negative ATP which is perhaps the most serious stage of the prognosis.
    Your solution lies in:
    1) Availability check control settings : Sales documents vs. deliveries  : For the delivery, don't include 'Sales Requirements'  and for the sales orders, do include 'Delivery Requirements and so on.
    2) Performing nightly rescheduling (V_V2) with Delivery priority and delivery date as key sort criteria. If the volumes are not high, you can try using manual confirmation via CO06.
    Take a look at this OSS note and the ones mentioned within:
    36520 - Availability check for delivery

  • Sales Order item should not be allowed to modify after doing PGI.

    Dear all SAP experts,
    When i create a sales order say for 10 pieces. Now I have created the delivery for all the 10 pieces & also created the invoice.
    My requirement is when i create a delivery for all 10 pieces then after doing the PGI the system should make the sales order line item & qty "grey" - I should not be able to change the sales order item in any respects.
    If not from delivery then when i save the invoice for that sales order then I should not be able to modify the sales order item & qty.
    With best regards,
    Allabaqsh G. Patil

    Hi
    I think there can be a problem in copy control
    In copy control at item level, in teh item category, ensure that the field "Update document flow" and the Pos/neg quantity are properly updated.
    Update document flow shoudl be ticked on
    Pos/neg quantity should be positive.
    Before doing this , check teh document flow of the sales order. Do the same after doign this configuration. Note the difference.
    This will solve your problem

  • Service order component not reflecting in sales order

    Dear All,
    I have mapped service notification type & service order type now if i create sales order directly from the service notification sales order is not reflecting the componets assigned in service order for that service notification. can anybody help me out?

    Sanjay,
    This is not standard, although it is possible through development (e.g. via action-box).
    However, there is the advance shipment functionality in the service order which does allow you to create a sales order from the service order components...
    PeteA

  • CIF: how to "push" a Sales Order item from ERP to SCM via FunctionModule ?

    Hello experts,
    we are implementing a process in ERP (ECC6.0) where we change a sales order item (VBAP- VPZUO) in order to stop SNP (LiveCache) performing the "fcst consumption" for this specific sales order since it is a spezial promotion / trade fair order which does not justify to change the fcst consumption for the entire product.
    We are searching for a function module or any ABAP "handle" of telling the CIF in ERP to "push" a specific sales order item thru to SCM again. We started with an artificial batch input in VA02 / VA32 and changed a non-used text field field in the sales order position and the document save was doing it. I wonder if someone run over same topic and found a better way to get this done with a specific function module or setting a specific trigger in some other ways.
    I was not sure if this is the correct forum - in case someone knows a better match on SDN I'm happy to move it over to the right place.
    Regards
    Thomas

    Hello Thomas,
    You can't really push a Sales Order seperately, and not advisable also as you should not tamper with CIF interface. I can give you another approach.
    You have to identify during CIF that the Sales Order is a special Sales Order. Better have a separate Sales order type for such special Sales Orders. That being the case, I think you can handle your issue by changing the ATP category of the Sales Order during CIF. The standard Order category is BM. You could create a custom category in APO, and during the transfer, you could change the Sales order category to this custom category. APOCF010  EXIT_/SAPAPO/SAPLCIF_SLS_001 exit (Inbound Sales Order in APO) should be helpful for this. You would need to change the ATP category field in IT_SL_REQ table.
    You could then display this "additional" Sales Order in a separate KF in SNP (if you need it) by assigning it a custom category group in SNP planning area which would have only this custom category. For normal SNP planning, normal SNP sales order of category BM would be relevant.
    Please be aware that when you try out things like this, you might need to tweak a lot of SAP standard behaviour at many other places. Things like CCR also need to be tweaked, and also whatever further planning you have to do for this particular Sales Order might also need to be tweaked.
    Thanks - Pawan

  • Sales Order Item configuration

    Hi,
    In my scenario, if there is any change in Sales Order Item configuration (characteristics), i have to create an entry in custom table.
    TCode - VA02
    How do i check if it is changed or not and in which exit?
    Thanks,
    Vetri

    Hi Vetri,
    The tables I told you about are only relevant for old values. For the new values after changing the document and before saving the document will be available in some internal tables and only the technical team will be a competent team to find out how the new values can be found out during run time.
    The checks you want to enable can be enabled in the user exit USEREXIT_SAVE_DOCUMENT or USEREXIT_SAVE_DOCUMENT_PREPARE based on the scenario.
    You can reward if this helps you.
    Message was edited by:
            Navaneetha Krishnan

  • Price is not changing in sales order in line item

    dear all.,
    price is not changing in sales order on line item,error comes "CHECK ORDER STRUCTURE.
    Regards,
    Praveen

    Dear
    You can go into VA03 --> Menu --> Environment --> Partner --> display credit account (if the data is maintained, than the system springs into FD33). Another way is to check if the sales order type is assigned to credit management in the transaction OVAK (should be D for aut. credit management).
    Did you enter the pricing date , prcing condition and press enter , so  that it should pick the correct price?
    Check this and come back
    Regards
    JH

  • Changing the status of the sales order item based on reason for rejection

    Hi All,
    When a Sales order item is rejected then the status at the item level is changed as 'TECO'.When the reason for rejection is removed the status 'Teco' is reset.This status change can be achieved using the user exit 'MV45AFZZ'.But the exit does not allow re-atp calculation whenver a blocked item is release.I have use the exit 'MV45AFZB' ,through this the status change as well as re-atp calculation takes place.But the status changed(Based on reason of rejection) does not appear in the same screen.The change gets reflected only when the sakes order is saved and i open it again.
    I want the status change to appear in the same screen.I am doing my code in the form 'userexit_check_vbap' of the exit 'MV45AFZB'. Please let me know if there are any user exits or BADI's available for the same(Changing the status of the sales order item based on reason for rejection ).
    Regards,
    S.Subasree

    Hi subburamaiah
    If you want the report you can create a separate SIS report . In that take the input field  as a Reason for rejection.. and ask for the output the list of sales orders .Now when you check this user defined report you will give the reason for rejection and check what all orders got rejected on that reason for rejection.
    Regards
    Srinath

  • CRM Sales Order Item Status Does Not match R/3 Item Status

    The status of the CRM sales order item is being set to 'In Process' when the related R/3 sales order line item status is set to 'Complete' - when, the delivery quantity is zero for the sales order item.  This happens when the warehouse can't find the stock to pick - the delivery quantity is set to zero.  Thus, the CRM order item status does not agree with the R/3 order item status.  We need for the line item status to be set to 'Complete' in CRM.  Anyone have an idea as to how to make this happen?
    Thanks you.

    Hi Peter and Suresh,
      From the information provided I understand that the sales order created in CRM after replication to R/3 has some status change.
    1.  What are the fields which are updated in R/3 for the sales order created in CRM ?
    2. If sales order fields are updated in R/3 are these updates reflected back to CRM?
    3. If they are reflected back in CRM? Is there still flexibility for sales order to be changed in CRM and replicated back to R/3?
    Can you please share you experiences.. Any help is highly appreciated.
    Thanks
    Jothi

Maybe you are looking for

  • Problems migrating PSE 8 on Windows to Lr 3 on Mac

    I have a 22K+ photo PSE 8 catalog on Windows.  I've just recently gotten a new Mac and a coworker convinced me to get Lr 3 for the Mac.  He migrated his PSE catalog (I don't know the version) to Lr 3 on the Mac with no problems.  Lucky him.  After tw

  • Plsql_code_type

    Hi, I am upgrading oracle applications from 11.5.10.2 (10.2.0.5) to R12.1.1 on linux 32 Bit Now i am applying 6678700.drv from $AU_TOP. In the Upgrade guide chapter 3, Point 4 it says upgrade init.ora with upgrade parameters. As i am on 11.5.10.2 wit

  • Startup ldap problem

    when trying to start a weblogic server (any server) on linux (wl7.0sp1, linux 7.2 (kernel 2.4.7-10) I get the following error. If I turn off nativeio then the error goes away. Any ideas? <Oct 17, 2002 2:21:27 PM EDT> <Error> <EmbeddedLDAP> <171517> <

  • Animated TOC in edge and DPS

    I'd like to create a animated TOC in Edge and import in in indesign. How can I link indesign pages/bookmark/article in Adobe Edge? thanks rob

  • Authorization to run a bps function from web

    Hi gurus, We have a layout that the users will access from web. For this we have created a Web Interface. This layout has also a planning function that calls an abap program. We have created a profile and the user is able to access and run that funct