Calling second transaction from a bdc prg

Hi experts
I am using a prog for ISU-Transaction EG33 now my requirement is I have to call another transaction IL02 within this transaction my requirement is just to  tick a check box.
Another thing here after executing my current prg ( eg33)  function location is created after completion of transction ....the same function location need to be used in my second transaction for which whom i am gonna tick tat check box.(single installation)
thanks in advance
any ideas ???

hi,
u can have a look at this code
*& Report  ZFIC_BDC_F_43_02_ADJ
REPORT  zfic_bdc_f_43_02_adj MESSAGE-ID zfi NO STANDARD PAGE HEADING .
DATA : t_excel   LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE,
       v_mvar1      LIKE balm-msgv1,
       v_mtext(100) TYPE c,
       v_tabix(4)   TYPE c ,
       t_bdcdata     LIKE bdcdata        OCCURS 0 WITH HEADER LINE.
----declaration of internal table for uploading the excel file -
DATA: BEGIN OF itab OCCURS 0 ,
      bukrs LIKE bkpf-bukrs,
        blart LIKE bkpf-blart,
        bldat(10) TYPE c ,
        budat(10) TYPE c ,
        monat LIKE bkpf-monat,
        waers LIKE bkpf-waers,
        docid LIKE fs006-docid,
        newbs LIKE rf05a-newbs,
        newko LIKE rf05a-newko,
       mwskz LIKE bseg-mwskz,
       wrbtr LIKE bseg-wrbtr,
        zuonr LIKE bseg-zuonr,
        sgtxt LIKE bseg-sgtxt,
        zfbdt(10) TYPE c ,
        prctr LIKE cobl-prctr,
       bukrs1 TYPE bkpf-bukrs,
        blart1 TYPE bkpf-blart,
        bldat1(10) TYPE c ,
        budat1(10) TYPE c ,
        monat1 TYPE bkpf-monat,
        waers1 TYPE bkpf-waers,
        newbs1 LIKE rf05a-newbs,
        newko1 LIKE rf05a-newko,
        newum LIKE rf05a-newum,
        wrbtr1(16) TYPE c,
        zuonr1 LIKE bseg-zuonr,
        sgtxt1 LIKE bseg-sgtxt,
        zfbdt1(10) TYPE c ,
        bupla1 LIKE bseg-bupla,
        secco1 LIKE bseg-secco,
        prctr1 LIKE bseg-prctr,
        docid1 LIKE fs006-docid,
        wrbtr(16) TYPE c ,
        newbs2 LIKE rf05a-newbs ,
        newbs3 LIKE rf05a-newbs ,
        END OF itab.
DATA: BEGIN OF messtab  OCCURS 0 .
        INCLUDE STRUCTURE bdcmsgcoll.
DATA: row TYPE i,
       key(30),
      END OF messtab.
DATA: BEGIN OF messtab2 OCCURS 0,
        mtype      LIKE bdcmsgcoll-msgtyp,
        mtext(100) TYPE c,
        row        TYPE i,
        key(30)    TYPE c,
      END OF messtab2.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETER : p_pfile(128) TYPE c OBLIGATORY,
            p_pbrow      TYPE i OBLIGATORY,
            p_perow      TYPE i OBLIGATORY,
            p_pdis       LIKE ctu_params-dismode OBLIGATORY DEFAULT
'A'.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_pfile .
  CALL FUNCTION 'F4_FILENAME'
   EXPORTING
     program_name        = syst-cprog
     dynpro_number       = syst-dynnr
  FIELD_NAME          = ' '
   IMPORTING
     file_name           = p_pfile .
START-OF-SELECTION .
----uploading the excel file to internal table -
  PERFORM upload_file .
-----filling the bdc table -
  PERFORM fill_bdctable .
------writing the error log -
  PERFORM write_messtab .
*&      Form  UPLOAD_FILE
      text
-->  p1        text
<--  p2        text
FORM upload_file .
  CLEAR : t_excel .
  REFRESH : t_excel .
  CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    EXPORTING
      filename                = p_pfile
      i_begin_col             = '1'
      i_begin_row             = p_pbrow
      i_end_col               = '27'
      i_end_row               = p_perow
    TABLES
      intern                  = t_excel
    EXCEPTIONS
      inconsistent_parameters = 1
      upload_ole              = 2
      OTHERS                  = 3.
  IF sy-subrc <> 0.
    MESSAGE e000 WITH text-002.
  ENDIF.
  LOOP AT t_excel .
    CASE t_excel-col .
      WHEN '001'.
        itab-bldat = t_excel-value.
      WHEN '002'.
        itab-budat = t_excel-value.
      WHEN '003'.
        itab-blart = t_excel-value.
      WHEN '004'.
        itab-bukrs = t_excel-value.
      WHEN '005'.
        itab-monat = t_excel-value.
      WHEN '006'.
        itab-waers = t_excel-value.
      WHEN '007'.
        itab-docid = t_excel-value.
      WHEN '008'.
        itab-newbs = t_excel-value.
      WHEN '009'.
        itab-newko = t_excel-value.
      WHEN '010'.
        itab-wrbtr = t_excel-value.
      WHEN '011'.
        itab-bupla1 = itab-bukrs.
        itab-secco1 = itab-bukrs.
        itab-zfbdt = t_excel-value.
      WHEN '012'.
        itab-zuonr = t_excel-value.
      WHEN '013'.
        itab-sgtxt = t_excel-value.
      WHEN '014'.
        itab-newbs1 = t_excel-value.
      WHEN '015'.
        itab-newko1 = t_excel-value.
      WHEN '016'.
        itab-prctr = t_excel-value .
      WHEN '017'.
        itab-wrbtr = t_excel-value .
      WHEN '018'.
        itab-bldat1 = t_excel-value.
      WHEN '019'.
        itab-budat1 = t_excel-value.
      WHEN '020'.
        itab-blart1 = t_excel-value.
      WHEN '021'.
        itab-monat1 = t_excel-value.
      WHEN '022'.
        itab-newbs2 = t_excel-value.
      WHEN '023'.
        itab-wrbtr1 = t_excel-value.
      WHEN '024'.
        itab-zuonr1 = t_excel-value.
      WHEN '025'.
        itab-sgtxt1 = t_excel-value.
      WHEN '026'.
        itab-newbs3 = t_excel-value.
      WHEN '027'.
        itab-newum = t_excel-value .
        AT END OF row .
          APPEND itab.
          CLEAR itab .
        ENDAT.
    ENDCASE .
  ENDLOOP.
