cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Ignore work status

Former Member
0 Likes
1,349

Hi Experts,

I'm working with BPC 7.5 NW. When I execute a package I want to ignore the work status (Is not a standard package).  I tryed inserting the function *IGNORE_STATUS inside the script logic but it doesnt works. Is there any other way to ignore the workstatus settings in script logic code?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

Hi Marc,

"Is there any other way to ignore the workstatus settings in script logic code?" - There is no way to ignore work status in script logic!!


Vadim

Former Member
0 Likes

Hi Vladim,

I know in older version you could use this function in the script logic to solve the problem. But I going to forget the script logic, do you know another solution for this issue?


former_member186338
Active Contributor
0 Likes

Ups, "But I going to forget the script logic" - what do you mean?

What do you want to perform by DM package?

What type of DM package?


Please, explain!


Vadim


P.S. For sure you can look on the ABAP code of the standard COPY chain and recreate the code to bypass the work status check...

Former Member
0 Likes

Vadim,

My DM package executes BADI to run a currency conversion. If members are locked by work status, it doesn’t do the conversion.

former_member186338
Active Contributor
0 Likes

Sorry, but what do you mean by "BADI to run a currency conversion" Who is the author of the code of this badi? If it's a custom logic badi you can bypass the work status check.


Vadim

Former Member
0 Likes

Yes, is a custom logic badi. How Can I bypass de works status check?

former_member186338
Active Contributor
0 Likes

It has to be done in the ABAP code of this badi! Do you know how to program in ABAP?

Please post code of your badi! At least the part that write data to the cube.

Former Member
0 Likes

I created a Implementation inside the badi BADI_UJ_CUSTOM_LOGIC. I use 4 entry variables:

I_APPSET_ID

I_APPL_ID

IT_PARAM

IT_CV

and 1 table:

CT_DATA.

CT_DATA has the data of the cube.

The code:

METHOD if_uj_custom_logic~execute.

  CONSTANTS:      rs_c_false          TYPE rs_bool      VALUE ' ',

                    rs_c_true           TYPE rs_bool      VALUE 'X',

                    rs_c_unknown        TYPE rs_bool      VALUE 'U'.

*------------------------------------------------------------------------*

*                      Declaraciones -  Tipos                            *

*------------------------------------------------------------------------*

*    CAMBIOS DE MONEDA

  TYPE-POOLS: rs, rsdrc.

  TYPES: BEGIN OF str_cen_mon,

*            /cpmb/ibddoy6 TYPE /1CPMB/_IBDDOY6-/CPMB/IBDDOY6 ,     "CENTRO productivo"

*            /cpmb/curr TYPE /1cpmb/_ibddoy6-/cpmb/curr,            "CURRENCY productivo"

                /b28/s_ibddoy6 TYPE /b28/pibddoy6-/b28/s_ibddoy6 ,   "CENTRO desarrollo"

                /b28/s_curr    TYPE /b28/pibddoy6-/b28/s_curr,       "CURRENCY desarrollo"

     END OF str_cen_mon.

*    MIEMBROS BASE

  TYPES: BEGIN OF str_cuen_calc,

           /b28/s_ibdnby7 TYPE /b28/mibdnby7-/b28/s_ibdnby7 ,   "CUENTA"

           /b28/s_calc    TYPE /b28/mibdnby7-/b28/s_calc,       "CALC"

END OF str_cuen_calc.

  TYPES:

  BEGIN OF str_rate_data,

         requid(20)       TYPE c,    "ID petición

        /cpmb/ibdobiz(3)  TYPE n,    "Moneda

        /cpmb/ibdvfib(20) TYPE c,    "Category

        /cpmb/ibd568h(20) TYPE c,    "time"

        /cpmb/ibdh66z(20) TYPE c,    "r_acct

        /cpmb/ibdrziy(20) TYPE c,    "r_entity

        /cpmb/sdata       TYPE /b28/oisdata,

  END OF str_rate_data.

*   PERIODOS ABIERTOS

  TYPES: BEGIN OF str_time_op,

     /b28/s_ibd568h  TYPE /b28/mibd568h-/b28/s_ibd568h,         "TIME

     /b28/s_ibpfq7z(1),

        /b28/s_year  TYPE /b28/mibd568h-/b28/s_year,            "YEAR

  END OF str_time_op.

