2005 Sep 15 2:26 PM
Hi all
My requirement is to read the session data after the session has run.
Reading is done in a difefrent program.
Can any one please help me in how to read it.
Thanks & regards
sree
2005 Sep 15 4:28 PM
Get your TEMSEID MANDANT from APQL table, and call these four function modules in sequence.
DATA: CHARCP LIKE RSTSTYPE-CHARCO VALUE '0000'.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
AUTHORITY = ' '
CLIENT = APQL-MANDANT
NAME = APQL-TEMSEID
IMPORTING
CHARCO = CHARCP
EXCEPTIONS
FB_ERROR = 1
FB_RSTS_OTHER = 2
NO_OBJECT = 3
NO_PERMISSION = 4
OTHERS = 5.
CALL FUNCTION 'RSTS_OPEN_RLC'
EXPORTING
NAME = APQL-TEMSEID
CLIENT = APQL-MANDANT
AUTHORITY = 'BATCH'
PROM = 'I'
RECTYP = 'VNL----'
CHARCO = CHARCP
EXCEPTIONS
FB_CALL_HANDLE = 4
FB_ERROR = 8
FB_RSTS_NOCONV = 12
FB_RSTS_OTHER = 16
NO_OBJECT = 20
OTHERS = 24.
IF SY-SUBRC > 0.
EXIT.
ENDIF.
CALL FUNCTION 'RSTS_READ'
TABLES
DATATAB = LOG_TABLE
EXCEPTIONS
FB_CALL_HANDLE = 4
FB_ERROR = 8
FB_RSTS_NOCONV = 12
FB_RSTS_OTHER = 16
OTHERS = 16.
IF SY-SUBRC > 0.
EXIT.
ENDIF.
CALL FUNCTION 'RSTS_CLOSE'
EXCEPTIONS
OTHERS = 4.
LOG_TABLE will contain the log you want.
Srinivas
PS: This is what RSBDCLOG does.
Hi all
My requirement is to read the session data after the session has run.
Reading is done in a difefrent program.
Can any one please help me in how to read it.
Thanks & regards
sree
2005 Sep 15 2:47 PM
Hi
can you give more details . Are you trying to read BDC sessions data or ???
Cheers
2005 Sep 15 3:45 PM
Hi friends,
I have got a requirement to capture created Scheduling Agreement Number(SAN) after processing the session in SM35.
I have to use this number to pass as parameter in another program.
Is there any Function Module to read the Session Log to know the created SAN.
thanks
sree
2005 Sep 15 2:57 PM
Sree - if it's batch input session logs that you're after, look at program RSBDCLOG. It reads tables BDCMH, BDCTH, T100, APQD, APQI, D0220 and D0300.
Rob
2005 Sep 15 3:56 PM
Hi
Use CAll TRANSACTION instead of session method .
You will get the Req No. in BDCMSGCALL in MSGV1/2/3/4 .
Call transaction always returns success message like
"Pur Req XXXXXX Created " .
From SM35 also you can get it but you may need to know the session name . Check Session Log.
Cheers
2005 Sep 15 4:28 PM
Get your TEMSEID MANDANT from APQL table, and call these four function modules in sequence.
DATA: CHARCP LIKE RSTSTYPE-CHARCO VALUE '0000'.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
AUTHORITY = ' '
CLIENT = APQL-MANDANT
NAME = APQL-TEMSEID
IMPORTING
CHARCO = CHARCP
EXCEPTIONS
FB_ERROR = 1
FB_RSTS_OTHER = 2
NO_OBJECT = 3
NO_PERMISSION = 4
OTHERS = 5.
CALL FUNCTION 'RSTS_OPEN_RLC'
EXPORTING
NAME = APQL-TEMSEID
CLIENT = APQL-MANDANT
AUTHORITY = 'BATCH'
PROM = 'I'
RECTYP = 'VNL----'
CHARCO = CHARCP
EXCEPTIONS
FB_CALL_HANDLE = 4
FB_ERROR = 8
FB_RSTS_NOCONV = 12
FB_RSTS_OTHER = 16
NO_OBJECT = 20
OTHERS = 24.
IF SY-SUBRC > 0.
EXIT.
ENDIF.
CALL FUNCTION 'RSTS_READ'
TABLES
DATATAB = LOG_TABLE
EXCEPTIONS
FB_CALL_HANDLE = 4
FB_ERROR = 8
FB_RSTS_NOCONV = 12
FB_RSTS_OTHER = 16
OTHERS = 16.
IF SY-SUBRC > 0.
EXIT.
ENDIF.
CALL FUNCTION 'RSTS_CLOSE'
EXCEPTIONS
OTHERS = 4.
LOG_TABLE will contain the log you want.
Srinivas
PS: This is what RSBDCLOG does.
2005 Sep 15 5:21 PM
Hi srininvas,
Thank you very much.
One doubt, how should i declare log_table.
regards
sree
2005 Sep 15 5:34 PM
Hi Srinivas
i got teh short dump in function module
'RSTS_OPEN_RLC.
EXPORTING
NAME = APQL-TEMSEID
CLIENT = APQL-MANDANT
AUTHORITY = 'BATCH'
PROM = 'I'
RECTYP = 'VNL----'
CHARCO = CHARCP.
Hi can you explain the parameters authority, PROM, RECTYP and CHARCP.
thanks & regards
sree
2005 Sep 15 5:47 PM
log_table is defined as follows
DATA: BEGIN OF LOGTABLE OCCURS 50, " plain log information
ENTERDATE LIKE BTCTLE-ENTERDATE,
ENTERTIME LIKE BTCTLE-ENTERTIME,
LOGMESSAGE(400) TYPE C,
END OF LOGTABLE.
2005 Sep 15 5:47 PM
2005 Sep 15 11:52 PM
If these answers helped you, please reward and close the post.
Thanks,
Srinivas
2005 Oct 04 2:20 PM
Srinivas, Is it possible to identify my BDC inputs (key fields that I provide on screen) during failed BDC transaction from the Session Log programmatically?
2009 Jan 11 7:05 AM
Dear Srinivas,
I have done exactly what you have mentioned in this form to get the data on the screen ( what is there in sm35) , but iam not getting the exactly what is there in sm35 . I have used the four function modules which you have explained and i have found the internal table logtable which i found is not fullfilling my requirement .
Please could you help me.
regards
divya.
2009 Jan 11 7:03 AM
Hi Sree,
AS i found that you are displaying the SM35 success or failure messages as display after your report is executed i have same rquirement , if you have th code can you please send iam not able to get the data using the below function module said in the form.
regards
divya.
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |