Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Syntax-Problem in BADI: WORKORDER_INFOSYSTEM Method: AT_OUTPUT_SCREEN

Former Member
0 Likes
1,291

Hi,

i want to use the method AT_OUTPUT_SCREEN of BADI: WORKORDER_INFOSYSTEM

I want to get the fieldcattable: MT_FIELDCAT_LOCAL.

This method has the parameter: I_ALV_GRID (type ref. to)

I try this code, but i get syntax-error.


method IF_EX_WORKORDER_INFOSYSTEM~AT_OUTPUT_SCREEN.
*
  data: LOCAL_T_FCAT  type LVC_T_FCAT.
*
  LOCAL_T_FCAT = I_ALV_GRID->MT_FIELDCAT_LOCAL.
  break-point.
endmethod.

Can anyone help me to get what i need?

Thanks.

regards, Dieter

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,188

What syntax error are you getting ?

Kind regards,

Advait

Hi,

i want to use the method AT_OUTPUT_SCREEN of BADI: WORKORDER_INFOSYSTEM

I want to get the fieldcattable: MT_FIELDCAT_LOCAL.

This method has the parameter: I_ALV_GRID (type ref. to)

I try this code, but i get syntax-error.


method IF_EX_WORKORDER_INFOSYSTEM~AT_OUTPUT_SCREEN.
*
  data: LOCAL_T_FCAT  type LVC_T_FCAT.
*
  LOCAL_T_FCAT = I_ALV_GRID->MT_FIELDCAT_LOCAL.
  break-point.
endmethod.

Can anyone help me to get what i need?

Thanks.

regards, Dieter

7 REPLIES 7
Read only

Former Member
0 Likes
1,188

Hi,

i try it again.

regards, Dieter

Read only

Former Member
0 Likes
1,189

What syntax error are you getting ?

Kind regards,

Advait

Read only

0 Likes
1,188

Hi Advait,

i get this syntax-error:

Class ZCL_IM__WORKORDER_INFOSYST, Method IF_EX_WORKORDER_INFOSYSTEM~AT_OUTPUT_SCREEN

Field "MT_FIELDCAT_LOCAL" is unknown. It is neither in one of the specified tables

nor defined by a "DATA" statement.

What statement do i have to insert to get the table MT_FIELDCAT_LOCAL?

Hope you can help.

Regards, Dieter

Read only

0 Likes
1,188

HI,

As I can see, the BADI's function does not contain the parameter MT_FIELDCAT_LOCAL, thus it wont be visible in this method, but it does have 2 parameters IT_FIELDCAT and IT_FIELDCAT_ALL, you may use one of these.

regards,

Advait

Read only

0 Likes
1,188

Hi Advait,

thanks for your answer, but i need the contents of table MT_FIELDCAT_LOCAL.

when i debug the method in debugger i can see the table with this field:

-MT_FIELDCAT_LOCAL

How can i get this table in the BADI. I will copy it to

variable: LOCAL_T_FCAT


METHOD IF_EX_WORKORDER_INFOSYSTEM~AT_OUTPUT_SCREEN.
*
  DATA: LOCAL_T_FCAT  TYPE LVC_T_FCAT.
*
* {O:55*\CLASS=CL_GUI_ALV_GRID}-MT_FIELDCAT_LOCAL.
* LOCAL_T_FCAT = I_ALV_GRID-MT_FIELDCAT_LOCAL.
  BREAK-POINT.
ENDMETHOD.

thanks.

Regards, Dieter

Read only

0 Likes
1,188

Hi,

That attribute is a private attribute of the class CL_GUI_ALV_GRID, hence you wont be able to access it in the BADI. However if you want to get the fieldcatalog, then you can always use the method GET_FRONTEND_FIELDCATALOG which will return the fieldcatalog of the alv instance that is currently passed to the method.


call method CL_GUI_ALV_GRID->GET_FRONTEND_FIELDCATALOG
         importing ET_FIELDCATALOG = LOCAL_T_FCAT.

Hope this helps.

regards,

Advait

Read only

0 Likes
1,188

Hi Adviat,

that's it.

thanks.

Regards, Dieter