‎2005 Dec 09 6:45 AM
Hi
I am trying smartforms in that i am facing one problem I have define 2 tables say MARA & MAKT and I want to Print matnr & maktx on the form.
in Form I am defining itab & jtab in form interface-table also in global definations workarea for both the tables
in Page1 i am defining one table itab into wa_itab also define table columns in main loop i am passing jtab to wa_jtab (for 2nd table, Material description)
while activating the form i am getting an error %TEXT6 Field wa_JTAB-MAKTX has no defined value can anybody solve this .
thanks& Regards
Vinayak Deosthali.
‎2005 Dec 09 6:58 AM
Hello Vinayak,
Is it a warning or an error message that you're getting? The reason I asked was I encountered the same warning message and just ignored it. I activated the Smartform anyway. It is a result of not directly populating the variable/field within the form. Is the value coming from a print program?
Regards,
LeGo
‎2005 Dec 09 6:58 AM
‎2005 Dec 09 8:43 AM
Hi,
If you are passing the values from program,declaring the internal tables in forms interface is correct.
If you are not passing values from program,then you should declare the internal table in global definition->Global data.
for eg.. the declarations should be like this
mara type mara[in case of not passing value from program]
itab <b>type standard table of</b> mara
wa <b>like</b> mara
The place you are declaring depends on the values from program or from smartform itself.
Kindly reward points by clicking the star on the left of reply,if it helps.
‎2005 Dec 09 9:21 AM
Hi Vinayak,
Assuming all the itab,jtab,wa_itab,wa_jtab are declared properly...
When you are writing &wa_jtab-maktx& for a text (TEXT6)... First you need to select the correct description for the material in wa_itab.
1. You use program lines pass wa_itab,wa_jtab in input and wa_jtab for output.. Then code for reading the wa_itab with matnr = wa_itab-matnr... use this for TEXT6.
So, a loop on wa_itab...within which a read on wa_jtab for getting description will do...
Regards,
Raj
‎2005 Dec 09 9:32 AM
Hi Vinayak,
Below are the Steps to get material Description
1. Form Interface->Table
Define
IT LIKE MARA
2. Global Definitions->Global Data
define
GS_MAKTX LIKE MAKT-MAKTX
3. Create Table in Main Window
go to Data Tab->Loop->Check Operand
eneter IT into IT
4. Now for getting Material Description in Main Area of table use program lines
Use IT in Input Parameters & gs_maktx in Output Parameters
write following code:
TABLES : makt.
CLEAR : makt,gs_maktx.
SELECT SINGLE * FROM makt WHERE matnr = it-matnr.
IF sy-subrc = 0.
gs_maktx = makt-maktx.
ENDIF.
5. Create Text under program lines.
Use &gs_maktx& in text editor.
On assumption that u know about Table
I dont write steps how to design table
It's easily solve ur problem.
Plz reward point, if it solve ur problem.
Regards,
Digesh