Skip to Content
avatar image
Former Member

WD4A - Selection screen default values loading

Hi,

We are developing one new report using WD4A and that report has a huge logic and big selection screen with 86 fields. Along with it, we do have to simulate the Selection Screen Variant Operation(Create/Display/Change/Delete Variants).

Since the number of fields being high, we decided to use a RSPARAMS Table(Context element with 0-n cardinality) to store in the entire selection screen values.

We were able to capture the values of Selection screen into this Context variable using one generic code, without using any specific field name.

But now I am stuck with repopulating the Sel Screen fields with the Context Variables. Like I have the Sel Screen data in the Context and when I trying to set the values of each field dynamically, I get an error/dump since the HIGH/LOW field types changes dynamically based on the field type.

So I was wondering if any one have faced a similar problem ? What could be the solution ? Or atleast it would be great, if someone could provide a snippet of code that sets the default values of the 4 fields of selection screen.

Hope Am clear.

Regards

<i><b>Raja Sekhar</b></i>

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 15, 2007 at 01:05 AM

    When you used UPD_SELECTION_FIELD earlier, it didnt work for you becos, you did a mistake by using wrong reference variable.

    Raja T

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 13, 2007 at 08:55 PM

    Where do you have issue? while populating the actual selection screen field from RSPARAM table?

    Pls explain bit more & your code, so that we can assist you better. I did similar kind of development. But I dont understand where you stuck up.

    Raja T

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Xavier

      for setting a default value in a parameter-field I wrote this code:

      **********************************************************

      DATA: lr_value TYPE REF TO data.

      DATA: m_handler TYPE REF TO if_wd_select_options.

      FIELD-SYMBOLS: <fs_bukrs> TYPE bukrs.

      CONSTANTS: co_bukrs TYPE bukrs VALUE '0330'.

      CREATE DATA lr_value TYPE bukrs.

      ASSIGN lr_value->* TO <fs_bukrs>.

      <fs_bukrs> = co_bukrs.

      wd_this->m_handler->add_parameter_field(

      i_id = 'BUKRS_PRM'

      i_value = lr_value ).

      hope it helps, regards David