on 01-23-2012 11:05 AM
i'm Sure my internal table contain wealth of Data (multiline)
DATA : begin of d_append occurs 100,
STAWN type EIPO-STAWN,
TEXT1 type T604T-TEXT1,
SUM type EKPO-NETWR,
SUM1 type EKPO-NETWR,
end of d_append.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'ZMEDRUCK2'
language = sy-langu
EXCEPTIONS
others = 1.
" CALL FUNCTION 'WRITE_FORM'
" EXPORTING
" element = 'ITEM_HEADER_F'
" window = 'MAIN'.
CALL FUNCTION 'CLOSE_FORM' .
and i must to pass this internal table in TEXT element in sapscript
in sapscript
/: PERFORM NGPGROUP IN PROGRAM Z_GROUP_NGP
/: USING &EKKO-EXNUM&
/: USING &EKKO-EBELN&
/: CHANGING &D_APPEND-STAWN&
/: CHANGING &D_APPEND-TEXT1&
/: CHANGING &D_APPEND-SUM&
/: CHANGING &D_APPEND-SUM1&
/: ENDPERFORM
but the result in me9f is empty
please somebody have an idea ??
KHABLACHI BESSEM
Hey you can not pass internal table data to script using perform in script.so here looping the internal table will not work .i guess you are using subroutine pool.am i right?if any help revert me.
with regards
Naresh
Edited by: naresh bammidi on Jan 23, 2012 12:34 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i PASS TWO PARAMETERS FROM THE SAPSCRIPT CHECK MY SELECT WITH INNER JOIN ...
and
pass the result in intenal tables
REPORT Z_GROUP_NGP.
&----
*& Form NGPGROUP
&----
text
----
-->IN_TAB text
-->OUT_TAB text
----
FORM NGPGROUP TABLES in_tab STRUCTURE itcsy out_tab STRUCTURE itcsy.
Get first parameter in input table.
READ TABLE in_tab INDEX 1.
WRITE in_tab-value TO l_EXNUM .
READ TABLE in_tab INDEX 2.
MOVE in_tab-value TO l_EBELN.
DATA : begin of d_append occurs 100,
STAWN type EIPO-STAWN,
TEXT1 type T604T-TEXT1,
SUM type EKPO-NETWR,
SUM1 type EKPO-NETWR,
end of d_append.
my internal table with full and multiline data is d_append
my test element in sapscript is "
/E ITEM_HEADER_F
So how to pass the result of my query to sapscript ???
From your sap script pass only two parameters to report.
/: PERFORM NGPGROUP IN PROGRAM Z_GROUP_NGP
/: USING &EKKO-EXNUM&
/: USING &EKKO-EBELN&
Fetch the details based on the parameters.Now you have the data in internal table.
in script under this perform create one more element
For eg:
/e 100
* wa_value1,,wa_value2,wa_value3
Now loop this element from your report.(this element should be in MAIN window).
********************************************IN program report*******************************************
loop at d_append .
"WRITE 😕 d_append-STAWN , d_append-SUM , d_append-SUM1 , d_append-TEXT1 . " my table is full data
CALL FUNCTION 'START_FORM'
EXPORTING
Form = 'ZMEDRUCK2'
program = 'Z_GROUP_NGP'.
Call WRITE FORM
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = '100'
window = 'MAIN'.
Call END FORM
CALL FUNCTION 'END_FORM'.
Call CLOSE FORM
endloop.
**************************************************************IN SAPSCRIPT****************************
i create new text element '100'
/E 100
/: PERFORM NGPGROUP IN PROGRAM Z_GROUP_NGP
/: USING &EKKO-EXNUM&
/: USING &EKKO-EBELN&
/: ENDPERFORM
&D_APPEND-STAWN&
result in sapscript still empty data
Edited by: Bassem KHABLACHI on Jan 23, 2012 2:35 PM
Give a try by changing the code as below
********************************************IN program report*******************************************
"WRITE 😕 d_append-STAWN , d_append-SUM , d_append-SUM1 , d_append-TEXT1 . " my table is full data
CALL FUNCTION 'open_FORM' " changed start_form to Open_form
EXPORTING
Form = 'ZMEDRUCK2'
program = 'Z_GROUP_NGP'.
* Call WRITE FORM
loop at d_append . " changed here
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = '200' " changed here
window = 'MAIN'.
* Call END FORM
CALL FUNCTION 'END_FORM'.
* Call CLOSE FORM
endloop.
**************************************************************IN SAPSCRIPT****************************
i create new text element '100'
/E 100
/: PERFORM NGPGROUP IN PROGRAM Z_GROUP_NGP
/: USING &EKKO-EXNUM&
/: USING &EKKO-EBELN&
/: ENDPERFORM
/e 200 " changed here
* &D_APPEND-STAWN&
Put break point to script and see the values in the internal table d_append and see whether all values are passing to script or not.
Good morning ,
when i put a break point to script and i see the values in the internal table d_append and see whether all values are passing to script or not. i found that the debugguer can't see ELEMENT /E 200 or /E 100 and continue execution ,
So when i put in Standart element like 'ITEM_HEADER_F' ,the debugguer can acces to write form
then he can't see the values passed with loop in the internal table
So please if you have a sample code report and sapscritpt
just to have a look and i will do the same with my query .
Thanks a lot for your time man ,i hope that idea work ,i need to know this functionality to solve problem
KHABLACHI BESSEM
in sapsript -
/E 200
/: PERFORM NGPGROUP IN PROGRAM Z_GROUP_NGP
/: USING &EKKO-EXNUM&
/: USING &EKKO-EBELN&
/: ENDPERFORM
&D_APPEND-STAWN&
-
in report----
form REPORT Z_GROUP_NGP
...
.....
DATA : begin of d_append occurs 100,
STAWN type EIPO-STAWN,
TEXT1 type T604T-TEXT1,
SUM type EKPO-NETWR,
SUM1 type EKPO-NETWR,
end of d_append.
select from inner join .... ""d_append have a data
loop at d_append
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = '200' " changed here
window = 'MAIN'.
....
.....
endloop
i want to know if we have other way to decalre a global variable ...
an example will be great to understand the problem
in the debugguer after i put ths internal table in global définition
in the funtion write form we have this line :
check co_perform-active <> true. ==> the value passed is 'X'
i change this value in the debbuguer => value ' ' /*empty
internal Erreur SAPscript LSTXCFEV(4)
i found my result query in sapscript with only two line in 8 page
this is a problem
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.