Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6617341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:41:34+00:00 2026-05-25T20:41:34+00:00

Good Day Everyone, There is this something i’ve been trying to exercise in abap

  • 0

Good Day Everyone,

There is this something i’ve been trying to exercise in abap and that is the Displaying of column datas in ALV by retrieving the values from excel file into an internal table. I’ve been trying to debug my program for quite some time now and i can’t seem to solve the error it’s been stating which is “Field symbol has not yet been assigned” please guide me. I already made some research on how to solve this short dump error but most of the other issues posted on the net is selected from some specific table with column fields. I was just wondering that maybe my case is a little bit different from others.

The function that retrieved the values from excel is properly working and i have no problem at all in displaying them.Below is the code i constructed.

TYPE-POOLS: truxs,
        slis.

TYPES: BEGIN OF t_itab,
      col1 TYPE char20,
      col2 TYPE char20,
      col3 TYPE char20,
      col4 TYPE char20,
      col5 TYPE char20,
   END OF t_itab,
   t_it_itab type STANDARD TABLE OF t_itab.

Data: gt_tab TYPE t_it_itab,
  wa_tab TYPE t_itab,
  g_numrows TYPE i.

PARAMETERS: p_fname TYPE c LENGTH 50.

INITIALIZATION.

AT SELECTION-SCREEN OUTPUT.

AT SELECTION-SCREEN.
AT SELECTION-SCREEN on VALUE-REQUEST FOR p_fname.
DATA: l_filename LIKE  IBIPPARMS-PATH.
CALL FUNCTION 'F4_FILENAME'
 EXPORTING
   PROGRAM_NAME        = SYST-CPROG
   DYNPRO_NUMBER       = '1000'
 IMPORTING
   FILE_NAME           = l_filename
        .
p_fname = l_filename.

START-OF-SELECTION.

DATA: lc_fname TYPE RLGRAP-FILENAME,
  lt_tab TYPE TRUXS_T_TEXT_DATA.

  lc_fname = p_fname.

CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
  EXPORTING
    I_TAB_RAW_DATA             = lt_tab
    I_FILENAME                 = lc_fname
  TABLES
    I_TAB_CONVERTED_DATA       = gt_tab
  EXCEPTIONS
    CONVERSION_FAILED          = 1
  OTHERS                       = 2
      .
IF SY-SUBRC <> 0.
  WRITE 'Error'.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

" Delete First Row / HEADER
DELETE gt_tab INDEX 1.

IF gt_tab[] is INITIAL.
  MESSAGE 'No Record(s) found' TYPE 'I'.
  EXIT.
ELSE.
  PERFORM DisplayALv.
ENDIF.

FORM DISPLAYALV.
 DATA: l_it_fcat type SLIS_T_FIELDCAT_ALV,
       l_wa_fcat TYPE SLIS_FIELDCAT_ALV.

 l_wa_fcat-fieldname = 'col1'.
 l_wa_fcat-ref_tabname = 'gt_tab'.
 l_wa_fcat-reptext_ddic = 'Column 1'.
 l_wa_fcat-outputlen = '30'.
 APPEND l_wa_fcat TO l_it_fcat.
 CLEAR l_wa_fcat.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    I_CALLBACK_PROGRAM       = sy-repid
    IT_FIELDCAT              = l_it_fcat
    I_DEFAULT          = 'X'
    I_SAVE             = 'A'
  TABLES
    T_OUTTAB           = gt_tab[].

IF SY-SUBRC <> 0.
  WRITE: 'SY-SUBRC: ', SY-SUBRC .
ENDIF.

ENDFORM.

Any tips, tricks and advice in my program would be highly sought. Thanks in Advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:41:34+00:00Added an answer on May 25, 2026 at 8:41 pm

    You’re using a type which is not defined in the data dictionary. This requires a different approach when creating the ALV fieldcat. Try this:

    l_wa_fcat-fieldname = 'COL1'.
    l_wa_fcat-inttype = 'C'.
    l_wa_fcat-outputlen = '30'.
    l_wa_fcat-text_fieldname = 'Column 1'.
    l_wa_fcat-seltext_s = 'Column 1'.
    

    Also make sure you enter the fieldname value with capitalized letters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day everyone, this is one of those areas that is a little over
Good day everyone. This problem was part of another one which it as been
Good day everyone. I have been having the same problem all day at work
Hi and good day everyone, as per above title, I was trying to handle
Good day everyone! I am trying to understand how buffer overflow works. Right now,
Good day everyone. I have an audio class, that plays a .wav file. But
Good day everyone I need to execute command on linux machine this command is
Good day, I have a hibernate mapping which goes something like this <class name=Person>
Good day, Is there a Regex that I could use to prepend a 0
Good day everyone, I am building a page in ASP.NET, and using Master Pages

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.