Skip to Content
author's profile photo Former Member
Former Member

Dynamically declaring a field in the variant

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Apr 23, 2012 at 12: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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.