"Enter the document number" in BAPI_SALESORDER_CHANGE.

Hi,
I've got the following error:
Call of BAPI_SALESORDER_CHANGE gives us an error V1 045 "Enter the document number". We are sure the call is proper (document number is send). The errors occurs in function module SD_SALES_DOCUMENT_READ in lines 60 and 61:
60    VBAK-VBELN = DOCUMENT_NUMBER.
61   PERFORM BELEG_LESEN(SAPMV45A).
In line 60 field VBAK-VBELN is set  but in form BELEG_LESEN(SAPMV45) is initial. The value of field is checked in MV45AF0B_BELEG_LESEN line 53.
53    if vbak-vbeln is initial.
54    message e045.
55   endif.
The error occurs only when we have mass changing of sales order and posting deliveries in reference to sales order. Single operation doesn't make any problem.
Our system:
   SAP_APPL 470 with  SAPKH47026
   SAP_BASIS 620 with SAPKB62059
Anyone met it before? I'm quite confused.
Best regards:
Lukasz Tylutki

Hi Lukasz,
If I understand correctly the problem occurs with multiple calls of the BAPI within the same program call. As a general rule of thumb, this could be due to parts of the program not properly initialized. Don't try to correct the BAPI - it's hopeless.
I suggest you make use of the suggestion in note 760068 to start a new task.
This can be achieved as follows:
Call function 'XXXXXX' starting new task 'BLABLA'
performing yyyyy on end of task
...rest of function interface (only export and tables)...
wait until semaphore = 'X'.
form yyyyy
receive results from function 'XXXXXX'
importing...
tables...
exceptions....
semaphore = 'X'.
endform.
This way all data are initalized in a different LUW, thus not influencing the next function executions. An alternative would be to submit programs for each function call, passing the interface through export-import parameters, but it doesn't look as nice.
Best regards,
Stratis

