on 01-08-2009 4:11 AM
Hi all,
I'm working on smartforms,
i'm getting one internal table value from a function module with 3 records this i should display,
i'm able to display only the last record if i use work area, if i use interna table it giving error as
"occurs 0 specification is missing" or "internal table without headerline" .
SORT leistung BY EXTROW packno .
clear wa_text.
loop at leistung into wa_le.
wa_text-EXTROW = wa_le-EXTROW.
WA_text-kTEXT1 = wa_le-KTEXT1.
wa_text-packno = wa_le-packno.
wa_text-introw = wa_le-introw.
append wa_text into it_text .
endloop.
if i call &it_text-ktext1& its giving error.
global definiton i've declared like this..
types : begin of ty_text,
count type i,
extrow like esll-extrow,
ktext1 like esll-ktext1,
packno like esll-packno,
introw like esll-introw,
end of ty_text.
types : wa_text type standard table of ty_text.
global data :
wa_text type ty_text.
it_text type ty_text occurs 0.
regards
Suprith
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 4:42 PM
Hi Suprith,
TYPES:
begin of ty_text,
count type i,
extrow like esll-extrow,
ktext1 like esll-ktext1,
packno like esll-packno,
introw like esll-introw,
end of ty_text. " Declare it in the TYPES tab of Global Definitions
" And Declare the internal table and work area in the Global Data tab of Global Definitions.
wa_text type ty_text
it_text type table of ty_text
With luck,
Pritam.
Edited by: Pritam Ghosh on Jan 8, 2009 8:10 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Place a loop, and on 'data tab' of LOOP
click internal table check box
give your 'internal table name' to 'work area name'
Thanks & Regards,
Krishna..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
types : wa_text type standard table of ty_text.
global data :
wa_text type ty_text.
it_text type ty_text occurs 0.
regards
INSTEAD OF THIS.. TYR WITH THE BELOW
IT_TEXT LIKE TY_TEXT OCCURS 0 WITH HEADER LINE.
Hope the answer to the Query
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In global Data declare like this....
global data :
wa_text type Table of ty_text
it_text type table of ty_text
This is working.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
go to commandline editor.
describel table line.
now u can find numeber of rows
after
use read statement.
Read the last row.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
declare it
data: wa_text type ty_text,
it_text type standard table of ty_text
instead of
it_text type ty_text occurs 0.
regards,
Santosh Thorat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check below program.
REPORT YPRINTPRG_SMARTFORM1 .
DATA : ITKNA1 LIKE KNA1,
ITVBAK LIKE VBAK OCCURS 0 WITH HEADER LINE.
PARAMETERS : PKUNNR LIKE KNA1-KUNNR.
SELECT * FROM KNA1 INTO ITKNA1
WHERE KUNNR = PKUNNR.
ENDSELECT.
SELECT * FROM VBAK
INTO TABLE ITVBAK
WHERE KUNNR = PKUNNR.
CALL FUNCTION '/1BCDWB/SF00000011' u201CTHIS FUNCTION MODULE CALLS THE
SMART FORM WE WILL GET THIS AT MENU ENVIRONEMENT u201D
EXPORTING
ITKNA1 = ITKNA1
TABLES
ITVBAK = ITVBAK.
IN SMART FORM
FORM INERFACE----
IMPORT (TAB)
Parameter name Type assignment Reference type Default value
ITKNA1 LIKE KNA1
FORM INERFACE----
TABLES (TAB)
ITVBAK LIKE VBAK
PAGES & WINDOWS--- MAIN WINDOW-LOOP 1--DATA(TAB)
ITVBAK INTO ITVBAK
PAGES & WINDOWS-----MAIN WINDOW--LOOP 1---TEXT 3(EDITOR)
&ITVBAK-VBELN& &ITVBAK-ERDAT& &ITVBAK-ERNAM& &ITVBAK-NETWR&
PAGES & WINDOWS-----HEADER WINDOW---TEXT 2(EDITOR)
Customer No. &itkna1-kunnr& CustomerName :&itkna1-name1&
Regards
Md.MahaboobKhan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Please check the ITAB IT_TEXT is being declared as table and called.
If not create a table type and then pass the ITAB and WA
Regards
Shiva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SORT leistung BY EXTROW packno .
clear wa_text.
loop at leistung into wa_le.
wa_text-EXTROW = wa_le-EXTROW.
WA_text-kTEXT1 = wa_le-KTEXT1.
wa_text-packno = wa_le-packno.
wa_text-introw = wa_le-introw.
append wa_text into it_text .
endloop.
loop at it_text into wa_text. " <=== Create a TABLE node & add this statement
&wa_text-ktext1&. " <====== Create a text element
if i call &it_text-ktext1& its giving error.
global definiton i've declared like this..
types : begin of ty_text,
count type i,
extrow like esll-extrow,
ktext1 like esll-ktext1,
packno like esll-packno,
introw like esll-introw,
end of ty_text.
* Global data :
data : wa_text type ty_text.
it_text type standard table of ty_text.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.