*TABLA PARA TRABAJAR SIN FIELD SYMBOLS.

  TYPES: BEGIN OF str_data_tab,

     cuenta(20)         TYPE c,

     p_centro(20)       TYPE c,

     category(20)       TYPE c,

     proyecto(20)       TYPE c,

     area_funcional(20) TYPE c,

     ajuste(20)         TYPE c,

     time(6)            TYPE n,

     p_moneda(3)        TYPE c,

     semana(20)         TYPE c,

     signeddata   TYPE /b28/oisdata,

  END OF str_data_tab.

  TYPES: BEGIN OF str_cat,

     category(20) TYPE c,

     time(20) TYPE c,

END OF str_cat.

  TYPES: BEGIN OF str_moneda,

     /b28/s_ibdobiz(20) TYPE c,

END OF str_moneda.

*------------------------------------------------------------------------*

*                      Declaraciones -  Variables                        *

*------------------------------------------------------------------------*

  DATA:

        l_parameter(6)        TYPE p,

        ls_dim                TYPE uja_s_dim,

        lr_rec                TYPE REF TO data,

        lr_result_rec         TYPE REF TO data,

        lr_ctdata             TYPE REF TO data,

        l_totalactual         TYPE uj_sdata,

        l_totalplan           TYPE uj_sdata,

        l_percent             TYPE uj_sdata,

        lt_cuenta_calc        TYPE STANDARD TABLE OF str_cuen_calc,

        lw_cuenta_calc        TYPE str_cuen_calc,

        lv_ejercicio(4)       TYPE c,

        lv_mes(2)             TYPE c,

        lv_mes_op(2)          TYPE c,

        lv_iter(2)            TYPE c,

        lv_cuenta_old(20)     TYPE c,

        lv_ajuste_old(20)     TYPE c,

        lv_centro_old(20)     TYPE c,

        lv_areafuncio_old(20) TYPE c,

        lv_proyecto_old(20)   TYPE c,

        lv_time(6)            TYPE n,

        lv_timeac(6)          TYPE c,

        lv_index              LIKE sy-tabix,

        lv_index100           LIKE sy-tabix,

        lv_encon(1)           TYPE c,

        lv_acum_lc            TYPE /b28/oisdata,

        lv_acum_100           TYPE /b28/oisdata,

*    lv_imp_100       TYPE /b28/oisdata,

        lv_imp_100            TYPE p DECIMALS 4.

*------------------------------------------------------------------------*

*                      Declaraciones -  Estructuras                      *

*------------------------------------------------------------------------*

  DATA:

  wa_rate_data TYPE str_rate_data,

    g_s_sfc      TYPE rsdri_s_sfc,

  g_s_sfk      TYPE rsdri_s_sfk,

  g_s_range    TYPE rsdri_s_range.

* ------------TABLAS Y WORKAREAS------------------------------------------

*VARIABLES PARA RECUPERAR INFORMACIÓN RATE

  DATA:

*        it_rate_data TYPE STANDARD TABLE OF str_rate_data,

*        it_rate_data TYPE SORTED TABLE OF str_rate_data WITH UNIQUE KEY moneda category time r_acct r_entity,

*        wa_rate_data TYPE str_rate_data,

wa_axis        TYPE ujq_s_query_dim,                " BPC: SQE dimension members for SQE

wa_member      TYPE ujq_s_dim_member,               " BPC: SQE dimension member

wa_param       TYPE ujk_s_script_logic_hashentry,   " Hash Entry used in Script Logic

ls_param       TYPE ujk_s_script_logic_hashentry,

lw_cen_mon     TYPE str_cen_mon,

lw_cuen_calc   TYPE str_cuen_calc,

lw_time_op     TYPE str_time_op,

ls_data        TYPE REF TO data,

lw_data_tab    TYPE str_data_tab,

lw_data_tab2   TYPE str_data_tab,

lw_cat         TYPE str_cat,

lw_moneda      TYPE str_moneda,

lw_data_final TYPE str_data_tab.

*------------------------------------------------------------------------*

*                      Declaraciones -  Tablas                           *

*------------------------------------------------------------------------*

  DATA:

    it_rate_data_aux TYPE STANDARD TABLE OF str_rate_data,

     it_rate_data TYPE SORTED  TABLE OF

                  str_rate_data WITH NON-UNIQUE KEY /cpmb/ibdobiz

                                                    /cpmb/ibdvfib

                                                    /cpmb/ibd568h,

      g_t_range  TYPE rsdri_t_range,

    g_th_sfc     TYPE rsdri_th_sfc,

    g_th_sfk     TYPE rsdri_th_sfk,

    it_axis      TYPE ujq_t_query_dim,

