Call a transaction code in dynamic action

Hi
How can we call a transaction code in a dynamic action.
TC XD01 is populated when changes is happen in IT0006 subtype 03.
Regards
WS

Hi,
Please find the below threads which may help you.
Problem in calling dynamic actions in BDC
Create Dynamic Action
Triggering Dynamic actions when updating an Infotype using a FM
Thanks & Regards,
Sandip Biswas.

Similar Messages

  • Calling a transaction code in between the program and use the output

    Hi frnds,
              i want to call a transaction code in between the program   and pass the input .After getting the output, use that output in the program

    Hi Navin,
                     Why don't you sit with ABAPer he can explain better.
    Regards,
    HAri.

  • Calling a transaction code

    Dear Expert,
    Is that possible to call a transaction code using a webdynpro for abap. I have a button in my program where when i click on the button, it need to all up the su01 screen.
    My coding is as below
    method ONACTIONEDIT_APPRAISAL .
    LEAVE TO TRANSACTION 'SU01'.
    endmethod.
    However when i run this program, and click ont he button, the system return a short dump.
    Any idea?
    Thanks,
    Regards,
    Bryan

    Dear Suman or anyone,
    I have solve this using the navigate_absolute method, however the NAVIGATION_MODE seem that does not works.
    Code begin*
    method ONACTIONEDIT_APPRAISAL .
      data lr_componentcontroller type ref to ig_componentcontroller .
      data l_api_componentcontroller type ref to if_wd_component.
      data lr_port_manager type ref to if_wd_portal_integration.
      lr_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
      l_api_componentcontroller = lr_componentcontroller->wd_get_api( ).
      lr_port_manager = l_api_componentcontroller->get_portal_manager( ).
    Data:
    target type string.
    Data:
    nmode type string.
    target = 'pcd:portal_content/mysap/Appraisal/PPPM_PAGE'.
    nmode = 'INPLACE'.
      call method lr_port_manager->navigate_absolute
        exporting
          NAVIGATION_MODE = nmode
          navigation_target = target
    endmethod.
    *code end
    I have tried to use the INPLACE navigation mode, but it still display it in a new portal page. Anyway to control it? Do i need to define a area so that the target will show in that particular area?
    Please help me...
    Thanks
    Regards,
    Bryan

  • Call MR21 Transaction code

    Hi Expert,
    i want to call MR21 transaction code from program with filling plant ,company code and material from the production order
    my first question is
    is it possible to call MR21 with filling material?
    if possible then how ?
    Thanks,
    Mahipal

    Hi,
    you just need to change the MODE.
    N
    Screens are not displayed. You must choose this mode when you run the BDC in a background job.
    A
    All screens are displayed. On each screen, a little popup is displayed with the next recorded function, the user has to press Enter to execute it.
    E
    By default, screens are not displayed, except if an error occurs, or if the end of BDC data is reached although the recorded transaction was not exited
    Do not forget to click on "Correct Answer", to close the topic.
    Rachid.

  • Call a routine in a dynamic action.

    Hi Experts,
    i want to write a routine in which i can give the error msg while saving the infotype 0002 incase the given condition is not fulfilled.
    Can you tell me where i can write this routine and how to call it in a dynamic action.
    i hav written other types of dynamic actions before but never called any routine before
    Plz give me the detailed info regarding writing a routine.
    regards
    TS

    Hello TS,
    You can do that using F in Indicator for step but iam not sure whether it will return an error message. We have user exits for this which might solve your issue. We have userexit PBAS0001 and in this EXIT_SAPFP50M_002 Function module, we need to write the code which ever you want to do.
    For Calling FORM in Dynamic actions.
    P - Check conditions
    I - Maintain infotype record
    W - Set default values when creating a new record
    V - Reference to another step
    F - Call routine
    M - Send mail
    Say you have a program ZTEST. In this you need to write the form that needs to be called in dynamic action and say for ex:form_test.
    You can fill only structure RP50D values, because these values you can get it back to dynamic action. ypu can check for examples in dynamic actions it self which have 'F' indicator step.
    Regards,
    Kiran I

  • Calling a transaction code on click on alv

    how do i call a transaction on mouse double click on alv grid.
    thanks
    chinmaya

    Can u please explain wid reef. to this code thnx
    report ztst_chin_alv3.
    tables : lfb1.
       Declarations                                                     *
    selection-screen begin of block a with frame title text-001.
    select-options : bukrs for lfb1-bukrs.
    select-options : lifnr for lfb1-lifnr.
    selection-screen end of block a.
    data: r_container     type ref to cl_gui_custom_container.
    data: r_grid          type ref to cl_gui_alv_grid.
    data: g_fieldcat      type lvc_t_fcat.
    data: w_fieldcat      like line of g_fieldcat.
    data: g_layout        type lvc_s_layo.
    data: ok_code         like sy-ucomm.
    data: gs_variant      type disvariant.
    data: t_selected      type lvc_t_row.
    data  wa_selected     like line of t_selected.
    data: it_items        like eban occurs 0.
    data: it_sort type lvc_t_sort.
    data: s_sort type lvc_s_sort.
    data: h_test_alv type lvc_s_col.
    data: begin of it_lfb1 occurs 0,
    lifnr like lfb1-lifnr,
    bukrs like lfb1-bukrs,
    akont like lfb1-akont,
    fdgrv like lfb1-fdgrv,
    end of it_lfb1.
       Initialization                                                   *
    initialization.
    at selection-screen.
      ok_code = sy-ucomm.
      case ok_code.
        when 'BACK'.
          leave program.
        when 'CANCEL'.
          leave program.
        when 'EXIT'.
          leave program.
        when 'ONLI' or 'CRET'.
          call screen 100.
        when others.
      endcase.
        GetData                                                         *
    module getdata output.
      if sy-ucomm <> 'STOP'.
    *refresh control container_1 from screen scr.
        refresh it_lfb1.
        clear bukrs.
        clear lifnr.
        select lifnr bukrs akont fdgrv
          into corresponding fields of  table it_lfb1
          from lfb1
          where
          bukrs in bukrs
          and lifnr in lifnr.
      endif.
      refresh bukrs.
      refresh lifnr.
    endmodule.
          Create ALV                                                    *
    module create_alv output.
      gs_variant-report = sy-repid.
      if r_container is initial.
        create object r_container
                 exporting container_name = 'CONTAINER_1'.
        create object r_grid
              exporting i_parent = r_container.
      endif.
    *modify the headings in the field catalogue
      call function 'LVC_FIELDCATALOG_MERGE'
           exporting
                i_structure_name = 'ztest_alv'
           changing
                ct_fieldcat      = g_fieldcat[].
      loop at g_fieldcat into w_fieldcat.
        case w_fieldcat-fieldname.
          when 'ZCURSTAT'.
            w_fieldcat-scrtext_l = 'Prev.RelCode'.
            w_fieldcat-scrtext_m = 'Prev.RelCode'.
            w_fieldcat-scrtext_s = 'Prev.RelCode'.
            w_fieldcat-reptext   = 'Prev.RelCode'.
        endcase.
        modify g_fieldcat from w_fieldcat.
      endloop.
      call method r_grid->set_table_for_first_display
        exporting
       I_BYPASSING_BUFFER            =
       I_BUFFER_ACTIVE               =
       I_CONSISTENCY_CHECK           =
          i_structure_name              = 'ztest_alv'
          is_variant                    = gs_variant
          i_save                        = 'A'
       I_DEFAULT                     = 'X'
          is_layout                     = g_layout
       IS_PRINT                      =
       IT_SPECIAL_GROUPS             =
       IT_TOOLBAR_EXCLUDING          =
       IT_HYPERLINK                  =
       IT_ALV_GRAPHICS               =
       IT_EXCEPT_QINFO               =
        changing
          it_outtab                     = it_lfb1[]
          it_fieldcatalog               = g_fieldcat[]
          it_sort                       = it_sort[]
       IT_FILTER                     =
        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.
       call method r_grid->set_table_for_first_display
                           exporting i_structure_name     = 'ztest_alv'
                                     is_layout            = g_layout
                                     is_variant           = gs_variant
                                     i_save               = 'A'
                           changing it_outtab = it_lfb1[]
                                    it_fieldcatalog  = g_fieldcat[].
    *ELSE.
    CALL METHOD r_grid->refresh_table_display
    EXPORTING i_soft_refresh = ' '.
    endmodule.
       STATUS                                                           *
    module status output.
      set pf-status '0100'.
    endmodule.
         User Commands                                                  *
    module user_command input.
      ok_code = sy-ucomm.
      case ok_code.
        when 'BACK'.
          call screen '1000'.
        when 'CANCEL'.
          leave program.
        when 'EXIT'.
          leave program.
      endcase.
    endmodule.
         ALV Layout                                                     *
    module layout output.
      g_layout-zebra = 'X'.
      g_layout-sel_mode = 'A'.
      g_layout-grid_title = ''.
      g_layout-detailtitl = ''.
    endmodule.
          MODULE sort_itab                                              *
    module sort_itab output.
    *break-point.
    *data s_Sort type lvc_s_sort.
      perform sort_itab.
    endmodule.
          FORM sort_itab                                                *
    form sort_itab.
      s_sort-spos = '1'.
      s_sort-fieldname = 'FDGRV'.
      s_sort-up = 'X'.
      append s_sort to it_sort.
      clear s_sort.
    endform.
         Select Rows                                                    *
    form get_selected_rows.
      call method r_grid->get_selected_rows
      importing et_index_rows = t_selected.
      if t_selected is initial.
        call function 'WS_MSG'
             exporting
                  msg_type = 'E'
                  text     = 'Select Line'
                  titl     = 'Select Line'.
        sy-ucomm = 'STOP'.
      endif.
    endform.
    This is Test code.
    *class lcl_event_receiver definition.
    *public section.
       methods:
       handle_double_click
           for event double_click of cl_gui_alv_grid
               importing e_row e_column.
    private section.
    *endclass.
    *class lcl_event_receiver implementation.
    method handle_double_click.
    **endmethod.
    *endclass.

  • Calling earliest record in a dynamic action

    Hi all,
    I am using dynamic actions to call infotype 0016 when user creates a new record in infotype 19. I am opening this infotype 0016 in change mode.
    Now,  I want that the earliest record of infotype 0016 should come in the change mode and not the latest one.
    Please suggest what to do for that?
    Thanks
    Ribhu

    Hi Do in this way..
    Call a routine...
    There is a structure RP50D which is accessible in dynamic action...
    Structure is : 
    FIELD1
    DATE1
    DATE2
    FLAG1
    .INCLUDE  CI_INCLUDE
    in side that routine find out the record for ur particular date..
    and pass BEGDA and ENNDA for that record to RP50D-DATE1 and RP50D-DATE2.
    and in dynamic action call :
    COP,0016,,,(RP50D-DATE1),(RP50D-DATE2)
    if u want more fields then u can include in CI include..
    Hope it will work
    reward if helpful
    Regards
    Prax

  • Problem with calling we02 transaction code from web dynpro

    Hello everyone,
    I want to skip the initial screen of we02 tcode for this i have created the URL, provided the idoc number and
    used the function code DYNP_CODE=ONLI for execute button.
    DATA : FINAL_URL TYPE STRING.
    CONCATENATE 'host' '.port' '/sap/bc/gui/sap/its/webgui?~transaction=we02 DOCNUM-LOW='
                ls_itab-docnum ';CREDAT-low=' ' ' ';DYNP_OKCODE=ONLI'
                 into FINAL_URL.
    I am trying to pass the idoc number internally and click on execute button...so that the end user can see the idoc display directly, rather than clicking the execute button manually. But, unfortunately the function code for execute buttong (ONLI) is not working. In WE02 tcode, provided input values are appeaing correctly but not triggering the execute button.
    Please help!
    Thanks in advance...

    Hi Rohit.,
    Did u tried my previous reply.,  Use., & ~OKCODE=ONLI .,
    http://host:8000/sap/bc/gui/sap/its/webgui?sap-system-login-basic_auth=X&sap-client=800&sap-language=EN&transaction=we02&okcode=ONLI
    tis will work.,
    Thanks & Regards
    Kiran

  • ALV Grid Calling Transaction Code

    Hello Everybody
    Can anyone help me about my problem in using ALV Grid calling a transaction code...?Here is the sample code below..
           IF rs_selfield-fieldname = 'BELNR'.
            SET PARAMETER ID 'BLN' FIELD  rs_selfield-value.
            CALL TRANSACTION 'FB03'  AND SKIP FIRST SCREEN.
          ENDIF.
    the main problem is how can I set my parameter id for company since
    my rs_field-value is for the column BELNR ( document # field only)
    it returns error when i set this code since i have no value to pass for rs_selfield for company code
            SET PARAMETER ID 'BUK' FIELD 
    Help
    thanks in advance
    aVaDuDz

    Hi,
    *"Table declarations...................................................
    TABLES:
      rbkp,                                " Document Header Invoice receipt
      rseg,                                " Document Item: Incoming Invoice
      eban,                                " Purchase Requisition
      t001w.                               " Plants/Branches
    *"Selection screen elements............................................
    PARAMETERS:
      p_gjahr LIKE rbkp-gjahr.             " Fiscal Year
    SELECT-OPTIONS:
      s_belnr FOR rbkp-belnr,              " Document number of an invoice
      s_bldat FOR rbkp-bldat,              " Document Date in Document
      s_budat FOR rbkp-budat,              " Posting Date in the Document
      s_werks FOR rseg-werks.              " Plant
    *" Data declarations...................................................
    Work variables                                                      *
    DATA:
      w_flag1  TYPE c VALUE '0',           " Flag variable 1
      w_flag2  TYPE c VALUE '0',           " Flag variable 2
      w_index1 TYPE sy-tabix.              " Index variable
    Field String to hold Document Header Invoice receipt                *
    DATA:
      BEGIN OF fs_rbkp,
        belnr TYPE rbkp-belnr,             " Document number of an invoice
        gjahr TYPE rbkp-gjahr,             " Fiscal Year
        bldat TYPE rbkp-bldat,             " Posting Date in the Document
        budat TYPE rbkp-budat,             " Posting Date in the Document
        lifnr TYPE rbkp-lifnr,             " Different invoicing party
      END OF fs_rbkp,
    Internal table to hold Document Header Invoice receipt              *
      t_rbkp LIKE STANDARD TABLE OF fs_rbkp.
    Field String to hold Document Item: Incoming Invoice                *
    DATA:
      BEGIN OF fs_rseg,
        belnr TYPE rseg-belnr,             " Document number of an invoice
        ebeln TYPE rseg-ebeln,             " Purchasing Document Number
        wrbtr TYPE rseg-wrbtr,             " Amount in document currency
      END OF fs_rseg,
    Internal table to hold Document Item: Incoming Invoice              *
    t_rseg LIKE STANDARD TABLE OF fs_rseg.
    Field String to hold Purchase Requisition                           *
    DATA:
      BEGIN OF fs_eban,
        banfn TYPE eban-banfn,             " Purchase requisition number
        ernam TYPE eban-ernam,             " Person who Created the Object
        afnam TYPE eban-afnam,             " Name of requisitioner/requester
        badat TYPE eban-badat,             " Requisition (request) date
        ebeln TYPE eban-ebeln,             " Purchase order number
      END OF fs_eban,
    Internal table to hold Purchase Requisition                         *
      t_eban LIKE STANDARD TABLE OF fs_eban.
    Field String to hold Desired Data                                   *
    DATA:
      BEGIN OF fs_final,
        ebeln TYPE rseg-ebeln,             " Purchasing Document Number
        banfn TYPE eban-banfn,             " Purchase requisition number
        badat TYPE eban-badat,             " Requisition (request) date
        bldat TYPE rbkp-bldat,             " Posting Date in the Document
        lifnr TYPE rbkp-lifnr,             " Different invoicing party
        wrbtr TYPE rseg-wrbtr,             " Amount in document currency
        afnam TYPE eban-afnam,             " Name of requisitioner/requester
        ernam TYPE eban-ernam,             " Name of Person who Created the
                                           " Object
      END OF fs_final,
    Internal table to hold Desired Data                                 *
      t_final LIKE STANDARD TABLE OF fs_final.
                          INITIALIZATION                                *
    INITIALIZATION.
      p_gjahr = sy-datum+0(4).
                          AT SELECTION-SCREEN EVENT                     *
    AT SELECTION-SCREEN.
      IF s_belnr IS INITIAL OR s_bldat IS INITIAL OR s_budat IS INITIAL.
        MESSAGE ' (Invoice) Add Creation Date .' TYPE 'E'.
      ENDIF.                               " IF S_BELNR...
                          AT SELECTION-SCREEN ON FIELD EVENT            *
    AT SELECTION-SCREEN ON s_werks.
      SELECT SINGLE werks                  " Plant
        FROM t001w
        INTO t001w
       WHERE werks IN s_werks.
      IF sy-subrc NE 0.
        MESSAGE 'Invalid plant' TYPE 'E'.
      ENDIF.                               " IF SY-SUBRC NE 0.
                          START-OF-SELECTION EVENT                      *
    START-OF-SELECTION.
      PERFORM get_purchaserequistion.
      LOOP AT t_rseg INTO fs_rseg.
        READ TABLE t_rbkp INTO fs_rbkp WITH KEY belnr = fs_rseg-belnr
                                                        BINARY SEARCH.
        IF sy-subrc EQ 0.
          READ TABLE t_eban INTO fs_eban WITH KEY ebeln = fs_rseg-ebeln
                                                        BINARY SEARCH.
          IF sy-subrc EQ 0.
            IF fs_rbkp-bldat LE fs_eban-badat.
              DELETE t_rseg INDEX sy-tabix.
            ENDIF.                         " IF FS_RBKP-BLDAT...
          ENDIF.                           " IF SY-SUBRC EQ 0
        ENDIF.                             " IF SY-SUBRC EQ 0
      ENDLOOP.                             " LOOP AT T_RSEG...
      LOOP AT t_rbkp INTO fs_rbkp.
        WHILE w_flag1 EQ '0'.
          READ TABLE t_rseg INTO fs_rseg WITH KEY belnr = fs_rbkp-belnr
                                                          BINARY SEARCH.
          w_index1 = sy-tabix.
          IF sy-subrc EQ 0.
            WHILE w_flag2 EQ '0'.
              READ TABLE t_eban INTO fs_eban WITH KEY ebeln = fs_rseg-ebeln
                                                              BINARY SEARCH.
              IF sy-subrc EQ 0.
                fs_final-bldat = fs_rbkp-bldat.
                fs_final-lifnr = fs_rbkp-lifnr.
                fs_final-ebeln = fs_rseg-ebeln.
                fs_final-wrbtr = fs_rseg-wrbtr.
                fs_final-banfn = fs_eban-banfn.
                fs_final-badat = fs_eban-badat.
                fs_final-afnam = fs_eban-afnam.
                fs_final-ernam = fs_eban-ernam.
                APPEND fs_final  TO t_final.
                CLEAR fs_final.
                DELETE t_eban INDEX sy-tabix .
              ELSE.
                w_flag2 = '1'.
                DELETE t_rseg INDEX w_index1.
              ENDIF.                       " IF SY-SUBRC EQ 0
            ENDWHILE.                      " WHILE W_FLAG2...
            w_flag2 = '0'.
          ELSE.
            w_flag1 = '1'.
          ENDIF.                           " IF SY-SUBRC EQ 0
        ENDWHILE.                          " WHILE W_FLAG1...
        w_flag1 = '0'.
      ENDLOOP.                             " LOOP AT T_RBKP...
      CLASS lcl_event_receiver DEFINITION DEFERRED.
    Declare reference variables to the ALV grid and the container
      DATA :
        cust_con TYPE scrfname VALUE 'BCALVC_TOOLBAR_D100_C1',
        cont_on_dialog TYPE scrfname VALUE 'BCALVC_TOOLBAR_D101_C1',
        ref1 TYPE REF TO cl_gui_custom_container,
        ref2 TYPE REF TO cl_gui_alv_grid,
        event_receiver TYPE REF TO lcl_event_receiver,
        fcat    TYPE lvc_t_fcat,
        wa      TYPE lvc_s_fcat,
        wa_layo TYPE lvc_s_layo.
      CALL SCREEN 200.
    class lcl_event_receiver: local class to define and handle own
    *functions......................................................
    Definition:
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
        handle_toolbar
            FOR EVENT toolbar OF cl_gui_alv_grid
                IMPORTING e_object e_interactive,
        handle_user_command
            FOR EVENT user_command OF cl_gui_alv_grid
                IMPORTING e_ucomm.
      PRIVATE SECTION.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    class lcl_event_receiver (Implementation)
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_toolbar.
    In event handler method for event TOOLBAR: Append own functions
      by using event parameter E_OBJECT.
        DATA: ls_toolbar  TYPE stb_button.
    E_OBJECT of event TOOLBAR is of type REF TO CL_ALV_EVENT_TOOLBAR_SET.
    append a separator to normal toolbar
        CLEAR ls_toolbar.
        MOVE 3 TO ls_toolbar-butn_type.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    append an icon to show booking table
        CLEAR ls_toolbar.
        MOVE 'PORDER' TO ls_toolbar-function.
        MOVE icon_employee TO ls_toolbar-icon.
        MOVE 'Show Bookings' TO ls_toolbar-quickinfo.
        MOVE 'PONUMBER' TO ls_toolbar-text.
        MOVE ' ' TO ls_toolbar-disabled.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    append a separator to normal toolbar
        CLEAR ls_toolbar.
        MOVE 3 TO ls_toolbar-butn_type.
        APPEND ls_toolbar TO e_object->mt_toolbar.
    append an icon to show booking table
        CLEAR ls_toolbar.
        MOVE 'PREQUISITION' TO ls_toolbar-function.
        MOVE icon_employee TO ls_toolbar-icon.
        MOVE 'Show Bookings' TO ls_toolbar-quickinfo.
        MOVE 'PRNUMBER' TO ls_toolbar-text.
        MOVE ' ' TO ls_toolbar-disabled.
        APPEND ls_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.                           " handle_toolbar
      METHOD handle_user_command.
    *Event handler method for event USER_COMMAND:
        CASE e_ucomm.
          WHEN 'PORDER'.
            CALL TRANSACTION 'ME23N'.
          WHEN 'PREQUISITION'.
            CALL TRANSACTION 'ME53N'.
        ENDCASE.
      ENDMETHOD.                           " handle_user_command
    ENDCLASS.                              " lcl_event_receiver
    *& Module STATUS_0200 OUTPUT
    text
    MODULE status_0200 OUTPUT.
      SET PF-STATUS 'GUI'.
      SET TITLEBAR 'TITLE'.
      IF sy-ucomm = 'BACK'.
        LEAVE PROGRAM.
      ENDIF.
      PERFORM form_fcat.
      PERFORM form_layo.
      IF ref1 IS INITIAL.
        CREATE OBJECT ref1
        EXPORTING
    PARENT = ref1
        container_name = 'CUST_CON'
    STYLE =
    LIFETIME = lifetime_default
    REPID =
    DYNNR =
    NO_AUTODEF_PROGID_DYNNR =
        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.
      ENDIF.
      IF ref2 IS INITIAL.
        CREATE OBJECT ref2
        EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
        i_parent = ref1
    I_APPL_EVENTS = space
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
        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 ref2->set_table_for_first_display
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT =
    I_SAVE =
    I_DEFAULT = 'X'
    is_layout = wa_layo
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
        CHANGING
        it_outtab = t_final
        it_fieldcatalog = fcat
    IT_SORT =
    IT_FILTER =
       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.
        CREATE OBJECT event_receiver.
        SET HANDLER event_receiver->handle_user_command FOR ref2.
        SET HANDLER event_receiver->handle_toolbar FOR ref2.
    *Call method 'set_toolbar_interactive' to raise event TOOLBAR.
        CALL METHOD ref2->set_toolbar_interactive.
      ENDIF.
    ENDMODULE.                             " STATUS_0200 OUTPUT
    Form FORM_FCAT                                                     *
    text                                                               *
    FORM form_fcat.
      CLEAR fcat.
      CLEAR wa.
      wa-fieldname = 'EBELN'.
      wa-col_pos = 1.
      wa-scrtext_l = ' PURCHASE ORDER NUMBER'.
      APPEND wa TO fcat.
      CLEAR wa.
      wa-fieldname = 'BANFN'.
      wa-col_pos = 2.
      wa-scrtext_l = 'PURCHASE REQUISITION NUMBER'.
      APPEND wa TO fcat.
      CLEAR wa.
      wa-fieldname = 'BADAT'.
      wa-col_pos = 3.
      wa-scrtext_l = 'PR CREATION DATE'.
      APPEND wa TO fcat.
      CLEAR wa.
      wa-fieldname = 'BLDAT'.
      wa-col_pos = 4.
      wa-scrtext_l = 'INVOICE DATE'.
      APPEND wa TO fcat.
      CLEAR wa.
      wa-fieldname = 'LIFNR'.
      wa-col_pos = 5.
      wa-scrtext_l = 'VENDOR NUMBER'.
      APPEND wa TO fcat.
      wa-fieldname = 'WRBTR'.
      wa-col_pos = 6.
      wa-do_sum  = 'X'.
      wa-scrtext_l = ' PO AMOUNT'.
      APPEND wa TO fcat.
      wa-fieldname = 'AFNAM'.
      wa-col_pos = 7.
      wa-scrtext_l = 'REQUISITIONER'.
      APPEND wa TO fcat.
      wa-fieldname = 'ERNAM'.
      wa-col_pos = 8.
      wa-scrtext_l = 'PR CREATOR'.
      APPEND wa TO fcat.
    ENDFORM.                               " FORM_FCAT
    Module USER_COMMAND_0200 INPUT                                      *
    text                                                                *
    MODULE user_command_0200 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK' OR 'CANCEL' OR 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                             " USER_COMMAND_0200 INPUT
         FORM FORM_LAYO                                                *
    There are no interface parameters to be passed to this subroutine.*
    FORM form_layo.
      CLEAR wa_layo.
      wa_layo-zebra = 'X'.
      wa_layo-grid_title = 'GRID TITLE'.
      wa_layo-no_toolbar = 'X'.
    ENDFORM.                               " FORM_LAYO
         FORM GET_PURCHASEREQUISITION                                   *
    This subroutine selects all the Purchase requisitions from table   *
    EBAN for all the selected Invoices based on the Purchase orders.   *
    There are no interface parameters to be passed to this subroutine. *
    FORM get_purchaserequistion.
      SELECT belnr                         " Document number of an invoice
             gjahr                         " Fiscal Year
             bldat                         " Posting Date in the Document
             budat                         " Posting Date in the Document
             lifnr                         " Different invoicing party
        FROM rbkp
        INTO TABLE t_rbkp
       WHERE belnr IN s_belnr
         AND gjahr EQ p_gjahr
         AND bldat IN s_bldat
         AND budat IN s_budat.
      IF NOT t_rbkp[] IS INITIAL.
        SELECT belnr                       " Document number of an invoice
               ebeln                       " Purchasing Document Number
               wrbtr                       " Amount in document currency
          FROM rseg
          INTO TABLE t_rseg
           FOR ALL ENTRIES IN t_rbkp
         WHERE belnr EQ t_rbkp-belnr
           AND werks IN s_werks.
      ENDIF.                               " IF NOT t_rbkp[] IS INITIAL...
      IF NOT t_rseg[] IS INITIAL.
        SELECT banfn
               ernam
               afnam
               badat
               ebeln
          FROM eban
          INTO CORRESPONDING FIELDS OF TABLE t_eban
           FOR ALL ENTRIES IN t_rseg
         WHERE ebeln EQ t_rseg-ebeln.
      ENDIF.                               " IF NOT t_rseg[] IS INITIAL...
    ENDFORM.                               " GET_PURCHASEREQUISITION
    reward points if helpful.
    regards,
    kiran kumar k.

  • Calling Transaction code & returning back to calling program

    Hi,
    I have requirement as below
    Write the report to call the transaction code say for example different tcode (1000 in number) need to be executed and after every tcode execution it should return back to calling report. I tried using "CALL TRANSACTION 'ABC' AND SKIP FIRST SCREEN"  it does execute the tcode but need the user interaction to return back to report, where here i want do this programatically.
    can someone please help me & what is possible ways this can be do able.
    Thanks,
    John.

    There are two method of BDC
    1- Call transaction method
    2- BDC Session method
    In this case you can use call tansaction method.
    Syntax- call tansaction abc using gt_bdcdata.
    Do the recording with t-code SHDB for that particular transaction and after the necessary modification use it in your program.
    Please check f1 help of call transaction for details.

  • I can not execute a dynamic action if I execute a BI

    I am executing an infotype in Batch input with a call transaction and the dynamic actions don't work.
    Any ideas.
    Thank you.

    Unfortunetly dynamic actions (T588Z) are not called in batch input mode - that is standard SPA HR processing.
    The normal process is to create all the infotypes in the batch input program - even the ones that would be created by dynamic actions if running online in PA30/PA40
    hope that helps

  • Send mail using Dynamic actions

    Hello experts,
    How to send  a mail using Dynamic Actions??
    Requirement : Lets say one employee is hired on 26th Aug, so after 10 days he will be confirmed. so on 8th day need to send a mail to concerned person reminding the confirmation date.
    so how do i do that using dynamic actions??
    Thanks in advance.
    Saurabh

    Hi,
    In dynamic actions there is an option for calling sub-routine from any program or subroutine pool. So u can make subroutine for sending mail according to ur requirement. An call on th same from dynamic actions.
    if u want sample code for this, pls let me know.
    <removed_by_moderator>
    Regards,
    Ranjith
    Edited by: Julius Bussche on Aug 26, 2008 3:25 PM

  • Adding period to a date in Dynamic action

    Hi Gurus,
    We have a requirement where we need to create a IT2010 with a start date less than the action date.
    For E.g If action is run on 02.07.2011 then IT 2010 should be created with 01.07.2011.
    Please help.

    Create program that can be called as a routine in Dynamic Action (table V_T588Z)
    1.    Within the dynamic action, the routine (ZXXXX) will be called (Configured by the functional consultant) with the GETDATE subroutine:
    P2010-BEGDA=RP50D-DATE1
    2.     In the program, we need to minus 1 from the hire date.
    Program     ZXXXX
    Tables : P0000, rp50d
    Form getdate
          Rp50d-date1 = p0000-begda u2013 1
    Endform

  • How to Send Notification to Manager of the Employee using Dynamic Action..

    Hi All,
    I am sending a notification using the Dynamic Action for an Infotype.. I am able to send mail using distribution list but I have a requirement to send the notification to employee manager. I am able to determine the Line Manager ID calling the subroutine in the dynamic action. But I am not sure how to send the notification to the manager.
    If the email's are maintained in distribution list if I specify the text id in the feature M0001 and distribution list the notifications are sent. I am not sure how to pass the line manager id to get the same notification..
    I have seen the option REC1 but infotype 0001 in not having the line manager id..

    Used the Function Module RH_GET_LEADING_POSITION.
    Thanks..

  • HR_INFOTYPE_OPERATION within Dynamic Action

    Hello,
    I am calling HR_INFOTYPE_OPERATION from within the Dynamic Action.  I can debug through it and even have it display the screens and everything appears to work fine.  The return structure is clear of any errors and the key structure indicates that the 'MOD' was done with no problem.  The infty is 2012.
    However once the dynamic action is complete the 2012 records have not been updated.  I am passing blank for the no_commit parameter on the FM.
    Does HR_INFOTYPE_OPERATION with a 'MOD' operation work from within the dynamic action?
    Regards,
    Jeff

    Hi Jeff,
    I am not sure if I get you right. But as for DB commit, it will be triggered automatically once SUBMIT statement is executed (as work process is released). What I have in my program is as follows:
    - in T588Z table (dyn.actions) I have invoked subroutine from my custom program
    POPUP_SELECTION_FOR_IT0015((YPLPY_PRO_RE_QUOTAGEN1).
    - In this YPLPY_PRO_RE_QUOTAGEN1 program I write subroutine wherein I do some coding and submit another report (which do real update).
    form POPUP_SELECTION_FOR_IT0015.
    "some coding - in my case I am filling P0015 strcutre (as this infotype has to be udpdated) while dyn. action is triggered for IT2002
        P0015-PERNR = LS_PSKEY-PERNR = P2002-PERNR.
        P0015-SUBTY = LS_PSKEY-SUBTY = P0015-LGART = LGART = IT_RET-FIELDVAL.
        P0015-BEGDA = LS_PSKEY-BEGDA = DATUM.
        P0015-ENDDA = LS_PSKEY-ENDDA = DATUM.
        P0015-UNAME = UNAME.
        P0015-INFTY = LS_PSKEY-INFTY = '0015'.
       "before I am submiting another program I am passing this strcuture
        export P0015 = P0015 PSKEY = LS_PSKEY to memory id 'ZXPADU02_P0015'.
        submit YPLPY_PRO_RE_ZXPADU02_2002
               and return.
    - Now the below program creates my IT0015 and the same time changes to IT2002 are written (DB commit is triggered with SUBMIT)
    REPORT  yplpy_pro_re_zxpadu02_2002.
    data: p0015 like p0015.
    data: ls_return TYPE bapireturn1,
          ls_pskey like pskey.
    IMPORT p0015 = p0015 pskey = ls_pskey FROM MEMORY ID 'ZXPADU02_P0015'.
    CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
      EXPORTING
        number = ls_pskey-pernr.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty                  = ls_pskey-infty
        number                 = ls_pskey-pernr
        subtype                = ls_pskey-subty
        validityend            = ls_pskey-endda
        validitybegin          = ls_pskey-begda
        record                 = p0015
        operation              = 'INS'
        dialog_mode            = '2'
      IMPORTING
        return                 = ls_return.
    IF NOT ls_return IS INITIAL AND
       ls_return-type EQ 'E'.
      MESSAGE e000(38) WITH ls_return-message.
    ENDIF.
    "unlock the EE
    CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
      EXPORTING
        number = ls_pskey-pernr.
    Works fine for me.
    Regards
    Marcin

Maybe you are looking for

  • BACKGROUND_COLOR BUG!!!!!

    My problem is that I set the background color to an item, for example 'r100g100b100' and when I get the item property of this item,the response is 'r98g98b98'. Is this a bug???? null

  • Imac airplay mirroring shut video

    Hello,     I'm using airplay to connect my imac to apple tv and watch on the tv the screen of my imac, is there a way to keep watching the mirroring screen on the tv but having the screen of the imac shut down? I would like to sabve energy but at the

  • TDS Annual returns

    TDS annual returns in version 6.0 is drawn through j1inqefile. all th edata is not picking up in report. please suggest me any clue or SAP note for this.

  • #error in formula row of the form sum([1])/2

    Greetings! I have a necessity to use formula row in some forms to get an aggregated value of rows above, sometimes i have to use sum([1])/2 and this results me into a problem: in cells where formula is not valid (all values in specific column are bla

  • ITunes settings lost after reboot

    I have a problem where after a reboot the settings of iTunes are back to default. For example: it loses the account for the Store (I have to re-enter email address and password); it loses the wifi sync settings for my devices it shows the iTunes tuto