Application Development 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: 

IMPORT FROM DATABASE doesn't work in Web Dynpro

fabian_nelis
Explorer
0 Kudos

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

SuhaSaha
Advisor
Advisor
0 Kudos

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.

4 REPLIES 4

guillaume-hrc
Active Contributor
0 Kudos

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

SuhaSaha
Advisor
Advisor
0 Kudos

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.

0 Kudos

Thnx, my problem is solved

Former Member
0 Kudos

Hi,

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