Skip to Content

Starting SM35 Session

Hi,

I have two queries regarding bdc session method.

1.Is there is any function module / report to start the

session by providing the session name.

2.Is there is any function module / reprot to retrieve

status of the session and log.

Looking for your help for the above...queries..

Thanks and Regards,

K Vijayasekar.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Dec 04, 2004 at 04:30 PM

    Hi Vijayasekar

    The FM <b>"BDC_OPEN_GROUP"</b> gives an queue id to the batch session through the parameter <b>"qid"</b>.

    Using this parameter you can start batch sessions by submitting the program <b>"rsbdcbtc"</b>.

    <u><b>e.g.</b></u>

    ...
    CALL FUNCTION 'BDC_OPEN_GROUP'
    ...
      EXPORTING
        qid <queue_id>
    ...
    ...
    SUBMIT rsbdcbtc WITH queue-id EQ <queue_id> [AND RETURN] .

    <u>For your second question</u>, you may utilize the FM <b>"SHOW_JOBSTATE"</b> after knowing the background job name for the batch session.

    Hope this helps...

    *--Serdar

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Vijayasekar

      You had 2 questions and I believe my previous post solves your first question.

      <u>For your second question</u>, sorry but I've misremember something since I have not a connection to SAP system then to check.

      Now, there are no functions to give you the state of a batch input session. However, batch input sessions are stored at the transparent table <b>"APQI"</b>. Hence, you can write a select statement using the <b>"queue_id"</b> (retrieval of this id was explained in my previous post) as a key to retrieve the status data.

      <u><b>e.g.</b></u>

      DATA lv_qstate LIKE apqi-qstate .
      SELECT qstate FROM APQI
             INTO lv_qstate
             WHERE qid = <queue_id> .
      
      CASE lv_qstate .
          WHEN 'P'.
      *-- Job is at "PRELIMINARY" state
          WHEN 'S'.
      *-- Job is at "SCHEDULED" state
          WHEN 'Y'.
      *-- Job is at "READY" state
          WHEN 'R'.
      *-- Job is at "RUNNING" state
          WHEN 'F'.
      *-- Job is at "FINISHED" state
          WHEN 'A'.
      *-- Job is at "ABORTED" state
      ENDCASE .

      The state codes are for jobs, but I guess they will be same for batch inputs and some of them may be obsolote for batch inputs.

      Kind regards...

      *--Serdar

  • Posted on Dec 06, 2004 at 07:41 AM

    Vijayasekar,

    -> make select from apqi

    here's the description of the state:

    ` ': No status / New

    C: Queue will be created

    F: Queue has been finished

    E: Queue error

    Andreas

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Vijay

      Would you like to assign points to posts which helped you solve your problem?

      You can assign points to posts by clicking the yellow star icon at header of each post. You can assign;

      - one 10 points (solved)

      - two 6 points (very helpful answer)

      - many two points (helpful answer)

      Regards...

      *--Serdar

  • author's profile photo Former Member
    Former Member
    Posted on Dec 07, 2004 at 04:40 PM

    Hi,

    if you want to start a BI-Session from your programm and wait until it ends you may try this:

    search the Id of the session:

    SELECT * FROM APQI WHERE GROUPID EQ MAPPENAM AND

    CREATOR = USER AND QSTATE = .... AND ....

    then

    SUBMIT RSBDCBTC WITH QUEUE-ID EQ APQI-QID AND RETURN.

    Viktor

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.