2014 Mar 05 4:28 PM
Hi
I call in loop logical database by FM LDB_PROCESS in different parameters but only first step is return ok
next return error subrc = 1 LDB_NOT_REENTRANT
How to init this calling in second step?
2014 Mar 05 4:30 PM
Hi
Firstly why you are calling the LDB using FM instead mentioned that in Program attributes and call that using GET statement ?
Regards,
Sreeram
2014 Mar 05 5:18 PM
2014 Mar 05 6:16 PM
2014 Mar 06 7:50 AM
2015 Feb 04 5:57 AM
2022 Mar 03 1:58 PM
A necro post, but I've found a solution.
You need to initialize certain function group variables before next LDB_PROCESS call.
FORM ldb_init_ada.
DATA:
lt_fields TYPE STANDARD TABLE OF char40,
ld_fname TYPE char20.
FIELD-SYMBOLS:
<ld_any> TYPE any,
<ld_fld> LIKE LINE OF lt_fields.
DEFINE mac_fld.
concatenate '(SAPLABRA)' &1 into ld_fname.
append ld_fname to lt_fields.
END-OF-DEFINITION.
mac_fld:
'GD_INDEX',
'GD_TFILL',
'GD_ABRA',
'GD_LAST_OBJ',
'GD_ACT',
'GD_SAV',
'GD_OPEN_SUMANEP',
'GD_NEW_TRIGGER',
'GD_COMMIT',
'GD_VORRAT',
'GD_CURSOR',
'GD_CURSOR_SUMANEP',
'GD_SUMANEP_STOP',
'GD_SUMANEP_STOP'.
LOOP AT lt_fields ASSIGNING <ld_fld>.
ASSIGN (<ld_fld>) TO <ld_any>.
CHECK sy-subrc EQ 0.
CLEAR <ld_any>.
ENDLOOP.
ASSIGN ('(SAPLSLDBFREE)BAD_LDBS[]') TO <ld_any>.
CLEAR <ld_any>.
ENDFORM. "ldb_init_ada