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

Modify field catlog table without work area

Former Member
0 Likes
787

I have a field catlog internal table g_fieldcat without header line and i need to modify field content where SELTEXT_L = 'NAME1' to SELTEXT_L = 'Vendor Name''. Kindly help me

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
769
data: wa_fieldcat like line of g_fieldcat.

read table g_fieldcat into wa_fieldcat with key fieldname = 'NAME1'.
if sy-subrc  = 0.
  wa_fieldcat-seltext_l = 'Vendor Name'.
  modify g_fieldcat from wa_Fieldcat index sy-tabix.
endif.

Regards,

RIch Heilman

4 REPLIES 4
Read only

Former Member
0 Likes
769

you can use field symbols.

field-symbols : <fs> like line of g_fieldcat.

LOOP AT G_FIELDCAT assigning <FS>.

<FS>-SELTEXT_L = 'Vendor Name'.

ENDLOOP.

You can give condition for particular field in the loop.

for example,

IF <FS>-fieldname = 'FIELD1'.

endif.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
770
data: wa_fieldcat like line of g_fieldcat.

read table g_fieldcat into wa_fieldcat with key fieldname = 'NAME1'.
if sy-subrc  = 0.
  wa_fieldcat-seltext_l = 'Vendor Name'.
  modify g_fieldcat from wa_Fieldcat index sy-tabix.
endif.

Regards,

RIch Heilman

Read only

0 Likes
769

RIch Heilman

Thanks it works perfect...

Read only

0 Likes
769

Hi Rich,

For me also same problem came, I have resolved it using your solution. Thanks very much.

Regards,

Mahesh