04-22-2012 10:59 PM
Hi,
I have a requirement where in I have to create a variant for the program RBDMANI2. In the program, there is a field in the selection screen "Sender Partner number" by name. The field value for Sender Partner Number field should be the name of the production server at EWM. I am supposed to reprocess the failed idocs at R/3 side and post it at EWM side. But the variant has to move from development through a transport request. SO, if I specify the production server name in the field :Sender Partner Number, it will throw a dump in development server. Is there any way, I can create a variant such that the server is picked up dynamically ? for eg: for developmen server in R/3, automatically EWM development server should appear in that field. SImilarly, for prod. server in r/, the corresponding prod. server in EWM should appear. Is this possible? Please suggest how to proceed.
Regards,
Pavan
04-23-2012 1:20 PM
You can write some Logic inside the Initialization Event by Implicit enhancement, already one Initialization event there inside the Program anyway you can have one more Initialization event
i.e.
If SY-SYSID = 'DEV'.
Assign Values to Selection screen.
elseif SY-SYSID = 'PRD'.
Assign Values to Selection screen.
endif.
Kanagaraja L
04-25-2012 5:38 AM
Hi Kanagaraja,
It is a standard program. So, I ma not supposed to make any code changes. Also, SY-sysid is giving the current server name. I need the targetserver name and its client name. To be more clear, I am sending an idoc from R/3 to EWM server.So, the target should be EWM production server. For eg: the target should be like <EWMPRD>CLNT<client number>.
Regards,
Pavan
04-25-2012 6:10 AM
Pavan,
If you are not getting any alternate solution, you can change Standard Program without access key by using Implicit Enhancement.
SY-SYSID is used to get 'Current Server Name' if you want to execute some logic based on Server (DEV or QUA or PRD). You can write with If Condition, the logic executes only on that particular server where If condition satifying.
I hope you can do like below
Initialization.
If ( SY-SYSID = '<Target Server Name ie EWMPRD>' and SY-MANDT = '<client number>' ).
SO_SNPRN-OPTION = 'EQ'.
SO_SNPRN-SIGN = 'I'.
SO_SNPRN-LOW = '<Value>' " Partner Number of Sender
Append SO_SNPRN.
clear SO_SNPRN.
endif.
Kanagaraja L