Skip to Content
author's profile photo Former Member
Former Member

problem in structure

Hye abapers...

I am trying to upload the structure of a DB table to internal area.

Input, DB table is a parameter p_table.

My input is table zscp_circle_m which has strucutre as

mandt

circle_id

circle_desc

p_circle

status.

By executing the code, the field symbol gt_table which should contain the entire structure of zscp_circle_m is having only

mandt

circle_id

circle_desc.

Please help me in solving this.

Code for your reference.

data: gr_dref type ref to data.
 
FIELD-SYMBOLS: <f_table> TYPE ANY,
               <f_up_table> type any,
               <gt_table>  TYPE STANDARD TABLE.
 
PARAMETERS: p_table LIKE dd02l-tabname   OBLIGATORY.
 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
      program_name  = syst-repid
      dynpro_number = syst-dynnr
    CHANGING
      file_name     = p_fname
    EXCEPTIONS
      mask_too_long = 1
      OTHERS        = 2.
  IF sy-subrc  0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
 
START-OF-SELECTION.
  
CREATE DATA gr_dref TYPE table of (p_table).
ASSIGN gr_dref->* TO <gt_table>.
 

By debuggin it is clear that the whole structure is not copied.. what might be the problem.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 06:39 PM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 06:33 PM

    HI,

    Might be it showing only primary keys of ur ztable.

    check the syntax again to assign it to field symbol..

    Regards

    Syed A

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 10, 2008 at 08:50 PM

    Write the below code in start-of-selection instead of your code. It will work.

    CREATE DATA gr_dref TYPE STANDRAD TABLE OF (p_table).

    ASSIGN gr_dref->* TO <gt_table>.

    Thanks,

    Srinivas

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.