Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BAPI_XMI_LOGON and furtther processing via Webserviceses (SOAP)

I'm trying to get a list with all planned and running background jobs from SAP over a webservice call. As per the documentation, we are opening RFC connection and then calling function module(BAPI).

First I call BAPI_XMI_LOGON with the following settings:

<EXTCOMPANY>Company</EXTCOMPANY>

<EXTPRODUCT>Backgroundjobs</EXTPRODUCT>

<INTERFACE>XBP</INTERFACE>

<VERSION>1.0</VERSION>

I get a response like this:

<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Body>

<urn:BAPI_XMI_LOGON.Response xmlns:urn="urn:sap-com:document:sap:rfc:functions">

<RETURN>

<TYPE/>

<ID/>

<NUMBER>000</NUMBER>

<MESSAGE/>

<LOG_NO/>

<LOG_MSG_NO>000000</LOG_MSG_NO>

<MESSAGE_V1/>

<MESSAGE_V2/>

<MESSAGE_V3/>

<MESSAGE_V4/>

<PARAMETER/>

<ROW>0</ROW>

<FIELD/>

<SYSTEM/>

</RETURN>

<SESSIONID>0A620415752D49E47B93129B</SESSIONID>

</urn:BAPI_XMI_LOGON.Response>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

After this I try to request the Joblist

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:rfc:functions">

<soapenv:Header/>

<soapenv:Body>

<urn:BAPI_XBP_JOB_JOBLOG_READ>

<EXTERNAL_USER_NAME>*</EXTERNAL_USER_NAME>

<JOBCOUNT>*</JOBCOUNT>

<JOBNAME>*</JOBNAME>

</urn:BAPI_XBP_JOB_JOBLOG_READ>

</soapenv:Body>

</soapenv:Envelope>

But it ends in an error like this:

<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

<SOAP-ENV:Body>

<urn:BAPI_XBP_JOB_JOBLOG_READ.Response xmlns:urn="urn:sap-com:document:sap:rfc:functions">

<RETURN>

<TYPE>E</TYPE>

<ID>XM</ID>

<NUMBER>028</NUMBER>

<MESSAGE>Not logged on in interface XBP (function BAPI_XBP_JOB_JOBLOG_READ)</MESSAGE>

<LOG_NO/>

<LOG_MSG_NO>000000</LOG_MSG_NO>

<MESSAGE_V1>BAPI_XBP_JOB_JOBLOG_READ</MESSAGE_V1>

<MESSAGE_V2>XBP</MESSAGE_V2>

<MESSAGE_V3/>

<MESSAGE_V4/>

<PARAMETER/>

<ROW>0</ROW>

<FIELD/>

<SYSTEM>DB1CLNT001</SYSTEM>

</RETURN>

</urn:BAPI_XBP_JOB_JOBLOG_READ.Response>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

How can i pass the sessionid to the JOBLOG_READ function?

Former Member
Not what you were looking for? View more on this topic or Ask a question