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

Error while fetching data from Logical data base

Former Member
0 Likes
637

Hi All,

I need to fetch the data from Logical data base DDF.First when i am trying demo code

REPORT demo_program_read_tables_2.

NODES: spfli, sflight.

GET spfli FIELDS carrid connid cityfrom cityto.

WRITE: / spfli-carrid,

spfli-connid,

spfli-cityfrom,

spfli-cityto.

GET sflight FIELDS fldate.

WRITE: / sflight-fldate.

I am getting error like ""spfli is not a node of the logical data base __S""

Should i declare anything esle?

Madhu

4 REPLIES 4
Read only

Former Member
0 Likes
582

REPORT demo_logical_database.

DATA wa_spfli TYPE spfli.

SELECT-OPTIONS s_carr FOR wa_spfli-carrid.

DATA: callback TYPE TABLE OF ldbcb,

callback_wa LIKE LINE OF callback.

DATA: seltab TYPE TABLE OF rsparams,

seltab_wa LIKE LINE OF seltab.

callback_wa-ldbnode = 'SPFLI'.

callback_wa-get = 'X'.

callback_wa-get_late = 'X'.

callback_wa-cb_prog = sy-repid.

callback_wa-cb_form = 'CALLBACK_SPFLI'.

APPEND callback_wa TO callback.

CLEAR callback_wa.

callback_wa-ldbnode = 'SFLIGHT'.

callback_wa-get = 'X'.

callback_wa-cb_prog = sy-repid.

callback_wa-cb_form = 'CALLBACK_SFLIGHT'.

APPEND callback_wa TO callback.

seltab_wa-kind = 'S'.

seltab_wa-selname = 'CARRID'.

LOOP AT s_carr.

MOVE-CORRESPONDING s_carr TO seltab_wa.

APPEND seltab_wa TO seltab.

ENDLOOP.

CALL FUNCTION 'LDB_PROCESS'

EXPORTING

ldbname = 'F1S'

variant = ' '

TABLES

callback = callback

selections = seltab

EXCEPTIONS

ldb_not_reentrant = 1

ldb_incorrect = 2

ldb_already_running = 3

ldb_error = 4

ldb_selections_error = 5

ldb_selections_not_accepted = 6

variant_not_existent = 7

variant_obsolete = 8

variant_error = 9

free_selections_error = 10

callback_no_event = 11

callback_node_duplicate = 12

OTHERS = 13.

IF sy-subrc <> 0.

WRITE: 'Exception with SY-SUBRC', sy-subrc.

ENDIF.

FORM callback_spfli USING name TYPE ldbn-ldbnode

wa TYPE spfli

evt TYPE c

check TYPE c.

CASE evt.

WHEN 'G'.

WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.

ULINE.

WHEN 'L'.

ULINE.

ENDCASE.

ENDFORM.

FORM callback_sflight USING name TYPE ldbn-ldbnode

wa TYPE sflight

evt TYPE c

check TYPE c.

WRITE: / wa-fldate, wa-seatsocc, wa-seatsmax.

ENDFORM.

Read only

shishupalreddy
Active Contributor
0 Likes
582

Hello ,

Please check the avaialble nodes in DDF , I could nt see SPFLI as a node defined inthat .

Check in SE36 tcode and write u r code for those nodes only accordingly ..

regards

Read only

0 Likes
582

Hi..

in DDF LDB kna1 ...are the nodes ..SPFLI is my demo program nodes.

I need to write program with out using FM LDB_Process.

1.How to declare a Logical data base for DDF

2.Hot to declare a node for KNA1

3.How to get data from them..

in the report program?

Because when iam giving NODE : KNA1 ..iam getting error. KNA1 is not a node of the logical data base __S

I have search in forum but i am confused and not got the result.

Madhu

Read only

Former Member
0 Likes
582

i got the solution..