06-15-2006 3:53 PM
Hi,
I have an RFC function module that call firstly to the BAPI_ENTRYSHEET_CREATE and then calls to the BAPI_INCOMINGINVOICE_CREATE.
I am getting the M8(607) error code Error in sobroutine frseg_fill read tab_esll estructure.
I have tried put a BAPI_TRANSACTION_COMMIT between both of the function modules. even I have tried to check if some entries have been added to tables essr and essl before processing the invoice creation.
If I put a delay, it works fine.
Anybody know how I can avoid this error, what I have to check, before call to the invoice creation.
Thanks for your attention.
BR
06-15-2006 4:02 PM
Hi Jorge,
Make a call to the FM MS_READ_ENTRY_SHEET in an indefinite loop and if it is successful, then only call the second bapi.
do.
call function 'MS_READ_ENTRY_SHEET'
if sy-subrc = 0.
exit.
endif.
enddo.
call function 'BAPI_INCOMINGINVOICE_CREATE'
alternatively you can check the table
ESLL if an entry exists for the package number
Regards,
Ravi
06-15-2006 4:52 PM
Hi Ravi,thanks for your response,
it sounds well, but it didn't work or maybe I did something in a wrong way.
I added in the source code the next call.
But I get the same error.
any other idea??
Thanks again
do.
CALL FUNCTION 'MS_READ_ENTRY_SHEET'
EXPORTING
i_lblni = entrysheet
I_WITH_ACCOUNTS = 'X'
I_WITH_ESKL = 'X'
I_WITH_ESLL = 'X'
I_EXISTENCE_CHECK = 'X'
.
if sy-subrc = 0.
exit.
endif.
enddo.
06-15-2006 5:01 PM
Instead of checking for SY_SUBRC check for one of the return parameters. As SY_SUBRC would be 0 even if the entry sheet details are not found.
Regards,
Ravi