Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

IMPORT FROM DATABASE doesn't work in Web Dynpro

fabian_nelis
Explorer
0 Likes
858

Hi all, I want to use the code at the bottom to get the last packages visited by a user I specify.

But I'm getting this error:

IMPORT var_1 ... var_N FROM DATABASE is not supported in the OO

context. Use IMPORT name_1 TO var_1 ... name_n TO var_n FROM DATABASE

... instead. var_n DATABSE ... insted var_n FROM DATABASE.

Could someone please show me how I can resolve this?

-


TYPES : BEGIN OF ty_key,

uname TYPE euf4values-uname,

object TYPE euf4values-object,

END OF ty_key.

TYPES : BEGIN OF ty_value_table, " Last F4 Values

obj_name TYPE tadir-obj_name,

encl_object TYPE tadir-obj_name,

position TYPE i,

END OF ty_value_table.

DATA : gs_key TYPE ty_key,

f4_last_values TYPE TABLE OF ty_value_table,

gs_value_table TYPE ty_value_table.

gs_key-uname = item_user.

gs_key-object = 'K'.

IMPORT f4_last_values FROM DATABASE euf4values(eu) ID gs_key.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
794

Did you check the online documentation ? [http://help.sap.com/abapdocu_70/en/ABAPIMPORT_MEDIUM.htm#&ABAP_ALTERNATIVE_4@4@]

I see your code has differences from the example provided in the standard documentation.

Hi all, I want to use the code at the bottom to get the last packages visited by a user I specify.

But I'm getting this error:

IMPORT var_1 ... var_N FROM DATABASE is not supported in the OO

context. Use IMPORT name_1 TO var_1 ... name_n TO var_n FROM DATABASE

... instead. var_n DATABSE ... insted var_n FROM DATABASE.

Could someone please show me how I can resolve this?

-


TYPES : BEGIN OF ty_key,

uname TYPE euf4values-uname,

object TYPE euf4values-object,

END OF ty_key.

TYPES : BEGIN OF ty_value_table, " Last F4 Values

obj_name TYPE tadir-obj_name,

encl_object TYPE tadir-obj_name,

position TYPE i,

END OF ty_value_table.

DATA : gs_key TYPE ty_key,

f4_last_values TYPE TABLE OF ty_value_table,

gs_value_table TYPE ty_value_table.

gs_key-uname = item_user.

gs_key-object = 'K'.

IMPORT f4_last_values FROM DATABASE euf4values(eu) ID gs_key.

4 REPLIES 4
Read only

guillaume-hrc
Active Contributor
0 Likes
794

Hi,

Did you try coding your IMPORT... code in a subroutine within a program and call this subroutine from yuour Web Dynpro ABAP application ?

Best regards,

Guillaume

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
795

Did you check the online documentation ? [http://help.sap.com/abapdocu_70/en/ABAPIMPORT_MEDIUM.htm#&ABAP_ALTERNATIVE_4@4@]

I see your code has differences from the example provided in the standard documentation.

Read only

0 Likes
794

Thnx, my problem is solved

Read only

Former Member
0 Likes
794

Hi,

how did you resolved that problem, because i have the same probleme.