Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_REQUISITION_CHANGE importing table value converted to upper case

Former Member
0 Likes
2,586

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

1 ACCEPTED SOLUTION
Read only

FredericGirod
Active Contributor
0 Likes
2,533

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

14 REPLIES 14
Read only

FredericGirod
Active Contributor
0 Likes
2,534

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

Read only

0 Likes
2,532

Hi Fred,

I have checked OSS notes but found none relevant.

Modification of standard is not an option.

Thanks,

Anubhav

Read only

0 Likes
2,532

Are you sure when you call your BAPI you put data in upper case ?

regards

Fred

Read only

arindam_m
Active Contributor
0 Likes
2,532

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

Read only

Former Member
0 Likes
2,532

Hi Arindam,

Domain is TEXT40 and checkbox is checked for this domain in my system still the issue.

Thanks,

Anubhav

Read only

Former Member
0 Likes
2,532

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

Read only

Former Member
0 Likes
2,532

How is the BAPI being called?

SE37, Custom program or External system or something else?

Read only

0 Likes
2,532

Hi Manish,

BAPI is called from SRM system but the behavior is same even if tested in SE37 in ERP.

Thanks,

Anubhav

Read only

0 Likes
2,532

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.

Read only

0 Likes
2,532

Hi Manish,

But the same error occurs when calling RFC from SRM system.

Thanks,

Anubhav

Read only

0 Likes
2,532

There is a check box for lower-case when you test a FM

regards

Fred

Read only

0 Likes
2,532

I had never noticed that checkbox. Thanks for letting me know.

Read only

Former Member
0 Likes
2,532

Hi All,

Will open OSS ticket and update the thread.

Thanks,

Anubhav

Read only

0 Likes
2,532

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.