Bapi Does not update Doc flow

Hi All,
We have found a discrepancy in the goods receipt process . When i do a manual process using MIGO i see the following in the doc flow.                                                                               
Doc.                                            Date     Overall ProcessingStat.                                                                               
. Purchase order 56005883                       08/30/06                          
STO Delivery 87068558                           08/30/06 Completed                
. WMS transfer order 6002450608                 08/31/06 Completed                
. TF to stck in trans. 49806781                 09/03/06 complete                 
. Service Confirmation                          09/03/06 Completed                
. Goods receipt 5000074657                      09/12/06 Completed
But when i do the goods receipt using the BAPI 'BAPI_GOODSMVT_CREATE'the doc flow does not get updated.
. Purchase order 56007669                                                        
STO Delivery 87115631                           09/26/06 Completed               
. WMS transfer order 6002478832                 09/26/06 Completed               
. TF to stck in trans. 49853247                 09/26/06 complete                
But still i can see that the delivery has benn goods recieved. Has anyone come across a simiar isssue before? Please help.
Regards,
Hari.                                                                               
For a standard STO that has been received with MIGO this is the doc flow -- notice the goods receipt at the end.

Here is a sample code where it works:
***********HEADER
    w_goodsmvt_header-pstng_date = sy-datum.
    w_goodsmvt_header-ref_doc_no = i_likp-vbeln.
***********Goods Movement Code
    w_goodsmvt_code-gm_code = '01'.
***********Goods Movement Item
    loop at i_lips.
      i_goodsmvt_item-material = i_lips-matnr.
      i_goodsmvt_item-move_type = '101'.
      i_goodsmvt_item-deliv_numb = i_lips-vbeln.
      i_goodsmvt_item-deliv_item = i_lips-posnr.
      i_goodsmvt_item-plant = w_destplant.
      i_goodsmvt_item-stge_loc = i_lips-lgort.
      i_goodsmvt_item-entry_qnt = i_lips-lfimg.
      i_goodsmvt_item-entry_uom = i_lips-meins.
      i_goodsmvt_item-po_number = i_lips-vgbel.
      i_goodsmvt_item-po_item = i_lips-vgpos.
      i_goodsmvt_item-mvt_ind = 'B'.
      append i_goodsmvt_item. clear i_goodsmvt_item.
    endloop.
***********Test run
    clear w_testrun.
*BAPI call
    call function 'BAPI_GOODSMVT_CREATE'
         exporting
              goodsmvt_header       = w_goodsmvt_header
              goodsmvt_code         = w_goodsmvt_code
              testrun               = w_testrun
         importing
              goodsmvt_headret      = w_goodsmvt_headret
              materialdocument      = w_materialdocument
              matdocumentyear       = w_matdocumentyear
         tables
              goodsmvt_item         = i_goodsmvt_item
              goodsmvt_serialnumber = i_goodsmvt_serialnumber
              return                = i_return.
    loop at i_return where type = 'A'
                        or type = 'E'.
      move: i_return-id to mess_tab-msgid,
            i_return-number to mess_tab-msgnr,
            i_return-message_v1 to mess_tab-msgv1,
            i_return-message_v2 to mess_tab-msgv2,
            i_return-message_v3 to mess_tab-msgv3,
            i_return-message_v4 to mess_tab-msgv4.
      append mess_tab. clear mess_tab.
    endloop.
    if sy-subrc eq 0.
      i_trans-status = 'E'.
      call function 'BAPI_TRANSACTION_ROLLBACK'.
    else.
        call function 'BAPI_TRANSACTION_COMMIT'
            exporting
                wait          = 'X'
            importing
                return        =  w_return.
    endif.