ENDFORM.                    " UPLOAD_FILE
*&      Form  fill_bdctable
      text
-->  p1        text
<--  p2        text
FORM fill_bdctable .
  LOOP AT itab .
    v_tabix = sy-tabix .
    PERFORM bdc_dynpro USING :
      '1'  'SAPMF05A'      '0100',
      ' '  'BDC_CURSOR'    'FS006-DOCID',
      ' '  'BDC_OKCODE'    '/00',
      ' '  'BKPF-BLDAT'    itab-bldat,
      ' '  'BKPF-BLART'    itab-blart,
      ' '  'BKPF-BUKRS'    itab-bukrs,
      ' '  'BKPF-BUDAT'    itab-budat,
      ' '  'BKPF-MONAT'    itab-monat,
      ' '  'BKPF-WAERS'    itab-waers,
      ' '  'FS006-DOCID'    itab-docid,
      ' '  'RF05A-NEWBS'   itab-newbs,
      ' '  'RF05A-NEWKO'   itab-newko,
      '1'  'SAPMF05A'      '0302',
      ' '  'BDC_CURSOR'    'RF05A-NEWKO',
      ' '  'BDC_OKCODE'    '/00',
      ' '  'BSEG-WRBTR'    itab-wrbtr,
' '  'BSEG-MWSKZ'    ITAB-MWSKZ,
      ' '  'BSEG-ZFBDT'    itab-zfbdt,
      ' '  'BSEG-ZUONR'    itab-zuonr,
      ' '  'BSEG-SGTXT'    itab-sgtxt,
      ' '  'RF05A-NEWBS'   itab-newbs1,
      ' '  'RF05A-NEWKO'   itab-newko1,
      '1'  'SAPMF05A'      '0300',
      ' '  'BDC_CURSOR'    'BSEG-WRBTR',
      ' '  'BDC_OKCODE'    '/00',
      ' '  'BSEG-WRBTR'    itab-wrbtr,
      '1'  'SAPLKACB'      '0002',
      ' '  'BDC_CURSOR'    'COBL-PRCTR',
      ' '  'BDC_OKCODE'    '=ENTE',
      ' '  'COBL-PRCTR'    itab-prctr,
      '1'  'SAPMF05A'      '0300',
      ' '  'BDC_CURSOR'    'BSEG-WRBTR',
      ' '  'BDC_OKCODE'    '=BS',
      ' '  'BSEG-WRBTR'    itab-wrbtr,
      '1'  'SAPLKACB'      '0002',
      ' '  'BDC_CURSOR'    'COBL-PRCTR',
      ' '  'BDC_OKCODE'    '=ENTE',
      ' '  'COBL-PRCTR'    itab-prctr,
      '1'  'SAPMF05A'      '0700',
     ' '  'BDC_CURSOR'    'RF05A-NEWBS',
      ' '  'BDC_OKCODE'     '=BU'.
    CALL TRANSACTION 'F-43' USING  t_bdcdata
                              MODE   p_pdis
                              UPDATE 'A' MESSAGES INTO messtab.
    LOOP AT messtab WHERE msgtyp = 'E' .
      v_mvar1 = messtab-msgv1+0(49).
      CALL FUNCTION 'MESSAGE_PREPARE'
      EXPORTING
      language = sy-langu
      msg_id   = messtab-msgid
      msg_no   = messtab-msgnr
      msg_var1 = v_mvar1