*        VARIABLES PARA TRABAJAR SIN FIELD SYMBOLS.

      lt_data_tab    TYPE STANDARD TABLE OF str_data_tab,

*-----Copia auxiliar de la tabla, Lista de usus:

* 1 se emplea para buscar datos de la propia tabla en el loop a la misma.

     lt_data_tab_aux2  TYPE SORTED TABLE OF str_data_tab

                               WITH UNIQUE KEY cuenta

                                               p_centro

                                               category

                                               proyecto

                                               area_funcional

                                               ajuste

                                               time

                                               p_moneda

                                               semana,

      lt_final        TYPE REF TO data,

      lt_acum         TYPE REF TO data,

      lt_acum100      TYPE REF TO data,

      lt_acumcopy     TYPE REF TO data,

*      lt_cen_mon    TYPE STANDARD TABLE OF str_cen_mon,

      lt_cen_mon      TYPE SORTED TABLE OF str_cen_mon WITH UNIQUE KEY /b28/s_ibddoy6,

      lt_cuen_calc    TYPE STANDARD TABLE OF str_cuen_calc,

      lt_time_op      TYPE STANDARD TABLE OF str_time_op,

      lt_data_tab2    TYPE STANDARD TABLE OF str_data_tab,

      lt_data_final   TYPE STANDARD TABLE OF str_data_tab,

      lt_cat          TYPE STANDARD TABLE OF str_cat,

      lt_moneda       TYPE STANDARD TABLE OF str_moneda.

*////////////////////////////////////////////////////////////////////////*

*------------------------------------------------------------------------*

*                        Lógica de proceso                               *

*------------------------------------------------------------------------*

*////////////////////////////////////////////////////////////////////////*

*------------------------------------------------------------------------*

*         Lógica de proceso -  Selecciones de datos                      *

*------------------------------------------------------------------------*

*Creamos tabla para saber la relación entre centro y moneda.

  SELECT /b28/s_curr /b28/s_ibddoy6 FROM /b28/pibddoy6

                                  INTO CORRESPONDING

                                  FIELDS OF TABLE lt_cen_mon.

* Creamos tabla para seleccionar las cuentas base.

*    Serán las que la propiedad CALC sean N.

  SELECT  /b28/s_ibdnby7 /b28/s_calc FROM /b28/mibdnby7

                                 INTO CORRESPONDING

                                 FIELDS OF TABLE lt_cuen_calc.

*    Buscamos los tips de cambio

  CLEAR g_th_sfc.

  CLEAR g_s_sfc.

  g_s_sfc-chanm = '0REQUID'.

  g_s_sfc-chaalias = 'REQUID'.

  g_s_sfc-orderby = 0.

  INSERT g_s_sfc INTO TABLE g_th_sfc.

  g_s_sfc-chanm  = '/CPMB/IBDOBIZ'.    "Moneda"

  g_s_sfc-chaalias = '/CPMB/IBDOBIZ'.

  g_s_sfc-orderby = 0.

  INSERT g_s_sfc INTO TABLE g_th_sfc.

  g_s_sfc-chanm = '/CPMB/IBDVFIB'.     "Category

  g_s_sfc-chaalias = '/CPMB/IBDVFIB'.

  g_s_sfc-orderby = 0.

  INSERT g_s_sfc INTO TABLE g_th_sfc.

  g_s_sfc-chanm = '/CPMB/IBDH66Z'.

  g_s_sfc-chaalias = '/CPMB/IBDH66Z'.

  g_s_sfc-orderby = 0.

  INSERT g_s_sfc INTO TABLE g_th_sfc.

  g_s_sfc-chanm = '/CPMB/IBDRZIY'.

  g_s_sfc-chaalias = '/CPMB/IBDRZIY'.

  g_s_sfc-orderby = 0.

  INSERT g_s_sfc INTO TABLE g_th_sfc.

  g_s_sfc-chanm = '/CPMB/IBD568H'.

  g_s_sfc-chaalias = '/CPMB/IBD568H'.

  g_s_sfc-orderby = 0.

  INSERT g_s_sfc INTO TABLE g_th_sfc.

