How to call program in BDC

Hi everyone!
For BDC programming, I use this statement (example only):
CALL TRANSACTION 'F-02' USING   bdc_tab
                        MODE    'N'
                        UPDATE  'S'.
Is it possible to call the program ID and screen no. instead of the tcode?
Thanks a lot!

> hi
>
> s its poosible try it like this.
>
> through the recording method.
>
>         CALL FUNCTION 'BDC_OPEN_GROUP'
>  EXPORTING
>            client = sy-mandt
>  group  = 'JES'
>            keep   = 'X '
>  user   = 'SY-USER'
> prog   = SAPMF05.  -> PROGRAM NAME FOR
>  F-02 TRANSACTION
>
>         CALL FUNCTION 'BDC_INSERT'
>   EXPORTING
>          tcode     = 'F-02'
>  TABLES
> dynprotab = itab_bdcdata.  "PASS YOUR
> <ITAB NAME>
>       CALL FUNCTION 'BDC_CLOSE_GROUP'.
> RDS
> BASKARAN
>
> Message was edited by:
>         baskaran nagamanickam
However, this still calls the tcode (F-02). I need to call the program ID and screen no..
For example (if F-02):
program - SAPMF05A
screen - 100
Thanks!

Similar Messages

  • Hi,how to call reports in bdc

    hi experts,
    please tell me how to call reports in bdc.
    nobody give me replay  for this .
    thank u in advance.

    Hi..,
    Your question is incorrect !!.. what do you mean by calling programs in BDC.. we usually call transactions in BDC .... BDC means a program (report) in which we call a sequence of screens of a particular  transaction <b>programatically not manually</b>.
    check this program..
    data :
      t_bdcdata type standard table
                  of bdcdata
             initial size 0.
    data:
      wa_bdcdata type bdcdata.
      perform bdc_dynpro      using 'SAPLSETB' '0230'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'DATABROWSE-TABLENAME'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=ANZE'.
      perform bdc_field       using 'DATABROWSE-TABLENAME'
                                    'EKPO'.
      perform bdc_dynpro      using '/1BCDWB/DBEKPO' '1000'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=SEOP'.
      perform bdc_field       using 'LIST_BRE'
                                    '250'.
      perform bdc_field       using 'MAX_SEL'
                                    '200'.
      perform bdc_dynpro      using 'SAPMSSY0' '0120'.
      perform bdc_field       using 'BDC_CURSOR'
                                    '06/04'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=DMA2'.
      call transaction 'SE16' using t_bdcdata mode 'A'.
           Start new screen                                              *
    form bdc_dynpro using program dynpro.
      clear wa_bdcdata.
      wa_bdcdata-program  = program.
      wa_bdcdata-dynpro   = dynpro.
      wa_bdcdata-dynbegin = 'X'.
      append wa_bdcdata to t_bdcdata.
    endform.                               "Form BDC_DYNPRO
           Insert field                                                  *
    form bdc_field using fnam fval.
        clear wa_bdcdata.
        wa_bdcdata-fnam = fnam.
        wa_bdcdata-fval = fval.
        append wa_bdcdata to t_bdcdata.
    endform.                               " Form BDC_FIELD
    regards,
    sai ramesh

  • How to Call Program? Thx

    I got a problem as follows:
    There is a application which has two frames, Frame1 and Frame2. Frame2 has a program to be executed. But normally, when run the application, only Frame1 will be called to run.
    Thus, here I would like to know how to run the program in Frame2 through Frame1.
    Thx a lot

    Alright now, if you have some methods in def.java and you'd like to call them from a program the main() method of the abs class (by running abs.class), then just instantiate the def class:
    // file abc.java
    public class abc
    public static void main(String arg[])
    def o = new def();
    o.pr();
    // file def.java
    public class def{
    public void pr()
    System.out.println("Hello!");
    If you'd like to create a program that is consisted of two frames and you'd like to store each frame in a class then think about the following code:
    public class frame1 extends JFrame
    public static void main(String arg[])
    // instantiate this class:
    frame1 fr1 = new frame1("The first frame");
    // instantiate the second frame:
    frame2 fr2 = new frame2("The second frame");
    // the constructor
    public frame1(String title)
    super(title);
    // here you can add some components...
    // here you can assign some listeners...
    this.pack();
    this.setLocation(200,300);
    this.setVisible(true);
    // file frame2.java
    public class frame2 extends JFrame
    public frame2(String title)
    super(title);
    // add some components (JButton, JTextField...)
    // put some listeners...
    this.pack();
    this.setLocation(800,200);
    this.setVisible(true);
    Just compile the two files (put the two .class files in the same directory) and run the first class (java frame1
    or javaw frame1). I prefer the second one since the console will get back to the C:\dir> prompt, but remember: you'll have to add some WindowListener-s which would System.exit(0) the program, so that when you click on the X (close button), the javaw program doesn't continue running in the background.
    I hope this is useful...

  • How to call program through process chain

    Hi Gurus,
    I am in the position to execute the abap program through process chain, I have used  abap program as process type in process chain(First time I am using this process type).when I am executing the process chain, the abap program is not executing.Eagerly anticipating your reply.
    Regards
    Shiva

    Hi
    I managed the execution of rscrm jobs in PC as follows:
    1. Execute query through RSCRM_BAPI transaction
    2. goto sm37 and copy the Jobname (the active one)
    3. Create following progromm
    *& Report /WST/RSCRM_START *
    REPORT /WST/RSCRM_START .
    parameter: l_bid TYPE sysuuid_c.
    CALL METHOD cl_rscrmbw_bapi=>exec_rep_in_batch
    EXPORTING
    i_barepid = l_bid
    4. Execute Programm and fill the Parameter with the Jobname
    5. Save as a new program variant and use in PC as a normal program
    I hope that helps.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
    regards
    ashwin

  • How to call program in the Module pool screen

    hi ,
    i am having 2 screen when we press enter in first screen we will go to second screen in second screen i want to call a standard ALV program but second screen is already having some fields i want tthis report in down part of the screen
    please help me for that
    Edited by: ankita12345 on Nov 19, 2009 12:27 PM

    Hi,
    Its your choice. If you want a ALV display, then create a custom container and display data like this
    DATA: custom_container1 TYPE REF TO cl_gui_custom_container.
    IF custom_container1 IS INITIAL.
          CREATE OBJECT custom_container1
            EXPORTING
              container_name              = 'CUST_CONT1'
            EXCEPTIONS
              cntl_error                  = 1
              cntl_system_error           = 2
              create_error                = 3
              lifetime_error              = 4
              lifetime_dynpro_dynpro_link = 5
              OTHERS                      = 6.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          CREATE OBJECT grid1
            EXPORTING
              i_parent          = custom_container1
            EXCEPTIONS
              error_cntl_create = 1
              error_cntl_init   = 2
              error_cntl_link   = 3
              error_dp_create   = 4
              OTHERS            = 5.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
          CALL METHOD grid1->set_table_for_first_display
            CHANGING
              it_outtab                     = t_itemdetails[]
              it_fieldcatalog               = t_itemfc
            EXCEPTIONS
              invalid_parameter_combination = 1
              program_error                 = 2
              too_many_lines                = 3
              OTHERS                        = 4.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                       WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
        ENDIF.
    If you want to have a table control, then you can do so. Search the SDN, you will find loads for your reference.

  • Call Program from another Program using varient

    Hi...
    How to call program from program with varient....?
    i have used submit but how to pass varient dynamically.
    Regards,
    Chintan

    Hi,
    Use the FM SUBMIT_REPORT
    OR
    SUBMIT <Program Name> VIA SELECTION-SCREEN
                                      USING SELECTION-SET <VARIANT>
                                      AND RETURN.

  • How to call a SM35 transaction and run in BDC report.

    Hi Experts,
    I knew that how to call a transaction but here, I've to call the SM35 transaction ,which have my BRS BDC recording, to run my session.
    Pls help me how to call the transaction and run/process the first session tab in the table control of SM35 window.
    thanks & regards
    sankar.

    Hi,
    Look up this example..here v have recorded one transaction & running it throough BDC report programming.
    report ZBDC_16JUL2008
           no standard page heading line-size 255.
    include bdcrecx1.
    DATA : BEGIN OF it_tab OCCURS 0,
             LIFNR(016),
             BUKRS(004),
             KTOKK(004),
             NAME1(035),
             SORTL(010),
             STRAS(035),
             PFACH(010),
             ORT01(035),
             LAND1(003),
             REGIO(003),
             SPRAS(002),
             TELF1(016),
             AKONT(010),
             FDGRV(010),
           END OF it_tab.
    start-of-selection.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
      CODEPAGE                      = ' '
       FILENAME                      = 'D:\'
       FILETYPE                      = 'ASC'
      ITEM                          = ' '
      FILEMASK_MASK                 = ' '
      FILEMASK_TEXT                 = ' '
      FILETYPE_NO_CHANGE            = ' '
      FILEMASK_ALL                  = ' '
      FILETYPE_NO_SHOW              = ' '
      LINE_EXIT                     = ' '
      USER_FORM                     = ' '
      USER_PROG                     = ' '
      SILENT                        = 'S'
    IMPORTING
      FILESIZE                      =
      CANCEL                        =
      ACT_FILENAME                  =
      ACT_FILETYPE                  =
      TABLES
        data_tab                      = it_tab
    EXCEPTIONS
       CONVERSION_ERROR              = 1
       INVALID_TABLE_WIDTH           = 2
       INVALID_TYPE                  = 3
       NO_BATCH                      = 4
       UNKNOWN_ERROR                 = 5
       GUI_REFUSE_FILETRANSFER       = 6
       OTHERS                        = 7
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    perform open_group.
    LOOP at it_tab.
    perform bdc_dynpro      using 'SAPMF02K' '0105'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF02K-KTOKK'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'RF02K-LIFNR'
                                  it_tab-LIFNR.
    perform bdc_field       using 'RF02K-BUKRS'
                                  it_tab-BUKRS.
    perform bdc_field       using 'RF02K-KTOKK'
                                  it_tab-KTOKK.
    perform bdc_dynpro      using 'SAPMF02K' '0110'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-TELF1'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'LFA1-NAME1'
                                  it_tab-NAME1.
    perform bdc_field       using 'LFA1-SORTL'
                                  it_tab-SORTL.
    perform bdc_field       using 'LFA1-STRAS'
                                  it_tab-STRAS.
    perform bdc_field       using 'LFA1-PFACH'
                                  it_tab-PFACH.
    perform bdc_field       using 'LFA1-ORT01'
                                  it_tab-ORT01.
    perform bdc_field       using 'LFA1-LAND1'
                                  it_tab-LAND1.
    perform bdc_field       using 'LFA1-REGIO'
                                  it_tab-REGIO.
    perform bdc_field       using 'LFA1-SPRAS'
                                  it_tab-SPRAS.
    perform bdc_field       using 'LFA1-TELF1'
                                  it_tab-TELF1.
    perform bdc_dynpro      using 'SAPMF02K' '0120'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFA1-VBUND'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_dynpro      using 'SAPMF02K' '0130'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFBK-BANKS(01)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_dynpro      using 'SAPMF02K' '0210'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'LFB1-FDGRV'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=UPDA'.
    perform bdc_field       using 'LFB1-AKONT'
                                  it_tab-AKONT.
    perform bdc_transaction using 'FK01'.
    ENDLOOP.
    perform close_group.

  • How to call a maintenance view  from a program

    Hello Abapers,
    Can anybody explain with some examples. How to call a mainetenance view from a program.
    Thanks
    Ranjith.

    Use FM 'VIEW_MAINTENANCE_CALL'.
    REPORT  zmaintaintest.
    VARIABLES / CONSTANTS                          
    CONSTANTS: 
                    c_action(1) TYPE c VALUE 'U',                                 "Update
              c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
              c_field(6) TYPE c VALUE 'EMPNO'.                            "Field Name
    INTERNAL TABLES
    DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
              v_empno TYPE zempno,
              wa_rangetab TYPE vimsellist.
    SELECTION SCREEN
    PARAMETERS:     p_empno TYPE   zempno   OBLIGATORY.  "Emplyee ID
    AT SELECTION-SCREEN                                                 
    AT SELECTION-SCREEN.
    Chcking the existence of the user in EMPLOYEE table
      PERFORM validate_employee.
    START_OF_SELECTION                                                  
    START-OF-SELECTION.
    This will restrict the user view so that user can only view/change
    Table data corresponding to his/her Employee ID
      PERFORM define_limited_data_area.
    Displaying table maintenance view for a particular employee ID
      PERFORM call_view_maintenance.
    *&      Form validate_employee
    Validate plant entered in the selection screen
    FORM validate_employee.
      SELECT SINGLE empno     u201CEmployee ID
        FROM zemp_example     u201CEmployee Table
        INTO v_empno
        WHERE empno = p_empno.
      IF sy-subrc <> 0.
        MESSAGE 'Not an Valid User' TYPE 'I'.
      ENDIF.
    ENDFORM.                    "validate_employee
    *&      Form DEFINE_LIMITED_DATA_AREA
    To restrict the user view so that user can see/change table data
    corresponding to his employee ID. Here one internal table is
    getting populated with field name as u201CEMPNOu201D (Key field of the table)
    And value as given by user in Selection Screen and this is passed as
    Parameter in function module 'VIEW_MAINTENANCE_CALL'
    FORM define_limited_data_area.
      CLEAR wa_rangetab.
      wa_rangetab-viewfield  = c_field.
      wa_rangetab-operator  = 'EQ'.
      wa_rangetab-value       = p_empno.
      APPEND wa_rangetab TO itab_rangetab.
    ENDFORM.                    "define_limited_data_area
    *&      Form CALL_VIEW_MAINTENANCE.
    Displaying table maintenance view for a particular employee ID
    FORM call_view_maintenance.
      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'      
        EXPORTING
          action           = c_action
          view_name   = c_viewname
        TABLES
          dba_sellist     = itab_rangetab.
    ENDFORM.                    "call_view_maintenance
    Regards,
    Joy.

  • How to call SAP Webservice in standalone java program

    Hi,
    In our Java application, we want to use the SAP Webservices. I dont know much about authentication mechanism used by SAP. Can any one please help me with any sample code how to Call SAP webservice in Standalone Jave Program. I searched alot on the web regarding this, but helpless. Please help me.
    Thanks,
    Mohan

    Hi Mohan,
    You need an account for the ES Workplace. I'm afraid this is not free, e.g. check [SAP NetWeaver, Composition Subscription|https://www.sdn.sap.com/irj/sdn/subscriptions/composition].
    But I thought you wanted to play with a WSDL [you already had at hand|Sample code to access BAPI Web services from JAVA required;?

  • How to call a dialog program with return value in another dialog program

    Dear All,
    How can I call a dialog program with return value from another dialog program?
    Regards,
    Alok.

    Hi Alok,
    You can you SET/GET parameters to do this.
    This is some information about this.
    To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETERstatements.
    To fill one, use:
    SET PARAMETER ID pid FIELD f.
    This statement saves the contents of field f under the ID pid in the SAP memory. The ID pid can be up to 20 characters long. If there was already a value stored under pid, this statement overwrites it. If you double-click pid in the ABAP Editor, parameters that do not exist can be created as a Repository object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID pid FIELD f.
    This statement places the value stored under the pid ID into the variable f. If the system does not find any value for pid in the SAP memory, sy-subrc is set to 4. Otherwise, it sets the value to 0.
    Thanks,
    SriRatna

  • How To Call a Broadcasting Template within an ABAP program

    I was wondering if anyone knew how to call the Broadcast template via an ABAP program so it will execute?  The scenario that I have is we are doing validations via BW.  We put the data (for conversion reasons) through validation rules and then load a data target.  From this, there are 2 situations that could occur:
    1) There are errors
    2) There are not any errors
    If #1 is true, then I would like to execute the Query Broadcasting Template that I have created.  If #2 is true, then I would like to execute another process via the ABAP program.  In the past, I was successful using exception reporting via reporting agent, since I was able to call that program but the report did not look good at all.  Please let me know if there is a program that I could call in order to execute this broadcast that I have set up.
    Best Regards,
    Tim

    Hello,
    although this is an old threat, but do you have any hints on how to dynamically change the template when broadcasting?
    kind regards
    Murat

  • How to get data from the called program using SUBMIT in a background job?

    Hi Experts,
    I've a program which creates a background job using JOB_OPEN and JOB_CLOSE function modules.
    Between the above function modules I need to call a program using SUBMIT VIA JOB statement.
    My problem is, How do I fetch some data in an internal table in the called program to the calling program after the SUBMIT statement?
    I tried to EXPORT and IMPORT the data, but they are giving a failed sy-subrc when using this background job.
    Kindly let me know your inputs and valuable suggestions.

    Kumar,
    When we execute a program as a background job then the output will be sent to Spool which needs to be fetched again.I guess we need to use Submit via spool as mentioned by Rajat.
    Check these threads to get some idea
    submit report to spool & import spool id
    Re: Generate Spool for a report
    K.Kiran.

  • How to call one program from another program

    Hai,
      How to call one program through another program.
    Example.
       I have two programs 1.ZPROG1 2. ZPROG2.
    When i execute ZPROG1 at that time it should call ZPROG2.

    Hi ,
    u can use submit statement to call a program .
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    regards,
    Santosh thorat

  • How to call a business graphics from a SAPGUI program?

    Dear experts,
    I'm new to WebDynpro for ABAP. I was able to create a working WebDynpro application that shows a simple bar-chart. Nice. What I would like to realize is a bar chart as a pop-up when I click a button on an ALV table element. This ALV table is in the SAPGUI and not WebDynpro (and it shouldn't be). I searched a lot but only found people that talk of 100% WebDynpro applications. So I wonder if a hybrid is possible like embedding the graphics in a control container on a SAPGUI screen or such. I need to somehow submit the required data for the chart from the calling program.
    Is this feasible or do I need to go for the GFW that SAP has marked as obsolete?
    Thanks!

    Hi,
    You can create a transaction for WDA application and call that transaction on click of button ( but you cannot show it as popup) : You can check this for reference: How to pass data to Web Dynpro ABAP from ABAP - Part 2
    You can use CL_GFW classes to display graphs or cl_gui_chart_engine.. ref: Creating charts in Simple ABAP Programs - Code Gallery - SCN Wiki
    Hope this helps u,
    Regards,
    Kiran

  • How to call a BW Query from an ABAP program?

    How to call a BW Query from an ABAP program?

    hi
    check this link
    /people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-i
    /people/durairaj.athavanraja/blog/2005/04/03/execute-bw-query-using-abap-part-ii
    /people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii
    hope this helps
    cheers

Maybe you are looking for

  • Tax code VN in procedure TAXIN is invalid

    Hello Gurus... i'm facing a error while posting goods with Tcode Miro... pls help me....thanks in advance.. <b>Tax code VN in procedure TAXIN is invalid Message no. FICORE704 Diagnosis The tax code entered is not defined in the country for this compa

  • How do you know if my iPod is from the second gen?

    hello I would like to know if my iPod is an second generation Ipod is:), but i realy don't know how to know it. And wat can you do when you update your iPod

  • Runtime Error for the Picking List Smartform

    Hi All, I am working on the smartform, used for GI Scrapping for 551 Movement type. The requirement is they need DEA number for the Plant. I have written code for getting the DEA number. Iacivated the form and I want to print it using the TCODE MB02.

  • My apps suddenly stopped working.

    I just paid for $40 in apps, and after i sync my itouch to my pc, they stopped working. Is there some way I can get them to work again?

  • OT(ish): what happened to imageready?

    is it not part of cs3? is it the intention of adobe that we use fireworks instead?