cancel
Showing results for 
Search instead for 
Did you mean: 

Code help pleaseu0085

Former Member
0 Kudos

Hai

I want to check wether there are fields WWRET; WWREV, WWCUC WWGCN in the table CE1XXXX where (XXXX is Operating concern populated in the selection.)

Thanks in advance

Oli

Accepted Solutions (1)

Accepted Solutions (1)

vladimir_golovtchiner
Participant
0 Kudos

Hi Oli,

These fields are CHARS (Merkmale) of your Operating Concern. If you go to transaction KEA0 you could check these fields in the structure of you Operating Concern. If your Operating Concern is active an generated you could see these fields in the table CE1XXXX. Use transaction SE11.

Best regards

Vladimir Golovtchiner

Answers (1)

Answers (1)

ChristianFi
Active Participant
0 Kudos

Oliver,

1. ) table TKEFE hold the chars of an operating concern.

2.) Read ddic info (table dd03l)

3) try assign component 'WWRET' of structure

where structure represents ce1xxxx.

One of the approach should fulfill your needs.

Christian

Former Member
0 Kudos

Thanks Christian and Vladimir,

I want to check programatically with ABAP.....could you please help me.

I want to check wether there are fields WWRET; WWREV, WWCUC WWGCN in the table CE1XXXX (where XXXX is Operating concern will be populated in the selection selection screen.)

And The field should have

Techn. Field Type min. Field Length

WWRET CHAR 2

WWREV CHAR 4

WWCUC CHAR 3

WWGCN CHAR 10

Thanks in advance

Oli

Former Member
0 Kudos

As Christian mentioned code a select statement to DDIC table DD03L with the table name and field name. After the select check for SY-SUBRC. If SY-SUBRC is 0 field exist in the table else does not exists.

Sample:

Select Single * from DD03L

Where TABNAME = <tablename>

and FIELDNAME = <fieldname>.

if sy-subrc eq 0.

Write: 'Field Exists'.

else.

Write: 'Field does not Exists'.

endif.

Thanks,

Shashi Reddy

Former Member
0 Kudos

Hai Christian

Could you please explain me the 3 solution you siggested..

Thanks in advance

Oli

Former Member
0 Kudos

and Thanks Shashi, could you please explain the third solution suggested my Christian, As Iam very new to ABAP.

Thanks in advance.

oli

ChristianFi
Active Participant
0 Kudos

Oliver,

here quick & dirty

you would have to concatenate l_tabname.

data: gref_data type ref to data.

data: g_tabname type dd02l-tabname value 'CE10100'.

field-symbols: <g_struct> type any,

<g_field> type any.

create data gref_data type (g_tabname).

assign gref_data->* to <g_struct>.

assign component 'WWRET' of structure <g_struct> to <G_field>.

if sy-subrc is initial.

  • WWRET is component of structure

else.

  • it is not part of the structure.

endif.

Christian