*------Ratio-------------

  g_s_sfk-kyfnm = '/CPMB/SDATA'.

  g_s_sfk-kyfalias = '/CPMB/SDATA'.

  g_s_sfk-aggr = 'SUM'.

*

  INSERT g_s_sfk INTO TABLE g_th_sfk.

*

*

  DATA: g_end_of_data  TYPE rs_bool,

        wa_s_range     TYPE rsdri_s_range,

        i_t_range      TYPE rsdri_t_range,

        i_td_range     TYPE rsdri_t_range,

        g_first_call   TYPE rs_bool.

  g_end_of_data = rs_c_false.

  g_first_call = rs_c_true.

* Select all data in cube that is equal to AVG

  CLEAR g_s_range.

* --- name of the characteristic

  g_s_range-chanm    = '/CPMB/IBDH66Z'.

* --- including or excluding condition ?

  g_s_range-sign     = rs_c_range_sign-including.

* --- comparison operator

  g_s_range-compop   = rs_c_range_opt-equal.

* --- low value

  g_s_range-low      = 'AVG'.

  INSERT g_s_range INTO TABLE g_t_range.

*----LECTURA DE LOS TIPOS DE CAMBIO DEL CUBO CORRESPONDIENTE

  WHILE g_end_of_data = rs_c_false.

    CALL FUNCTION 'RSDRI_INFOPROV_READ'

      EXPORTING

        i_infoprov                   = '/CPMB/IBIWKBY'

        i_th_sfc                     = g_th_sfc

        i_th_sfk                     = g_th_sfk

       i_t_range                    = g_t_range

*   I_TH_TABLESEL                =

*   I_T_RTIME                    =

       i_reference_date             = sy-datum

*   I_ROLLUP_ONLY                = RS_C_TRUE

*   I_T_REQUID                   =

       i_save_in_table              = rs_c_false

*   I_TABLENAME                  =

       i_save_in_file               = rs_c_false

*   I_FILENAME                   = 5000

       i_packagesize                = 50000

*   I_MAXROWS                    = 0

       i_authority_check            = rsdrc_c_authchk-read

*   I_CURRENCY_CONVERSION        = 'X'

*   I_USE_DB_AGGREGATION         = RS_C_TRUE

*   I_USE_AGGREGATES             = RS_C_TRUE

*   I_READ_ODS_DELTA             = RS_C_FALSE

*   I_CALLER                     = RSDRS_C_CALLER-RSDRI

*   I_DEBUG                      = RS_C_FALSE

*   I_CLEAR                      = RS_C_FALSE

     IMPORTING

       e_t_data                     = it_rate_data_aux

       e_end_of_data                = g_end_of_data

*   E_AGGREGATE                  =

*   E_SPLIT_OCCURRED             =

*   E_T_MSG                      =

*   E_STEPUID                    =

      CHANGING

        c_first_call                 = g_first_call

     EXCEPTIONS

       illegal_input                = 1

       illegal_input_sfc            = 2

       illegal_input_sfk            = 3

       illegal_input_range          = 4

       illegal_input_tablesel       = 5

       no_authorization             = 6

       illegal_download             = 7

       illegal_tablename            = 8

       trans_no_write_mode          = 9

       inherited_error              = 10

       x_message                    = 11

       OTHERS                       = 12

              .

    IF sy-subrc <> 0.

* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

  ENDWHILE.

  it_rate_data[] = it_rate_data_aux[].

  REFRESH it_rate_data_aux.

* Creamos tabla con la información de los periodos abiertos o cerrados.

  IF sy-sysid = 'BPD'.

*    SELECT /b28/s_ibd568h

*           /b28/s_ibpm5me

*            /b28/s_year FROM /b28/mibd568h

*                           INTO TABLE lt_time_op.

  ELSE.

    SELECT /b28/s_ibd568h

         /b28/s_ibpfq7z

          /b28/s_year FROM /b28/mibd568h

                         INTO TABLE lt_time_op.

  ENDIF.

*    Seleccionamos las monedas disponibles.

  SELECT /b28/s_ibdobiz FROM /b28/mibdobiz

       INTO CORRESPONDING FIELDS OF TABLE lt_moneda.

*  CREATE DATA lt_final LIKE ct_data.

  CREATE DATA lt_final LIKE ct_data.

  ASSIGN lt_final->* TO <lt_final>.

  CREATE DATA lr_rec LIKE LINE OF ct_data.

  ASSIGN lr_rec->* TO <ls_rec>.

