Skip to Content

Data Slice With Variables filled in user exit is not wokting

Dear all,

I have to meet the requirement of creating a data slice which should lock the data for values coming from a Bex query supplied by the user in the prompt.

Once the user has filled the prompt, I use the customer exit to populate the exit variables of the data slice, but is not woking.

I was reading some post and I found one which indicate that BI-IP must be filled in I-STEP 1, however if I fill only one of them in the I-STEP 2 the lock is working fine.

The summary of the requirement is:

- The user populate two fields in the Input template.

- The customer exist place in the memory the information of those two fields.

- A look up is done in a DSO with the previous values to determine if an specific version exists for each value passed from the prompt.

- The data Slice variables are filled with the values in memory

This is the code I am using:

WHEN 'ZVAR_PEF_EXIT_SEVERAL'.

   IF i_step = 2.

** Because the memory containers are different between BEx And IP we need a memory helper to become available he selected values.


** I move values from BEX to memory because I need them in the second variable
    move i_t_var_range[] to pefs_baseline[].
    export pefs_baseline[] to MEMORY id 'PEF_BASELINE'.
    IMPORT pefs_list[] FROM MEMORY ID 'PEF_LIST'.

    IF pefs_list is not INITIAL.
        LOOP AT pefs_list INTO loc_var_range WHERE vnam = 'ZVAR_PEF_CMA_AUTH'.
          CLEAR l_s_range. "Variable local porque la de salida no tiene cabecera
          l_s_range-sign = 'I'.
          l_s_range-opt = 'EQ'.
          l_s_range-low = loc_var_range-low.

          APPEND l_s_range TO e_t_range.

        ENDLOOP.

        clear pefs_baseline[].
        clear pefs_list[].

    ENDIF.

   ENDIF.


** second variable to be filled.
 WHEN 'Z_VAR_VER_ADJ_TYPE'.

    DATA : i_ppc_cveradj TYPE STANDARD TABLE OF /BIC/AEHFI2O100,
           wa_ppc_cveradj TYPE /BIC/AEHFI2O100,
           l_s_range_PEF_BASELINE TYPE rrrangeexit.
    TYPES:
      BEGIN OF ty_vers,
        vVers type /BIC/AEHFI2O100-/BIC/EXFIVPPC,
        vPef type /BIC/AEHFI2O100-/BIC/ZZ_PEFPRO,
      END OF ty_vers.

    DATA: i_vers TYPE STANDARD TABLE OF ty_vers,
          wa_vers TYPE ty_vers.

    IF i_step = 2.

** Because the memory containers are different between BEx And IP we need a memory helper to become available he selected values.
      IMPORT pefs_baseline[] FROM MEMORY ID 'PEF_BASELINE'.
      move pefs_baseline[] to pefs_list[].
      export pefs_list[] to MEMORY id 'PEF_LIST'.


      LOOP AT pefs_baseline into l_s_range_PEF_BASELINE WHERE VNAM = 'ZVAR_PEF_CMA_AUTH'.
        wa_vers-VPEF = l_s_range_PEF_BASELINE-low.

        READ TABLE pefs_baseline into l_s_range_PEF_BASELINE WITH KEY VNAM = 'ZVAR_KPI_VERS_RRI'.

        IF sy-subrc = 0.
          wa_vers-VVERS = l_s_range_PEF_BASELINE-low.

        ENDIF.

        APPEND wa_vers TO i_vers.

      ENDLOOP.


*This DSO contais the version to be locked, these values are generated based in a input template, a planing sequence reload the DSO based in the IP cube.

*For a given two filters values I need to determine if the "baseline" concept exists for each one, if so, I fill the Data Slice variables with this information.


      SELECT *
        FROM /BIC/AEHFI2O100
        INTO CORRESPONDING FIELDS OF TABLE i_ppc_cveradj
        FOR ALL ENTRIES IN i_vers
       WHERE /BIC/ZZ_PEFPRO = i_vers-vPef
        AND /BIC/EXFIVPPC = i_vers-vVers
        AND   /BIC/EHFITYP = 'BASELINE'.

      IF sy-subrc EQ 0.
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.

          LOOP AT i_ppc_cveradj INTO wa_ppc_cveradj.
            l_s_range-low = wa_ppc_cveradj-/BIC/EHFITYP.
            APPEND l_s_range TO e_t_range.
          ENDLOOP.
      ELSE.
** no permitir guardar valores vacios
        l_s_range-sign = 'I'.
        l_s_range-opt = 'EQ'.
        l_s_range-low = ''.
        APPEND l_s_range TO e_t_range.
      ENDIF.

    ENDIF.

Sincerely I am stuck, if I put manually the values is working, At debug time, I was able to check that the differente values are passed to the different variables. Not sure what is happening.

Any suggestions? I know my ABAP may not be accurate, so suggestion will be welcomed.

Thanks in advance for your time,

Carlos.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 15 at 04:14 PM

    Hi Ivan, I've changed the tag of this thread. I'm sorry.

    Kind regards,

    Carlos.

    Add comment
    10|10000 characters needed characters exceeded

  • May 14 at 11:21 PM

    Hi Carlos,

    This thread does not seem related to Integrated Business Planning Cloud Solution product. Can you please adjust the TAG for the correct product.

    Thank you,

    Ivan

    Add comment
    10|10000 characters needed characters exceeded