on 01-30-2007 10:16 AM
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,
Firstly Wishing you a very Happy and Prosperous New Year
I got the same error in same function module and same line.
"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 to solve this issues.
Thanks a lot for ur help in advance....
Naidu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've received other solution proposed by SAP. See details below.
Development has provided some sample coding on how to refresh the data.
However, please note that this only a suggestion and you will need to
test thoroughly before implementing it. The Note too clearly mentions
that each problems needs to be analysed separately. Please keep in mind
Note 170183 before proceeding.
Sample code:
******************************************************************
FIELD-SYMBOLS <TMCB> TYPE TMCB.
ASSIGN ('(SAPLMCS1)TMCB') TO <TMCB>.
IF SY-SUBRC = 0.
CLEAR <TMBC>.
UNASSIGN <TMBC>.
ENDIF.
******************************************************************
You have two options to place this code:
1. After each BAPI call (after commit work) like below
BAPI_SALESOREDER_CHANGE
BAPI_TRANSACTION_COMMIT
<< Insert your coding(Clear TMBC)
BAPI_INCOMINGINVOICE_CREATE
BAPI_TRANSACTION_COMMIT
<< Insert your coding(Clear TMBC)
OR
2. Into the USEREXIT_REFRESH_DOCUMENT (MV45AFZA) as a single point.
Then it will automatically run in both BAPIs.
Fill the document number with the leading zeroes.
pls. reward if helpful
regards
Roberto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem occurs even if I change differrent documents. As I've understood note 760068 the problem is general in SD BAPI when we make differrent operations using BAPI from the same group as mentioned in note: "Teses are side effects which can occur if the BAPIs partly access the same programs internally".
My process is: change SO and post delivery.
Lukasz Tylutki
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.