MSG_VAR2 = ' '
MSG_VAR3 = ' '
MSG_VAR4 = ' '
      IMPORTING
      msg_text = v_mtext
      EXCEPTIONS
      function_not_completed = 1
      message_not_found = 2
      OTHERS = 3 .
      IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      messtab-row = p_pbrow + v_tabix - 1.
      messtab-key = itab-newbs.
      messtab2-row = messtab-row.
      messtab2-key = messtab-key.
      messtab2-mtype = messtab-msgtyp.
      messtab2-mtext = v_mtext.
      APPEND messtab2.
      CLEAR messtab.
    ENDLOOP.
    REFRESH t_bdcdata .
    PERFORM bdc_dynpro USING :
  '1'  'SAPMF05A'      '0100',
  ' '  'BDC_CURSOR'    'RF05A-NEWKO',
  ' '  'BDC_OKCODE'    '/00',
  ' '  'BKPF-BLDAT'    itab-bldat1,
  ' '  'BKPF-BLART'    itab-blart1,
  ' '  'BKPF-BUKRS'    itab-bukrs,
  ' '  'BKPF-BUDAT'    itab-budat1,
  ' '  'BKPF-MONAT'    itab-monat1,
  ' '  'BKPF-WAERS'    itab-waers,
  ' '  'FS006-DOCID'   itab-docid1,
  ' '  'RF05A-NEWBS'   itab-newbs2,
  ' '  'RF05A-NEWKO'   itab-newko,
  '1'  'SAPMF05A'      '0302',
  ' '  'BDC_CURSOR'    'RF05A-NEWUM',
  ' '  'BDC_OKCODE'    '/00',
  ' '  'BSEG-WRBTR'    itab-wrbtr1,
  ' '  'BSEG-ZFBDT'    itab-zfbdt,
  ' '  'BSEG-SGTXT'    itab-sgtxt1,
  ' '  'RF05A-NEWBS'   itab-newbs3,
  ' '  'RF05A-NEWKO'   itab-newko,
  ' '  'RF05A-NEWUM'   itab-newum,
  '1'  'SAPMF05A'      '0304',
  ' '  'BDC_CURSOR'    'BSEG-PRCTR',
  ' '  'BDC_OKCODE'    '/00',
  ' '  'BSEG-WRBTR'    itab-wrbtr1,
  ' '  'BSEG-PRCTR'    itab-prctr,
  ' '  'BSEG-ZUONR'    itab-zuonr1,
  ' '  'BSEG-SGTXT'    itab-sgtxt1,
  ' '  'BSEG-BUPLA'    itab-bukrs,
  ' '  'BSEG-SECCO'    itab-bukrs,
   '1' 'SAPMF05A'      '0304',
  ' '  'BDC_CURSOR'    'BSEG-WRBTR',
  ' '  'BDC_OKCODE'    '=BS',
  ' '  'BSEG-WRBTR'    itab-wrbtr1,
  ' '  'BSEG-BUPLA'    itab-bukrs,
  ' '  'BSEG-SECCO'    itab-bukrs,
  ' '  'BSEG-PRCTR'    itab-prctr,
  ' '  'BSEG-ZUONR'    itab-zuonr1,
  ' '  'BSEG-SGTXT'    itab-sgtxt1,
  '1'  'SAPMF05A'      '0700',
  ' '  'BDC_CURSOR'    'RF05A-NEWBS',
  ' '  'BDC_OKCODE'    '=BU'.
    CALL TRANSACTION 'F-02' USING  t_bdcdata
                              MODE   p_pdis
                              UPDATE 'A' MESSAGES INTO messtab.
    APPEND messtab.
    REFRESH t_bdcdata .
  ENDLOOP .
ENDFORM.                    " fill_bdctable
*&      Form  BDC_DYNPRO
      text
     -->P_0337   text
     -->P_0338   text
     -->P_0339   text
FORM bdc_dynpro  USING    flag
                          var1
                          var2.
  CLEAR t_bdcdata .
  IF flag = 1.
    t_bdcdata-program     = var1.
    t_bdcdata-dynpro      = var2.
    t_bdcdata-dynbegin    = 'X'.
  ELSE.
    t_bdcdata-fnam        = var1.
    t_bdcdata-fval        = var2.
  ENDIF.
  APPEND t_bdcdata.
ENDFORM.                    " BDC_DYNPRO

