Current Position:Home > "Enter document number error" in BAPI_SALESORDER_CHANGE

"Enter document number error" in BAPI_SALESORDER_CHANGE

Update:11-30Source: network consolidation
Advertisement
Hi,
I am trying to change the sales order thorugh BAPI_SALEORDER_CHANGE as follows,
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = <fs_order_alv_aux>-vbeln
order_header_in = e_bapisdh1
order_header_inx = e_bapisdh1x
simulation = p_consol
TABLES
return = t_bapi_return
extensionin = t_bapiparex.
I am changing only KVGR5 through this BAPI, and I am passing sales documetn number through <fs_order_alv_aux>-vbeln.
When I check inside BAPI I am able to see SALESDOCUMENT : 0021033932, while debugging further I came to know about following.
Inside the Function SD_SALES_DOCUMENT_READ. following 2 lines gets executed.
VBAK-VBELN = DOCUMENT_NUMBER.
PERFORM BELEG_LESEN(SAPMV45A).
Here, VBAK-VBELN has a value, but as soon as it goes inside PERFORM BELEG_LESEN(SAPMV45A). VBAK-VBELN value gets cleared and following error has been set inside the perform.
if vbak-vbeln is initial.
message e045.
endif.
If I manually fill VBAK-VBELN inside this perform then everything works fine.
I even tried same thing through SE37 by executing this BAPI but in this case it doesnot clear the VBAK-VBELN inside this PERFROM.
Can anyone help?
Thank you.

The Best Answer

Advertisement
Hi Pramod,
it does not look like a conversion error.
You may try again with SE37, enter debugger at start and set a watchpoint at VBAK-VBELN in function SD_SALES_DOCUMENT_READ, i.e. program SAPLV45A.
When VBAK-VBELN is set, it will stop at the watchpoint. Check the call stack at this point to find out how the value gets here. Then start your misbehaving program and (I hope so) find out ehere it is going wrong.
The SD process is heavily penetrated with enhancements for a couple of industry solutions. I do not know your environment so it is hard to say how the document number is passed to function group V45A.
Regards,
Clemens
  • "Enter document number error" in BAPI_SALESORDER_CHANGE Update:11-30

    Hi, I am trying to change the sales order thorugh BAPI_SALEORDER_CHANGE as follows, CALL FUNCTION 'BAPI_SALESORDER_CHANGE' EXPORTING salesdocument = <fs_order_alv_aux>-vbeln order_header_in = e_bapisdh1 order_header_inx = e_bapisdh1x simulation = p_

  • Enter the document number error in BAPI_SALESORDER_CHANGE Update:11-30

    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

  • Enter Document Number in "BAPI_SALESORDER_CHANGE". Update:11-30

    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 z

  • Document number error in billing Update:11-30

    HI all, When I am doing billing for a sales order, I am getting the following error. The full message is : "The document number you specified is not in the appropriate number range. The number range is dependent on the  document type. The exception t

  • CIF Error - Enter Document Type Update:11-30

    Hello Experts, I facing an problem, we purchase requisitions stuck in post processing in APO, when i try to push it to ECC, i am getting error in ECC application logs as "Enter Document Type", "Error during creation; GUID:   ; Item  000000&

  • F-32, clear customer - document number Update:10-11

    Hi, My client is using F-32 to clear customer items, it selects document no. as selction crieteria. it enters document number wrongly and press enters, system stores document no. user get back by pressing F3 once and select choose open items whr he a

  • No document number in Approval Workflow Update:11-30

    Hi! I have crated a work flow where I check if the status is FA for docType 900. If this is true then I send a mail to the person responsible for the approval. Everything works exept that I don't get the document number for the document that I change

  • JHF3 transaction:Accounting document display error Update:11-30

    Hi, I am displaying an order billing document through transaction JHF3. there's an accounting document which is being generated and i am displaying it. In the assignment field the sales document number should be populated but instead the reference bi

  • "Enter the document number" in BAPI_SALESORDER_CHANGE. Update:11-30

    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

  • IDOC error status 'Enter the Document Number' Update:11-30

    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 changedRead other 3 answers