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

Whats Wrong with this Code Or Function Call

Former Member
0 Likes
501

Hi all,

Can you please once go through this small peace of code.

If I test the below function module in SE37

BAPI_STDMATERIAL_GETINTNUMBER

it works perfectly with RFC destination.

However It gives me a short dump when I call the BAPI in a report with RFC Destination

Can any one throw some light on this ?

DATA : l_return LIKE bapireturn1,

it_matnr LIKE bapimatinr OCCURS 0

WITH HEADER LINE.

DATA : rfcdest TYPE rfcdest.

.

rfcdest = 'server1'.

CALL FUNCTION 'BAPI_STDMATERIAL_GETINTNUMBER'

DESTINATION 'SERVER1'

EXPORTING

material_type = 'PLEL'

industry_sector = 'M'

required_numbers = '1'

IMPORTING

return = l_return

TABLES

material_number = it_matnr.

Thanks in Advance

3 REPLIES 3
Read only

Former Member
0 Likes
461

Have you given the destination name in upper case??

rfcdest = 'SERVER1'. <------------

Read only

0 Likes
461

yes I have given the RFC destination in UPPER CASE

Read only

0 Likes
461

hi martin,

check this line in the program.

rfcdest = 'server1'.

Change this 'server1'. to SERVER1, and give rfcdest to the destination.

try this.

Regards,

Balaji E.