Similar Messages

  • Possible to call a transaction from a planning book using a macro button?

    Hi All,
    Is it somehow possible to call a transaction using a macro button in the planning book? Also, the current selection should be passed as input parameters to the transaction.
    In my example, I am trying to run the transaction /SAPAPO/MC90 - Release to Supply Network Planning from the Demand Planning  Planning Book/Data View. This way if planners need to change forecasts mid month for specific selections, they can easily transfer to SNP without having to go out of interactive planning.
    Thank you,
    Maria

    Hello Maria,
              It's possible to call a transaction from a planning book using a macro button.
    What you can do is ..... Create a function module and inside it use the command "Call Transaction Tcode"  (ABAPer can do this) to call ur specific transaction. And this module can in turn be called from your macro. Please find the below link which explanis how to call a function module from a macro. Do let me know if you need more information on this.
    Calling a function module from APO Macro
    Regards,
    Siva.

  • Can we call a transaction from a report

    hi
    can we call a transaction from a report

    hi,
    we can call
    check it
    *& Report  ZSALESORDERDETAILS_ASHOK
    REPORT         ZSALESORDERDETAILS_ASHOK
                   NO STANDARD PAGE HEADING
                   LINE-SIZE 50
                   LINE-COUNT 35(5).
    *data declaration.
    tables :vbak.
    tables: VBAP.
    DATA : TVBAK LIKE VBAK  OCCURS 0 WITH HEADER LINE,
           TVBAP LIKE VBAP  OCCURS 0 WITH HEADER LINE,
           TEMP TYPE p decimals 5 VALUE '0.0' ,
           A type i,
           FIELDNAME TYPE STRING,
           FIELDVALUE TYPE VBAP-VBELN.
    DATA G_CB.
    selection-screen  begin of block screen1  with frame title TEXT-001.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN COMMENT /32(35) COMM1.
    SELECTION-SCREEN ULINE /27(35).
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS TVBELN FOR VBAK-VBELN.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN ULINE.
    SELECTION-SCREEN COMMENT /30(50) COMM2.
    SELECTION-SCREEN ULINE /27(40).
    SELECTION-SCREEN SKIP.
    SELECT-OPTIONS TERDAT FOR VBAK-ERDAT.
    SELECTION-SCREEN SKIP.
    selection-screen  end of block screen1.
    *Initialization
    Initialization .
    TVBELN-low = 4000.
    TVBELN-high = 5000.
    TVBELN-option = 'BT'.
    TVBELN-sign = 'I'.
    APPEND TVBELN.
    TERDAT-low = '19960202'.
    TERDAT-high = '20020302' .
    APPEND TERDAT.
    AT SELECTION-SCREEN .
    SELECT *
           FROM VBAK
           INTO TABLE TVBAK
           WHERE  VBELN IN TVBELN AND erdat IN Terdat .
           IF sy-subrc ne 0.
           MESSAGE 'ENTERED ORDER NOT FOUND' type 'E'.
           ENDIF.
           START-OF-SELECTION.
           REFRESH TVBAK.
           SELECT *
                  FROM VBAK
                  INTO TABLE TVBAK
                  WHERE  VBELN IN TVBELN AND ERDAT IN TERDAT.
            END-OF-SELECTION.
            LOOP AT TVBAK.
                    WRITE: /2 SY-VLINE,
                    TVBAK-VBELN INPUT ON ,
                    15 SY-VLINE,TVBAK-ERDAT hotspot on,
                    30  SY-VLINE, 35 TVBAK-ERNAM,
                    46 SY-VLINE,
                    g_cb AS CHECKBOX.
           ENDLOOP.
           A = SY-LINCT - SY-LINNO - 1.
         SKIP A .
      RESERVE A LINES.
              AT SELECTION-SCREEN OUTPUT.
              comm1 ='SELECT SALES ORDER RANGE'.
              comm2 ='SELECT SALES ORDER CREATION DATE'.
           TOP-OF-PAGE.
           ULINE.
           WRITE /15    '     SALES ORDER REPORT    ' COLOR = 1 .
           ULINE.
           WRITE : /7 '  VBELN  ' COLOR = 5 ,
                   19 '  ERDAT  ' COLOR = 5,
                   34 ' ERNAM  ' COLOR = 5.
            ULINE.
            END-OF-PAGE.
            IF SY-LSIND = 0.
            ULINE.
            WRITE : /2 'NUMBER OF LINE IN THIS PAGE = ', SY-LINNO.
                    SKIP.
            WRITE: /30 'PAGE NUMBER = ', SY-PAGNO.
            ULINE.
            ELSEIF SY-LSIND = 1.
            ULINE.
            WRITE : /12 'TOTAL PRICE = ' ,TEMP.
            CLEAR TEMP.
            SKIP.
            WRITE : /30 'PAGE NUMBER = ', SY-PAGNO.
            ULINE.
            ENDIF.
            at line-selection.
            GET CURSOR FIELD FIELDNAME VALUE FIELDVALUE.
            IF FIELDNAME = 'TVBAK-VBELN'.
            CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
              EXPORTING
                INPUT         = FIELDVALUE
             IMPORTING
                OUTPUT        = FIELDVALUE.
            WINDOW STARTING AT 60 2 ENDING AT 120 25.
            IF SY-LSIND = 1.
            SELECT
                   FROM VBAP
                   INTO TABLE TVBAP
                   WHERE VBELN EQ FIELDVALUE.
            LOOP AT TVBAP.
            TEMP = TEMP + TVBAP-NETPR.
            WRITE :  /2 SY-VLINE, TVBAP-matnr,
                      17 SY-VLINE,TVBAP-VBELN,
                      30 SY-VLINE,TVBAP-NETPR currency 'IN',
                      49 SY-VLINE.
            ENDLOOP.
            ULINE.
            A = SY-LINCT - SY-LINNO - 1.
           SKIP A .
           RESERVE A LINES.
         ENDIF.
            <b>ELSEIF SY-LSIND = 2.
           call transaction 'MM01' .
           ENDIF.</b>
             TOP-OF-PAGE DURING LINE-SELECTION.
              WRITE : /  SY-ULINE,
                      /7 '    DETAIL OF GIVEN SALES ORDER    ' COLOR = 5,
                      /  SY-ULINE,
                      /4 'MATNR',
                      22 'VBELN',
                      35 'NETPR',
                      /  SY-ULINE.
      Regards
    ASHOK
    Message was edited by:
            ASHOK KUMAR

  • Calling SAP Transaction from BSP

    I wonder whether it is possible to call SAP transaction from BSP application and pass to it some data; e.g., PO# when calling VA02?
    The called transaction could appear in a separate MS IE Window (like in some Portal applications) or in SAP GUI.
    Any help will be appreciated.
    Thank you in advance

    I have launched the Java SAPGui from BSP pages before.  I used SNC so that the users were logged on via Single Sign On.  I store the Java Gui in the Mime directory.  You can force the startup transaction.  Theorectically you could also Gui Scripting to try and control the Gui and force in the default value for your PO field.  I have not tried that however.  You will probably want to check the Service Marketplace for documents on the Gui Scripting.  The following is the code from my BSP page to launch the Java Gui in the Browser as an applet:
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <HTML>
    <HEAD>
      <TITLE>SAPGUI for the Java Environment</TITLE>
      <STYLE type="text/css">
          body { margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0px; }
      </STYLE>
    </HEAD>
    <BODY scroll="no">
    <SCRIPT language="JavaScript">
    // user configurable part starts here
    var pluginurl         = '';
    var scriptable     = 'true';
    var codebase         = '.';
    var jnlp           = 'platin.jnlp';
    var keepalive      = 'true';
    var frog           = 'true';
    var trace          = '';
    var tracefile      = '';
    var connectionData = 'conn=/M/nts163/S/3620/G/SPACE/&tran=SE80&clnt=088&fast=true&sncon=true&sncname=p:[email protected]&sncqop=9';
    // user configurable part ends here
    // verify if Java Plugin as control in Internet Explorer or Java Plugin for Netscape or native JRE of browser must be used
    var jre = 'control';
    if(navigator.platform.indexOf("Mac") > -1)
       jre = 'native';
    else if (navigator.appName.indexOf("Netscape") != -1)
       jre = 'plugin';
    document.open();
    switch (jre)
    case 'control':
        document.writeln('<OBJECT CLASSID  = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"                               ');
        document.writeln('    ID       = "PlatinGUI"                                                                    ');
        document.writeln('    CODEBASE = "j2re-1_3_1_02-win-i.exe#Version=1,3,1,0"                             ');
        document.writeln('    WIDTH    = "100%"                                                 ');
        document.writeln('    HEIGHT   = "100%"                                                 ');
        document.writeln('    BORDER   = 0>                                                      ');
        document.writeln('<PARAM NAME = "TYPE"           VALUE = "application/x-java-applet;jpi-version=1.3.1">         ');
        document.writeln('<PARAM NAME = "SCRIPTABLE"     VALUE = "', scriptable,'">                                ');
        document.writeln('<PARAM NAME = "code"           VALUE = "com.sap.platin.GuiApplet2">                   ');
        document.writeln('<PARAM NAME = "codebase"       VALUE = "', codebase,'">                             ');
        document.writeln('<PARAM NAME = "jnlp"           VALUE = "', jnlp,'">                             ');
        document.writeln('<PARAM NAME = "archive"        VALUE = "GuiStartS.jar">                             ');
        document.writeln('<PARAM NAME = "keepalive"      VALUE = "', keepalive,'">                             ');
        document.writeln('<PARAM NAME = "frog"           VALUE = "', frog,'">                             ');
        document.writeln('<PARAM NAME = "trace"          VALUE = "', trace,'">                             ');
        document.writeln('<PARAM NAME = "tracefile"      VALUE = "', tracefile,'">        ');
        document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData,'">                               ');
        document.writeln('                                                                ');
        document.writeln('This page requires a Sun Java Plugin 1.3 and a SAPGUI for Java to view.                      ');
        document.writeln('                                                                ');
        document.writeln('</OBJECT>                                                           ');
        break;
    case 'plugin':
        document.writeln('<EMBED TYPE        = "application/x-java-applet;version=1.3"                         ');
        document.writeln('    PLUGINURL      = "', pluginurl,'"                                          ');     
        document.writeln('    WIDTH          = "100%"                                            ');                                        
        document.writeln('    HEIGHT         = "100%"                                             ');
        document.writeln('    ALIGN          = "BASELINE"                                                ');
        document.writeln('    code           = "com.sap.platin.GuiApplet2"                                      ');
        document.writeln('    codebase       = "', codebase,'"                                        ');
        document.writeln('    jnlp           = "', jnlp,'"                                                ');
        document.writeln('    archive        = "GuiStartS.jar"                                       ');
        document.writeln('    keepalive      = "', keepalive,'"                                       ');
        document.writeln('    frog           = "', frog,'"                                            ');
        document.writeln('    trace          = "', trace,'"                                            ');
        document.writeln('    tracefile      = "', tracefile,'"                                       ');
        document.writeln('    connectionData = "', connectionData,'"                                        ');
        document.writeln(' <NOEMBED>                                                      ');
        document.writeln(' </NOEMBED>                                                      ');
        document.writeln(' </EMBED>                                                              ');
        break;
    case 'native':
        document.writeln('<APPLET CODEBASE  = "', codebase,'"                                                           ');
        document.writeln('        ARCHIVE   = "GuiStartS.jar"                                                           ');
        document.writeln('        CODE      = "com.sap.platin.GuiApplet2"                                               ');
        document.writeln('        WIDTH     = "100%"                                                                    ');
        document.writeln('        HEIGHT    = "100%">                                                                   ');
        document.writeln('<PARAM NAME = "SCRIPTABLE"     VALUE = "', scriptable, '">                                    ');
        document.writeln('<PARAM NAME = "jnlp"           VALUE = "', jnlp, '">                                          ');
        document.writeln('<PARAM NAME = "keepalive"      VALUE = "', keepalive, '">                                     ');
        document.writeln('<PARAM NAME = "frog"           VALUE = "', frog, '">                                          ');
        document.writeln('<PARAM NAME = "trace"          VALUE = "', trace, '">                                         ');
        document.writeln('<PARAM NAME = "tracefile"      VALUE = "', tracefile, '">                                     ');
        document.writeln('<PARAM NAME = "connectionData" VALUE = "', connectionData, '">                                ');
        document.writeln('</APPLET>                                                                                ');
        break;
    document.close();
    </SCRIPT>
    </BODY>
    </HTML>

  • Can we call another transaction from the Userexit

    Hi all,
            Can we call another transaction from the Userexit?
    Thanks,
    Balaji

    Hi
    Because the statament CALL TRANSACTION triggers the end of the LUW so COMMIT WORK, so you should be sure not to insert that statament while some updating actions are been doing.
    So that exit shouldn't be triggered while updating
    Max

  • Call sap transaction from java

    can anyone tell me how to call SAP transaction from JCO,
    cheers
    Ajay

    Hi Ajay,
    You should find or create functional module which covers your requrements.
    Best regards, Maksim Rashchynski.

  • Call SAP Transaction from BSP

    Hi,
    I am new to BSP. I have to call SAP Screen on button click event on BSP and also need to pass data at runtime.
    I searched this forum but didn't find the right solution. I tried to call SAP screen from BAPI and through URL but no success.
    Anyone knows how it can be done?
    Regards,
    Usman Malik

    Thanks for your reply,
    Actually I am very new to BSP. I don't understand where to put this code?
    [System]
    Name=DEV
    Description=DEV [Development]
    Client=123
    [User]
    Name=RAJA
    Language=EN
    [Function]
    Title=
    Command=*SU01 USR02-BNAME=raja;
    Type=Transaction
    [Configuration]
    WorkDir=d:xxxxxxSapWorkDir
    [Options]
    Reuse=1
    Second thing is about shortcut. Do I have to place this shortcut on server?
    Thanks,
    Usman Malik

  • Lag when calling BLS Transaction from within another

    Using MII 12.0.
    In MII class, they told us a "best practice" was to check the "Reload Transaction after Execution" box in the configuration of a Transaction call within a BLS.  The reasoning behind it was that should this not be checked, a previous result of that called BLS transaction would still be cached in memory and used instead of the newly assigned values from within your calling BLS.
    Checking the "Reload transaction after Execution" box forces MII to reload that transaction when it is called.
    In time analysis, what has been noticed is that there's a significant - up to 9 seconds - lag time when one BLS calls another BLS.  On a time-sensitive operation, that is an eternity.  That amount of overhead defeats any hope of using common code libraries.
    Questions -
    1.  Is this a true "best practice", or is it one that adds unnecessary overhead to a BLS? 
    2.  If the calling BLS executes 1 time - but is subject to be executed multiple times over a certain interval - is checking the Reload box of the BLS it is calling unnecessary? 
    3.  Even if you pass new data each time you call that BLS, is it still going to use/return whatever data it has cached until the cache expires?
    4.  Is there another way to ensure that the called BLS uses the data you pass it (and returns the corresponding result set) without incurring the amount of overhead that we have noted? 
    Thanks

    The version we're on is 12.0.6 Build 13, and moving to  12.1 (something I am not directly involved in).  In this version, I'm not seeing the menu options you describe, so it's apparently in 12.1 or later. 
    The issue we are having if the "Reload transaction after execution" box is not selected is indeed caching of values. 
    For example -
    BLS1 runs every 5 minutes
    BLS2 is called from BLS1, and in this case, retrieves error log info from a table - a common module used by several BLS's.
    BLS3 is also called from BLS1, and in this case, writes to an error log using information retrieved from BLS2 from within the execution of BLS1.  BLS2 & BLS3's calls are in 2 separate sequences, one after the other. 
    If BLS2 & BLS3 DO NOT have the "Reload Transaction after execution" checked, each will run with whatever the cached data in memory is for them, even though inside BLS1 I am assigning values to the input of BLS1 to send to BLS2, and passing the returned data from BLS2 into BLS3.  Unless it's checked, BLS2 & BLS3 would continue to be called, however, it would be with whatever data has been cached for them. 
    If that "Reload" switch is checked, it will reload each transaction & call it with whatever data is being passed.
    This was mentioned in the MII class I was in also.  This is a generalization, but the way they described it was being similar to how you might save a web page to your local PC, and that unless that page is refreshed & changed, that from that point on, every time you brought up your saved web page, it would always display the same values in it.  They didn't go into great deal to explain the mechanics of it, but MII would only load it the first time it executed, and that unless you forced it (by checking the Reload switch), it would always execute using the same cached values no matter what you were passing.

  • Call SAPGUI transaction from BSP and vice versa

    Hi all
    There was some discussion about this topics before. Maybe someone can just point me to the thread answering this issue:
    1. I need to call a SAPGUI transaction from a BSP application: I want to use SAPGUI, not ITS/webgui, I need single sign on, the SAPGUI transaction could possible run in another SAP system then the BSP.
    As far as I understand I need to create a *.sap file with the correct parameters for sapshortcut. But how does single sign on work? Can I create a logon ticket in my BSP and forward it to sapshortcut?
    2. I need to call a BSP application from a SAPGUI transaction or report, with single sign on but in a MS IE window, not inside a SAPGUI HTML control
    Can I create a logon ticket in my coding an append it to the start url for the BSP?
    any hints?
    thanks
    Michael

    hi Michael,
    For your second issue,to call a BSP application from a SAP GUI in MS IE explorer,
    you can use the Function Module CALL_BROWSER in your report,like
    data url(200) type c.
    url = 'http://<server>.<domain><port>:'.
    concatenate url '/sap/bc/bsp/sap/' into url.
    concatenate url 'znw_poc2_1_prtl/dts.htm' into url.
    concatenate url '?sap-user=<userid>' into url.
    concatenate url '&sap-password=<passowrd>' into url.
    CALL FUNCTION 'CALL_BROWSER'
      EXPORTING
        URL                          = url
    *    WINDOW_NAME                  = ' '
    *    NEW_WINDOW                   = ' '
    *    BROWSER_TYPE                 =
    *    CONTEXTSTRING                =
    *  EXCEPTIONS
    *    FRONTEND_NOT_SUPPORTED       = 1
    *    FRONTEND_ERROR               = 2
    *    PROG_NOT_FOUND               = 3
    *    NO_BATCH                     = 4
    *    UNSPECIFIED_ERROR            = 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.
    For this to work you have to enable SSO on your server.
    you can check if it is enabled or not by runnning the BSP application "SYSTEM" ,page "SSO2TEST.htm" .
    Follow the instructions on the page for testing.
    This may not be a great way as your userid password are passed via URL,still it works .
    Hope this helps,
    Regards,
    Siddhartha

  • Calling a Transaction from Selection screen of Z Program...

    Hi,
    I am trying to call a Standard transaction from a report when they clicked one push button on selection screen.
    when i used CALL TRANSACTION 'MM01'. When i press save after entering the values in MM01, it is saving and coming out to selection screen of my Z program.
    But my question is when they press in BACK button in MM01 then only it should come out from MM01 and it should display the my Z Program selection screen. suppose if they press SAVE button on MM01 it should save and screen should be MM01 only.
    when i used LEAVE TO TRANSACTION 'MM01'. it is working fine but when i press BACK button from MM01 it is coming out and showing SAP EASY ACCESS screen. My requirement is when i press back button in MM01 then it must come to my Z program selection screen only.
    I hope it is clear.
    Regards,
    Sunny

    >
    sunny_143 wrote:
    > Hi,
    >
    > I am trying to call a Standard transaction from a report when they clicked one push button on selection screen.
    >
    > when i used CALL TRANSACTION 'MM01'. When i press save after entering the values in MM01, it is saving and coming out to selection screen of my Z program.
    >
    > But my question is when they press in BACK button in MM01 then only it should come out from MM01 and it should display the my Z Program selection screen. suppose if they press SAVE button on MM01 it should save and screen should be MM01 only.
    >
    >
    > when i used LEAVE TO TRANSACTION 'MM01'. it is working fine but when i press BACK button from MM01 it is coming out and showing SAP EASY ACCESS screen. My requirement is when i press back button in MM01 then it must come to my Z program selection screen only.
    >
    > I hope it is clear.
    >
    > Regards,
    > Sunny
    I'm not clear about what happens when you press the BACK button.
    First, LEAVE TO TRANSACTION is no help.  That ends your Z program.  CALL TRANSACTION is your only option.  If it doesn't work as you'd like, you're a bit stuck, as MMnn are standard SAP transactions, and you can't modify that. (well, you can, but that's a whole other tin of worms). 
    Perhaps if you told us what you're trying to achieve with the Z program, there might be another approach that will do that.
    matt

  • Calling SAP transaction from WebDynpro

    HI,
    Could someone post a link as to how I may call a SAP transaction from a webdynpro.
    Will this be an external call to R/3 or can i get it embedded in my dynpro.......
    Tnks..

    Hi,
    You can call by creating external window method.
    create LINK to URL or LINK TO ACTION according to requirement, for this. write code in onaction of that.
    data: iv_url type string value 'http://<server>:<port>/sap/bc/gui/sap/its/webgui?~transaction=*se38 RS38M-PROGRAMM=rsparam;DYNP_OKCODE=SHOP'.
      data: api_component  type ref to if_wd_component,
              window_manager type ref to if_wd_window_manager,
              window type ref to if_wd_window.
      api_component = wd_comp_controller->wd_get_api( ).
      window_manager = api_component->get_window_manager( ).
      window = window_manager->create_external_window(
                     url = iv_url
                     modal = abap_false ).
      window->open( ).
    Cheers,
    Kris.

  • Calling SAP Transaction from WDA

    Hi,
    We have a peculiar requirement of calling SAP Standard Transaction from Web Dynpro ABAP.Well, we tried achieving this using the Transactional iview. On click of appropiate link/button in my applicaiton, I can call the Transactional iview. But the problem is, I could not pass on the data from WDA Application to Transactional iview. I need some inputs in handling such cases.
    The case might look something similar to PCR's final updation(like after all approvals of PCRs, the final Administrator executes the workitem which in turn calls the Notification Maintenance and this in turn calls the PA40 passing the data from Adobe form(XML data) to PA40 txn. Like this, After all my approvals, I would like to call the SAP Transaction passing the data from WDA Application. Hope I am clear.
    Regards
    <i><b>Raja Sekhar</b></i>

    Hi,
    Maybe you can use the information from this blog to pass dynamic parameters to the SAP transaction iview which you call with the created URl
    How to launch SAP transaction & pass parameters via URL
    Dagfinn

  • How to call a transaction from ABAP code

    Hi everybody,
    How do I run a transaction from my ABAP code?
    For example, through my ABAP code, I want to call the ME24 transaction (Maintain Purchase Order).
    Thanks for the help,
    Roy

    CALL TRANSACTION
    Syntax
    CALL TRANSACTION ta { [AND SKIP FIRST SCREEN]
                        | [USING bdc_tab [bdc_options]] }.
    Extras:
    1. ... AND SKIP FIRST SCREEN
    2. ... USING bdc_tab [bdc_options]
    Effect
    The statement CALL TRANSACTION calls the transaction whose transaction code is contained in data object ta. The data object ta must be of character type and must contain the transaction code in uppercase letters. If the transaction specified in ta cannot be found, an untreatable exception is triggered. The additions suppress the display of the initial screen and allow you to execute the transaction using a batch input session.
    At CALL TRANSACTION the calling program and its data is kept, and after exiting the called transaction, processing is resumed in the calling program after the call.
    When the transaction is called, the ABAP program linked with the transaction code is loaded in a new internal session. The session of the calling program is kept. The called program runs in an SAP LUW of its own.
    If the called transaction is a dialog transaction, after loading the ABAP program the event LOAD-OF-PROGRAM is triggered and the dynpro defined as initial dynpro of the transaction is called. The initial dynpro is the first dynpro of a dynpro sequence. The transaction is finished when the dynpro sequence is ended by encountering the next dynpro with dynpro number 0 or when the program is exited with the LEAVE PROGRAM statement.
    If the called transaction is an OO transaction (as of release 6.10), when loading all programs except class pools the event LOAD-OF-PROGRAM is triggered and then the method linked with the transaction code is called. If the method is an instance method, implicitly an object of the corresponding class is generated and referenced by the runtime environment. The transaction is finished when the method is finished or when the program is exited using the LEAVE PROGRAM statement.
    After the end of the transaction call, program execution of the calling program resumes after the CALL TRANSACTION statement.
    Note
    At the statement CALL TRANSACTION, the authorization of the current user to execute the called transaction is not checked automatically. If the calling program does not execute a check, the called program must check the authorization. To do this, the called program must call function module AUTHORITY_CHECK_TCODE.
    Addition 1
    ... AND SKIP FIRST SCREEN
    Effect
    This addition suppresses the display of a screen of the initial dynpro of a called dialog transaction. The addition AND SKIP FIRST SCREEN suppresses the first screen under these prerequisites:
    For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.
    All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters
    If these prerequisites are met, that screen of the dynpro is displayed that is specified in the Screen Painter as the next dynpro of the initial dynpro.
    Example
    If the static next dynpro of the initial dynpro of the called dialog transaction FLIGHT_TA is not the initial dynpro itself, its screen is suppressed, because its input fields are filled using the SPA/GPA parameters CAR and CON.
    DATA: carrid TYPE spfli-carrid,
          connid TYPE spfli-connid.
    SET PARAMETER ID: 'CAR' FIELD carrid,
                      'CON' FIELD connid.
    CALL TRANSACTION 'FLIGHT_TA' AND SKIP FIRST SCREEN.
    Addition 2
    ... USING bdc_tab [bdc_options]
    Effect
    Use this addition to pass an internal table bdc_tab of row type BDCDATA from the ABAP Dictionary to a dialog transaction. The additions bdc_options control the batch input processing. When a transaction with addition USING is called, the system field sy-binpt is set to value "X" in the called program - while this transaction is running, no other transaction can be called with this addition.
    The internal table bdc_tab is the program-internal representation of a batch input session and must be filled accordingly. The structure BDCDATA has the components shown in the table below.
    Component Description
    PROGRAM Name of the program of the called transaction
    DYNPRO Number of the dynpro to be processed
    DYNBEGIN Flag for the beginning of a new dynpro (possible values are "X" and " ")
    FNAM Name of a dynpro field to be filled or batch input control statement, for example, to position the cursor
    FVAL Value to be passed to the dynpro field or to the control statement
    Using the internal table bdc_tab, you can provide any number of screens of the called transaction with input and user actions.
    System Fields
    sy-subrc Description
    0 The batch input processing of the called transaction was successful.
    < 1000 Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.
    1001 Error in batch input processing.
    Note
    Outside of ABAP Objects you can specify the additions AND SKIP FIRST SCREEN and USING together. However, this does not make sense, because the addition AND SKIP FIRST SCREEN is desigend only to fill the mandatory input fields using SPA/GPA parameters, while the batch input table specified with USING controls the entire transaction flow including the display of the screens.
    Example
    Call of the Class Builder (transaction SE24) and display of class CL_SPFLI_PERSISTENT. The internal table bdcdata_tab contains the input for the batch input processing of the first dynpro (1000) of the transaction. Using structure opt, the batch input processing is set to suppress the first screen and to display the next screen in the standard size.
    DATA class_name(30) TYPE c VALUE 'CL_SPFLI_PERSISTENT'.
    DATA: bdcdata_wa  TYPE bdcdata,
          bdcdata_tab TYPE TABLE OF bdcdata.
    DATA opt TYPE ctu_params.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLSEOD'.
    bdcdata_wa-dynpro   = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_CURSOR'.
    bdcdata_wa-fval = 'SEOCLASS-CLSNAME'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'.
    bdcdata_wa-fval = class_name.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=CIDI'.
    APPEND bdcdata_wa TO bdcdata_tab.
    opt-dismode = 'E'.
    opt-defsize = 'X'.
    CALL TRANSACTION 'SE24' USING bdcdata_tab OPTIONS FROM opt.

  • BAPI for calling Z transaction From NON-SAP system

    hi all, am new to BAPI i want to know that can we call any standard or Z transaction from NON-SAP system using BAPI if yes then plz let me know how.???
    thanx...

    BAPI's are not used for calling transactions. They have the same result though, a business partner for example kan be created, and maintained via the GUI, but it can also be done via a BAPI. These BAPI's are created for calling them from (non-) SAP systems since they are remote enabled. However, this means that the calling application / party will have to 'build' some sort of application themselves in order to call these BAPI's from 'outside' of the SAP system.
    The calling application will have to have access to the system, which can be maintained in the remote destination transaction SM59.
    But enough of this, there are lots and lots of posts on SDN about BAPI's, remote destination etc.

  • To Call a transaction from message body of an e-mail sent from SAP

    I have requirement to call a transaction (say MM03) when I click on some text ( Like  Hyperlink ) in the message body of an email sent by SAP.
    Please let me know how it should be done.

    I dont know whether you can do hyperlink in the mail but i can think of following 2 options:
    1)  Use Workflow and send it to user and then attach transaction MM03 to that so that when user receives message, he/she can directly open MM03.
    2)  In report, you can have hyperlink.