* Copiamos los datos a una tabla con campos definidos.

*lt_data_tab[] = ct_data[].

  LOOP AT ct_data ASSIGNING <ls_rec>.

    MOVE-CORRESPONDING <ls_rec> TO lw_data_tab.

    APPEND lw_data_tab TO lt_data_tab.

  ENDLOOP.

*------------------------------------------------------------------------*

*         Lógica de proceso -  Tratamiento de los datos                  *

*------------------------------------------------------------------------*

  CLEAR:lw_data_tab.

*  SORT lt_data_tab by p_moneda DESCENDING.

  SORT lt_data_tab BY  p_centro ASCENDING category ASCENDING

  proyecto ASCENDING cuenta ASCENDING area_funcional ASCENDING

   ajuste ASCENDING time ASCENDING p_moneda DESCENDING .

  lt_data_tab_aux2[] = lt_data_tab[].

*----  Añadimos un registro en aquellos meses donde no exista registro .

*      (El registro se añade con importe 0 para ajustar los cálculos)

*  Añadimos un registro en aquellos meses donde no haya importe.

*  LOOP AT lt_data_tab ASSIGNING <lw_data_tab2>.

  LOOP AT lt_data_tab INTO lw_data_tab.

    READ TABLE lt_cen_mon

       WITH KEY /b28/s_ibddoy6 = lw_data_tab-p_centro

           INTO lw_cen_mon

                BINARY SEARCH.

    CHECK lw_cen_mon-/b28/s_curr NE '100'.

    CHECK lw_data_tab-p_moneda = 'LC'.

    IF lw_data_tab-category(4) = 'ROLF' OR lw_data_tab-category(4) = 'REAL'

      OR lw_data_tab-category(4) = 'PRES'.

*      Añadimos 0 a los meses en los que no tenemos registros.

*      Lo haremos en caso de tener una conbinación de caratcterísticas diferente.

      IF lv_cuenta_old     NE lw_data_tab-cuenta         OR

         lv_ajuste_old     NE lw_data_tab-ajuste         OR

         lv_centro_old     NE lw_data_tab-p_centro       OR

         lv_areafuncio_old NE lw_data_tab-area_funcional OR

         lv_proyecto_old   NE lw_data_tab-proyecto.

        lv_time = lw_data_tab-time.

        WHILE lv_time+4(2) NE 12.

          ADD 1 TO lv_time.

          READ TABLE  lt_data_tab_aux2

               INTO lw_data_tab2

           WITH KEY time           = lv_time

                    p_moneda       = 'LC'

                    cuenta         = lw_data_tab-cuenta

                    p_centro       = lw_data_tab-p_centro

                    proyecto       = lw_data_tab-proyecto

                    area_funcional = lw_data_tab-area_funcional

                    ajuste         = lw_data_tab-ajuste.

          IF sy-subrc NE 0.

            READ TABLE lt_time_op

              WITH KEY /b28/s_ibd568h = lv_time

                  INTO lw_time_op.

            IF lw_time_op-/b28/s_ibpfq7z = 'Y'.

              lw_data_tab-signeddata = 0.

              lw_data_tab-time = lv_time.

              APPEND lw_data_tab TO lt_data_tab.

              INSERT lw_data_tab INTO TABLE lt_data_tab_aux2.

            ENDIF.

          ENDIF.

        ENDWHILE.

      ENDIF.

    ENDIF.

    lv_cuenta_old     = lw_data_tab-cuenta.

    lv_ajuste_old     = lw_data_tab-ajuste.

    lv_centro_old     = lw_data_tab-p_centro.

    lv_areafuncio_old = lw_data_tab-area_funcional.

    lv_proyecto_old   = lw_data_tab-proyecto.

    CLEAR lw_data_tab.

  ENDLOOP.

  REFRESH lt_data_tab_aux2.

  SORT lt_data_tab BY  p_centro       ASCENDING

                       category       ASCENDING

                       proyecto       ASCENDING

                       cuenta         ASCENDING

                       area_funcional ASCENDING

                       ajuste         ASCENDING

                       time           ASCENDING

                       p_moneda       DESCENDING.

  LOOP AT lt_data_tab ASSIGNING <lw_data_tab>.

    AT NEW cuenta.

      CLEAR: lv_acum_lc, lv_acum_100, lv_imp_100.

    ENDAT.

    AT NEW p_centro.

      CLEAR: lv_acum_lc, lv_acum_100, lv_imp_100.

    ENDAT.

    AT NEW category.

      CLEAR: lv_acum_lc, lv_acum_100, lv_imp_100.

    ENDAT.

    AT NEW proyecto.

      CLEAR: lv_acum_lc, lv_acum_100, lv_imp_100.

    ENDAT.

    AT NEW area_funcional.

      CLEAR: lv_acum_lc, lv_acum_100, lv_imp_100.

    ENDAT.

    AT NEW ajuste.

      CLEAR: lv_acum_lc, lv_acum_100, lv_imp_100.

    ENDAT.

