Application Development and Automation 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: 
Read only

Smartform System table declarations

Former Member
0 Likes
361

Dear Guys ,

I have create a smartform and i have added in two places in smartforms some code for some reason.

The code is the following :

  tables : makt.

  CLEAR MAKT.
  SELECT SINGLE * FROM MAKT  WHERE MATNR = WA_YVIANDETA-MATNR
     AND    SPRAS = SY-LANGU.

       IF SY-SUBRC = 0.
         MOVE MAKT-MAKTX TO MAKTX.
       ENDIF.

       IF WA_YVIANDETA-MATNR = '000000000000099999'.
         MAKTX = 'Garbage'.
       ENDIF.


The problem is that the declaration of tables : makt  returns errors because it say that the table has been declared 2 times ...

I want to perform the code 2 times ...


How can i do it ?


Thanks a lot ....


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
324

In Global settings -> Global Definitions, Declare a Global Data - MAKT type MAKT.

Remove the tables declaration from your code.

~Lokesh

1 REPLY 1
Read only

Former Member
0 Likes
325

In Global settings -> Global Definitions, Declare a Global Data - MAKT type MAKT.

Remove the tables declaration from your code.

~Lokesh