2014 Oct 08 12:45 PM
Hi,
The below works in a test program but when used in a user-exit i get the message'
import is not support in oo context. Use import .....
Does anybody know what the new syntax needs to be?
TYPES:
BEGIN OF t_text,
line(72),
END OF t_text.
DATA:
ptext TYPE STANDARD TABLE OF t_text INITIAL SIZE 10,
gw_text TYPE t_text,
gw_key TYPE pskey.
MOVE-CORRESPONDING innnn TO gw_key.
IMPORT ptext FROM DATABASE pcl1(tx) ID gw_key.
LOOP AT ptext INTO gw_text.
WRITE / gw_text-line .
ENDLOOP.
2014 Oct 08 4:11 PM
Here:
TYPES: BEGIN OF t_text,
line(72),
END OF t_text.
DATA:
ptext TYPE STANDARD TABLE OF t_text INITIAL SIZE 10,
gw_text TYPE t_text,
gw_key TYPE pskey.
DATA: gpcl TYPE pcl1.
IMPORT t_text = ptext FROM DATABASE pcl1(tx) TO gpcl ID gw_key.
LOOP AT ptext INTO gw_text.
WRITE / gw_text-line .
ENDLOOP.
2014 Oct 08 3:45 PM
I prefer declaring a global class, and a table as a static public property in the class.
If you use that Global static component and populate some value to it, through out the execution the value will be there. So you can ignore the export memory id statement. and use a static component.
2014 Oct 08 4:11 PM
Here:
TYPES: BEGIN OF t_text,
line(72),
END OF t_text.
DATA:
ptext TYPE STANDARD TABLE OF t_text INITIAL SIZE 10,
gw_text TYPE t_text,
gw_key TYPE pskey.
DATA: gpcl TYPE pcl1.
IMPORT t_text = ptext FROM DATABASE pcl1(tx) TO gpcl ID gw_key.
LOOP AT ptext INTO gw_text.
WRITE / gw_text-line .
ENDLOOP.
2014 Oct 08 4:23 PM
Thanks Glen, thats what I needed. Unfortunately it's coming back empty though
2014 Oct 09 8:01 AM
Have you got the correct corresponding EXPORT statement? for eg: EXPORT t_text = ptext TO DATABASE pcl1(tx) FROM gpcl ID gw_key.
2014 Oct 08 5:54 PM
Hello,
Declare a global vairbale / workarea in the zztop include and you can use this variable across the function group.
Regards,
Nagaraj