To display migo by call transaction through ALV

Hai,
I have developed an ALV report in which I am calling some transactions( PO, MIGO,MIR4) to display the documents. but by calling MIGO it is going to create a new goods recept insted of displaying the document. I need how to cal the transaction to display a material document.
Thanks

Call directly the FM [MIGO_DIALOG|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_all&query=migo_dialog&adv=true&sdn_author_name=&sortby=cm_rnd_rankvalue] passing I_MBLNR, I_MJAHR and I_ZEILE parameters. (Default value should give you a display dialog)
* Extract from RM07DOCS
        CALL FUNCTION 'MIGO_DIALOG'
          EXPORTING
            i_action            = 'A04'
            i_refdoc            = 'R02'
            i_notree            = 'X'
            i_no_auth_check     = ' '
            i_deadend           = 'X'
            i_skip_first_screen = 'X'
            i_okcode            = 'OK_GO'
            i_mblnr             = list-mblnr
            i_mjahr             = list-mjahr
            i_zeile             = list-zeile.
Regards

Similar Messages

  • Call transaction through ALV

    Dear All,
    when i am calling transaction VA32 then it is taking same number again and again.
    please chk code below:
    form sub_user_command1 using V_UCOMM1 like sy-ucomm
    v_selfield1 type slis_selfield.
      case V_UCOMM1.
        when '&IC1'.
          if v_selfield1-fieldname = 'VBELN'.
          clear it_kun.
          clear wa_kun.
            read table it_kun into wa_kun index v_selfield1-tabindex.
        if sy-subrc = 0.
            set parameter id 'AUN' field wa_kun-vbeln.
            call transaction 'VA32' AND SKIP FIRST SCREEN.
          endif.
          clear V_UCOMM1.
          clear wa_kun.
      endif.
      endcase.
    *clear V_UCOMM1.
    *set parameter id: 'AUN' field SPACE.
    *Clear 'AUN' with space in byte mode.    "id 'AUN'.
    endform.
    Thanks in Advance,
    Ashish Gautam

    hi,
    u using internal table without header line?
    otherwise u can try like this
    FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.
      CLEAR fcat1.
      CASE u_com.
        WHEN '&IC1'.
      <b>    READ TABLE itab INDEX sel_field-tabindex.</b>   
            IF sy-subrc = 0.
              t_mat = itab-matnr.
             SET PARAMETER ID 'MAT' FIELD t_mat.
             CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
            ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command

  • Call Transaction in ALV GRID Display

    Hi All,
    i have an ALV list .( list of Invoices) i want to call  trans.
    VF03 from clicking the line .
    i have also used User Command, events  in ALV function .
    as mention below , but cant able to call transaction.
    in ALV line is selected but not working or moves to another Tcode as VF03 with parameter id .
    please help me in this , if any body can ?
    thanks in advance
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_INTERFACE_CHECK        = G_INTERFACE_CHECK
          I_CALLBACK_PROGRAM       = GV_REPID
          IT_FIELDCAT              = GT_FIELDCAT[]
          I_DEFAULT                = 'X'
          I_SAVE                   = 'A'
          IS_LAYOUT                = LAYOUT_IN
          IS_VARIANT               = VARIANT_DETAIL
          IT_EVENTS                = EVENTCAT
         I_CALLBACK_PF_STATUS_SET = 'SET_STATUS'
          I_CALLBACK_USER_COMMAND  = USER_COMMAND
          I_GRID_TITLE             = 'Tax Report : GRN'
        I_CALLBACK_TOP_OF_PAGE   = 'page_header'
        I_BACKGROUND_ID          = 'ALV_BACKGROUND'
        IS_PRINT                 = ALV_PRINT
        IMPORTING
          ES_EXIT_CAUSED_BY_USER   = LS_EXIT_BY_USER
      TABLES
        T_OUTTAB                 = IT_VBRP
      EXCEPTIONS
        PROGRAM_ERROR            = 1
        OTHERS                   = 2.
      IF SY-SUBRC <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-SGV4.
      ENDIF.
    Nitin

    HI,
    check the sample code which call the transaction VA02.
    type-pools: slis.
    types: BEGIN OF TY_KNA1,
    KUNNR TYPE KUNNR,
    NAME1 TYPE NAME1,
    ORT01 TYPE ORT01,
    END OF TY_KNA1.
    TYPES: BEGIN OF TY_VBAK,
    VBELN TYPE VBELN,
    ERNAM TYPE ERNAM,
    ERDAT TYPE ERDAT,
    NETWR TYPE NETWR,
    WAERK TYPE WAERK,
    END OF TY_VBAK.
    *&--WORK AREA & TABLE DECLARATION--
    DATA: W_KNA1 TYPE TY_KNA1.
    DATA: T_KNA1 TYPE STANDARD TABLE OF TY_KNA1 INITIAL SIZE 1.
    DATA: W_VBAK TYPE TY_VBAK.
    DATA: T_VBAK TYPE STANDARD TABLE OF TY_VBAK INITIAL SIZE 1.
    *&--FIELDCAT TABLE & WORK AREA--
    DATA: W_FCAT TYPE SLIS_FIELDCAT_ALV.
    DATA: T_FCAT TYPE SLIS_T_FIELDCAT_ALV.
    DATA: W_FCAT1 TYPE SLIS_FIELDCAT_ALV.
    DATA: T_FCAT1 TYPE SLIS_T_FIELDCAT_ALV.
    *&--EVENT TABLE AND WORK AREA--
    DATA: W_EVENTS TYPE SLIS_ALV_EVENT.
    DATA: T_EVENTS TYPE SLIS_T_EVENT.
    DATA: W_EVENTS1 TYPE SLIS_ALV_EVENT.
    DATA: T_EVENTS1 TYPE SLIS_T_EVENT.
    *&--COMMENT TABLE & WORK AREA--
    DATA: W_COMMENT TYPE SLIS_LISTHEADER.
    DATA: T_COMMENT TYPE SLIS_T_LISTHEADER.
    DATA: W_COMMENT1 TYPE SLIS_LISTHEADER.
    DATA: T_COMMENT1 TYPE SLIS_T_LISTHEADER.
    APPENDING FCAT -
    W_FCAT-COL_POS = 1.
    W_FCAT-FIELDNAME = 'KUNNR'.
    W_FCAT-SELTEXT_M = 'CUST. NO'.
    W_FCAT-HOTSPOT = 'X'. "HOT SPOT HAND SYMBOL
    W_FCAT-EMPHASIZE = 'C119'. "FOR COLORING THE COLUMN 1
    APPEND W_FCAT TO T_FCAT.
    CLEAR W_FCAT.
    W_FCAT-COL_POS = 2.
    W_FCAT-FIELDNAME = 'NAME1'.
    W_FCAT-SELTEXT_M = 'CUST. NAME'.
    APPEND W_FCAT TO T_FCAT.
    W_FCAT-COL_POS = 3.
    W_FCAT-FIELDNAME = 'ORT01'.
    W_FCAT-SELTEXT_M = 'CITY'.
    APPEND W_FCAT TO T_FCAT.
    W_FCAT1-COL_POS = 1.
    W_FCAT1-FIELDNAME = 'VBELN'.
    W_FCAT1-SELTEXT_M = 'ORDER NO'.
    W_FCAT1-EMPHASIZE = 'C519'.
    APPEND W_FCAT1 TO T_FCAT1.
    CLEAR W_FCAT.
    W_FCAT1-COL_POS = 2.
    W_FCAT1-FIELDNAME = 'ERNAM'.
    W_FCAT1-SELTEXT_M = 'NAME OF PARTY'.
    APPEND W_FCAT1 TO T_FCAT1.
    W_FCAT1-COL_POS = 3.
    W_FCAT1-FIELDNAME = 'ERDAT'.
    W_FCAT1-SELTEXT_M = 'DATE'.
    APPEND W_FCAT1 TO T_FCAT1.
    W_FCAT1-COL_POS = 4.
    W_FCAT1-FIELDNAME = 'NETWR'.
    W_FCAT1-SELTEXT_M = 'ORDER VALUE'.
    APPEND W_FCAT1 TO T_FCAT1.
    W_FCAT1-COL_POS = 5.
    W_FCAT1-FIELDNAME = 'WAERK'.
    W_FCAT1-SELTEXT_M = 'CURRENCY'.
    APPEND W_FCAT1 TO T_FCAT1.
    *&--APPEND COMMENTRY--
    W_COMMENT-TYP = 'H'.
    W_COMMENT-INFO = 'CUSTOMER DETAILS'.
    APPEND W_COMMENT TO T_COMMENT.
    CLEAR W_COMMENT.
    *&--APPEND EVENTS TABLE--
    W_EVENTS-NAME = 'TOP_OF_PAGE'.
    W_EVENTS-FORM = 'TOPPAGE'.
    APPEND W_EVENTS TO T_EVENTS.
    W_EVENTS-NAME = 'USER_COMMAND'.
    W_EVENTS-FORM = 'SUB2'.
    APPEND W_EVENTS TO T_EVENTS.
    W_EVENTS1-NAME = 'TOP_OF_PAGE'.
    W_EVENTS1-FORM = 'TOPPAGE1'.
    APPEND W_EVENTS1 TO T_EVENTS1.
    CLEAR W_EVENTS1.
    W_EVENTS1-NAME = 'USER_COMMAND'.
    W_EVENTS1-FORM = 'SUB3'.
    APPEND W_EVENTS1 TO T_EVENTS1.
    SELECT-OPTIONS: CUSTNO FOR W_KNA1-KUNNR.
    SELECT KUNNR
    NAME1
    ORT01 FROM KNA1 INTO TABLE T_KNA1
    WHERE KUNNR IN CUSTNO.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    *I_BACKGROUND_ID =
    I_GRID_TITLE = 'CUSTOMER DETAILS'
    IT_FIELDCAT = T_FCAT
    IT_EVENTS = T_EVENTS
    TABLES
    T_OUTTAB = T_KNA1 .
    FORM TOPPAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = T_COMMENT
    I_LOGO = 'LOGO_ALV'.
    ENDFORM. "END OF TOPPAGE SUB.
    FORM SUB2 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.
    READ TABLE T_KNA1 INTO W_KNA1 INDEX FIELDS1-TABINDEX.
    SELECT VBELN
    ERNAM
    ERDAT
    NETWR
    WAERK
    FROM VBAK
    INTO TABLE T_VBAK
    WHERE KUNNR = W_KNA1-KUNNR.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    *I_BACKGROUND_ID =
    I_GRID_TITLE = 'LIST OF ORDERS'
    IT_FIELDCAT = T_FCAT1
    IT_EVENTS = T_EVENTS1
    TABLES
    T_OUTTAB = T_VBAK.
    ENDFORM. "END OF SUB2.
    FORM TOPPAGE1.
    *&--APPEND COMMENTRYOF SECONDRY SCREEN--
    W_COMMENT1-TYP = 'H'.
    W_COMMENT1-INFO = 'LIST OF ORDERS'.
    APPEND W_COMMENT1 TO T_COMMENT1.
    W_COMMENT1-TYP = 'S'.
    W_COMMENT1-KEY = 'CUSTOMER'.
    W_COMMENT1-INFO = W_KNA1-KUNNR.
    APPEND W_COMMENT1 TO T_COMMENT1.
    CLEAR W_COMMENT.
    W_COMMENT1-TYP = 'A'.
    W_COMMENT1-INFO = W_KNA1-NAME1.
    APPEND W_COMMENT1 TO T_COMMENT1.
    CLEAR W_COMMENT1.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = T_COMMENT1
    I_LOGO = 'LOGO_ALV'
    REFRESH T_COMMENT1.
    ENDFORM. "END OF TOPPAGE1
    FORM SUB3 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.
    READ TABLE T_VBAK INTO W_VBAK INDEX FIELDS1-TABINDEX.
    SET PARAMETER ID 'VBAk' FIELD W_VBAK-VBELN.
    CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
    ENDFORM.
    reward if useful.
    thanks and regards.

  • Call Transaction Through RFC

    Hi ,
    I am trying to do a call transaction through RFC call from a Middleware which is a CPIC user (only communication Non dialog User ) . 
    Call  transaction does gets executed without any error but it does not update any data.But when I run it through my user id it works absolutely fine .
    I am not sure what is causing the issue
    Security authorization?
    RFC through Non Dialog user ?
    Paramters missing in RFC  ?
    Paramatertes missing in call transaction option?
    If anyone of you has faced a similiar issue then please let me know the path forward.
    Thanks
    Vikas

    Hi Vikas,
        The problem is in Authorization? And check the mode of Process Synchoronus or asynchoronous? Both the RFC and CALL transaction should be Same /
    Thanks
    MAnju

  • CALL ING TRANSACTION THROUGH ALV

    hi,
    any one can help me.
    i created one ALV interactive report.i want  in that first report when i click a record, it will go to the transaction MM01.
    pls any one can explain with code.

    HI
    see this report
    when you double click on any lne
    it wil take you to a TRANSACTIon
    *& Report  ZTEST_ALV_LOGO
    REPORT  ztest_alv_logo.
    TYPE-POOLS : slis.
    *ALV Formatting tables /structures
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: gt_events   TYPE slis_t_event.
    DATA: gs_layout   TYPE slis_layout_alv.
    DATA: gt_page     TYPE slis_t_listheader.
    DATA: gs_page     TYPE slis_listheader.
    DATA: v_repid     LIKE sy-repid.
    *ALV Formatting work area
    DATA: w_fieldcat TYPE slis_fieldcat_alv.
    DATA: w_events   TYPE slis_alv_event.
    DATA: gt_bsid TYPE TABLE OF bsid WITH HEADER LINE.
    INITIALIZATION.
      PERFORM build_events.
      PERFORM build_page_header.
    START-OF-SELECTION.
    *perform build_comment.     "top_of_page - in initialization at present
      SELECT * FROM bsid INTO TABLE gt_bsid UP TO 10 ROWS.
    *perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.
    *USING = Row, Column, Field name, display length, table name, heading
    *OR
      PERFORM build_fieldcat.
      gs_layout-zebra = 'X'.
    *top of page event does not work without I_callback_program
      v_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program                = v_repid
          i_structure_name                  = 'BSID'
       i_background_id                   = 'ALV_BACKGROUND'
          i_grid_title                      = 'This is the grid title'
      I_GRID_SETTINGS                   =
          is_layout                         = gs_layout
          it_fieldcat                       = gt_fieldcat[]
          it_events                         = gt_events[]
        TABLES
          t_outtab                          = gt_bsid.
    Form..............:  populate_for_fm
    Description.......:  Populates fields for function module used in ALV
    FORM populate_for_fm USING p_row
                               p_col
                               p_fieldname
                               p_len
                               p_table
                               p_desc.
      w_fieldcat-row_pos      = p_row.          "Row Position
      w_fieldcat-col_pos      = p_col.          "Column Position
      w_fieldcat-fieldname    = p_fieldname.    "Field name
      w_fieldcat-outputlen    = p_len.          "Column Lenth
      w_fieldcat-tabname      = p_table.        "Table name
      w_fieldcat-reptext_ddic = p_desc.         "Field Description
      w_fieldcat-input        = '1'.
      APPEND w_fieldcat TO gt_fieldcat.
      CLEAR w_fieldcat.
    ENDFORM.                    " populate_for_fm
    *&      Form  build_events
    FORM build_events.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = gt_events.
      READ TABLE gt_events
                 WITH KEY name =  slis_ev_user_command
                 INTO ls_event.
      IF sy-subrc = 0.
        MOVE slis_ev_user_command TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
      READ TABLE gt_events
                 WITH KEY name =  slis_ev_top_of_page
                 INTO ls_event.
      IF sy-subrc = 0.
        MOVE slis_ev_top_of_page TO ls_event-form.
        APPEND ls_event TO gt_events.
      ENDIF.
    ENDFORM.                    " build_events
    *&      Form  USER_COMMAND
    When user command is called it uses 2 parameters. The itab
    passed to the ALV is in whatever order it currently is on screen.
    Therefore, you can read table itab index rs_selfield-tabindex to get
    all data from the table. You can also check r_ucomm and code
    accordingly.
    FORM user_command USING  r_ucomm     LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      READ TABLE gt_bsid INDEX rs_selfield-tabindex.
    error checking etc.
      SET PARAMETER ID 'KUN' FIELD gt_bsid-kunnr.
      CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
    ENDFORM.                    "user_command
    *&      Form  top_of_page
    Your own company logo can go here if it has been saved (OAOR)
    If the logo is larger than the size of the headings in gt_page,
    the window will not show full logo and will have a scroll bar. Thus,
    it is a good idea to have a standard ALV header if you are going to
    use logos in your top of page.
    FORM top_of_page.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = gt_page
          i_logo             = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "top_of_page
    *&      Form  build_fieldcat
    *Many and varied fields are available here. Have a look at documentation
    *for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE
    FORM build_fieldcat.
      w_fieldcat-fieldname  = 'BUDAT'.
      w_fieldcat-seltext_m  = 'Dte pst'.
      w_fieldcat-ddictxt(1) = 'M'.
      w_fieldcat-edit = 'x'.
    Can change the position of fields if you do not want them in order
    of the DDIC or itab
    w_fieldcat-row_pos = '1'.
    w_fieldcat-col_pos = '10'.
      APPEND w_fieldcat TO gt_fieldcat.
      CLEAR w_fieldcat.
    ENDFORM.                    " build_fieldcat
    *&      Form  build_page_header
          gt_page is used in top of page (ALV subroutine - NOT event)
          *H = Header, S = Selection, A = Action
    FORM build_page_header.
    For Headers, Key is not printed and is irrelevant. Will not cause
    a syntax error, but is not used.
      gs_page-typ  = 'H'.
      gs_page-info = 'Header 1'.
      APPEND gs_page TO gt_page.
      gs_page-typ  = 'H'.
      gs_page-info = 'Header 2'.
      APPEND gs_page TO gt_page.
    For Selections, the Key is printed (bold). It can be anything up to 20
    bytes. It gets printed in order of code here, not by key value.
      gs_page-typ  = 'S'.
      gs_page-key  = 'And the winner is:'.
      gs_page-info = 'Selection 1'.
      APPEND gs_page TO gt_page.
      gs_page-typ  = 'S'.
      gs_page-key  = 'Runner up:'.
      gs_page-info = 'Selection 2'.
      APPEND gs_page TO gt_page.
    For Action, Key is also irrelevant.
      gs_page-typ  = 'A'.
      gs_page-info = 'Action goes here'.
      APPEND gs_page TO gt_page.
    ENDFORM.                    " build_page_header

  • How to resolve the error in bdc call transaction in ALV report

    Dear Experts, i am executing the alv report program and in alv report program one bdc is there..
    after executing output is showing in alv format but one button is there (update master)..when i am clicking update button the bdc is run but is not updated in the material master..after executing my bdc is not updated in mm02.
    how to resove it?
    CALL TRANSACTION 'MM02' USING BDCDATA MODE MODE
                                                              UPDATE 'S'
                                                      MESSAGES INTO MESSTAB.

    Hi Kaustav,
    Looking at the code you attached, it appears to me that your BDC (Form  USER_COMMAND) is not executed at all as you haven't passed the 'USER_COMMAND' in FM REUSE_ALV_GRID_DISPLAY for ALV display.
    You must pass the importing parameter  I_CALLBACK_USER_COMMAND of this FM as 'USER_COMMAND', only then this form will be executed and your BDC will run.
    Thereafter, in case your BDC update fails, you can put a break-point in the form (at CALL TRANSACTION statement) and analyze the message table MESSTAB.
    Hope it helps.
    Regards,
    Sapeksh

  • Call transaction in ALV report

    Dear Experts,
    I want to call transaction HUMO from my ALV report on double click on Handling unit no.
    I want to pass the Handling unit through my report and skip the first screen.
    I try it using Call Transaction but the filed Handling unit doesn't have a parameter ID.
    I also try it using Submit but the program is a function pool.
    Can anyone please help me out in solving the issue.
    Thanks in advance
    Best regards
    Ankur G.

    Hai,
    This can be achieved by creating custom parameter id.
    1.Go to the table maintenance generator of the table TPARA and go to the Maintain button through the transaction SM30. 
    Enter the table view name TPARA.
    2.Click on the maintain button. The following information will appear. Click on the Tick button or the ENTER button to go to the next screen.
    3.Enter the Set/Get parameter id as the parameter ID you want to create. Here, I will be creating the parameter Id as ZNAME_DATA1. Click on ENTER button.
    4.It will ask for the text of the parameter Id. Enter the text of the parameter ID and click on the Save button.
    5.Now go to the SE11 transaction for creating a data element and enter the parameter id at the Further Characteristics tab at the parameter Id section.
    6.Activate the data element and use it with the program. It will act the same good as a standard one.

  • Calling Transaction from ALV using OO Method

    Hi,
    My requirement is as follows....
    I have an ALV grid with columns such as month wise Total of a GL account  say JAN, feb etc...
    When I double click on any of these cells it should take me to the respective Transaction (say FBL3n for the GL account and the company code) . I am able to track the GL account for which the total is displayed and company code is one of my selection criteria. In the main screen of the FBL3N we have to enter the posting date and i also want the Radio button against "all items', presently default is against 'Open Items'. So how can i proceed.
    Thanks and Regards,
    Namit

    DATA gr_event_handler TYPE REF TO lcl_event_handler . .. ..
    *--Creating an instance for the event handler
    CREATE OBJECT gr_event_handler .
    *--Registering handler methods to handle ALV Grid events
    SET HANDLER gr_event_handler->handle_double_click FOR gr_alvgrid .
    CLASS lcl_event_handler IMPLEMENTATION .
    *Handle Double Click
    METHOD handle_double_click .
    PERFORM handle_double_click USING e_row e_column es_row_no .
    ENDMETHOD .
    CLASS lcl_event_handler DEFINITION
    *Double-click control
    Methods:
    handle_double_click
          FOR EVENT double_click OF cl_gui_alv_grid
            IMPORTING e_row e_column
               i_fieldrows      TYPE lvc_t_row.
               w_fieldrows LIKE LINE OF i_fieldrows,
      CALL METHOD o_alvgrid->get_selected_rows
                 IMPORTING
                 et_index_rows = i_fieldrows.
      LOOP AT i_fieldrows INTO w_fieldrows.
        READ TABLE i_batch INTO w_block INDEX w_fieldrows-index.
    if sy-subrc = 0.
    *       CLASS LCL_EVENT_RECEIVER DEFINITION
    CLASS LCL_EVENT_RECEIVER DEFINITION.
    * Event receiver definitions for ALV actions
      PUBLIC SECTION.
        CLASS-METHODS:
    * Row Double click for dirll down.
           HANDLE_DOUBLE_CLICK
             FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
                IMPORTING E_ROW
                          E_COLUMN
                          ES_ROW_NO.
    ENDCLASS.
    * Implementation
    * Every event handler that is specified below should also be set after
    * the object has been created.  This is done in the PBO processing.
    * with the following command
    * SET HANDLER oEventreceiver->handle_toolbar FOR o_Alvgrid.
    CLASS LCL_EVENT_RECEIVER IMPLEMENTATION.
    *&      Method handle_double_click
    * This method is called when the user double clicks on a line to drill
    * down.
    * The following are exported from the ALV
    * LVC_S_ROW
    * LVC_S_COL
    * LVC_S_ROID
      METHOD HANDLE_DOUBLE_CLICK.
    * The double click drill down processing should be
    * coded in the form below.
       PERFORM F9007_HANDLE_DOUBLE_CLICK USING E_ROW
                                               E_COLUMN
                                               ES_ROW_NO.
      ENDMETHOD.
    ENDCLASS.
    *&      Form  F9007_HANDLE_DOUBLE_CLICK
    * This form is called when the user double clicks on a line to drill
    * down.
    *      -->P_E_ROW_ID    - Row ID  text
    *      -->P_E_COLUMN_ID - Column ID
    *      -->P_ES_ROW_NO   - Row number
    FORM f9007_handle_double_click USING p_row
                                         p_column
                                         p_row_no.
      DATA: lw_output LIKE LINE OF i_output.
    * RG:16/11/2004 - Start of Changes
    * Need to check that a subtotal or grand total line has not been
    * double-clicked, otherwise the report will produce a short dump!
      check p_row+0(1) is initial.
    * RG:16/11/2004 - End of Changes
      READ TABLE i_output INDEX p_row INTO lw_output.
      CASE p_column.
        WHEN 'KNUMA'.
          IF NOT lw_output-knuma IS INITIAL.
            SET PARAMETER ID 'VBO' FIELD lw_output-knuma.
            CALL TRANSACTION 'VBO3' AND SKIP FIRST SCREEN.
          ENDIF.
        WHEN 'VBAK_VBELN'.
         IF NOT lw_output-vbak_vbeln IS INITIAL.
          SET PARAMETER ID 'AUN' FIELD lw_output-vbak_vbeln.
            CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
          ENDIF.
        WHEN 'VBRK_VBELN'.
          IF NOT lw_output-vbrk_vbeln IS INITIAL.
            SET PARAMETER ID 'VF' FIELD lw_output-vbrk_vbeln.
            CALL TRANSACTION 'VF03' AND SKIP FIRST SCREEN.
          ENDIF.
      ENDCASE.
    ENDFORM.                    " F9007_HANDLE_DOUBLE_CLICK

  • Call transaction from alv

    i am calling a transaction from alv i want to select the check boxes on th called transaction and go to the next screen how do i do that

    Hello Chandan
    You have to handle the DOUBLE_CLICK event either in your callback form routine (FM-based ALV) or event handler method for event USER_COMMAND (ABAP-OO based ALV).
    If you call the transaction directly you will not have the authority check for this transaction. If you need this, you can use function module <b>ABAP4_CALL_TRANSACTION</b> instead.
    If you want to open the transaction in a new window you can use the static method <b>CL_RECA_GUI_SERVICES=>CALL_TRANSACTION</b> (no authority check!).
    Regards
    Uwe

  • Want to call transactions from ALV list output

    Hi Guru's,
    I have a report which displays Open PR's, open PO's n their details with respect to material. wat i want to do is call transactions from this out put i.e i want a interactive output. if i click on particular PR i want the system to call that PR screen. how can i do this?? Plz help.

    REFER THIS
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
      I_CALLBACK_PROGRAM             = ' '
      I_CALLBACK_PF_STATUS_SET       = ' '
      I_CALLBACK_USER_COMMAND        = 'USER_COMMAND '
      I_STRUCTURE_NAME               =
      IS_LAYOUT                      =
      IT_FIELDCAT                    =
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
      I_SAVE                         = ' '
      IS_VARIANT                     =
      IT_EVENTS                      =
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      IR_SALV_LIST_ADAPTER           =
      IT_EXCEPT_QINFO                =
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      TABLES
        T_OUTTAB                       =
    IF SY-SUBRC <> 0.
    ENDIF.
    AND THEN
                     rs_lineinfo type slis_lineinfo.
    FORM user_command5 USING r_ucomm LIKE sy-ucomm
                      rs_selfield TYPE slis_selfield.
    data : lv_date type char4.
    CLEAR : LV_DATE .
    CASE r_ucomm.
    WHEN '&IC1'.
          IF rs_selfield-fieldname = 'BELNR'.
        read table it_e into wa_e index rs_selfield-tabindex.
        if sy-subrc = 0.
        lv_date = wa_e-budat(4).
        endif.
        SET PARAMETER ID 'BLN' FIELD rs_selfield-value.
        SET PARAMETER ID 'BUK' FIELD s_bukrs-low.
        SET PARAMETER ID 'GJR' FIELD lv_date.
        call TRANsaction 'FB03' AND SKIP FIRST SCREEN.
        endif.
        ENDCASE.
    ENDFORM. "user_comm

  • Calling Transaction through User Decision step in workflow

    Hi all,
    Pls help me calling a transaction through User Decision step in workflow. I have attached two buttons to my User decision and the one of the outcomes to a task where I am calling the transaction through a method of BOR. But the problem is I am unable to see the transaction when I press the button on my User Decision at test run.
    Can you ppl let me know how can I achieve this?
    Pls reply ASAP...
    Thanks
    Sangharsh

    Hello Sangharsh ,
    Please Check the paramater of of the method which you define.
    e.g. I define CALL_TCODE_CJ03 method
          which have the parameters FLAG,ProjectDefinition,WBSElement2,User
          with export, import checkbox.            
    Pass the paratmeres in programs
    e.g.
    BEGIN_METHOD CALL_TCODE_CJ03 CHANGING CONTAINER.                      
    DATA:                                                          
          FLAG(1),                                                        
          PROJECTDEFINITION TYPE PROJ-PSPID,                              
          WBSELEMENT2 TYPE PRPS-POSID,                                    
          USER TYPE USR21-BNAME.                                                                               
    SWC_GET_ELEMENT CONTAINER 'FLAG' FLAG.                              
      SWC_GET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.    
      SWC_GET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2.                
      SWC_GET_ELEMENT CONTAINER 'User' USER.                                                                               
    GET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.                       
      GET PARAMETER ID 'PRO' FIELD WBSELEMENT2.                                                                               
    SET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.                       
      SET PARAMETER ID 'PRO' FIELD WBSELEMENT2.                             
      CALL TRANSACTION 'CJ03' AND SKIP FIRST SCREEN.                                                                               
    SWC_SET_ELEMENT CONTAINER 'FLAG' FLAG.                              
      SWC_SET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.    
      SWC_SET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2.    SWC_SET_ELEMENT CONTAINER 'User' USER. 
    END_METHOD.
    I hope it will help you.
    ***Assigning points is the way to say thanks in SDN.***
    Minaxi Shah

  • Call Transaction in ALV Tree Display on Double Click

    Hi Experts,
    How can i call any Transaction on Double clicking  a field in ALV Tree?
    I'm able to call the transaction when Double clicked a field but it is not reading the value of the field on which i double click. It calls the transaction skipping the first screen with always the same value of the field.
          E.g : Whether i click on Purchase order no.  450000010 or 450000003 it displays the purchase order 4500000010 after it goes to ME23N transaction skipping the first screen.
            I am Trying Method ITEM_DOUBLE_CLICK of Class CL_GUI_COLUMN_TREE
    by passing the parameter NODE_KEY.But it's not working.
    Thanks & Regards,
    Vinit Ranjan

    hi
    (also check u have refresh the field)
    Check the demo program,In this double click the data fields it will display some field in screen,You can check it
    BCALV_GRID_DND_TREE
    Thanks
    Edited by: dharma raj on Jun 17, 2009 7:41 PM

  • Calling transaction through webdynpro abap applicatoin

    hi,
    Is it possible to call an EWT transaction or an transaction from a webdynpro abap application.
    Regards,
    Divya

    The example demo listed works under special circumstance ONLY.
    Logon to SAP.
    At main menu add a favourite of type WDA.
    Choose application wdr_sapgui_demo1  .
    Now run demo.
    The WDA app appears inside an SAP GUI screen.
    Now the when the runtime API call the sapgui manager, a handle to the GUI is available.
    The new transaction can now be fired. EG navigate away to new transation.
    If the GUI is not already active you have another issue.
    I suggest you search the forum for the use of SAPGUI shortcuts and other
    such tricks . There has been a few topics and solutions discussed.
    Cheers
    Phil.

  • Call Transaction "MIGO" in display mode only

    Hi friends,
    I have changed the standard the SAP standard program MB51 to a Customer Program 'ZMB51' based upon the user requirement.Iam able to get all the values (output)
    Now my requirement is .... iam trying to call transaction "MIGO" when the user clicks on the Material Document Number (MBLNR) (as how in Standard program)
    I ve used "ALV_GRID..." display. and given a callback_user_command also .... iam able to call the trasaction ...... but it is editable and not in the display mode ..........
    Here my code :
    FORM SY_UCOMM_FOR_MBLNR USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE
    SLIS_SELFIELD.
      IF RS_SELFIELD-FIELDNAME EQ 'MBLNR'.
      IF NOT RS_SELFIELD-VALUE IS INITIAL  AND
             RS_SELFIELD-VALUE NE SY-ULINE.
          CALL TRANSACTION 'MIGO'.
        ENDIF.
        IF R_UCOMM EQ SPACE.
        ENDIF.
      ENDIF.
    ENDFORM.                    " SY_UCOMM_FOR_MBLNR
    So ??????????????????
    What is the remedy ????
    Expecting ur answers....
    Thanks in Advance
    Cheers,
    R.Kripa.

    Hi ... it is solved ...
    I ve changed the code as how it was in MB51 report.
    Here is my code
    FORM SY_UCOMM_FOR_MBLNR USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE
    SLIS_SELFIELD.
      CASE RS_SELFIELD-TABNAME.
        WHEN 'I_FINAL'.
          READ TABLE I_FINAL INDEX RS_SELFIELD-TABINDEX.
      ENDCASE.
      CHECK SY-SUBRC = 0 .
      IF R_UCOMM = '&IC1'.
        CHECK RS_SELFIELD-TABNAME = 'I_FINAL'.
        CASE RS_SELFIELD-FIELDNAME.
          WHEN 'MBLNR'.
            SET PARAMETER ID 'MBN' FIELD I_FINAL-MBLNR.
            SET PARAMETER ID 'POS' FIELD I_FINAL-ZEILE.
            SET PARAMETER ID 'MJA' FIELD I_FINAL-MJAHR.
        ENDCASE.
        IF SY-SUBRC = 0.
          SELECT SINGLE * FROM MKPF
                    WHERE  MBLNR = I_FINAL-MBLNR
                      AND  MJAHR = I_FINAL-MJAHR.
          IF SY-SUBRC = 0.
    MIGO_DIALOG is a funcion module to set the MIGO transaction
    in Display mode.
            CALL FUNCTION 'MIGO_DIALOG'
              EXPORTING
                I_ACTION            = 'A04'
                I_REFDOC            = 'R02'
                I_NOTREE            = 'X'
                I_NO_AUTH_CHECK     = ' '
                I_DEADEND           = 'X'
                I_SKIP_FIRST_SCREEN = 'X'
                I_OKCODE            = 'OK_GO'
                I_MBLNR             = I_FINAL-MBLNR
                I_MJAHR             = I_FINAL-MJAHR
                I_ZEILE             = I_FINAL-ZEILE.
          ENDIF.
        ENDIF.
      ENDIF.
    But still if anyone knows how to call MIGo transaction i Display mode using 'CALL TRANSACTION 'MIGO''.
    Thanks friends,
    Cheers
    R.Krpia.

  • BDC call transaction

    Hi All,
      Help needed. Im facing a problem in BDC call transaction. Im calling a z screen ie i have developed a modulepool prog. In this I have given a zscreen.
    Now by using a call transasction method im calling this screen ie the zscreen and i  want to update a z table through a flat file.
    the system is able to read the flat file and then im able to read it in my internal table. after this im transfering this internal table content in the BDCtable it is even taking it up but then when im calling the command:
    CALL TRANSACTION 'YVTRANS' USING jtab MODE 'A' UPDATE 'S' MESSAGES INTO ktab.
    It takes me to the screen connected by the ztcode yvtrans. but no data is coming in the screen . and then vn im inserting the content but nothing happens wat could be the probable error.
    This is my code:
    *& Report  ZBDCCALLTXN1
    REPORT  zbdccalltxn1.
    *& Report  ZBDCCALLTXN
    *REPORT  zbdccalltxn.
    PREDEFINED TABLES ***
    TABLES:zemp.
    INTERNAL TABLE TO UPLOAD FLAT FILE ***
    DATA:BEGIN OF itab OCCURS 0,
         empno LIKE zemp-empno,
         name LIKE zemp-empname,
         deptno LIKE zemp-deptid,
         deptname LIKE zemp-deptname,
         END OF itab.
    INTERNAL TABLE FOR MAPPING USING BDCDATA ***
    DATA:BEGIN OF jtab OCCURS 0.
            INCLUDE STRUCTURE bdcdata.
    DATA:END OF jtab.
    INTERNAL TABLE FOR ERROR CAPTURING USING BDCMSGCOLL ***
    DATA:BEGIN OF ktab OCCURS 0.
            INCLUDE STRUCTURE bdcmsgcoll.
    DATA:END OF ktab.
    FUNCTION MODULE TO UPLAOD FLAT FILE ***
    CALL FUNCTION 'UPLOAD'
      EXPORTING
        filename                      = 'C:\Documents and Settings\mad13363\Desktop\file.txt'
       filetype                      = 'ASC'
                       HAS_FIELD_SEPARATOR           = ' '
                       HEADER_LENGTH                 = 0
                       READ_BY_LINE                  = 'X'
                       DAT_MODE                      = ' '
                       CODEPAGE                      = ' '
                       IGNORE_CERR                   = ABAP_TRUE
                       REPLACEMENT                   = '#'
                       CHECK_BOM                     = ' '
                       VIRUS_SCAN_PROFILE            =
                     IMPORTING
                       FILELENGTH                    =
                       HEADER                        =
      TABLES
        data_tab                      = itab
    EXCEPTIONS
       file_open_error               = 1
       file_read_error               = 2
       no_batch                      = 3
       gui_refuse_filetransfer       = 4
       invalid_type                  = 5
       no_authority                  = 6
       unknown_error                 = 7
       bad_data_format               = 8
       header_not_allowed            = 9
       separator_not_allowed         = 10
       header_too_long               = 11
       unknown_dp_error              = 12
       access_denied                 = 13
       dp_out_of_memory              = 14
       disk_full                     = 15
       dp_timeout                    = 16
       OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    READ DATA FROM ITAB ***
    LOOP AT itab.
      REFRESH jtab.
      PERFORM sub USING 'YVTRANS' '0100'.
    TRANSFER THE DATA FROM INTERNAL TABLE TO APLLICATION ***
      PERFORM sub1.
    TO SAVE THE RECORDS IN DB SERVER ***
    PERFORM sub1 USING 'BDC_OKCODE' 'INSERT'.
    LOGIC TO PROVIDE VALIDATIONS USING BDCDATA, DISPLAY MODE, BDCMSGCOLL ***
      CALL TRANSACTION 'YVTRANS' USING jtab MODE 'A' UPDATE 'S' MESSAGES INTO ktab.
    LOGIC REQUIRED FOR LOG FILE ***
      LOOP AT ktab.
        IF ktab-msgtyp = 'I' OR
            ktab-msgnr = 000.
          WRITE:/1 'VENDOR', 15 itab-empno, 30 'INSERTED'.
        ELSEIF ktab-msgtyp = 'E' OR
                  ktab-msgnr = '001'.
          WRITE:/1 'VENDOR', 15 itab-empno, 30 'NOT INSERTED'.
        ENDIF.
      ENDLOOP.
      REFRESH ktab.
    ENDLOOP.
    FROM TO PASS  PRG NAME, SCREEN NUMBER AND FIRST SCREEN ***
    FORM sub USING a b.
      CLEAR jtab.          " CLEAR REFRESHES WORK AREA
      jtab-program = a.
      jtab-dynpro = b.
      jtab-dynbegin = 'X'.
      APPEND jtab.
    ENDFORM.                    "SUB
    FROM TO PASS FEILD NAME AND FIELD VALUE ***
    FORM sub1.
      CLEAR jtab.
      jtab-fnam = 'zemp-EMPNO'.
      jtab-fval = itab-empno.
      jtab-program = 'YVTRANS'.
      jtab-dynpro = '0100'.
      APPEND jtab.CLEAR jtab.
    *Passing screen information to BDCDATA
      jtab-fnam = 'ZEMP-EMPNAME'.
      jtab-fval = itab-name.
      jtab-program = 'YVTRANS'.
      jtab-dynpro = '0100'.
      APPEND jtab.CLEAR jtab.
      jtab-fnam = 'ZEMP-DEPTID'.
      jtab-fval = itab-deptno.
      jtab-program = 'YVTRANS'.
      jtab-dynpro = '0100'.
      APPEND jtab.CLEAR jtab.
      jtab-fnam = 'ZEMP-DEPTNAME'.
      jtab-fval = itab-deptname.
      jtab-program = 'YVTRANS'.
      jtab-dynpro = '0100'.
      APPEND jtab.CLEAR jtab.
    *Passing BDC_OKCODE to BDCDATA
      jtab-fnam = 'BDC_OKCODE'.
      jtab-fval = 'INSERT'.
      APPEND jtab.CLEAR jtab.
    ENDFORM.                                                    "sub1
    reward for all useful ans

    Hi madhvi,
                       You are using jtab within the form.. i dont think you can use it directly inside ur FORM sub1 without declaring it or without passing it. and it will give you the syntax error.
    and please send me the step by step code you have written in editor so that i can check it and can reply you with proper solution'
    Thanks ,
    Prasanna

Maybe you are looking for