Similar Messages

  • Enter the document number error in BAPI_SALESORDER_CHANGE

    Hi,
    please help me on the below error:
    Call of BAPI_SALESORDER_CHANGE gives us an error V1 045 "Enter the document number". We are sure the call is proper (document number is send). The errors occurs in function module SD_SALES_DOCUMENT_READ in lines 60 and 61:
    60 VBAK-VBELN = DOCUMENT_NUMBER.
    61 PERFORM BELEG_LESEN(SAPMV45A).
    In line 60 field VBAK-VBELN is set but in form BELEG_LESEN(SAPMV45) is initial. The value of field is checked in MV45AF0B_BELEG_LESEN line 53.
    53 if vbak-vbeln is initial.
    54 message e045.
    55 endif.
    kindly help me on this error,
    Thanks in advance friends,
    Naidu

    LOOP AT IT_ZVCONTRACT_SUSP_SAVE INTO WA_ZVCONTRACT_SUSP_SAVE.
    *Assign values to required fields for for updation
        SALESDOCUMENT = WA_ZVCONTRACT_SUSP_SAVE-VBELN.
        ORDER_HEADER_IN-SALES_ORG = WA_ZVCONTRACT_SUSP_SAVE-VKORG.
        ORDER_HEADER_IN-PURCH_DATE = '00000000'.
        ORDER_HEADER_INX-SALES_ORG = 'X'.
        ORDER_HEADER_INX-PURCH_DATE = 'X'.
        ORDER_HEADER_INX-UPDATEFLAG = 'U'.
        WA_ORDER_ITEM_IN-ITM_NUMBER = WA_ZVCONTRACT_SUSP_SAVE-POSNR.
        IF WA_ZVCONTRACT_SUSP_SAVE-CFLAG EQ 'P'.      "flag for permanent suspension
          WA_ORDER_ITEM_IN-REASON_REJ = WA_ZVCONTRACT_SUSP_SAVE-ABGRU.
        ELSEIF WA_ZVCONTRACT_SUSP_SAVE-CFLAG EQ 'T'.  "flag for temporary suspension
          WA_ORDER_ITEM_IN-REASON_REJ = ''.
        ENDIF.
        APPEND WA_ORDER_ITEM_IN TO ORDER_ITEM_IN.
        WA_ORDER_ITEM_INX-ITM_NUMBER = WA_ZVCONTRACT_SUSP_SAVE-POSNR.
        WA_ORDER_ITEM_INX-UPDATEFLAG = 'U'.
        WA_ORDER_ITEM_INX-REASON_REJ = 'X'.
        APPEND WA_ORDER_ITEM_INX TO ORDER_ITEM_INX.
    *update contract for reason code
        CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
          EXPORTING
            SALESDOCUMENT    = SALESDOCUMENT
            ORDER_HEADER_IN  = ORDER_HEADER_IN
            ORDER_HEADER_INX = ORDER_HEADER_INX
          TABLES
            RETURN           = RETURN
            ORDER_ITEM_IN    = ORDER_ITEM_IN
            ORDER_ITEM_INX   = ORDER_ITEM_INX.
    ENDLOOP.
    We are using it the above given way and it is working fine.
    Regards,
    Abhijit G. Borkar

  • IDOC error status 'Enter the Document Number'

    Hi PI or SD masters,
    I have a status 51 in my IDOC. The reason was 'Enter the Document Number'. Has anyone encountered this before?

    Sold To Party Account number was changed

  • Enter Document Number in "BAPI_SALESORDER_CHANGE".

    Hi All,
    I am facing some problem with BAPI_SALESORDER_CHANGE.
    I am trying to update the Sales Order header with the BAPI BAPI_SALESORDER_CHANGE.
    However, I am facing the below error though I pass the Sales document number correctly with all leading zeroes.
    "Enter Document Number".
    When I debugged, I found that it hits a function module SD_SALESDOCUMENT_CHANGE which inturn calls the FM
    SD_SALES_DOCUMENT_READ. Inside the FM SD_SALES_DOCUMENT_READ, I could see that the value is being assigned to
    VBAK-VBELN. But, there is a subroutine which gets executed after that. As soon as it enters in to the subroutine, the value of VBAK-VBELN gets vanished.
    VBAK-VBELN = DOCUMENT_NUMBER.
      PERFORM BELEG_LESEN(SAPMV45A).    "Once it enters inside this subroutine, the value of VBAK-VBELN gets cleared.
      PERFORM KONV_SELECT(SAPFV45P).
    Any pointers on this would be highly appreciated. I have gone through various posts of SDN. But, none of them could help me.
    Note:  When I execute the above FM from SE37, it works fine and the VBAK-VBELN value doesnt get vanish even after entering the above mentioned Subroutine.
    Thanks,
    Babu KIilari

    Hi Babu,
    Just replying to update this thread in case it can help others in the future, as I had a similar issue (at our same client ).  To paraphrase/quote your reply to my mail on similar error " the solution for the same is not the implicit enhancement that we have created there. It was just a temporary solution and as you have highlighted that transport never moved into any other system across the landscape. The actual issue that caused the error was due to a conflict between the subroutine pool and the program SAPMV45A.  Someone had defined a subroutines in SAPMV45A and they were calling the same in the USEREXIT_SAVE_DOCUMENT_PREPARE which I think belongs to the same program. Don’t recall the actual glitch at the variable level, however VBAK-VBELN was being reset by the subroutine pool. Instead of calling the external subroutines from the parent program SAPMV45A, I had created one Subroutine pool and consolidated all the 6 subroutines into it and then I am calling these 6 subroutines from the FM." 
    So your issue was within a sales order change being saved, in the save user-exit, someone was again referring to SAPMV45A which was blanking out VBAK-VBELN as you showed above.
    In my issue, same issue was happening that VBAK-VBELN was disappearing.  The scenario for us was as follows.  We have an interface from a TMS system which can update STOs or Sales Orders (1 doc per IDOC).  We saw the Sales Order IDOCs were sometimes getting a 51 status if the BAPI call failed with V1045 Enter the Document Number.  By the hints above, we suspected somehow SAPMV45A was being called.  By analysis, we realized that the issue happened when an IDOC to do a BAPI_PO_CHANGE preceded the BAPI call for the sales order.  And then debugging showed us that someone had put a user-exit in a gATP exit which was performing a subroutine in SAPMV45A for  an STO (which the logic was only pertinent to SOs).  By going into the SAPMV45A routine, the (SAPMV45A)VBAK-VBELN work area was created albeit empty.  Then, when the Sales Order BAPI gets called (his IDOC was next in line of the IDOC processing program) that blank work area overlaid VBAK-VBELN when code entered into BELEG_LESEN.  Our solution will be to prevent the gATP exit from calling a perform into SAPMV45A when its working with STOs.

  • Attaching a flat file to the Document Number

    Hi,
       I want to attach a flat file to the Document Number generated .
    Please follow the steps :
    1) Goto transaction FB03.
    2) Enter into it by giving a document number.
    3) At the Document overview screen you will find the 'Services for Object' button(Left side upper part of the screen)
    4) When you click it you will find Create-> Create attachment will be there where you can browse and upload a flat file that tags tagged to the Document number.
         Is there any FM to do this activity.
    Thanks in Advance

    Hi Raja,
           I have used the function module
    'BDS_BUSINESSDOCUMENT_CREATEF' with the following parameters .
         Export:      
              LOGICAL_SYSTEM =  'LS_TSX100'
              CLASSNAME      = 'BUS6035'
              CLASSTYPE      = 'BO'
              CLIENT         = '100'
              OBJECT_KEY     = 'SE1201000000012006'
         Tables:
              Files-directory = 'C:\'
              files-filename  = 'POSTING.TXT'.
    After that I have committed it .
    The file doesn't get attached . I went into the FB02 and entered the accounting number(100000001) and checked but it has not got attached .
    Please help me .

  • I am trying to install Lightroom and I am OK until it asks for a serial number. I purchased Lightroom from B&H and the have entered the seal number on the the B&H invoice. Nothing happens, not all the entry boxes are filled with the serial number that was

    I am trying to install Lightroom and I am OK until it asks for a serial number. I purchased Lightroom from B&H and the have entered the seal number on the the B&H invoice. Nothing happens, not all the entry boxes are filled with the serial number that was provided by B&H. I looked for a serial number on and in the box it came in, nada. Need a bit of help here, what can I do?
    RJ@

    Try to connect on Live chat one more time.
    Still not connected , better to contact Adobe Phone Support
    Click on Phone option and check once :
    Contact Customer Care

  • The salesperson for my iphone 4 said on Christmas morning we could go to our online account, select my number, select to change my SIM card, and enter the ICCID number so that I'd be able to use my iphone 4 today. I have not seen any such steps. Help?

    The salesperson for my iphone 4 said on Christmas morning we could go to our online account, select my number, select to change my SIM card, and enter the ICCID number so that I'd be able to use my iphone 4 today instead of my old phone (not an iphone). I have not seen any such steps. Help?

    I suspect the salesperson that told you that meant your online account with your carrier...have you tried logging into your carrier account online? To do this will require the sim number on your sim card, as well as the phone's IMEI number...you get the sim number off the sim card & the IMEI number, for the phone, is printed on the box.

  • Why does iCal insist on formatting a phone number as a hyperlink? How can I prevent this, and prevent iCal from launching FaceTime in response to entering the phone number in the event box?

    I just want to enter a phone number into an event in iCal. I do not want to launch FaceTime. How can I just put a phone number in an iCal event, without OSX 10.10 insisting on launching FaceTime in response to entering the phone number? I use a Macbook Pro.

    Megantic wrote:
    Ever since I upgraded my iPhone 4S to iOS7, it has basically become a brick.  It constantly freezes, and the home button becomes completely inoperable.  People have suggested a number of fixes for the home button problem ("calibrating", tightening screws, etc.) but none of the fixes solved the problem.  Through trial and error, I've come to realize that the problem is that the phone doesn't have enough computing power and that too much of its RAM gets used up by background processes, causing the phone to freeze.
    I have found an app that stops unnecessary background processes currently running, frees up RAM, and lets the phone function properly (Free RAM 1.3). Once I've run this app, the phone functions perfectly.
    However, this clean up only happens each time the app is launched (ie: it does not continuously free up RAM).  So, I constantly have to run it (and sometimes am not able to because the phone is frozen and the home button won't work).
    When it is running, the app  displays the background processes that are running.  Looking at the list, there are many processes for which I have no need, such as processes related to automatic checking for app updates, processes related to iCloud (which I do not use), etc.  Preventing these processes from running in the first place would go a long way in making my phone more useable (being able to return to a previous iOS would be a better option, but Apple won't allow this).
    Here is my question:  is there a way to prevent unnecessary background processes from running at all?
    Which app is this?

  • I have just transferred my application file from an Imac to an identical Imac, both running OS 10.9.5. When I attempt to open Photoshop 6, I am prompted for the serial number. I enter the serial number provided by Adobe, which I have confirmed with my "pr

    I have just transferred my entire application file from an Imac to an identical Imac, both running OS 10.9.5. Everything works fine, excepting that when I attempt to open Photoshop 6, I am prompted for the serial number. I enter the serial number provided by Adobe, which I have confirmed with my "previous purchase" records kept by Adobe. It is demanding a "qualifying product", all of which is contained in the complete files I transferred. Why can't Adobe recognise my valid serial number for Photoshop 6?

    I have just transferred my entire application file from an Imac to an identical Imac,
    Say what?
    Please use the proper installer.
    Are you really talking about Photoshop 6 or about Photoshop CS6?

  • Where can I download photoshop cs 8.0  I have the serial number from the case but I can't find the Cd that came with it.  I can't find where to download the software for it so I can just enter the serial number and download the program.

    I am trying to find at least the trial version so that I can enter the serial number that I have on the back of the case and activate the full version so I can get some work I need to get done finished.  My laptop was thrown away after a flood in my basement and I believe the cd was still in it.  I don't recall ever taking it out.

    Forget your existing disc and serial number. They won't work.
    Download the new non-activation version of CS2 (applies to CS owners as well) from
    Error: Activation Server Unavailable | CS2, Acrobat 7, Audition 3
    Install then enter the new serial number provided at that link.

  • I reinstalled operating system software on my MacBook Air (Yosemite 10.10.3) and tried reinstalling Adobe Acrobat 9 Pro.  I was able to install the software into my Applications folder but I was unable to enter the serial number or go any further with the

    I reinstalled operating system software on my MacBook Air (Yosemite 10.10.3) and tried reinstalling Adobe Acrobat 9 Pro.  I was able to install the software into my Applications folder but I was unable to enter the serial number or go any further with the installation.  When I click on the Adobe Acrobat icon in the Applications folder, nothing happens.

    Hi Tom,
    kindly check the System requirements | Acrobat family of products—older versions (XI, X, 9)
    For serial number message try: 
    Error "Invalid serial number" | Acrobat 9 | CS4
    Thanks,
    Atul Saini

  • I just purchased Adobe Photoshop Elements 13 for a Mac and trying to install. I am at the point to enter the serial number but it won't take letters. What do I do and where do I go for help?

    I just purchased Adobe Photoshop Elements 13 for a Mac and trying to install. I am at the point to enter the serial number but it won't take letters. What do I do and where do I go for help?

    If the code you are trying to enter has letters then you are not looking at a serial number.  A serial number only contains numbers - 6 sets of 4 numbers.
    Find your serial number quickly
    You might be dealing with a redemption code.  This is especially so if you purchased it from a store or the like.
    Redemption Code Help
    http://helpx.adobe.com/x-productkb/global/redemption-code-help.html

  • EBS - Auto posting not working  if text behind the document number

    Hi,
    When the document number is at the end of the payment reference, there is no problem.
        However, when there is text behind the document number, the posting rule doesn't work anymore.
        The autoposting also fails when there is a seperator (like a comma) directly added to the document number.
    -   In the posting rule for invoice numbers (BE51), it is able to find multiple invoice numbers and clear these together.
        We were expecting this posting rule will behave the same, so when a customer mentions more than 1 document number,
        it is able to find them all and clear if they fulfill the criteria (total amount of the documents matches the amount received).
        But because of 1st mentioned problem, system doesn't clear anything because of additional text present.
    I am look help to solve this issue
    Thanks.
    With regards,
    V.K
    Best regards,

    Hi,
    Any input for above issue?
    With regards,
    V.K

  • I just deactivated adobe acrobat 8.0 standard version from an old laptop in order to install it on my new laptop, however when i enter the license number, it tells me it is invalid

    I just deactivated adobe acrobat 8.0 standard version from an old laptop in order to install it on my new laptop, however when i enter the license number, it tells me it is invalid

    Error "The serial number is not valid for this product" | Creative Suite

  • How to do Check in the files for the document number?

    Hi ,
    By using BAPI_DOCUMENT_CHECKIN2 Function module I am uploading the Files for the Document number.
    My problem is - After uploading the files to the document number the files are not in check in status.
    I want the files to be checked in after uploading the from the FM.
    Can anyone tell me what I am missing ? How to do check in the files.
    I am passing the following values to FM.
          ls_files-SOURCEDATACARRIER = ls_file-DATA_CARRIER.
          ls_files-WSAPPLICATION     = ls_file-application.
          ls_files-DESCRIPTION       = ls_file-file_desc.
          ls_files-STORAGECATEGORY   = ls_file-category.
          ls_files-DOCFILE           = ls_file-doc_path.
          ls_files-CHECKEDIN         = 'X'.
        CALL FUNCTION 'BAPI_DOCUMENT_CHECKIN2'
          EXPORTING
            DOCUMENTTYPE            = ls_file_data-dokar
            DOCUMENTNUMBER          = ls_file_data-doknr
            DOCUMENTPART            = ls_file_data-doktl
            DOCUMENTVERSION         = ls_file_data-dokvr
          IMPORTING
            RETURN                  =  ls_return
          TABLES
            DOCUMENTFILES           =  lt_files
        COMPONENTS              =
        DOCUMENTSTRUCTURE       =
    I appriciate you response on this.
    Thanks in advance.

    Any answers for this?
    Thanks.

Maybe you are looking for

  • I summitted a job on solaris 9

    please, can any body help me out with this issue, I summitted a job but after some time the job change to a status of either stop or suspended. Please, help out

  • Convert rows to columns in sql database

    Hi Team, I have a table called as ABC in test schema which have got 3 columns       ABC COL1   VARCHAR2(10) COL2    VARCHAR2(10) COL3    VARCHAR2(10) The dat in ABC table is as follows            ABC COL1           COL2            COL3 A             

  • IPhone6 does not pairs with bluetooth head phones

    I had been using Bose wireless head phones with iPhone 4S, recently I bought iPhone 6 but now I am not able to use my bluetooth head phones as the new iPhone6 does not reads them. Would appreciate any information on how I can correct this issue. 

  • FAX on HP 8620 PRO not working

    Unable to receive FAX from HP FaxBack number 888-473-2963. Phone rings but FAXed page not received. Local printer tests all PASS.

  • Weblogic Portal 10.0 Autocomplete AJAX drop down list

    I realized I put this in the wrong forum, I moved it to the WLP forum, sorry. Edited by: user10192987 on Aug 27, 2008 9:19 PM