cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance Standard Business content extractor using “RSU5_SAPI_BADI”.

Former Member
0 Kudos

Hello,

I would like to enhance 0EQUIPMENT_ATTR. Standard Master Data Source BWE_EQUI is appended with the field GROES. The data for this field is filled from  EQUI - GROES. I tried to do exactly the same as in tutorial:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3001894b-b1fb-2910-77ba-e80b6f205...

When I enhance 0PROFIT_CTR_ATTR, as in tutorial, it is working correctly. Unfortunately, in case of 0EQUIPMENT_ATTR, I can't activate my method.

The error is: "EQUI_GROES" is not defined in the ABAP Dictionary as a table, projection view, or database view.

The code looks similar to the one from the tutorial. What should I do to make EQUI table visible and activate my method?

Thank you in advance for any help!

The code:

method IF_EX_RSU5_SAPI_BADI~DATA_TRANSFORM.

   CHECK i_datasource = '0EQUIPMENT_ATTR'.

   DATA: lt_data TYPE TABLE OF BWE_EQUI.

   FIELD-SYMBOLS: <ls_data> TYPE BWE_EQUI.

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

* Internal table for EQUI_GROES

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

   TYPES:

   BEGIN OF ty_equimpent,

   EQUNR TYPE BWE_EQUI-EQUNR,

   GROES TYPE BWE_EQUI-GROES,

   END OF ty_equimpent.

   DATA:

   lt_equimpent type standard table of ty_equimpent,

    ls_equimpent type ty_equimpent.

   lt_data[] = c_t_data[].

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

* Read data into internal memory

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

   select EQUNR

   GROES

   from equi_groes

    into table lt_equimpent

     for all entries in lt_data

   where EQUNR eq lt_data-EQUNR.

   LOOP AT lt_data ASSIGNING <ls_data>.

     read table lt_equimpent into ls_equimpent

     with key EQUNR = <ls_data>-EQUNR.

     if sy-subrc eq 0.

       <ls_data>-GROES = ls_equimpent-GROES.

       MODIFY lt_data FROM <ls_data>.

     endif.

   ENDLOOP.

   REFRESH c_t_data.

   c_t_data[] = lt_data[].

endmethod.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In select statement u have mention the table name.

No need to use modify statement, if you are using field-symbol.

select EQUNR

   GROES

   from BWE_EQUI

    into table lt_equimpent

     for all entries in lt_data

   where EQUNR eq lt_data-EQUNR.


Thanks,

Somesh.

Answers (2)

Answers (2)

Former Member
0 Kudos

Than you guys! I just changed EQUI_GROES to EQUI and now it is working. Big thank you!

MartinMaruskin
Active Contributor
0 Kudos

Hi Mateuz,

looking to the code you listed issue is caused because table EQUI_GROES is not available in your system.

As how to document you are referring to says it applies to:  "SAP_BASIS 6.20 and PI_BASIS 2004_1"... I'd say that you maybe running system on lower version of these components?

cheers

m./

Former Member
0 Kudos

Table EQUI, field GROES - they are available in my system. For example from the attached document it is working fine.

MartinMaruskin
Active Contributor
0 Kudos

No your SELECT is using table EQUI_GROES which is not in the system. I believe table is EQUI and field in the same table is GROES. Check this out!

Former Member
0 Kudos

Hi Mateusz,

Please apply following code then you shold be good:

----------------

IF_EX_RSU5_SAPI_BADI~DATA_TRANSFORM.

   CHECK i_datasource = '0EQUIPMENT_ATTR'.

   DATA: lt_data TYPE TABLE OF BWE_EQUI.

   FIELD-SYMBOLS: <ls_data> TYPE BWE_EQUI.

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

* Internal table for EQUI_GROES

   TYPES:

   BEGIN OF ty_equimpent,

   EQUNR TYPE EQUI-EQUNR,        ""AMIT"" 

   GROES TYPE EQUI-GROES,       ""AMIT""

   END OF ty_equimpent.

   DATA:

   lt_equimpent type standard table of ty_equimpent,

    ls_equimpent type ty_equimpent.

   lt_data[] = c_t_data[].

* Read data into internal memory

   select EQUNR

   GROES                                      

   from equi                                    ""AMIT""

    into table lt_equimpent                    

     for all entries in lt_data

   where EQUNR eq lt_data-EQUNR.

   LOOP AT lt_data ASSIGNING <ls_data>.

     read table lt_equimpent into ls_equimpent

     with key EQUNR = <ls_data>-EQUNR.

     if sy-subrc eq 0.

       <ls_data>-GROES = ls_equimpent-GROES.

*       MODIFY lt_data FROM <ls_data>. ""AMIT"" Comment this statement

     endif.

   ENDLOOP.

   REFRESH c_t_data.

   c_t_data[] = lt_data[].

endmethod.

--------------

All the ""AMIT"" changes you need to do in your code.

Thanks

Amit