cancel
Showing results for 
Search instead for 
Did you mean: 

Get Installation Number

Former Member
0 Kudos

I am trying to remotely retrieve a system Installation number.

<%

DATA: V_INSTNO TYPE STRING.

CALL FUNCTION 'CMO_GET_INSTNO' DESTINATION rfcdest

IMPORTING

ev_instno = V_INSTNO.

IF SY-SUBRC = 0.

%>

<%=V_INSTNO%>

<%ENDIF.%>

The problem is that only works on our 620 Systems and a couple of the 46C systems. I've been looking for the functions for the other versions to get the data but it's not been easy searching for it.

Can anyone help me out?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

<%

DATA: V_INSTNO TYPE STRING.

CALL FUNCTION 'CMO_GET_INSTNO' DESTINATION rfcdest

IMPORTING

ev_instno = V_INSTNO

EXCEPTIONS

others = 7.

IF SY-SUBRC NE 0.

CALL FUNCTION '/SDF/CMO_GET_INSTNO' DESTINATION rfcdest

IMPORTING

ev_instno = V_INSTNO

EXCEPTIONS

others = 7.

ENDIF.

Seems to work ok on 620, 46C, 45B, and 40B with APO 3.0, BW2.0.

Maybe someone else will get some use out of this as well.

athavanraja
Active Contributor
0 Kudos

You can use the following FM for checking the avaialblity of a FM.

"FUNCTION_EXISTS" .

Regards

Raja

Former Member
0 Kudos

Thank you!

Is this function standard all version of SAP R/3 and WebAS ?

Former Member
0 Kudos

Just in case anyone is wondering you can also check a table in SAP that contains the names of all the functions if the function exists, off the top of my head I want to say the table is called TADIR, please correct me if I am wrong, or you can use the FM "FUNCTION_EXISTS"

If I am wrong about the table name someone please correct me and if there is another way - I'd love to hear it!!!

former_member181879
Active Contributor
0 Kudos

I would recommend you use FUNCTION_EXISTS. It sounds like it does the job.

The TADIR table is actually information about all development objects in your system, and which are their home based system. Effectively, the question in what system was that object developed. I am no expert in these things, but I do suspect that the table is not "general use".

++bcm

Former Member
0 Kudos

I did some playing as well last night and didn't come across any problems with using the FM.

Former Member
0 Kudos

Is there a function you can use to check if a function exists before calling it?