*    AT NEW category.

*      CLEAR: lv_acum_lc, lv_acum_100, lv_imp_100.

*    ENDAT.

*   Miramos si el periodo es cerrado o obierto

    READ TABLE lt_time_op WITH KEY /b28/s_ibd568h = <lw_data_tab>-time

                           INTO lw_time_op.

*   Miramos la moneda.

    READ TABLE lt_cen_mon WITH KEY /b28/s_ibddoy6 = <lw_data_tab>-p_centro

                         INTO lw_cen_mon.

*  Para los meses abiertos si la moneda es euro lo copio

*   como moneda 100 con el mismo importe.

    IF lw_cen_mon-/b28/s_curr = '100'.

      IF <lw_data_tab>-p_moneda = 'LC'.

*      CHECK lw_time_op-/b28/s_ibpm5me = 'Y'.

        <lw_data_tab>-p_moneda = '100'.

        APPEND  <lw_data_tab> TO lt_data_final.

      ENDIF.

    ELSE.

* Si es moneda estrangera.

*  Buscamos el cambio de moneda.

*      REFRESH it_axis.

*      CLEAR it_axis.

      READ TABLE lt_cen_mon

        WITH KEY /b28/s_ibddoy6 = <lw_data_tab>-p_centro

            INTO lw_cen_mon

                 BINARY SEARCH.

      READ TABLE it_rate_data

            INTO wa_rate_data

        WITH KEY /cpmb/ibdobiz = lw_cen_mon-/b28/s_curr

                 /cpmb/ibdvfib = <lw_data_tab>-category

                 /cpmb/ibd568h = <lw_data_tab>-time.

*   Si la category es Presupuesto o Forecast hacemos el cambio normal

      IF sy-subrc = 0 AND wa_rate_data-/cpmb/sdata NE 0.

        IF <lw_data_tab>-category(4) ='FORE'.

*        IF lw_time_op-/b28/s_ibpm5me = 'Y'.

          IF <lw_data_tab>-p_moneda = 'LC'.

            <lw_data_tab>-p_moneda = '100'.

            <lw_data_tab>-signeddata = <lw_data_tab>-signeddata / wa_rate_data-/cpmb/sdata.

            APPEND <lw_data_tab> TO lt_data_final.

*        ENDIF.

          ENDIF.

*        Si es Rolling o Real hacemos el cambio acumulado.

        ELSEIF <lw_data_tab>-category(4) = 'ROLF' OR

               <lw_data_tab>-category(4) = 'REAL' OR

               <lw_data_tab>-category(4) = 'PRES' .

* Para  periodos cerrados hacemos el acumulado.

          IF lw_time_op-/b28/s_ibpfq7z = 'N'.

*IF lw_time_op-/B28/S_IBPM5ME = 'N'.

            IF  <lw_data_tab>-p_moneda = 'LC'.

              lv_acum_lc = lv_acum_lc + <lw_data_tab>-signeddata.

            ELSEIF <lw_data_tab>-p_moneda = '100'.

              lv_acum_100 = lv_acum_100 + <lw_data_tab>-signeddata.

            ENDIF.

*          Si es periodo abierto hacemos la conversión.

