Application Development 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: 

alv report

Former Member
0 Kudos

hi in internal table i have used 5 fields and printed the alv report.

now i got the requirement to add one more field and i added it along with the 5 fields in the internal table and in the output of ALV that new field is not reflecting..?

do i need to make any setting in ALV

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

To add more fields no extra setting needs to done to alv except fieldcatlog. Debug the program and see whether values are cmg for that field in internal table or not.

If values are cmg then check your fieldcatlog. Give fieldnames in capital.

Reward pts. if usefull.

Regards,

Dhan

10 REPLIES 10

Former Member
0 Kudos

If u r passing the correct internal table to the alv then it shud reflect hv u activated ur program after making changes. i guess activating ur program may solve the problem.

Former Member
0 Kudos

Hi Murali

Check your field catalog. Field name and table name should be in capital letters

Example

gi_fieldcatalog-fieldname   = 'HKONT'.
  gi_fieldcatalog-tabname      = 'IT_DETAIL'.
  gi_fieldcatalog-seltext_m   = 'Account No'.
  gi_fieldcatalog-col_pos     = 2.
  APPEND gi_fieldcatalog TO gi_fieldcatalog.
  CLEAR  gi_fieldcatalog.

Hope this will help

Regards

Anbu

0 Kudos

alv is working fine with that 5 fields , my problem only with the newly added field

0 Kudos

is ur program active ?

Former Member
0 Kudos

Hi,

To add more fields no extra setting needs to done to alv except fieldcatlog. Debug the program and see whether values are cmg for that field in internal table or not.

If values are cmg then check your fieldcatlog. Give fieldnames in capital.

Reward pts. if usefull.

Regards,

Dhan

0 Kudos

i just changed the name of the internal table ,

and its working fine now,

thnk u one and all

former_member188685
Active Contributor
0 Kudos

hi in internal table i have used 5 fields and printed the alv report.

now i got the requirement to add one more field and i added it along with the 5 fields in the internal table

i Hope you are using the Fieldcatalog merge function.

if you are using the Function then you have to take care of some things

Declaration of internal table.

data: begin of it_data occurs 0,
         vbeln like vbak-vbeln,
        matnr like vbap-matnr,

       fifthfield type vbap-xxxxx,   "if you use Type it will not display
       
        end of it_data.

when you are using merge you have to use LIKE declaration.

can you revert back if you are not using the Function alv merge, then post your code.

0 Kudos

hi,

DATA: BEGIN OF w_result OCCURS 0,

lifnr LIKE lfa1-lifnr,

fname LIKE cdpos-fname,

username LIKE cdhdr-username,(newly added field)

ddtext LIKE dd04t-ddtext,

udate LIKE cdhdr-udate,

value_new LIKE cdpos-value_new,

value_old LIKE cdpos-value_old,

END OF w_result.

..........

........................

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = i_repid

i_internal_tabname = 'W_RESULT'

  • I_STRUCTURE_NAME = '

  • I_CLIENT_NEVER_DISPLAY = 'X'

i_inclname = i_repid

  • I_BYPASSING_BUFFER =

  • I_BUFFER_ACTIVE =

CHANGING

ct_fieldcat = int_fcat

EXCEPTIONS

inconsistent_interface = 1

program_error = 2

OTHERS = 3.

IF sy-subrc EQ 0

AND int_fcat[] IS NOT INITIAL .

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = i_repid

i_callback_user_command = 'DOUBLE_CLIC'

it_fieldcat = int_fcat

i_save = 'A'

TABLES

t_outtab = w_result

EXCEPTIONS

program_error = 1

OTHERS = 2.

IF sy-subrc <> 0.

WRITE: /

'Returncode',

sy-subrc,

'from FUNCTION REUSE_ALV_LIST_DISPLAY'.

ENDIF.

ENDIF.

*******************************

FORM double_clic USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield .

CHECK r_ucomm EQ '&IC1' .

IF rs_selfield-fieldname EQ 'LIFNR' .

SET PARAMETER ID 'LIF' FIELD rs_selfield-value .

CALL TRANSACTION 'XK03' .

ENDIF .

ENDFORM. "double_clic

0 Kudos

Correct your code from

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = i_repid

i_internal_tabname = 'W_RESULT'

to

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = i_repid

i_internal_tabname = W_RESULT

Former Member
0 Kudos

hi check this...

you should add in the fieldcat log as well and in the internal table...first check whether the data is coming into the internal table or not..then think about the alv..