‎2007 Apr 02 5:30 PM
HI,
I want to learn the usages of LDB_PROCESS
Iam using 2 logical database in report.
one in attributes and other one is in LDB_PROCESS
getting output in 2 blocks But i don't want like blocks.
hope u understood my requirement.
can any one plz post the sample code for my requirement .
like<b> vbeln, posnr, matnr</b>(for one logical database)
<b>Maktx</b> (from other Logial database, Related info)
Thanx in Advance
Santhosh reddy
‎2007 Apr 02 5:47 PM
>>getting output in 2 blocks But i don't want like blocks.
I guess your callback routines in both the function calls to LDB_PORCESS have WRITE statements. Instead, export the data using the EXPORT to MEMORY option. At the end of the secoond function call, use the statement IMPORT from MEMEORY & then manipulate the data to write it out to a list in whatever format you like.
~Suresh
‎2007 Apr 02 5:47 PM
>>getting output in 2 blocks But i don't want like blocks.
I guess your callback routines in both the function calls to LDB_PORCESS have WRITE statements. Instead, export the data using the EXPORT to MEMORY option. At the end of the secoond function call, use the statement IMPORT from MEMEORY & then manipulate the data to write it out to a list in whatever format you like.
~Suresh
‎2007 Apr 03 4:38 AM
hi suresh, thanq for reply.
iam trying to pass the data to final internal table for both the function calls.
but not getting appropriate output from second ldb.
for getting data from second ldb iam using READ TABLE.
will this method help out.
can u post the example code for this.
any inputs..
regards.
santhosh reddy
‎2007 Apr 03 4:43 AM
I dint go thru the entire explantion but i have some sample code and i have pasted it below:
create CALLBACK:
lt_callback-ldbnode = i_ldbnode.
lt_callback-get = i_callback_get.
lt_callback-get_late = i_callback_get_late.
lt_callback-cb_prog = i_callback_prog.
lt_callback-cb_form = i_callback_form.
APPEND lt_callback.
CLEAR lt_callback.
CALL FUNCTION 'LDB_PROCESS'
EXPORTING
ldbname = i_ldbname
VARIANT =
EXPRESSIONS =
field_selection = lt_fields_sorted
DYN_NODE_TYPES =
TABLES
callback = lt_callback
selections = lt_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
callback_no_program = 13
callback_no_cbform = 14
dyn_node_no_type = 15
dyn_node_invalid_type = 16
OTHERS = 17.
Callback form
FORM callback_form "#EC CALLED
USING name TYPE ldbn-ldbnode
workarea TYPE fti_ldb_tr_positions
mode TYPE c
selected TYPE c.
MOVE-CORRESPONDING workarea TO g_wrk_ldb_result.
APPEND g_wrk_ldb_result TO g_tab_ldb_result[].
ENDFORM.