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

Problem in Logical Databse Call via Function Module - Urgent

aaruljothi
Participant
0 Likes
611

Hi Experts,

To use the Logical Database(LDB) in the function module(Custom) I am using the function module - LDB_PROCESS. But I didn't get any output. I am attaching the code. Please Help me in this.

DATA : W_LDBNAME LIKE TRDIR-LDBNAME.

DATA : IT_CALLBACK LIKE TABLE OF LDBCB WITH HEADER LINE,

IT_SELECTIONS LIKE TABLE OF RSPARAMS WITH HEADER LINE,

IT_PERNR TYPE TABLE OF PERNR WITH HEADER LINE.

MOVE 'PNP' TO W_LDBNAME.

IT_CALLBACK-LDBNODE = 'PERNR'.

IT_CALLBACK-GET = 'X'.

IT_CALLBACK-CB_PROG = SY-CPROG.

IT_CALLBACK-CB_FORM = 'CALLBACK_PERNR'.

APPEND IT_CALLBACK.

CLEAR IT_CALLBACK.

IT_SELECTIONS-KIND = 'S'.

IT_SELECTIONS-SELNAME = 'PNPPERNR'.

IT_SELECTIONS-SIGN = 'I'.

IT_SELECTIONS-OPTION = 'EQ'.

IT_SELECTIONS-LOW = '100178'.

APPEND IT_SELECTIONS.

CLEAR IT_SELECTIONS.

CALL FUNCTION 'LDB_PROCESS'

EXPORTING

LDBNAME = W_LDBNAME

  • VARIANT =

  • EXPRESSIONS =

  • FIELD_SELECTION =

  • DYN_NODE_TYPES =

TABLES

CALLBACK = IT_CALLBACK

  • SELECTIONS = IT_SELECTIONS

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.

IF SY-SUBRC <> 0.

MESSAGE I039(ZABA) WITH SY-SUBRC.

ENDIF.

LOOP AT IT_PERNR.

message i039(zaba) with 'Inside loop'.

WRITE : / IT_PERNR-PERNR, IT_PERNR-BUKRS.

ENDLOOP.

&----


*& Form CALLBACK_PERNR

&----


  • text

----


  • -->L_LDBNAME text

  • -->L_IT_PAYROLL text

  • -->TYPE text

  • -->PAY99_REULT text

  • -->L_EVT text

  • -->L_CHK text

----


FORM CALLBACK_PERNR USING L_LDBNAME LIKE TRDIR-LDBNAME

L_IT_PERNR LIKE PERNR

L_EVT type C

L_CHK type C.

message i039(zaba) with 'Inside Callback'.

WRITE : / L_IT_PERNR-PERNR,

L_IT_PERNR-BUKRS.

MOVE-CORRESPONDING L_IT_PERNR TO IT_PERNR.

APPEND IT_PERNR.

CLEAR IT_PERNR.

ENDFORM. "CALLBACK_PERNR

Thanks in advance

Arul Jothi.

3 REPLIES 3
Read only

Former Member
0 Likes
577

hi,

i guess the statement "* SELECTIONS = IT_SELECTIONS"

is commented in the code ....uncomment that statement and i think u may get the output

Thanks,

Aditya

Read only

Former Member
0 Likes
577

Hi Jyothi,

I think adithya is right b'coz we have to pass the values for the selection screen after executing that with out that we may not get the data.so check it out whether it works or not .

Regards,

<i><b>Sri</b></i>

Read only

0 Likes
577

Hi,

I think Arul commented the 'it_selections' while trying out.. I couldn't get the fm work for PNP.. it worked fine with the FI LDBs.. just didn't seem to like the PNP..

Regards,

Suresh Datti