Skip to Content
author's profile photo Former Member
Former Member

Identifying Programs using BDC.

Hi Experts,

I have a peculiar requirement. i have a list of programs. I have to develop a logic which will help me identify those programs using BDC (using batch input session or Call transaction). I also have to identify the transactions called using the batch input session or Call transaction.

For example:

1) I have a program using CALL TRANSACTION 'abc' USING BDCDATA

MODE CTUMODE

UPDATE CUPDATE

MESSAGES INTO MESSTAB.

I have to extract the program name and 'abc' in a file.

kindly provide solutions.

Thanks

Edited by: Sadhna Achhra on Dec 22, 2008 7:58 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 08:22 AM

    Hi use SHDB transactiob for recording program. In that program you give your transaction.

    In recording program you will get all the Transactions and tables .

    Thanks & regards

    Nagamani Challa

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Sadhna,

      I just written a small program (with reference to standard progs) that u might use. please see if you can use the following codes and adapt it for your purpose:

      logic:

      - i have retrieved all includes associated to the program in selection screen

      - scan each program where call transaction has been used

      - get the transaction being called and display it on screen

      PARAMETERS:p_prog TYPE trdir-name.

      DATA: BEGIN OF i_int_abap OCCURS 0, " Internal table for storing ABAP

      line(256) TYPE c,

      END OF i_int_abap.

      DATA: BEGIN OF i_int_inc OCCURS 0, " Table to Store Includes Name

      include LIKE sy-repid,

      END OF i_int_inc.

      DATA:v_prog TYPE trdir-name ,

      v_tcode TYPE sy-tcode,

      v_dummmy TYPE c.

      CONSTANTS:c_true TYPE c VALUE 'X'.

      CLEAR v_prog.

      v_prog = p_prog.

      CALL FUNCTION 'RS_GET_ALL_INCLUDES' "This will get all includes related to the program

      EXPORTING

      program = v_prog

      with_inactive_incls = c_true

      TABLES

      includetab = i_int_inc

      EXCEPTIONS

      not_existent = 1

      no_program = 2

      OTHERS = 3.

      IF sy-subrc = 0.

      CLEAR i_int_inc.

      i_int_inc-include = p_prog.

      INSERT i_int_inc INDEX 1.

      CLEAR i_int_inc.

      LOOP AT i_int_inc. " loop at all programs/include and check for call transaction

      CLEAR v_prog.

      v_prog = i_int_inc-include.

      READ REPORT v_prog INTO i_int_abap.

      LOOP AT i_int_abap WHERE line(1) <> '*'

      AND LINE CS 'CALL TRANSACTION '.

      SPLIT i_int_abap-line AT text-001 INTO v_dummmy v_tcode. "text-001 stores '

      SPLIT v_tcode AT text-001 INTO v_tcode v_dummmy. "text-001 stores '

      WRITE : / 'Call transaction to :' , v_tcode.

      ENDLOOP.

      REFRESH i_int_abap .

      ENDLOOP.

      ENDIF.

      Regards,

      Dev.

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 11:43 AM

    It is done using the back track method. It takes lot of effort to go and track.

    Anyway thanks to all of you for your timely reply.

    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.