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

Field symbol has not yet been assigned.

Hello,

When I run program coming DAMP.--->> Field symbol has not yet been assigned.

DATA: gt_lfbk TYPE STANDARD TABLE OF lfbk WITH HEADER LINE,

gt_knbk TYPE STANDARD TABLE OF knbk WITH HEADER LINE,

kunnr LIKE knbk-kunnr.

START-OF-SELECTION.

SELECT * FROM lfbk INTO CORRESPONDING FIELDS OF TABLE gt_knbk.

SELECT * FROM lfbk INTO CORRESPONDING FIELDS OF TABLE gt_lfbk.

FIELD-SYMBOLS: <fs_knbk> LIKE LINE OF gt_knbk ,

<fs_lfbk> LIKE LINE OF gt_lfbk,

<val> TYPE ANY.

LOOP AT gt_lfbk ASSIGNING <fs_lfbk>.

<fs_knbk>-kunnr = <fs_lfbk>-lifnr.

ENDLOOP. <<<<<<<<<<<<<<<<<<<<<<<<<< DAMP

IF sy-subrc <> 0.

MESSAGE 'E' TYPE text-001.

ELSE.

WRITE: 'Upload OK'.

ENDIF.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 05, 2010 at 07:33 AM

    Hi,

    Can you check the below code...

    I removed one select query and one field symbols......

    DATA: gt_lfbk TYPE STANDARD TABLE OF lfbk WITH HEADER LINE,
          gt_knbk TYPE STANDARD TABLE OF knbk WITH HEADER LINE,
          kunnr   LIKE knbk-kunnr.
    
    FIELD-SYMBOLS: <fs_lfbk> LIKE LINE OF gt_lfbk,
                   <val> TYPE ANY.
    
    DATA : e_knbk TYPE knbk.
    
    START-OF-SELECTION.
    
      SELECT * FROM lfbk INTO TABLE gt_lfbk.
    *SELECT * FROM lfbk INTO CORRESPONDING FIELDS OF TABLE gt_knbk.
    
      LOOP AT gt_lfbk ASSIGNING <fs_lfbk>.
    
        MOVE-CORRESPONDING <fs_lfbk> TO e_knbk.
    
        e_knbk-kunnr = <fs_lfbk>-lifnr.
    
        APPEND e_knbk TO gt_knbk.
    
    ENDLOOP.  " <<<<<<<<<<<<<<<<<<<<<<<<<< DAMP
    
    IF sy-subrc <> 0.
      MESSAGE 'E' TYPE text-001.
    ELSE.
      WRITE: 'Upload OK'.
    ENDIF.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 03, 2010 at 01:49 PM

    I have executed the same program and I am not getting the dump which you mentioned but i am getting dump at MESSAGE 'E' type text-001.

    if gt_lfbk[] is INITIAL.

    LOOP AT gt_lfbk ASSIGNING <fs_lfbk>.

    <fs_knbk>-kunnr = <fs_lfbk>-lifnr.

    ENDLOOP.

    ENDIF.

    Thanks

    Bala Duvvuri

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Babek,

      You didn't assign anything to field-symbol <fs_knbk> than it causes a dump message,

      try this :

      LOOP AT gt_lfbk ASSIGNING <fs_lfbk>.

      • Add this line :

      ASSIGN LOCAL COPY OF INITIAL LINE OF gt_lfbk TO <fs_knbk>.

      *----

      <fs_knbk>-kunnr = <fs_lfbk>-lifnr.

      ENDLOOP. <<<<<<<<<<<<<<<<<<<<<<<<<< DAMP

      Or read the related record of table gt_lfbk

      assigning it to <fs_knbk> :

      READ TABLE gt_lfbk ASSIGNING <fs_knbk>

      WITH KEY ... .....

      Hope it helps.

  • Posted on Jul 03, 2010 at 05:09 PM

    You have not assigned field symbol fs_kbnk .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 05, 2010 at 02:41 AM

    FIELD-SYMBOLS: <fs_knbk> LIKE LINE OF gt_knbk ,

    <fs_lfbk> LIKE LINE OF gt_lfbk,

    <val> TYPE ANY.

    "FIELD-SYMBOLS" this is just declare it

    U haven't assign <fs_knbk> to anyting

    so use <fs_knbk>-kunnr is wrong

    Edited by: John Allen on Jul 5, 2010 4:41 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 05, 2010 at 06:41 AM

    Hi,

    Please make the changes in your report as shown below.

    DATA: gt_lfbk TYPE STANDARD TABLE OF lfbk WITH HEADER LINE,
          gt_knbk TYPE STANDARD TABLE OF knbk WITH HEADER LINE,
          kunnr   LIKE knbk-kunnr.
    
    FIELD-SYMBOLS: <fs_knbk> LIKE LINE OF gt_knbk ,
                   <fs_lfbk> LIKE LINE OF gt_lfbk,
                   <val> TYPE ANY.
    
    DATA : e_knbk TYPE knbk.
    
    ASSIGN e_knbk to <fs_knbk>.
    
    START-OF-SELECTION.
    
    SELECT * FROM knbk INTO CORRESPONDING FIELDS OF TABLE gt_knbk.
    SELECT * FROM lfbk INTO CORRESPONDING FIELDS OF TABLE gt_lfbk.
    
    
    
    LOOP AT gt_lfbk ASSIGNING <fs_lfbk>.
    <fs_knbk>-kunnr = <fs_lfbk>-lifnr.
    ENDLOOP. 
    
    IF sy-subrc <> 0.
    MESSAGE 'E' TYPE text-001.
    ELSE.
    WRITE: 'Upload OK'.
    ENDIF.

    Edited by: Senthil Kumar on Jul 5, 2010 12:13 PM

    Edited by: Senthil Kumar on Jul 5, 2010 12:14 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 05, 2010 at 07:00 AM

    Hi,

    You are not getting the dump now right...

    Ok tell me what is your requirement.... I thought you want us to solve your dump...

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      You change

      SELECT * FROM " lfbk " INTO CORRESPONDING FIELDS OF TABLE gt_knbk.

      TO

      SELECT * FROM " knbk " INTO CORRESPONDING FIELDS OF TABLE gt_knbk.

      Run program this select:

      SELECT * FROM lfbk INTO CORRESPONDING FIELDS OF TABLE gt_knbk.

      and see DEBUGGER. gt_knbk-kunnr.

      I want gt_knbk-kunnr = gt_lfbk-lifnr.

      Thanks for you.

      Edited by: Babek Farzaliyev on Jul 5, 2010 9:15 AM

      Edited by: Babek Farzaliyev on Jul 5, 2010 9:21 AM

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.