‎2007 Nov 21 4:52 AM
Hi expert,
How can get retrive the value from HIDE at function module and return the value to the calling screen. Pls advise. thanks.
‎2007 Nov 21 5:02 AM
see i this example.. how the Data is passed from one Program to another Program .
<b>Using the IMPORT & EXPORT Conceept.</b>
see the Program2 consist of value 'TEXT' & Program3 Consist of 'TABLE' are imported to Memory , And then called in the Program1 to use it from the Memory.
"Program1.PROGRAM SAPMZTS1.
DATA TEXT1(10) VALUE 'Exporting'.
DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
DO 5 TIMES.
ITAB-BOOKID = 100 + SY-INDEX.
APPEND ITAB.
ENDDO.
EXPORT TEXT1
TEXT2 FROM 'Literal'
TO MEMORY ID 'text'.
EXPORT ITAB
TO MEMORY ID 'table'.
SUBMIT SAPMZTS2 AND RETURN.
SUBMIT SAPMZTS3.
"Program2
PROGRAM SAPMZTS2.
DATA: TEXT1(10),
TEXT3 LIKE TEXT1 VALUE 'Initial'.
IMPORT TEXT3 FROM MEMORY ID 'text'.
WRITE: / SY-SUBRC, TEXT3.
IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.
WRITE: / SY-SUBRC, TEXT1.
"Program3
PROGRAM SAPMZTS3.
DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.
LOOP AT JTAB.
WRITE / JTAB-BOOKID.
ENDLOOP.
Message was edited by:
shashi kumar
‎2007 Nov 21 4:54 AM
‎2007 Nov 21 5:02 AM
see i this example.. how the Data is passed from one Program to another Program .
<b>Using the IMPORT & EXPORT Conceept.</b>
see the Program2 consist of value 'TEXT' & Program3 Consist of 'TABLE' are imported to Memory , And then called in the Program1 to use it from the Memory.
"Program1.PROGRAM SAPMZTS1.
DATA TEXT1(10) VALUE 'Exporting'.
DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
DO 5 TIMES.
ITAB-BOOKID = 100 + SY-INDEX.
APPEND ITAB.
ENDDO.
EXPORT TEXT1
TEXT2 FROM 'Literal'
TO MEMORY ID 'text'.
EXPORT ITAB
TO MEMORY ID 'table'.
SUBMIT SAPMZTS2 AND RETURN.
SUBMIT SAPMZTS3.
"Program2
PROGRAM SAPMZTS2.
DATA: TEXT1(10),
TEXT3 LIKE TEXT1 VALUE 'Initial'.
IMPORT TEXT3 FROM MEMORY ID 'text'.
WRITE: / SY-SUBRC, TEXT3.
IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.
WRITE: / SY-SUBRC, TEXT1.
"Program3
PROGRAM SAPMZTS3.
DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.
LOOP AT JTAB.
WRITE / JTAB-BOOKID.
ENDLOOP.
Message was edited by:
shashi kumar
‎2007 Nov 21 5:22 AM
Hi
The HIDE keyword is used to store data objects and their values so they can be made available when the User selects a report line. When a line is selected, the fields that were hidden are filled with the values that you hid for that line.
The user selects a line for which
data has been stored in the HIDE
area. The runtime system evaluates
field SY-LILLI to determine the
selected line.
The runtime system jumps to the
point in the HIDE area where data
for this line is stored.
The runtime system then inserts all
values stored for the selected line in
the HIDE area into their
corresponding fields.
The runtime system processes the
event AT LINE-SELECTION and
its corresponding program
processing block.
A detail list is created.
<b>Reward if usefull</b>
‎2007 Nov 21 6:24 AM
thank you for your guide.
I call a function to do the HIDE and how can i retrive the value according to user response and return to the calling screen.
pls guide.
thanks.