cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in smartforms

Former Member
0 Kudos

Hi Guru's,

I am looping one internal table. In my itab iam having 10 records, I want to print all 10 records in form .

for example :




CALL FUNCTION 'FI_PRINT_ZTERM'
 EXPORTING
   I_ZTERM               = WA_EKKO-ZTERM
   I_LANGU               = SY-LANGU
   I_XT052U              = 'X'
*   I_T052                =
  TABLES
    T_ZTEXT               = IT_ZBTXT
          .

LOOP AT IT_ZBTXT INTO WA_ZBTXT.
  CASE SY-TABIX.
    WHEN 1.
      CONCATENATE 'TERM' '1' INTO TERM.
    WHEN 2.
      CONCATENATE 'TERM' '2' INTO TERM.
    WHEN 3.
      CONCATENATE 'TERM' '3' INTO TERM.
    WHEN 4.
      CONCATENATE 'TERM' '4' INTO TERM.
    WHEN 5.
      CONCATENATE 'TERM' '5' INTO TERM.
    WHEN 6.
      CONCATENATE 'TERM' '6' INTO TERM.
    WHEN 7.
      CONCATENATE 'TERM' '7' INTO TERM.
    WHEN 8.
      CONCATENATE 'TERM' '8' INTO TERM.
    WHEN 9.
      CONCATENATE 'TERM' '9' INTO TERM.
    WHEN 10.
      CONCATENATE 'TERM' '10' INTO TERM.
  ENDCASE.

  READ TABLE IT_ZBTXT INTO WA_ZBTXT WITH KEY TERM.

  IF SY-SUBRC EQ 0.
*     V_TEXT1 = WA_ZBTXT-TEXT.
     MODIFY IT_ZBTXT FROM WA_ZBTXT index sy-tabix.
  ENDIF.

  TERM =  ' '.

ENDLOOP.

in debugging i am getting 10 records but in Form's Text node i am getting only last record.

In Text node i have given like &WA_ZBTXT-TEXT&.

Thanks in Advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Where you are displaying the internal table.In main window?

Loop the internal table in the main window and clear work area after modifying the internal table.

Regards,

Rajesh.

Former Member
0 Kudos

Hi Rajesh,

My Apolozy for giving the late reply. I have written the loop in Program line of the Text Node... and I want to print the records in that text node.

Regards,

Muralikrishna

Edited by: muralipsharma on Aug 23, 2010 12:01 PM

Former Member
0 Kudos

Hi,

Where you want to display those 10 records in form? In the Table of a Main Window?

If so, goto the table node in main window and goto the 'DATA' tab.

In 'Data' tab, give your internal table as loop.

Like, IT_ZBTXT INTO WA_ZBTXT.

Regards,

Rajesh

Former Member
0 Kudos

Hi Rajesh,

I want to print the 10 terms in Text node of the Secondary window.. not in table of Main window.

Thanks n Regards,

Muralikrishna

Edited by: muralipsharma on Aug 23, 2010 1:07 PM

Former Member
0 Kudos

Hi,

OK.

Then create a loop in the secondary window and put the text node under the loop node.

Hope this will help you.

Regards,

Rajesh

Former Member
0 Kudos

Hi Rajesh,

Thank you for replying. I got the solution... Thanq for helping...

Regards,

Muralikrishna

Answers (0)