*          ELSEIF lw_time_op-/B28/S_IBPM5ME = 'Y'.

          ELSEIF lw_time_op-/b28/s_ibpfq7z = 'Y'.

            IF  <lw_data_tab>-p_moneda = 'LC'.

              lv_acum_lc = lv_acum_lc + <lw_data_tab>-signeddata.

              lv_imp_100 =  lv_acum_lc / wa_rate_data-/cpmb/sdata

                             - lv_acum_100.

              lv_acum_100 = lv_imp_100 + lv_acum_100.

              <lw_data_tab>-signeddata = lv_imp_100.

              <lw_data_tab>-p_moneda = '100'.

              APPEND <lw_data_tab> TO lt_data_final.

            ENDIF.

          ENDIF.

        ENDIF.

      ENDIF.

    ENDIF.

  ENDLOOP.

  REFRESH <lt_final>.

  LOOP AT lt_data_final INTO lw_data_final.

    MOVE-CORRESPONDING lw_data_final TO <ls_rec>.

    APPEND <ls_rec> TO <lt_final>.

  ENDLOOP.

  ct_data = <lt_final>.

ENDMETHOD.

former_member186338
Active Contributor
0 Likes

Ups, please read: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/702bf959-c89a-3010-aeb0-b43a4bfd8...

CALL METHOD cl_ujo_wb_factory=>create_write_back

CALL METHOD lo_ujo_wb->write_back

etc...

Vadim

Answers (3)

Answers (3)

former_member5472
Active Contributor
0 Likes

Hi,

If you haven't gone through the link then it may be helpful for your scenario.  

http://scn.sap.com/community/epm/planning-and-consolidation-for-netweaver/blog/2013/10/28/how-to-cha...

Prat

Former Member
0 Likes

It can be a solution, but I don't want to change the members status. First, I going to look for a solution where the package ignore the work status.

Thanks all for your answers.

Former Member
0 Likes

Can you try using Impersonate BADI described in BPC How To Guides?

It's mostly used to ignore security restrictions, but you can come up with a user name that is on top of WS hierarchy and assign that user name in the BADI.

Just don't forget to set it back after that part of the logic is done.

former_member186338
Active Contributor
0 Likes

Hi Gersh,

Can you explain what do you mean by "with a user name that is on top of WS hierarchy"? It will not work for the "Locked" status...

Vadim

Former Member
0 Likes

Hi Vadim,

Yes, I agree that it won't work for Locked, but it will work for other statuses which otherwise user can't update.

As a workaround, you can add a status before "Locked", like "Soft Locked" which nobody but that "special" user can update.

Regards,

Gersh

former_member186338
Active Contributor
0 Likes

Well, in some specific cases it will work

Former Member
0 Likes

Hi Marc,

Have you tried using prompt in advance options of the data manger package.

try below line it will ask for prompt whether you want to check work status setting.

PROMPT(RADIOBUTTON,%CHECKLCK%,"Select whether to check work status settings when importing data.",1,{"Yes, check for work status settings before importing","No, do not check work status settings"},{"1","0"})

hope this will help you.

former_member186338
Active Contributor
0 Likes

Unfortunately your proposal is not related to script logic packages...

Former Member
0 Likes

Thanks BPC User,

This prompt is the same that use the standard copy package. But I dont know, how the Copy package ignore the work status. I tried debugging this package but I didn’t find the code.

Do you know what is the next step?

I have to put something in the BADI?

Former Member
0 Likes

HI Marc,

in data manger package you can hard code the values.for ignore  work status you can use

INFO(%CHECKLCK%,0)

0 MEANS DON'T CHECK WORKSTATUS

1 MEANS  CHECK WORK STATUS

former_member186338
Active Contributor
0 Likes

It's related ONLY to some standard process chains - COPY, MOVE, CLEAR etc!

Former Member
0 Likes

Hi Vadim,

May be i am wrong but just write simple script in default logic and through DM package called that default logic, and in that package used INFO(%CHECKLCL%,0) and it work properly.Before adding INFO same package gets failed due to work-status violation rule but when added INFO it works for me.

If i am wrong then please correct me.

former_member186338
Active Contributor
0 Likes

Absolutely wrong!

Please, show the advanced DM script!

INFO(%CHECKLCL%,0) - has no effect on running script logic calculations.

Vadim

Former Member
0 Likes

Hi Vadim,

Please check below screen shots.

with prompt and selected YES check


After adding INFO



Result






former_member186338
Active Contributor
0 Likes

Sorry, but what BPC version you are talking about - NW???

And what is "Execute formulas"??

Vadim

Former Member
0 Likes

Hi Vadim,

No i have tested on MS version.

Sorry my bad. Thanks for information.

former_member186338
Active Contributor
0 Likes

Absolutely different behavior...