‎2013 Aug 07 7:37 AM
Hi Experts,
I am facing a strange issue with BAPI_REQUISITION_CHANGE.
The field requisition_items_old-short_text is converted to upper case when calling the BAPI due to this error W058 is raised.
BAPI_REQUISITION_CHANGE:
Main Program SAPLMEWQ
Source code of LMEWQF05
Line - 582
BAPIEBANV-VEND_MAT_LONG = REQUISITION_ITEMS_OLD-VEND_MAT_LONG."455879
IF bapiebanv NE requisition_items_old.
data_inconsistent = 'X'.
ENDIF.
This causes the issue shown in snap shot.
Is it possible to force the text to lower case on calling BAPI?
Thanks,
Anubhav
‎2013 Aug 07 7:44 AM
Hi,
first, check OSS note
And maybe you could change the domain of the data element of your field ?
(it's a standard modification .. )
regards
Fred
‎2013 Aug 07 7:44 AM
Hi,
first, check OSS note
And maybe you could change the domain of the data element of your field ?
(it's a standard modification .. )
regards
Fred
‎2013 Aug 07 7:48 AM
Hi Fred,
I have checked OSS notes but found none relevant.
Modification of standard is not an option.
Thanks,
Anubhav
‎2013 Aug 07 8:14 AM
Are you sure when you call your BAPI you put data in upper case ?
regards
Fred
‎2013 Aug 07 8:06 AM
Hi,
Check the domain of the field in SE11. In the domain definition if the checkbox Lowercase must be blank. Hence the field converts the lowercase values to uppercase. Refer the screen below:
So the possible solution may be to make the domain case sensitive.
Cheers,
Arindam
‎2013 Aug 07 8:15 AM
Hi Arindam,
Domain is TEXT40 and checkbox is checked for this domain in my system still the issue.
Thanks,
Anubhav
‎2013 Aug 07 8:13 AM
Hi Anubhav,
Before passing below field value into BAPI first Translate into lower case .
Suppose :
DATA : S_TRANSLATE_OLD LIKE BAPIEBANV OCCURS 0 WITH HEADER LINE.
Loop at REQUISITION_ITEMS_OLD .
TRANSLATE REQUISITION_ITEMS_OLD-SHORT_TEXT TO LOWER CASE.
MOVE REQUISITION_ITEMS_OLD-SHORT_TEXT TO S_TRANSLATE_OLD-SHORT_TEXT.
...........
........
-----
---
APPEND S_TRANSLATE_OLD-SHORT_TEXT.
CLEAR: S_TRANSLATE_OLD-SHORT_TEXT.
...........
.
EndLoop.
Now When you Call BAPI in your Custom Program.
CALL FUNCTION 'BAPI_REQUISITION_CHANGE'
EXPORTING
.........................................
..............
IMPORTING
..........................................
.........................
TABLES
REQUISITION_ITEMS_OLD = S_TRANSLATE_OLD
...............
.....
Regard's
Smruti
‎2013 Aug 07 10:33 AM
How is the BAPI being called?
SE37, Custom program or External system or something else?
‎2013 Aug 07 11:10 AM
Hi Manish,
BAPI is called from SRM system but the behavior is same even if tested in SE37 in ERP.
Thanks,
Anubhav
‎2013 Aug 07 11:19 AM
SE37 environment does change lowercase to uppercase.
If you run the BAPI with same parameters in ERP system using custom program, same error won't occur.
‎2013 Aug 07 12:05 PM
Hi Manish,
But the same error occurs when calling RFC from SRM system.
Thanks,
Anubhav
‎2013 Aug 07 12:15 PM
There is a check box for lower-case when you test a FM
regards
Fred
‎2013 Aug 07 12:28 PM
I had never noticed that checkbox. Thanks for letting me know.
‎2013 Aug 08 1:07 PM
Hi All,
Will open OSS ticket and update the thread.
Thanks,
Anubhav
‎2013 Sep 23 6:36 AM
Reply from SAP:
The difference is, that the short text of the purchase requisition
item on data base is in upper and lower case letters, while the
bapi can only handle upper case letters. That is why the systems
dectects the short text as different.
The bapi_requisition_change is a old bapi wich is no longer in
support. So I will have to ask you to use the new bapi
bapi_pr_change instead. The problem does not come up with that bapi.