on 08-11-2016 5:43 AM
Does SAP supply a way to pull the SAP System ID (SID) into a variant?
We used transaction STVARVC to create a variable Z_SID with value PRD, but when we do system copies, we have the extra step of fixing STVARVC which we want to avoid. It causes problems when that extra step is forgotton. Is there a simpler way such as putting $SID or <SYSID> into a variant or is there some trick?
Hello Jordan,
Maybe this can help you:
DATA: LocalInstance TYPE RFCDES-RFCDEST,
Len TYPE i,
SysID TYPE CHAR3.
CALL 'C_SAPGPARAM'
ID 'NAME' FIELD 'rdisp/myname'
ID 'VALUE' FIELD LocalInstance.
Len = STRLEN( LocalInstance ).
Len = Len - 6.
SysID = LocalInstance+Len(3).
"SysID" will have the SID .
Regards,
Isaías
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.