Maybe you are looking for

  • Unable to upload "files" to iTunes, help!

    I recently got a new iPhone and I was able to add 2 mp3s to it that I downloaded off a site I usually do. Now, when I went to upload any more mp3s by "File" "Add File" I am unable to do so. I have looked at other posts and other information is not wo

  • Cannot print wirelessly from Windows 7 (64 bit) laptop to Officejet 6000 Wireless (E609n)

    The printer is a HP Officejet 6000 Wireless (E609n) and is connected via usb to a Windows 7 (64 bit) desktop and the laptop has Windows 7 (64 bit) loaded. No changes were made that I'm aware of other than the usual Windows updates. Server is offline

  • Imac sleep problem

    the display goes to sleep after a few minutes and sometimes dosnt wake when i move the mouse or keyboard, i know its just the display becasue i can play music using the keyboard... i have to put my mac to sleep (CMDalteject) and then wake it for my d

  • Photosmart 7250

    I have a All-in-one 7250 which is feeding a blank page between each printed page in both docs from PDFLite and Mozilla? I have deleted and reinstalled the driver then readded the printer.  Any suggestions?

  • Work Variance Incorrect in Project 2010

    I have 2 projects with the same start date in the future.  No work has been done on them.  Each has the same following values, but the resulting work variance at the project summary (0) is different.  The formula as I understand it : Work Variance =