‎2005 Jun 28 3:01 AM
Dear guys,
Do we have any System field to retrieve the system Basis Version.
ie..to check whether the system is 46D or 620 Basis version.
How to do you..could somebody help on this.
Ambichan
‎2005 Jun 28 3:22 AM
‎2005 Jun 28 3:22 AM
‎2005 Jun 28 3:33 AM
hey,
thanks for your reply.
actually i want my program to work in 46B and 620Basis system with same piece of code.
so i used below statement.
If SY-SAPRL < 620.
OPEN DATASET FPATH FOR APPENDING IN TEXT MODE.
Else.
OPEN DATASET FPATH FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
Endif.
But In 46B it gives Compile error.Any idea.
How to solve this issue..
ambichan.
‎2005 Jun 28 5:59 AM
Hi~ ambi
You need to explain more detail what you want~
I thougt you had an answer for your previous question.
I think SY-SAPRL works at 46B,46C, 620 basis.
Anyway, you said your code has compile error.
what's <b>encoding default</b>. I couldn't find any help file for that.
why don't you get rid of encoding default~
It works after getting rid of the code 'encoding default'.
regards
kyung woo
‎2005 Jun 28 6:15 AM
Hello,
Your syntax error is to be expected. The statement you have written in the else part of your code -
OPEN DATASET FPATH FOR APPENDING IN TEXT MODE ENCODING DEFAULTis not applicable for a 46B system. That is becasue, the ENCODING addition will not be available in 46B and the system will give you a syntax error.
Hope you are able to see the point.
In this case, you will not be able to write a program that works on both 46B and 620 Basis systems.
At best, you can write another program in your 620 Basis system.
Regards,
Anand Mandalika.
‎2005 Jun 28 5:16 AM
Hi,
To check the basis version - check the following code
DATA: it_comptab LIKE TABLE OF spam_cvers.
data: wa_comptab LIKE spam_cvers.
CALL FUNCTION 'OCS_GET_INSTALLED_COMPS'
TABLES
tt_comptab = it_comptab
EXCEPTIONS
no_release_found = 1
wrong_release = 2
OTHERS = 99.
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
read table it_comptab into wa_comptab with key component = 'SAP_BASIS'.
write:wa_comptab-component.
write wa_comptab-release.
In the above code, the output will be -
SAP_BASIS 46C
with this code, try comparing the basis version with the variable wa_comptab-release.
Hope this code helps ur problem.
Revert in case of any issues else award points.
Regards,