Similar Messages

  • Numbers doc on my iPhone does not update on my iPad and vice versa.  Why?

    I have the same Numbers doc on my iPhone and my iPad.  iCloud backup is turned "on" for both devices.  Whenever I update the document on one device, it does not update on the other device.  Is there something else that I need to do to make automatic updates happen?  Many thanks, Mark

    This solved the problem.  "Use iCloud" was turned on in one device but not in the other.   Many, many, thanks!!!

  • BAPI_ACC_DOCUMENT_POST does not update BKPF/BSEG tables

    Hello,
    I used bapi_acc_document_post to post a accounting document The following routine says that the document is successfully posted, however, does not update the acccounting tables. I read several messages on the SDN and unable to get the correct answer.
    Your help is appreciated.
    Regards
    William
    REPORT ze_bapi_acc_document_post .
    SELECTION-SCREEN BEGIN OF BLOCK bl01 .
    SELECTION-SCREEN ULINE.
    PARAMETERS:
      ref_key LIKE bapiache01-obj_key DEFAULT 'TEST000001BAPICALL',
      dest    LIKE bdi_logsys-logsys  DEFAULT '          '.
    SELECTION-SCREEN END   OF BLOCK bl01 .
    DATA:
      gd_documentheader    LIKE bapiache09,
      gd_customercpd       LIKE bapiacpa09,
      gd_fica_hd           LIKE bapiaccahd,
      it_accountreceivable LIKE TABLE OF bapiacar09 WITH HEADER LINE,
      it_accountgl         LIKE TABLE OF bapiacgl09 WITH HEADER LINE,
      it_accounttax        LIKE TABLE OF bapiactx09 WITH HEADER LINE,
      it_criteria          LIKE TABLE OF bapiackec9 WITH HEADER LINE,
      it_valuefield        LIKE TABLE OF bapiackev9 WITH HEADER LINE,
      it_currencyamount    LIKE TABLE OF bapiaccr09 WITH HEADER LINE,
      it_return            LIKE TABLE OF bapiret2   WITH HEADER LINE,
      it_receivers         LIKE TABLE OF bdi_logsys WITH HEADER LINE,
      it_fica_it           LIKE TABLE OF bapiaccait WITH HEADER LINE,
      it_accountpayable    LIKE TABLE OF bapiacap09 WITH HEADER LINE,
      it_paymentcard       LIKE TABLE OF bapiacpc09 WITH HEADER LINE,
      it_ext               LIKE TABLE OF bapiacextc WITH HEADER LINE.
    PERFORM fill_internal_tables.
    CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
      DESTINATION dest
      EXPORTING
        documentheader    = gd_documentheader
        customercpd       = gd_customercpd
        contractheader    = gd_fica_hd
      TABLES
        accountgl         = it_accountgl
        accountreceivable = it_accountreceivable
        accountpayable    = it_accountpayable
        accounttax        = it_accounttax
        currencyamount    = it_currencyamount
        return            = it_return.
    WRITE: / 'Result of check all:'.                            "#EC NOTEXT
    PERFORM show_messages.
      DATA: l_type LIKE gd_documentheader-obj_type,
            l_key  LIKE gd_documentheader-obj_key,
            l_sys  LIKE gd_documentheader-obj_sys.
      CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
        EXPORTING
          documentheader    = gd_documentheader
          customercpd       = gd_customercpd
          contractheader    = gd_fica_hd
        IMPORTING
          obj_type          = l_type
          obj_key           = l_key
          obj_sys           = l_sys
        TABLES
          accountgl         = it_accountgl
          accountpayable    = it_accountpayable
          accounttax        = it_accounttax
          currencyamount    = it_currencyamount
          return            = it_return
        EXCEPTIONS
          OTHERS  = 1.
      WRITE: / 'Result of post:'.                               "#EC NOTEXT
    PERFORM show_messages.
    REFRESH IT_RETURN.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'.
    IMPORTING
      RETURN        = IT_RETURN.
        COMMIT WORK.     .
    BREAK-POINT.
         Form  fill_internal_tables
    FORM fill_internal_tables.
      PERFORM fill_header.
      PERFORM fill_accountgl.
      PERFORM fill_accountap.
      PERFORM fill_accounttax.
      PERFORM fill_currencyamount.
    ENDFORM.                               " fill_internal_tables
         Form  Show_messages
    FORM show_messages.
      IF it_return[] IS INITIAL.
        WRITE: / 'no messages'.
      ELSE.
        SKIP 1.
        LOOP AT it_return.
          WRITE: /    it_return-type,
                 (2)  it_return-id,
                      it_return-number,
                 (80) it_return-message,
                      it_return-message_v1,
                 (20) it_return-parameter,
                 (3)  it_return-row,
                      it_return-field.
        ENDLOOP.
      ENDIF.
      ULINE.
    ENDFORM.                               " Show_messages
          FORM fill_accountgl                                           *
    FORM fill_accountgl.
    Actual invoice line
      CLEAR it_accountgl.
      it_accountgl-itemno_acc     = 2.
      it_accountgl-gl_account     = '0000009223'.
      it_accountgl-item_text      = 'Line Iten'.  "#EC NOTEXT
      it_accountgl-profit_ctr     = 'DNDDUMMY'.
      it_accountgl-comp_code      = '0180'.
      it_accountgl-tax_code       = 'IG'.
      it_accountgl-FUNDS_CTR      = '1985BA'.
      it_accountgl-COSTCENTER     = '1985BA'.
      it_accountgl-FUND           = 'C113'.
      it_accountgl-TAXJURCODE     = 'CAON'.
      APPEND it_accountgl.
    ENDFORM.                    "fill_accountgl
          FORM fill_header                                              *
    FORM fill_header.
    CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
       IMPORTING
         own_logical_system = gd_documentheader-obj_sys.
    OBJ_TYPE has to be replaced by customers object key (Y* or Z*)
    gd_documentheader-obj_type   = 'BKPFF'.
    gd_documentheader-obj_key    = ref_key.
    gd_documentheader-BUS_ACT    = 'RMRP'.
      gd_documentheader-username   = sy-uname.
      gd_documentheader-header_txt = 'BAPI Test'.               "#EC NOTEXT
    gd_documentheader-obj_key_r  =
    GD_DOCUMENTHEADER-reason_rev =
      gd_documentheader-comp_code  = '0180'.
    GD_DOCUMENTHEADER-AC_DOC_NO  =
      gd_documentheader-fisc_year  = '2008'.
      gd_documentheader-doc_date   = sy-datum.
      gd_documentheader-pstng_date = '20070901'.
    GD_DOCUMENTHEADER-TRANS_DATE = SY-DATUM.
    GD_DOCUMENTHEADER-VALUE_DATE =
    GD_DOCUMENTHEADER-FIS_PERIOD =
      gd_documentheader-doc_type   = 'RE'.
      gd_documentheader-ref_doc_no = '6000009268'.
    GD_DOCUMENTHEADER-COMPO_ACC  = 'FI'.
      gd_documentheader-bus_act    = 'RFBU'.
    ENDFORM.                    "fill_header
          FORM fill_ap                                                  *
    FORM fill_accountap.
    vendor line
      CLEAR it_accountpayable.
      it_accountpayable-itemno_acc = 1.
      it_accountpayable-comp_code = '0180'.
      it_accountpayable-pmnttrms = '0006'.
      it_accountpayable-TAX_CODE = 'IG'.
      it_accountpayable-vendor_no  = '0001200051'.
      it_accountpayable-item_text  = 'Vendor Line'. "#EC NOTEXT
      APPEND it_accountpayable.
    ENDFORM.                    "fill_accountap
          FORM fill_tax                                                 *
    FORM fill_accounttax.
    tax line
      CLEAR it_accounttax.
      it_accounttax-itemno_acc = 3.
      it_accounttax-gl_account = '0000081710'.
      it_accounttax-tax_code   = 'IG'.
      it_accounttax-acct_key   = 'VST'.
      it_accounttax-TAXJURCODE     = 'CA00'.
      APPEND it_accounttax.
    ENDFORM.                    "fill_accounttax
          FORM fill_currencyamount                                      *
    FORM fill_currencyamount.
      CLEAR it_currencyamount.
      it_currencyamount-itemno_acc   = 1.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'CAD'.
      it_currencyamount-amt_base     = '106.00'.
      APPEND it_currencyamount.
      CLEAR it_currencyamount.
      it_currencyamount-itemno_acc   = 2.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'CAD'.
      it_currencyamount-amt_base     = '100.00'.
      APPEND it_currencyamount.
      CLEAR it_currencyamount.
      it_currencyamount-itemno_acc   = 3.
      it_currencyamount-curr_type    = '00'.
      it_currencyamount-currency     = 'CAD'.
      it_currencyamount-amt_base     = '6.00'.
      APPEND it_currencyamount.
    ENDFORM.                    "fill_currencyamount

    U have to implement the BADI for this.. ‘AC_DOCUMENT’
    Add source code into Method: CHANGE_INITIAL & CHANGE_AFTER_CHECK,
    *---<SAPLBPFC> is for Posting      with BAPI: BAPI_ACC_DOCUMENT_POST
      *---<SAPCNVE > is for Posting(Tax) with BAPI: BAPI_ACC_DOCUMENT_POST
      *---<SAPMSSY1> is for Test(Check)  with BAPI: BAPI_ACC_DOCUMENT_CHECK
    DATA: wa_header TYPE acchd.
        IF sy-xprog NE ' SAPMSSY1 '.
          CLEAR wa_header.
          wa_header = im_document-header.
          ex_document-header-bktxt = wa_header-bktxt.
          CLEAR wa_header.
        ENDIF.

  • Sale Quotation Formatted Search displays correctly but does not update OQUT

    I have a formatted search, intended to show a deposit amount of 50% for the document total, and refresh whenever the doc total changes. It displays correctly on the Quote header screen UDF area, but OQUT does not update. Pressing Shift-F2 returns 'internal error'. The first time the Quote is entered the right value gets in OQUT, but never gets updated after that.
    The UDF is OQUT.U_Deposit. The formatted search query is:
    Select ($[$33.88.number]*.05) and it is set to refresh reglaurly when Document Total changes.
    Thanks for helping to figure this out

    Which field are you referring by
    $[$33.88.0]
    The screen variable for
    Document Total  $[$29.0.Number]
    Total Before Discount $[$22.0.Number]
    Also I notice for 50% you have used .05 which is actually 5%
    Try this query 
    SELECT ($[$-29.0.Number]*0.5)
    The minus is needed since it is a UDF on the header which is a seperate window.

  • My firefox beta 12 using Linux platform does not update to firefox RC1 via the "check for update" function. I know windows' beta version had this fixed, when would Linux get similar support ?

    Current platform : Linux
    Current firefox version : Firefox 4 beta 12
    Issue : does not update to RC 1 using the check for update feature.
    Background : previously downloaded beta 8 and then it automatically updated to beta 12 using update features but for RC1, it does not.
    I know users under Windows platform had same problem but was resolved and they can now update via check for update feature.
    Please implement for Linux users too.
    Thanks !!

    If you can't update then you can download and install the full Firefox 4 RC version.
    * http://www.mozilla.com/firefox/all-beta.html

  • Can't add music my iPhone from iTunes.  When I try to drag a song over to my phone, I get the circle w/ the syncing line through it, but it does not update/load.  [Manually manage music and videos] is checked. And, this is the only Mac I have ever used to

    Can't add music my iPhone from iTunes.
    When I try to drag a song over to my phone, I get the circle w/ the syncing line through it, but it does not update/load.
    [Manually manage music and videos] is checked. And, this is the only Mac I have ever used to add music to my phone.
    Also, just updated the phone's software today, and iTunes' software is already up to date.

    Hi Gregg,
    Have you tried resetting the device (nothing will be lost): Hold down the Home and Power buttons at the same time and continue to hold them down until the Apple appears (up to 30 seconds). Once the Home screen redisplays, see if your Music app is behaving normally.
    Cheers,
    GB

  • HT2513 The date on my dock does not update automatically ? - Ps anybody.

    I use MACCBOOK PRO with OS X ver 10.6.8.
    I  Cal Version 4.0.4 (1395.7)
    Sometimes the current date does not update on my ical icon in the dock. After clicking on it the date becomes OK.
    I would appreciate if someone has a solution.

    I solved the problem by uninstalling Glims.

  • Mobile.me Calendar does not update/sync on iPhone

    Since I did my upgrade to the new version of Mobile.me Calendar (as requested by Apple!), my iPhone no longer shows entries that I have typed into the Mobile.me Calender website. I no longer use iCal because Apple said it would not work with the new version of Calendar on Mobile.me, so I did the upgrade to stay in sync with calendars on my mobile.me site and iPhone, but the iPhone does not update. I deleted my calendar entries on my iPhone hoping that the Mobile.me would re-sync the data, but that didn't happen either. Here is my info:
    iPhone version 3.1.3(7E18)   Model MA712LL (first original iPhone)
    What else can I tell you to help me please?

    Please always post your System details when you have a question. The upgrade to the new MobileMe calendar produces different results, and different problems, with different versions of OSX.
    Snow Leopard: during the upgrade process your iCal calendars should be moved to MobileMe (this can take some time and you have to wait for it to happen). Once done, your iCal reads the calendars from MobileMe so any changes made in either place will be visible immediately. If this has not happened then this Apple Tech Note provides instructions:
    http://support.apple.com/kb/TS3397
    Leopard: when the upgrade is completed iCal on Leopard will not be able to see the MobileMe calendars until an additional process is carried out, detailed in this Apple Tech Note:
    http://support.apple.com/kb/HT4330
    Tiger: iCal on Tiger cannot read the MobileMe calendars, period. The only workaround is to upgrade to Leopard, or Snow Leopard if possible (Intel Mac required).

  • Manual sync to ITunes does not update music

    I have a generation 3 (I think--it looks like the model number is A1318) IPOD Touch running version 4.1 operating system.  I have ITunes version 12.0.1.26. 
    It does not automatically sync.  When I select manual sync, it appears to go through the process and indicates that it has completed the sync, but nothing has changed.  It does not update the IPOD with new songs from my library.
    Any help would be appreciated.  For example are thees operating systems compatible?  If they are what am I doing wrong.
    Thanks
    Ron

    Try backing up to iTunes and restore from backup
    iOS: Back up and restore your iOS device with iCloud or iTunes
    Note that ll the synced media like apps and music have to be on the computer since they are not included in the backup

  • Batch Split in OBD & billed for the entire Quantity .RG1  register does not update the excise values

    Hi All,
    I am new here . We have batch split in Delivery and 601 happens for the individual batches and billing we bill for the entire quantity . Hence the RG1 does not update the excise values for the batches and it is showing as zero (upon extraction in J2I6). Upon research through the program the latest note which i presume is patched
    The latest note is N158234 which does not show in the program but seems have been patched considering we are using the Latest version of SAP .
    As you see above in the billing we have billed for the whole quantity but RG1 does not update for the since the batches are zero .
    My programmer says because of some note related to cancellation where it says about values H & J in vbfa table and due to which program does not go through the Note for the batch split .
    Now i have checked few other projects in my company and they all seems to be following the program . So i am wondering whether my process or some customization is missing .
    Sales order (no batch determination)  , in delivery the batches are picked through wm to and batch split happens in the delivery . Then billling for the whole quantity . We have automatic excise invoice creation enabled so no J1IIN .
    Can somebody help me .
    Thank you

    My programmer says because of some note related to cancellation where it says about values H & J in vbfa table and due to which program does not go through the Note for the batch split
    Which field (H & J) they were referring in VBFA ?
    i have checked few other projects in my company and they all seems to be following the program
    How about the other projects' values in VBFA where your techinical team is guessing some issue.  Have you compared this?
    Since you have already the note 158234 implemented in your system, ideally, you should not face any issue.
    G. Lakshmipathi

  • HT1277 Mail on my Mac computer does not update when I update my mail on my phone and iPad.  Can anyone help me with this?  Is there a setting I need to check?

    Mail on my Mac computer does not update when I update my mail on my iPhone and iPad. Can anyone help me with this?  Is there a setting that I need to check?

    All that you had to do was to sign into the old account in order to update those apps. What I mean is that you just needed to sign into that account in the store settings like I described and that should have worked. You didnt need to enter the credit card information again - you justed needed to use the old ID and password.
    Anyway, I think the good news is that if everything else is OK with the new account, just download iBooks with the new ID - it's a free app so its not like you have to pay for it again. I'm not sure what the other App is that you are talking about - but if it is the Apple Store App - that is free as well.
    Try this anyway, when you try to update iBooks, just use the old password if the old ID still pops up.
    Did you try signing into the store settings with your new ID and see what happens with the updates then?

  • Yahoo finance portfolio does not update in firefox but is fine in Chrome and IE9

    This problem did not exist under the previous version of Firefox. One can access Yahoo finance my portfolio ok but even with streaming quotes on the portfolio does not update.
    Problem now solved. It was an issue of the Kaspersky root kit certificate

    I don't know if it matters, try this url instead, which is a secured one (https):
    https://twitter.com/

  • Application Compatibility does not update the database.

    Hi,
     I am using application compatibility manager 6.1, and SQL server 2012 as database. ACT run ok and it create the XML file but it does not update the database at "C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA" location.
    I can see the valid XML file but somehow the MDF file of database is not updated so my ACT windows does not showing anything on it.
    Any Help would be appreciated.
    Thanks
    Rakesh Patel
    rakesh patel

    Hi Rakesh,
    I am not sure if you have resloved your issue.
    But for helping others to know what to do if they meet the same issue as yours, I consider to mark the post as answered.
    If you would like further assistance, please post back and we will be always here to help you.
    Any concern about this mark behavior, you can just unmark it.
    Thanks for your understanding.
    Regards,
    Kelvin hsu
    TechNet Community Support

  • Time stamp does not update automatically

    Hi, All. I want include the time stamp (yyyy-mo-dd-min-sec) in the file name. However, the value of the time stamp does not update automatically/synchronizes with the computer clock at each new run. I need to do it manually with the right click and update the time to the current.
    How can I solve this? Thanks a lot in advance.

    What does this have to do with NI counter/timer hardware?
    What language are you using and what function are you using to get a timestamp? If the language is LabVIEW, then all you need is Get Date/Time in Seconds. If you are using a front panel Time Stamp control, then you are using the incorrect function.

  • SSRS 2012 (SP Integrated) report on SP 2013 PerformancePoint Dashboard: when too many filter items selected together report does not update anymore!

    I am having a situation with SSRS 2012 (SP-integrated) report rendered on SP 2013 PerformancePoint Dashboard using linked PerformancePoint (PP) filters.
    The report works fine as long as too many PP filter items are not selected at the same time. When gradually selecting more items from the filter, the report updates itself until more than a sepecific numer of filter items are selected - the report simply
    does not update itself anymore. This "specific number of filter items", when hit, generates the following error in ULS:
    An exception  occurred while rendering a Web control. The following diagnostic information might help to determine the cause of this problem:  System.UriFormatException: Invalid URI: The hostname could not be parsed.    
     at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)    
     at System.UriBuilder..ctor(String uri)    
     at Microsoft.PerformancePoint.Scorecards.ServerRendering.ReportViewControl.ReportUrl(SqlReportViewData sqlReportViewData)    
     at Microsoft.PerformancePoint.Scorecards.ServerRendering.ReportViewControl.RenderSqlReport(TextWriter writer, ReportView sqlReportView)    
     at Microsoft.PerformancePoint.Scorecards.ServerRendering.ReportViewControl.RenderReportViewControl(HtmlTextWriter writer, ReportView rv)  PerformancePoint Services error code 20700.
    I already know that the cause of the issue is in the length of the query (perhapse RDL or MDX) that the browser is supposed to pass on to the instance of SSAS.
    Some people had suggested a workaround that was suitable for older versions or non-integrated SSRS (see here: http://social.msdn.microsoft.com/Forums/sqlserver/en-US/cb6ede72-6ed1-4379-9d3c-847c11b75b32/report-manager-operation-cannot-run-due-to-current-state-of-the-object).
    Knowing this, have already done the changes suggested (adding the lines suggested to SP's web.config for Reporting and the web.config of the site on which report is rendred) at no avail, just to make sure.
    I have rednered the same report on the same dashboard using SSRS filters and there is no problem; it just works fine. This has to be a bug in PP that is causing this.
    Has anyone had the same problem with SSRS 2012 (SP-integrated) report rendered on SP 2013 PP dashboard using PP filter? Any fixes or workarounds?
    thnx!

    Hello everybody.
    I confirm the issue in Service Pack 1 Release 2.
    Poor workaround is to remove the repeated infromation from the member keys (in SSAS they can be really long).
    The issue seems to be specific to SSRS: Excel Services works well with the same filter.
    Sergey Vdovin

Maybe you are looking for