Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
Showing results for 
Search instead for 
Did you mean: 

FM : RSTS_OPEN_RLC is errored out

Former Member
0 Kudos

Hi Experts,

I am making use of the FM: RSTS_OPEN_RLC... but one of the parameter 'NAME' is empty as i dont have data in the table APQL.

So what are the other inputs to this func module?

I need to find out the TEMSE id field. pls help




Former Member
0 Kudos

Hi Dan,

What u r trying to achieve. you could use FM RSPO_GET_TEMSEOBJ_OF_REQUEST to get object name.

Check this program RSTS0019.

hope that helps.


0 Kudos

Hi All,

Thanks for the replies.

I am trying to report the errors in the session onto my report.So i have to make use of FM:RSTS_OPEN_RLC , RSTS_READ..etc.

Please help .


0 Kudos

Dear Experts,

I am doing a BDC using session method and submitting the session using RSBDCSUB. Now i want to output details of error & succesul session onto a report<b> (without going to SM35 )</b> using FMs RSTS_OPEN_RLC FM RSTS_READ..etc.

the APQL table is also empty so i could not get th input param NAME for a "temse" object.

Please tell me how to do this?

Active Contributor
0 Kudos


I hope this made may clear ur doubt:

Types: Begin of joblogs, " Job log w/a

DDate(10) type c, " Display date

DTime(8) type c, " Display time

Mart like bdclm-mart, " Message type

mid like bdclm-mid, " Message ID

mnr like bdclm-mnr, " Number

Text(90) type c, " Message text

End of joblogs.

End of joblogs,

  • Tree structure for reporting results from N006 and N015.

Begin of program_results,

Progm like trdir-name, " Program name

Versn type Zversion, " Version No - 006

CostCtr type C, " Cost centre flag

Batch like apqi-groupid, " Batch flag

File type string, " Output file for GUI

PFile like rlgrap-filename, " Output file Print

Result type boolean, " OK or not ok

Msg(255) type c, " Error message

List type ABAPLIST Occurs 0, " Listing Results

jobname like tbtcjob-jobname, " Job name for batch

TemSeId like apql-TemSeId, " TemseId for job log

JobLog type joblogs Occurs 0,

End of Program_Results.

Data: g_Results type Program_Results occurs 0.





  • Get the batch logs,

Perform Get_log tables g_results-joblog

using g_results-TemSeId.

  • Find any 'E' or 'A' class messages.

Loop at g_results-joblog into g_joblog.

If g_joblog-Mart = c_error

or g_joblog-Mart = c_abort.

If g_results-msg <> ''.

Append g_results to t_results.






  • Procedure: Get_Log

  • Purpose: Gets the log for a selected job.

  • NOTE: BP_JOBLOG_READ returns the wrong log -

  • that just shows job start, running and end.

  • Entry: TemSeId of job log.

  • Exit: Table of expanded text messages

  • Called By:

  • Calls:

  • Modification History:

  • Date Reason Version Who

Form Get_Log Tables t_joblog

using pu_TemSeId like Apql-TemSeId.

Data: Begin Of t_logtable Occurs 50, " Plain Log Info In Temse

Enterdate Like Btctle-Enterdate,

Entertime Like Btctle-Entertime,

Logmessage(400) Type C,

End Of t_logtable,

Begin Of t_bdclm Occurs 0. " Log message Structure

Include Structure bdclm.

Data: Counter Type I,

Longtext Type Bdc_Mpar,

End Of t_bdclm,

w_joblog type JobLogs,

w_External_Date(10), " Display date

w_Internal_Date Type D,

W_Msgv1 Like T100-Text, " Message variables 1,2,3

W_Msgv2 Like T100-Text,

W_Msgv3 Like T100-Text,

W_Msgv4 Like T100-Text, " and 4

W_Mlen Type I, " Current message v length

W_Subscr(1) Type N, " Current message variable

W_Varname(7) Type C. " Message variable name

Field-Symbols: <F_Field>. " Pointer to current msgv

  • Open the log, read it and then close it.

<b>Call Function 'RSTS_OPEN_RLC'


Name = pu_temSeId

Client = sy-mandt

Authority = 'Batch'

Prom = 'I'

Rectyp = 'VNL----'


Fb_Call_Handle = 4

Fb_Error = 8

Fb_Rsts_Noconv = 12

Fb_Rsts_Other = 16

No_Object = 20

Others = 24.</b> If sy-subrc = 0.

Call Function 'RSTS_READ'


Datatab = t_logtable


Fb_Call_Handle = 4

Fb_Error = 8

Fb_Rsts_Noconv = 12

Fb_Rsts_Other = 16

Others = 16.

If sy-subrc = 0.

Call Function 'RSTS_CLOSE'


Others = 0.

  • The log messages are held as t100 messages with the message

  • variables in a single string.

Clear t_bdclm[].

Loop At t_logtable.

  • Get a displayable version of the date. If there's

  • a problem, don't display this record.


Id 'DATINT' Field t_logtable-Enterdate

Id 'DATEXT' Field w_External_Date.


Id 'DATEXT' Field w_External_Date

Id 'DATINT' Field w_Internal_Date.

If Sy-Subrc Ne 0.



Clear t_bdclm.

t_bdclm-Indate = t_logtable-Enterdate.

t_bdclm-Intime = t_logtable-Entertime.

t_bdclm+14 = t_logtable-Logmessage.

Append t_bdclm.


  • Decode the messages in t_bdclm inserting the variable parts

  • of the message.

Loop At t_bdclm.

Clear: W_Msgv1,




  • Any variable parts in this message ?

If t_bdclm-Mparcnt > 0. "#EC PORTABLE

  • Message variables in MPar are held in a single

  • string. Two bytes precede each variable with the

  • variable length.


  • Get the current variable length and remove that

  • from the start of the string.

Move t_bdclm-Mpar+0(2) To W_Mlen.

Move t_bdclm-Mpar+2 To t_bdclm-Mpar.

  • Calculate the message variable this is for

Move Sy-Index To W_Subscr.

Concatenate 'W_Msgv' W_Subscr Into W_Varname.

Assign (W_Varname) To <F_Field>.

  • Move the variable to the correct message var and

  • check if there are any more variable parts to

  • process.

Move t_bdclm-Mpar+0(W_Mlen) To <F_Field>.

Move t_bdclm-Mpar+W_Mlen To t_bdclm-Mpar.

If Sy-Index >= t_bdclm-Mparcnt. "#EC PORTABLE





  • Finally build the complete message and place it in the

  • output table.

Clear w_joblog.

Move-corresponding t_bdclm to w_joblog.

Move w_external_date to w_joblog-ddate.



Msgid = t_bdclm-Mid

Msgnr = t_bdclm-Mnr

Msgv1 = W_Msgv1

Msgv2 = W_Msgv2

Msgv3 = W_Msgv3

Msgv4 = W_Msgv4


Message_Text_Output = W_joblog-text.

Append w_joblog to t_joblog.





Pls reward points.