on 03-25-2004 8:28 AM
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?
<%
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!!!
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
Is there a function you can use to check if a function exists before calling it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.