Calling screens into a report

Hello all,
i need to call MM03 DasicData, MRPdetails, SalesData screens from a secondary list of report program.
Can any body give an example how i can call a SAP defined screen of a particular program into a report program..
Thanks and Regards
Seenu

Hello,
U could call like this:
<b>CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.</b>
  CASE R_UCOMM.
    WHEN '&IC1'.
*--- Hotspot selektion
      CASE RS_SELFIELD-FIELDNAME.
        WHEN 'POSID'.
*------ PSP-Element
Click auf PSP Element -> PSP Element anzeigen (CJ12)
          SET PARAMETER ID 'PSP' FIELD SPACE.
          SET PARAMETER ID 'PRO' FIELD RS_SELFIELD-VALUE.
<b>          CALL TRANSACTION 'CJ12' AND SKIP FIRST SCREEN.</b>
Regards,
Vasanth

Similar Messages

  • Can we call screen from ALV report

    Hi All,
    I am in the process of creating a stand alone application. However I have stuck up here.
    Problem: Can we call any screen from ALV report? If yes then how??? Can anyone give some code snippet??
    All your help appreciated.
    Thanks,
    Jignesh

    Hello Jignesh,
    Here is an example, when you double click on a line, it pops with with another screen that holds details for the flight information.
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS:
        handle_double_click FOR EVENT double_click
                            OF cl_gui_alv_grid
                            IMPORTING e_row
                                      e_column.
       ENDCLASS.                    "lcl_event_handler
    CLASS lcl_event_handler IMPLEMENTATION.
      METHOD handle_double_click.
        READ TABLE it_flight INTO wa_flight INDEX e_row-index.
        IF sy-subrc EQ 0.
          SELECT * FROM sbook
                   INTO TABLE it_book
                   WHERE carrid EQ wa_flight-carrid AND
                         connid EQ wa_flight-connid.
          CALL SCREEN 101 STARTING AT 10 10.
        ENDIF.
      ENDMETHOD.                 "HANDLE_DOUBLE_CLICK
    ENDCLASS.                    "LCL_EVENT_HANDLER
    MODULE status_0101 OUTPUT.
    Variant to save the layout
      gv_repid = sy-repid.
      IF g_custom_container2 IS INITIAL.
    Create an instance for Custom Container 'ALV_GRID'
        CREATE OBJECT g_custom_container2
               EXPORTING container_name = gs_container2.
    Create an instance for ALV Grid
        CREATE OBJECT g_grid2
               EXPORTING i_parent = g_custom_container2.
    Variant to save the layout
        gs_layout-grid_title = 'Flight Bookings'.
        CALL METHOD g_grid2->set_table_for_first_display
          EXPORTING
            i_structure_name = 'SBOOK'
            is_layout        = gs_layout
          CHANGING
            it_outtab        = it_book[].
      ELSE.
        CALL METHOD g_grid2->refresh_table_display.
      ENDIF.                               "IF grid2 IS INITIAL.
    Setting focus for created grid control
      CALL METHOD cl_gui_control=>set_focus
        EXPORTING
          control = g_grid2.
      CALL METHOD cl_gui_cfw=>flush.
    ENDMODULE.                 " status_0101  OUTPUT
    Refer to BC_ALV_GRID04 for ALV data declarations used in the above piece of code.

  • Call screen into module program?

    hi all,
       i am trying to call the screen of sap standard program into my customized module program can anyone please tell me how to call screen of another program into my program?
    thanks
    john

    Hi,
    First set the values which needs to be passed using the following statement:
    SET PARAMETER ID <pid> FIELD <f>.
    then call your screen using the statement:
    call screen 'SCREEN_NUMBER'.
    if the screen is of a standard transaction then do set the required values through set parameter statement and then call the screen as
    CALL TRANSACTION <tcod> [AND SKIP FIRST SCREEN] [USING <itab>].

  • Diff between call screen and set screen

    diff CALL SCREEN and SET SCREEN

    With SET SCREEN the current screen simply specifies the next screen in the chain , control branches to this next screen as sonn as th e current screen has been processed .Return from next screen to current screen is not automatic .It does not interrupt processing of the current screen.If we want to branch to the next screen without finishing the current one ,use LEAVE SCREEN.
    - With CALL SCREEN , the current (calling) chain is suspended , and a next screen (screen chain) is called .The called can then return to the suspended chain with the statement LEAVE SCREEN TO SCREEN 0 .Sometime we might want to let an user call a pop up screen from the main application screen to let him enter secondary information.After they have completed their enteries, the users should be able to close the popup and return directly to the place where they left off in the main screen.Here comes CALL SCREEN into picture .This statement lets us insert such a sequence intp the current one

  • Call Screen problem in a report

    Hi All,
    I have a report in which I am calling an ALV grid screen 1000. I select some line items and click on execute. On execution in the PAI I have called a function module which has a call screen statement inside it. This should call the screen 100 with tabstrip(This screen is not related to this report. This belongs to some other function group). But when I execute the report instead of calling the screen 100 again the screen 1000 is only being displayed. I have found that the PBO of screen 100 and all the subscreens in it are being called but after that this 100 screen not displayed as mentioned already. Please someone let me know if I am missing something somewhere.
    Thank you,
    Sri.

    Hi Madhu,
    I am calling the screen from PAI of the ALV grid screen. I have debuged and checked. The PBO of the screen and the corresponding subscreens is being called but after that instead of the wanted screen this ALV grid screen is being called. And when I press back button then again PAI of the actual screen is being called.
    When the same FM is called from other classic reports without using ALV grid it is working fine.
    Thanks,
    Sri.

  • Calling stored procedure into Crystal Report

    Could any one help in suggesting how to call the stored procedure with parameters into crystal report?
    i have tried using couple of methods
    I have added this in add command option of Crystal report
    Execute HRMS_DEVP.DPRC_GET_LEAVE_BAL(P_COMP_CODE,P_EMP_CODE,P_LV_CATG_CODE,P_DATE,P_BALANCE)
    WHERE in p_balance i would be retrieving the output.
    Second method i followed is
    SELECT DFUN_GET_LEAVE_BAL(:P_COMP_CODE,:P_EMP_CODE,:P_LV_CATG_CODE,:P_DATE)FROM
    DUAL;

    Hi,
    Have you tried the 'get_value' function?..The syntax is
    declare
    l_dept number(5);
    begin
    l_dept := get_value('dept');
    /* further process */
    end;
    where 'dept' is name of the bind variable.
    -Krishnamurthy

  • Calling oracle9iAS Forms and reports into the portal

    Hi !
    Could it possible to call a Forms and reports in the portals? if yes ? How?
    In my case I have to generate lots of reports..like printing reports in the different tray of printer through portal ? Could this be achieved by Oracle Portal ?
    thanks in advance
    chris

    Do you know how to do it by now.
    Thanks.

  • How can I add a new field in selection screen for this report

    *& Report  ZGS_BARKODLA_HIZLI_GIRIS
    report  zgs_barkodla_hizli_giris.
    tables: mara,
            mseg,
            mch1,
            *mch1,
            mkpf,
            mchb ,
            makt.
    type-pools: esp1.
    data: i_message_tab  type esp1_message_tab_type,
          wa_message_tab type esp1_message_wa_type ,
          sc_count type i.
    ALV
    type-pools: slis, kkblo.
    data: gs_layout   type slis_layout_alv                     ,
          gt_fldcat   type slis_t_fieldcat_alv with header line,
          gt_header   type slis_t_listheader   with header line,
          gt_sortin   type slis_t_sortinfo_alv with header line,
          g_repid     like sy-repid                            .
    define add-fieldcat.
      gt_fldcat-fieldname     = &1.
      gt_fldcat-ref_tabname   = &2.
      gt_fldcat-seltext_s     = &3.
      gt_fldcat-seltext_m     = &3.
      gt_fldcat-seltext_l     = &3.
      gt_fldcat-reptext_ddic  = &3.
      gt_fldcat-ddictxt       = 'M'.
      append gt_fldcat.
      clear  gt_fldcat.
    end-of-definition.
    types: begin of titab,
            sel   type xfeld,
            matnr type matnr,
            maktx type maktx,
            charg type charg_d,
            menge type menge_d,
            erfmg type erfmg,
           end of titab.
    data : witab type titab.
    data : itab type table of titab.
    data : ok_code type sy-ucomm.
    controls: tc_itab type tableview using screen 0100.
    data: gv_header like bapi2017_gm_head_01,
          gv_code   like bapi2017_gm_code.
    BAPI export parameters
    data: gv_headret type bapi2017_gm_head_ret,
          gv_matdoc  type bapi2017_gm_head_ret-mat_doc,
          gv_matyear type bapi2017_gm_head_ret-doc_year.
    data : lv_objek like inob-objek .
    data : ls_inob  like inob .
    data : imseg type ty_t_mseg.
    data : wmseg type mseg.
    data : answer.
    data : count type i.
    data : v_atinn type atinn.
    BAPI movement details
    data: i_goodsmvt_items type bapi2017_gm_item_create occurs 0
          with header line.
    data: i_return type bapiret2 occurs 0 with header line.
    start-of-selection.
    call function 'CONVERSION_EXIT_ATINN_INPUT'
       exporting
         input  = 'Z_ORAN'
       importing
         output = v_atinn.
      call screen 100.
    *&      Module  status_0100  OUTPUT
    module status_0100 output.
      set pf-status '100'.
      set titlebar '100'.
      mseg-werks = 1000.
      mseg-umwrk = 1000.
    **added
      sc_count = sc_count + 1.
      if sc_count eq 1.
        mseg-bwart = 313.
      endif.
      mkpf-budat = sy-datum.
    **added
      describe table itab lines tc_itab-lines.
    endmodule.                 " status_0100  OUTPUT
    *&      Module  user_command_0100  INPUT
    module user_command_0100 input.
      data field(20).
      data: line_t like sy-index.
      data: lines  like sy-index.
      data line_count like sy-loopc.
      data: begin of cols,
             screen      like screen,
             index       type i,
             selected(1) type c,
             vislength   like icon-oleng,
             invisible(1) type c,
           end   of cols.
      case ok_code.
        when 'DELE'.
          delete itab where sel eq 'X'.
        when 'ENTE'.
          check *mch1-charg is not initial.
          read table itab into witab with key charg = *mch1-charg.
          if not sy-subrc is initial.
            witab-charg = *mch1-charg.
            select single matnr from mch1 into witab-matnr
                               where charg eq witab-charg.
            if not syst-subrc is initial.
              set cursor field '*MCH1-CHARG'.
              message e115(12) with *mch1-charg.
            endif.
            select single maktx from makt into witab-maktx
                               where matnr eq witab-matnr
                                 and spras eq syst-langu.
            witab-erfmg = 1.
            concatenate witab-matnr witab-charg into lv_objek .
            clear ls_inob .
            select single * into ls_inob
                            from inob
                            where objek = lv_objek and
                                  klart = '023'    and
                                  obtab = 'MCH1' .
            select single atflv from ausp into witab-menge
                     where objek = ls_inob-cuobj and
                           klart = '023' .
            append witab to itab.
    **added
            clear *mch1-charg.
    **added
          endif.
        when 'SAVE'.
          if mkpf-budat is initial.
            set cursor field 'MKPF-BUDAT'.
            message e055(00).
          endif.
          if mseg-lgort is initial.
            set cursor field 'MSEG-LGORT'.
            message e055(00).
          endif.
          if mseg-umlgo is initial.
            set cursor field 'MSEG-UMLGO'.
            message e055(00).
          endif.
          if mseg-bwart is initial.
            set cursor field 'MSEG-BWART'.
            message e055(00).
          endif.
          refresh imseg.
          loop at itab into witab.
            move-corresponding witab to wmseg.
            append wmseg to imseg.
          endloop.
          call function 'ZMM_POPUP_WITH_DATA'
            exporting
              imseg  = imseg
            importing
              answer = answer.
          if answer eq 'Y'.
            perform create_goods_movement.
          endif.
        when 'P--'.
          clear ok_code.
          perform paging using 'P--'.
          set cursor field 'MARA-MATNR' line 1.
        when 'P-'.
          clear ok_code.
          perform paging using 'P-'.
          set cursor field 'MARA-MATNR' line 1.
        when 'P+'.
          clear ok_code.
          clear lines.
          perform paging using 'P+'.
          set cursor field 'MARA-MATNR' line 1.
        when 'P++'.
          clear ok_code.
          perform paging using 'P++'.
          set cursor field 'MARA-MATNR' line 1.
        when 'SORA'.
          read table tc_itab-cols into cols with key selected = 'X'.
          if sy-subrc is initial.
            field = cols-screen.
            field = field+5(10).
            sort itab ascending by (field).
          endif.
        when 'SORZ'.
          read table tc_itab-cols into cols with key selected = 'X'.
          if sy-subrc is initial.
            field = cols-screen.
            field = field+5(10).
            sort itab descending by (field).
          endif.
        when 'PRNT'.
          perform write_alv.
      endcase.
    endmodule.                 " user_command_0100  INPUT
    *&      Module  read_table  OUTPUT
    module read_table output.
      mara-matnr = witab-matnr.
      makt-maktx = witab-maktx.
      mch1-charg = witab-charg.
      mseg-menge = witab-menge.
      mseg-erfmg = witab-erfmg.
      line_count = sy-loopc.
    endmodule.                 " read_table  OUTPUT
    *&      Module  write_table  INPUT
    module write_table input.
      witab-matnr = mara-matnr.
      witab-maktx = makt-maktx.
      witab-charg = mch1-charg.
      witab-menge = mseg-menge.
      witab-erfmg = mseg-erfmg.
      modify itab from witab index tc_itab-current_line.
    endmodule.                 " write_table  INPUT
    *&      Module  exit  INPUT
    module exit input.
      leave to screen 0 .
    endmodule.                 " exit  INPUT
    *&      Form  create_goods_movement
    form create_goods_movement .
      clear : gv_header, i_return[], i_goodsmvt_items[].
      gv_header-doc_date = gv_header-pstng_date = mkpf-budat.
      gv_header-pr_uname = sy-uname.
    GM with reference to reservation
      loop at itab into witab.
        i_goodsmvt_items-material   = witab-matnr.
        i_goodsmvt_items-entry_qnt  = witab-erfmg.
        i_goodsmvt_items-entry_uom  = 'ST'.
        i_goodsmvt_items-move_type  = mseg-bwart.
        i_goodsmvt_items-plant      = mseg-werks.
        i_goodsmvt_items-stge_loc   = mseg-lgort.
        i_goodsmvt_items-move_plant = mseg-umwrk.
        i_goodsmvt_items-move_stloc = mseg-umlgo.
        i_goodsmvt_items-batch      = witab-charg.
        append i_goodsmvt_items.
      endloop.
    find BAPI processing transaction
      if gv_code is initial.
        perform determine_bapi_code using mseg-bwart
                                 changing gv_code.
      endif.
      call function 'BAPI_GOODSMVT_CREATE'
        exporting
          goodsmvt_header  = gv_header
          goodsmvt_code    = gv_code
        importing
          goodsmvt_headret = gv_headret
          materialdocument = gv_matdoc
          matdocumentyear  = gv_matyear
        tables
          goodsmvt_item    = i_goodsmvt_items
          return           = i_return[].
    cancel blocking process
      loop at i_return where type eq 'E' or type eq 'A' or type eq 'X'.
        exit.
      endloop.
      if sy-subrc ne 0.
        refresh i_message_tab.
        call function 'BAPI_TRANSACTION_COMMIT'
          exporting
            wait = 'X'.
        wa_message_tab-msgid = 'M7'..
        wa_message_tab-msgty = 'S'.
        wa_message_tab-msgno = '060'.
        wa_message_tab-msgv1 = gv_matdoc.
        wa_message_tab-msgv2 = ''.
        wa_message_tab-msgv3 = ''.
        wa_message_tab-msgv4 = ''.
        append wa_message_tab to i_message_tab.
      else.
        refresh i_message_tab.
        call function 'BAPI_TRANSACTION_ROLLBACK'.
    write a message as there is an unexpected error.
        loop at i_return.
          wa_message_tab-msgid = i_return-id.
          wa_message_tab-msgty = i_return-type.
          wa_message_tab-msgno = i_return-number.
          wa_message_tab-msgv1 = i_return-message_v1.
          wa_message_tab-msgv2 = i_return-message_v2.
          wa_message_tab-msgv3 = i_return-message_v3.
          wa_message_tab-msgv4 = i_return-message_v4.
          append wa_message_tab to i_message_tab.
        endloop.
      endif.
      call function 'C14Z_MESSAGES_SHOW_AS_POPUP'
        tables
          i_message_tab = i_message_tab.
    endform.                    " create_goods_movement
    *&      Form  determine_bapi_code
    form determine_bapi_code using p_bwart type bwart
    changing p_code type bapi2017_gm_code.
      data: lt_t158b type table of t158b with header line.
      clear p_code.
      select tcode from t158b into corresponding fields of table lt_t158b
      where bwart eq p_bwart.
      loop at lt_t158b.
        select single gmcode from t158g into p_code
        where tcode eq lt_t158b-tcode.
        if sy-subrc is initial.
          exit.
        endif.
      endloop.
    endform. " determine_bapi_code
    *&      Form  paging
    form paging using code.
      data: i type i,
            j type i.
      case code.
        when 'P--'. tc_itab-top_line = 1.
        when 'P-'.
          tc_itab-top_line = tc_itab-top_line - line_count.
          if tc_itab-top_line le 0.
            tc_itab-top_line = 1.
          endif.
        when 'P+'.
          i = tc_itab-top_line +  line_count.
          j = tc_itab-lines -  line_count + 1.
          if j le 0.
            j = 1.
          endif.
          if i le j.
            tc_itab-top_line = i.
          else.
            tc_itab-top_line = j.
          endif.
        when 'P++'.
          tc_itab-top_line = tc_itab-lines - line_count + 1.
          if tc_itab-top_line le 0.
            tc_itab-top_line = 1.
          endif.
      endcase.
    endform.                    " paging
    *&      Form  write_alv
    form write_alv .
      perform find_list_header.
      perform fill_field_cat.
      perform fill_sortinfo.
      g_repid = sy-repid.
      gs_layout-colwidth_optimize = 'X'.
      gs_layout-zebra             = 'X'.
      answer = 'Y'.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_buffer_active        = ''
          i_callback_program     = g_repid
          i_save                 = 'A'
        i_callback_top_of_page = 'TOP_OF_PAGE'
          is_layout              = gs_layout
          it_fieldcat            = gt_fldcat[]
         it_sort                = gt_sortin[]
        tables
          t_outtab               = itab[].
    endform.                    " write_alv
         Form  find_list_header
    form find_list_header.
      data : v_datum(10),
             v_datlo(10),
             v_dathi(10),
             v_uzeit(8).
      clear: gt_header, gt_header[].
      gt_header-typ  = 'H'.
      gt_header-info = sy-title.
      append gt_header.
      clear gt_header.
      gt_header-typ  = 'S'.
      gt_header-key  = 'Çal&#305;&#351;t&#305;rma Zaman&#305; : '.
      write syst-datum to v_datum.
      write syst-uzeit to v_uzeit.
      concatenate v_datum '/' v_uzeit into gt_header-info.
      append gt_header.
    endform.                    " find_list_header
         Form  fill_field_cat
    form fill_field_cat.
      refresh gt_fldcat.
      clear   gt_fldcat.
      gt_fldcat-key = 'X'.
      add-fieldcat 'MATNR'  'MARA' ''.
      add-fieldcat 'MAKTX'  'MAKT' ''.
      add-fieldcat 'CHARG'  'MSEG' ''.
      gt_fldcat-do_sum = 'X'.
      add-fieldcat 'MEINS'  'MARA' 'Olcu Birimi '.
      gt_fldcat-do_sum = 'X'.
      add-fieldcat 'ERFMG'  'MSEG' 'Adet'.
    endform.                    " fill_field_cat
         Form  fill_sortinfo
    form fill_sortinfo.
      gt_sortin-up            = 'X'.
      gt_sortin-fieldname     = 'MATNR'.  append gt_sortin.
    endform.                    " fill_sortinfo
         Form  top_of_page                                              *
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          i_logo             = 'ZKUTAS'
          it_list_commentary = gt_header[].
    endform.                    " top_of_page

    HI,
    if it is a normal report program then you can directly create a Selection screen field.
    After the Type-pool you can use Parameters or Select-options to create the selection screen field..
    If it is a Modulpool program then you can create a selection scren field like
    SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN.
    PARAMETERS: p1(10) TYPE c.
    SELECTION-SCREEN END OF SCREEN 1100.
    defines a selection screens – 1100 – as subscreens.
    The next screen number of screen 100 is 100 (statically-defined).
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      CALL SUBSCREEN area INCLUDING sy-repid number.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      CALL SUBSCREEN area.
      MODULE user_command_0100.
    look at the below link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/content.htm
    Regards
    Sudheer

  • Passing values to a dynamic selection screen via a report

    Hi,
    I have the following problem and need to seek your expertise urgently.
    In my program, I need to call another report by passing in parameters to the selection screen of other report. However, I could not pass values into a dynamic selection screen. I tried to use submit (report) with free selection but do not know how it works.
    Currently, I tried calling the function RS_REFRESH_FROM_DYNAMICAL_SEL and FREE_SELECTIONS_RANGE_2_EX. Using the object the first function has returned to me, I tried to append values such as fieldname etc to it. However, I realised the field names of a dynamic selection screen keeps changing. So I would not know how to pass a particular value to a selection field.
    Appreciate any help given.
    Thanks,
    CK

    Hello CK,
    Are you using logical database in your selection screen program attributes? If it is, look at include file DBxxxSEL for parameter named xxxDYNSE where xxx = logical database. Debug the program that has that dynamic selection, and look at field xxxDYNSE. This should give you a hint on how to populate the parameter when you submit the program.

  • Post values from selection screen into vkm5 transaction

    Hi all,
    i need to create a report , when user enters values in the selection screen of that report, that values must be transported into a transaction VKM5 and then that transported values must be updated in a ztable.
    ex:
    in selection screen if user enter doc no:xxxxxx
                                                         date:  20.09.2011
                                                         Reason for release: some text
    then that doc no: xxxxx must be transported into vkm5 transaction and that values(selection screen values) must be uploaded into a ztable.
    i tried the below code
    TABLES: ZVKM5.
    data: IT_ZVKM5 type standard table of ZVKM5,
          WA_ZVKM5 type ZVKM5.
    PARAMETERS    : S_VBELN LIKE ZVKM5-VBELN ,
                    s_date LIKE  zvkm5-bldat ,
                    s_text LIKE  zvkm5-text .
    call transaction 'VKM5'.
    *LOOP AT IT_ZVKM5 INTO WA_ZVKM5.
       WA_ZVKM5-VBELN = S_VBELN.
       WA_ZVKM5-bldat = S_DATE.
       WA_ZVKM5-text  = S_TEXT .
       modify ZVKM5 from table IT_ZVKM5.
      if sy-subrc = 0.
      endif.
    *ENDLOOP.
    Kindly suggest me,
    thanks in advance,
    ben2012.

    Thanks to all ,
    Solved by me.
    REPORT  ZVKM5.
    TABLES: ZVKM5, vbuk.
    types: begin of ty_zvkm5 ,
           vbeln type VBELN_VL,
           BLDAT type BLDAT,
           TEXT type TEXT,
           UNAME TYPE CDUSERNAME,
      end of ty_zvkm5.
    TYPES: BEGIN OF TY_CDHDR,
           OBJECTID TYPE CDOBJECTV,
    END OF TY_CDHDR.
    DATA: IT_CDHDR TYPE TABLE OF TY_CDHDR,
          WA_CDHDR TYPE TY_CDHDR.
    data: IT_ZVKM5 like ZVKM5 occurs 0 with header line,
          WA_ZVKM5 type ty_ZVKM5.
      DATA: bdcdata_wa  TYPE bdcdata,
            bdcdata_tab TYPE TABLE OF bdcdata.
    data: date type STRING.
    PARAMETERS    : S_VBELN LIKE ZVKM5-VBELN ,
                    s_date LIKE  zvkm5-bldat ,
                    s_text LIKE  zvkm5-text .
          CLEAR bdcdata_wa.
          bdcdata_wa-program  = 'RVKRED05'.
          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 = 'VBELN-LOW'. " pass the field name
          APPEND bdcdata_wa TO bdcdata_tab.
          CLEAR bdcdata_wa.
          bdcdata_wa-fnam = 'VBELN-LOW'. " pass the field name
          bdcdata_wa-fval =  S_VBELN. " pass the date here
          APPEND bdcdata_wa TO bdcdata_tab .
    call transaction 'VKM5' using bdcdata_tab .
    REFRESH IT_ZVKM5.
    SELECT  OBJECTID
            FROM CDHDR INTO TABLE IT_CDHDR.
    LOOP AT IT_CDHDR INTO WA_CDHDR.
    IF WA_CDHDR-OBJECTID  = S_VBELN.
    move s_vbeln to it_zvkm5-vbeln.
    move S_date to it_zvkm5-bldat.
    move s_text to it_zvkm5-text.
    MOVE SY-UNAME TO IT_ZVKM5-UNAME.
    append it_zvkm5 to it_zvkm5.
    modify zvkm5 from  table it_zvkm5.
    UPDATE zvkm5.
    ENDIF.
    ENDLOOP.
    CLEAR: S_VBELN, S_DATE, S_TEXT.

  • How can i use two list screens in  Classical report.

    Dear Sir,
    In My Report in First screen i am taking the GR details and Display In it_final By Check Box Wise.
    Based On The Check Box selection in First screen In Second Screen i want The Challan Details Based On Some In Puts In First Field.
    so how can I call The second Screen In Classial report Plz Help Me.

    check this report
    REPORT  ZNNR_ALVOOPS_SCREEN.
    tables: mara,spfli.
    types: begin of ty_tab,
            matnr type mara-matnr,
            ernam type mara-ernam,
            ersda type mara-ersda,
           end of ty_tab.
    DATA ITAB1 TYPE TABLE OF SPFLI.
    DATA WA1 LIKE LINE OF ITAB1.
    DATA IO1 TYPE SPFLI-CARRID VALUE 'AA'.
    data itab type table of ty_tab.
    data wa like line of itab.
    DATA OK_CODE TYPE SY-UCOMM.
    DATA: GRID TYPE REF TO CL_GUI_ALV_GRID,
          CONT TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    DATA: GRID1 TYPE REF TO CL_GUI_ALV_GRID,
          CONTA TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    CREATE OBJECT CONT EXPORTING CONTAINER_NAME = 'CONT1' .
    CREATE OBJECT GRID EXPORTING I_PARENT = CONT .
    CREATE OBJECT CONTA EXPORTING CONTAINER_NAME = 'CONT2' .
    CREATE OBJECT GRID1 EXPORTING I_PARENT = CONTA .
    selection-screen begin of block b1 with frame title text-100.
    select-options: s_matnr for mara-matnr.
    selection-screen end of block b1.
    select matnr ernam ersda from mara into corresponding fields of table itab up to 15 rows
    where matnr in s_matnr .
    call selection-screen 100.
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE USER_COMMAND_0100 INPUT.
    if ok_code = 'PB1'.
    leave to screen 0.
    else.
    leave to screen 100.
    endif.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    SELECT * FROM SPFLI INTO
      CORRESPONDING FIELDS OF TABLE ITAB1 WHERE CARRID = IO1.
    CALL METHOD grid->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
       I_BUFFER_ACTIVE               =
       I_BYPASSING_BUFFER            =
       I_CONSISTENCY_CHECK           =
        I_STRUCTURE_NAME              = 'MARA'
       IS_VARIANT                    =
       I_SAVE                        =
       I_DEFAULT                     = 'X'
       IS_LAYOUT                     =
       IS_PRINT                      =
       IT_SPECIAL_GROUPS             =
       IT_TOOLBAR_EXCLUDING          =
       IT_HYPERLINK                  =
       IT_ALV_GRAPHICS               =
       IT_EXCEPT_QINFO               =
       IR_SALV_ADAPTER               =
      CHANGING
        IT_OUTTAB                     = itab.
       IT_FIELDCATALOG               =
       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 GRID1->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          I_STRUCTURE_NAME = 'SPFLI'
        CHANGING
          IT_OUTTAB        = ITAB1.
    ENDMODULE.                 " STATUS_0100  OUTPUT

  • Calling screens in ALV

    hello all,
           i need to call screens like that of basic data of a particular material number selected from the secondary list of an ALV report. is it the same way as in an ordinary report that i have to proceed or is there other method.
       Do i have to put buttons in appln tool bar of secondary window of ALV report using set pf status or is there any other method???
    kindly advice.
    thanks in advance,
    seenu
    Message was edited by:
            srisri
    Message was edited by:
            srisri

    Hello,
    Define a local class as shown:
    CLASS lcl_eh DEFINITION.
    PUBLIC SECTION.
    DATA:ls_wa2_schd_lines TYPE ts_schd_lines,
    lv_flag,
    ls_toolbar TYPE stb_button,
    lt_selected_rows TYPE lvc_t_roid,
    ls_selected_row TYPE lvc_s_roid,
    lv_counter TYPE i VALUE 0.
    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.
    ENDCLASS. "lcl_eh DEFINITION
    CLASS lcl_eh IMPLEMENTATION.
    *METHOD: HANDLE_TOOLBAR
    *DESCRIPTION: This method provides the necessary detail required to
    create an extra button in the toolbar.
    METHOD handle_toolbar.
    CLEAR ls_toolbar.
    MOVE 'SELECT' TO ls_toolbar-function.
    MOVE 0 TO ls_toolbar-butn_type.
    MOVE 'SELECT' TO ls_toolbar-text.
    MOVE 'SELECT'  TO ls_toolbar-icon.
    MOVE 'SELECT'  TO ls_toolbar-quickinfo.
    APPEND ls_toolbar TO e_object->mt_toolbar.
    ENDMETHOD. "handle_toolbar
    *METHOD: HANDLE_USER_COMMAND
    METHOD handle_user_command.
    CASE e_ucomm.
    WHEN 'SELECT'  .
    CALL METHOD gv_alv->get_selected_rows
    IMPORTING
    ET_INDEX_ROWS =
    et_row_no = lt_selected_rows.
    READ TABLE lt_selected_rows INTO ls_selected_row INDEX 1 .
    READ TABLE gt_it_schd_lines INTO
    gs_wa_schd_lines INDEX<b> ls_selected_row-row_id.</b>
    You get the data of the row selected.Now call the screen
    Call screen 200.
    Before you call the method
    SET_TABLE_FOR_FIRST_DISPLAY,you need to set the handlers.
    CREATE OBJECT object_ref.
    SET HANDLER object_ref->handle_toolbar FOR gr_alvgrid.
    SET HANDLER object_ref->handle_user_command FOR gr_alvgrid.
    Now call the method SET_TABLE_FOR_FIRST_DISPLAY.
    regards,
    Beejal
    **Reward if this helps

  • How i can call transaction into conteiner

    hi,
    i hope you can help me,
    i want call one transaction into the conteiner.
    i try everyting but dont working
    REPORT Z_IGOR_TESTE2.
    DATA: G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    CLASS create_report DEFINITION
    CLASS create_report DEFINITION INHERITING FROM cl_gui_alv_grid.
    PUBLIC SECTION.
    METHODS:
    call_transactio.
    ENDCLASS. "create_report DEFINITION
    CLASS create_report IMPLEMENTATION
    CLASS create_report IMPLEMENTATION .
    METHOD call_transactio.
    call transaction 'SM30'.
    ENDMETHOD. "
    ENDCLASS. "create_report IMPLEMENTATION
    START-OF-SELECTION.
    call screen 100.
    *& Module STATUS_0100 OUTPUT
    text
    module STATUS_0100 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    data: initial type c,
    sm30 type string VALUE 'SM30',
    teste TYPE REF TO create_report.
    if initial NE 'X'.
    CREATE OBJECT G_CUSTOM_CONTAINER
    EXPORTING CONTAINER_NAME = 'CC'.
    CREATE OBJECT teste
    EXPORTING I_PARENT = G_CUSTOM_CONTAINER.
    *SET HANDLER: create_report2=>call_transaction FOR create_report.
    CALL METHOD teste->call_transactio.
    INITIAL = 'X'.
    endif.
    endmodule.

    The main issue is that you can have only one main dynpro (I don't talk about its possible subscreens) and any number of docking containers (outside the dynpro). But these docking containers must be created from the PBO of the main dynpro.
    If it's for SM30, I think it is possible only by a modification of the standard. Note that SM30 already handles docking containers, as you can see when you call a view cluster (SM34, docking container at the left of the dynpro).

  • Help with Refreshing and Calling Screens

    Hi everyone.  I have somewhat of a simple ABAP program in which the user will enter data on Selection-Screen 1000.  This will then be loaded into an Object Oriented ALV Grid for display purposes only (screen 0100).  At any time, the user may use the back button on the ALV Grid Screen; which will take them from screen 0100 to screen 1000(Selection Screen).  Lets assume the user does not want to go back to the original selection screen from the ALV Grid Screen; they entered the information correctly and want to continue processing using a custom button I've created which will continue to process the record of data into a BW ODS.  This process works, but now I would like to use the write statement once the custom button is clicked to show a summary of the data I am inserting into the ODS after the data has been inserted.  The problem is, the title of the ALV Grid still shows and the Write statement is processed, but not shown on the screen.  I've been trying to refresh the screen with set screen and call screen combinations, but no luck.  Any Help would be appreciated.  Thanks!
    Here is a sample of the code below:
    *& Report  ZINC_DSP_SALES_INCRASE
    REPORT  ZINC_DSP_SALES_INCREASE MESSAGE-ID zsm.
    INCLUDE <icon>.
    DATA: credit_itab type standard table of /bic/azincosvi00,
          wa_credit like line of credit_itab,
          alv_itab type standard table of /bic/azincosvi00,
          wa_alv like line of alv_itab.
    DATA: ok_code LIKE sy-ucomm,
          save_ok LIKE sy-ucomm,
          incent type table of /bic/azincosvi00,
          g_container TYPE scrfname VALUE 'Increase DSP Sales',
          grid1 TYPE REF TO cl_gui_alv_grid,
          gs_layout TYPE lvc_s_layo,
          g_custom_container TYPE REF TO cl_gui_docking_container.
    DATA: active_guid like /bic/mzguid_dsr,
          UNIQUEKEY LIKE /BIC/AZINCOSVI00-/BIC/ZRCRDKEY,
          rpt_per_rec like  /BIC/MZRPTPRDCR,
          dsrcode like /bic/mzdsrcode-/bic/zdsrcode,
          payrec like /bic/mzsubcode.
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    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.
    CLASS lcl_event_receiver IMPLEMENTATION.
    This will create the toolbar
      METHOD handle_toolbar.
       DATA: ls_toolbar  TYPE stb_button.
       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 'CREATE' TO ls_toolbar-function.
       MOVE ICON_OKAY TO ls_toolbar-icon.
       MOVE ' ' TO ls_toolbar-disabled.
       APPEND ls_toolbar TO e_object->mt_toolbar.
      ENDMETHOD.
    METHOD handle_user_command.
      CASE e_ucomm.
      WHEN 'CREATE'.
      Insert /bic/azincosvi00 from wa_credit.
      CALL METHOD grid1->free.
      SET SCREEN '200'.
      WHEN 'OTHERS'.
      " DO NOTHING
      ENDCASE.
      ENDMETHOD.
    ENDCLASS.
    Data: event_receiver TYPE REF TO lcl_event_receiver.
    START-OF-SELECTION.
    Selection-Screen BEGIN OF BLOCK 1 with frame title text-001.
    Parameters:  start   like /bic/azincosvi00-BILL_DATE.
    Selection-Screen END OF BLOCK 1.
    Selection-Screen BEGIN OF BLOCK 3 with frame title text-003.
    Parameters: guid         type /BIC/OIZGUID_DSR,
                pcode        type /BIC/OIZPGMCODE,
                scode        type /BIC/OIZSUBCODE,
                reason       type /BIC/OIZEXCPTC,
                quantity(5)  type n,
                discount     type /BI0/OISUBTOTAL_4.
    Selection-Screen END OF BLOCK 3.
    END-OF-SELECTION.
    IF quantity <> '00000'.
       if pcode <> 'SCTMS'.
          message e000 with 'Quantity can only be used with seating spiff'.
       endif.
    ENDIF.
    GET REPORT PERIOD INFO using today's date.
      select single * from /bic/mzrptprdcr INTO rpt_per_rec
          where calyear  = sy-datum(4)
            and /bic/zpgmcode  = pcode
            and ( /BIC/ZRPPRDSTR <= start
                  and /BIC/ZRPPRDEND >= start ) .
      if sy-subrc <> 0.
        message e000 with
        'Report Period NOT FOUND for' pcode ' ' sy-datum(4).
      endif.
    Select Active Guid based upon user entry on selection-screen
    Select single * from /bic/mzguid_dsr into active_guid
                                      where /bic/zguid_dsr = guid
                                      and   /bic/zdsrstat = 'A'.
        If sy-subrc <> 0.
        MESSAGE e000 WITH 'Please enter a valid GUID'.
        ENDIF.
    Select DSR Code based upon a valid guid entered
    Select single /bic/zdsrcode from /bic/mzdsrcode into dsrcode
                                     where /BIC/ZGUID_DSR = guid
                                     and   /BIC/ZDSRCDST = 'A'.
        If sy-subrc <> 0.
        MESSAGE e000 WITH 'GUID entered does not have an active dsr code.'.
        ENDIF.
    Select MAX( /BIC/ZRCRDKEY ) FROM /BIC/AZINCOSVI00 INTO WA_CREDIT-/BIC/ZRCRDKEY.
    UNIQUEKEY = WA_CREDIT-/BIC/ZRCRDKEY + 1.
    WA_CREDIT-/BIC/ZRCRDKEY = UNIQUEKEY.
    WA_CREDIT-PO_NUMBER = UNIQUEKEY.
    WA_CREDIT-/BIC/ZERDAT = SY-DATUM.
    WA_CREDIT-BILL_DATE = SY-DATUM.
    WA_CREDIT-/BIC/ZRPPRDSTR = rpt_per_rec-/BIC/ZRPPRDSTR.
    WA_CREDIT-/BIC/ZRPPRDEND = rpt_per_rec-/BIC/ZRPPRDEND.
    WA_CREDIT-/BIC/ZCUBPRCDT = SY-DATUM.
    WA_CREDIT-/BIC/ZRPTPRDCR = rpt_per_rec-/BIC/ZRPTPRDCR.
    WA_CREDIT-/BIC/ZINCPYPRC = '00000000'.
    WA_CREDIT-/BIC/ZGUID_DSR = ACTIVE_GUID-/bic/zguid_dsr.
    WA_CREDIT-/BIC/ZDSRCODE = dsrcode.
    WA_CREDIT-/BIC/ZPGMCODE = PCODE.
    WA_CREDIT-/BIC/ZUNASSIGN = 'N'.
    WA_CREDIT-/BIC/ZSUBCODE = SCODE.
    WA_CREDIT-/BIC/ZSITE_ICR = ACTIVE_GUID-/BIC/ZSITE_IRG.
    WA_CREDIT-/BIC/ZSUSPEND = 'N'.
    WA_CREDIT-/BIC/ZSUSPNDR = ' '.
    WA_CREDIT-/BIC/ZSITE_IRG = ACTIVE_GUID-/BIC/ZSITE_IRG.
    WA_CREDIT-/BIC/ZSITE_CST = ' '.
    WA_CREDIT-/BIC/ZINCBONUS = '0.00'.
    WA_CREDIT-STAT_CURR = 'USD'.
    WA_CREDIT-DOC_CURRCY = 'USD'.
    WA_CREDIT-SALES_UNIT = 'ST'.
    WA_CREDIT-CALYEAR =  SY-DATUM(4).
    WA_CREDIT-/bic/ZCASEID = SY-UNAME.
    WA_CREDIT-/bic/ZSLSRSN = REASON.
    WA_CREDIT-RECORDMODE = ' '.
    *Depending on Program Code, populate the amounts to be paid.
    Data: fivepercent type p.
          fivepercent = '0.05'.
    If pcode = 'SCW5S' or pcode = 'SCTMS'.
    Select single * from /bic/mzsubcode into payrec
                         where /bic/zpgmcode = pcode
                         and /bic/zsubcode = scode
                         and CALYEAR = sy-datum(4).
          if sy-subrc <> 0.
            write: / '**************  ERROR  ***********************',
                   / '** Missing Program Information for ',
                   /  pcode,
                      scode,
                      sy-datum(4),
            exit.
            endif.
    ENDIF.
    If pcode = 'SCW5S'.
    WA_CREDIT-/BIC/ZINCUSDDS = discount.
    WA_CREDIT-/BIC/ZPAYAMTUS = WA_CREDIT-/BIC/ZINCUSDDS * payrec-/bic/zpayper / 100.
    WA_CREDIT-SUBTOTAL_4 = discount.
    WA_CREDIT-/BIC/ZINC_QTY = ' '.
    Endif.
    If pcode = 'SCTMS'.
    WA_CREDIT-/BIC/ZPAYAMTUS = quantity * payrec-/bic/zpayper / 100.
    WA_CREDIT-/BIC/ZINCUSDDS = '0.00'.
    WA_CREDIT-SUBTOTAL_4     = '0.00'.
    WA_CREDIT-/BIC/ZINC_QTY = quantity.
    Endif.
    If pcode = 'SCTB'.
    WA_CREDIT-/BIC/ZPAYAMTUS = '0.00'.
    WA_CREDIT-/BIC/ZINCUSDDS =  DISCOUNT.
    WA_CREDIT-SUBTOTAL_4 =  DISCOUNT.
    WA_CREDIT-/BIC/ZINC_QTY = ' '.
    Endif.
    *Create ALV Grid to show the user what the record will look like in which they are creating.
    Append wa_credit to alv_itab.
    CALL SCREEN 100.
    *&      Module  PBO  OUTPUT
          text
    MODULE alv_pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR  'MAIN100'.
      IF g_custom_container IS INITIAL.
    CREATE OBJECT grid1
    EXPORTING i_parent = g_custom_container.
        CALL METHOD grid1->set_table_for_first_display
          EXPORTING
            i_structure_name = '/bic/azincosvi00'
           CHANGING
            it_outtab        = alv_itab.
        CREATE OBJECT event_receiver.
        SET HANDLER event_receiver->handle_user_command FOR grid1.
        SET HANDLER event_receiver->handle_toolbar FOR grid1.
        CALL METHOD grid1->set_toolbar_interactive.
      ENDIF.
    ENDMODULE.                 " PBO  OUTPUT
    *&      Module  PAI  INPUT
          text
    MODULE alv_pai INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          CALL METHOD grid1->free.
          CALL SELECTION-SCREEN '1000'.
        WHEN OTHERS.
        " DO NOTHING.
      ENDCASE.
    ENDMODULE.                " PAI  INPUT
    *&      Module  200_PBO  OUTPUT
          text
    MODULE 200_PBO OUTPUT.
      Write at 5: 'Increase DSP Sales'.
      Skip 1.
      Write at 5: 'USER'.
      Write at 15:'PROGRAM CODE'.
      WRITE AT 25:'SUB CODE'.
      WRITE AT 37:'DISCOUNTED SALES'.
      WRITE AT 67:'PAY AMOUNT US'.
      WRITE AT 80:'REASON'.
    ENDMODULE.                 " 200_PBO  OUTPUT

    There are some problems with ok_code, you need to assign sy-ucomm at each module.  Also the main problem was that you needed leave to list-processing and suppress dialog before writing.  However, when you do this the screens calls change a little. You also needed to use the container correctly.  Apply the correctons below and you'll be all set. Unfortunaley you will have to play around with calling the sel. screen (1000) from screen 100, I don't think call sel. screen 1000 will work properly there (you might need a custome screen instead).  The user may be okay with kicking back out to sa38 after the alv display, however.  Good luck and don't listen to the clowns' comments above. I once worked in that circus,    Hey Guys.
    Instead of this:
    METHOD handle_user_command.
    CASE e_ucomm.
    WHEN 'CREATE'.
    Insert /bic/azincosvi00 from wa_credit.
    CALL METHOD grid1->free.
    SET SCREEN '200'.
    WHEN 'OTHERS'.
    " DO NOTHING
    ENDCASE.
    ENDMETHOD.
    <b>DO THIS:</b>
      METHOD handle_user_command.
        CASE e_ucomm.
          WHEN 'CREATE'.
            Insert /bic/azincosvi00 from wa_credit.
            CALL SCREEN 200.
          WHEN 'OTHERS'.
            " DO NOTHING
        ENDCASE.
      ENDMETHOD.                    "handle_user_command
    <b>Instead of this:</b>
    *Create ALV Grid to show the user what the record will look like in which they are creating.
    Append wa_credit to alv_itab.
    CALL SCREEN 100.
    <b>DO THIS:</b>
      IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container EXPORTING dynnr = '100'
                                          repid = sy-cprog
                                          ratio = '95'.
      ENDIF.
      IF grid1 IS INITIAL.
        CREATE OBJECT grid1 EXPORTING i_parent = g_custom_container.
      ENDIF.
      CREATE OBJECT event_receiver.
      SET HANDLER event_receiver->handle_user_command FOR grid1.
      SET HANDLER event_receiver->handle_toolbar FOR grid1.
      SET SCREEN 100.
      CALL SCREEN 100.
    <b>Instead of this:</b>
    MODULE alv_pbo OUTPUT.
    SET PF-STATUS 'MAIN100'.
    SET TITLEBAR 'MAIN100'.
    IF g_custom_container IS INITIAL.
    CREATE OBJECT grid1
    EXPORTING i_parent = g_custom_container.
    CALL METHOD grid1->set_table_for_first_display
    EXPORTING
    i_structure_name = '/bic/azincosvi00'
    CHANGING
    it_outtab = alv_itab.
    CREATE OBJECT event_receiver.
    SET HANDLER event_receiver->handle_user_command FOR grid1.
    SET HANDLER event_receiver->handle_toolbar FOR grid1.
    CALL METHOD grid1->set_toolbar_interactive.
    ENDIF.
    ENDMODULE. " PBO OUTPUT
    <b>DO THIS:</b>
    MODULE alv_pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      SET TITLEBAR  'MAIN100'.
    CALL METHOD grid1->set_table_for_first_display
      EXPORTING
         i_structure_name = '/bic/azincosvi00'
      CHANGING
         it_outtab = alv_itab.
      CALL METHOD grid1->set_toolbar_interactive.
    ENDMODULE.                 " PBO  OUTPUT
    <b>Instead of this:</b>
    MODULE alv_pai INPUT.
    save_ok = ok_code.
    CLEAR ok_code.
    CASE save_ok.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'CANCEL'.
    LEAVE PROGRAM.
    WHEN 'BACK'.
    CALL METHOD grid1->free.
    CALL SELECTION-SCREEN '1000'.
    WHEN OTHERS.
    " DO NOTHING.
    ENDCASE.
    ENDMODULE. " PAI INPUT
    <b>DO THIS:</b>
    MODULE alv_pai INPUT.
      ok_code = sy-ucomm.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          CALL METHOD grid1->free.
          LEAVE PROGRAM.
    *       CALL SELECTION-SCREEN '1000'.
        WHEN OTHERS.
          " DO NOTHING.
      ENDCASE.
    ENDMODULE.                " PAI  INPUT
    <b>Instead of this:</b>
    MODULE 200_PBO OUTPUT.
    Write at 5: 'Increase DSP Sales'.
    Skip 1.
    Write at 5: 'USER'.
    Write at 15:'PROGRAM CODE'.
    WRITE AT 25:'SUB CODE'.
    WRITE AT 37:'DISCOUNTED SALES'.
    WRITE AT 67:'PAY AMOUNT US'.
    WRITE AT 80:'REASON'.
    ENDMODULE. " 200_PBO OUTPUT
    <b>DO THIS:</b>
    *Take care of all your list output here
      LEAVE TO LIST-PROCESSING.
      SET PF-STATUS 'MAIN200'.
      SET TITLEBAR  'MAIN200'.
      SUPPRESS DIALOG.
      WRITE AT 5: 'Increase DSP Sales'.
      SKIP 1.
      WRITE AT 5: 'USER'.
      WRITE AT 15:'PROGRAM CODE'.
      WRITE AT 25:'SUB CODE'.
      WRITE AT 37:'DISCOUNTED SALES'.
      WRITE AT 67:'PAY AMOUNT US'.
      WRITE AT 80:'REASON'.
    ENDMODULE.                 " 200_PBO  OUTPUT
    <b>Add Moule:</b>
    MODULE 200_pai INPUT.
      ok_code = sy-ucomm.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
        WHEN 'CANCEL'.
          LEAVE PROGRAM.
        WHEN 'BACK'.
          CALL SCREEN 100.
        WHEN OTHERS.
          " DO NOTHING.
      ENDCASE.
    ENDMODULE.                 " 200_PAI  INPUT

  • Call screen not working

    Hi gurus,
    I m developing a report and I m trying to call another screen after  a statement. I have a problem. ALthough ı m writing call screen 300, the 100 numbered screen comes. What may be the reason? Thanks in advance?

    MY--CODES
      DATA: L_VALID TYPE C.
      DATA :
      TIMETICKETS TYPE BAPI_PP_TIMETICKET OCCURS 0 WITH HEADER LINE,
      RETURN LIKE BAPIRET1,
      LINK_CONF_GOODSMOV TYPE BAPI_LINK_CONF_GOODSMOV
                         OCCURS 0 WITH HEADER LINE,
      GOODSMOVEMENTS TYPE BAPI2017_GM_ITEM_CREATE OCCURS 0 WITH HEADER LINE.
      CALL METHOD CI_ALV->CHECK_CHANGED_DATA
        IMPORTING
          E_VALID = L_VALID.
    CALL METHOD CI_ALV->GET_SELECTED_ROWS
       IMPORTING
         ET_INDEX_ROWS = LT_INDEX_ROWS.
    LOOP AT LT_INDEX_ROWS INTO LS_INDEX_ROWS.
       READ TABLE GT_ITAB INDEX LS_INDEX_ROWS-INDEX.
       IF SY-SUBRC = 0.
       ENDIF.
    ENDLOOP.
      REFRESH : DETAIL_RETURN.
      READ TABLE GT_ITAB WITH KEY CHK = 'X'.
      IF SY-SUBRC NE 0.
        MESSAGE E000(ZPP) WITH 'Lütfen operasyon seçin'.
      ENDIF.
      CLEAR : DETAIL_RETURN, DETAIL_RETURN[].
      LOOP AT GT_ITAB WHERE CHK IS NOT INITIAL
                        AND OK IS INITIAL.
        IF GT_ITAB-LMNGA LE 0 AND GT_ITAB-XMNGA LE 0.
          MESSAGE E000(ZPP) WITH
           'Operasyon' GT_ITAB-VORNR 'için miktar girin'.
        ENDIF.
        REFRESH : TIMETICKETS, DETAIL_RET.
        CLEAR   : TIMETICKETS, DETAIL_RET.
        TIMETICKETS-ORDERID        = GT_ITAB-AUFNR.
        TIMETICKETS-OPERATION      = GT_ITAB-VORNR.
        TIMETICKETS-YIELD          = GT_ITAB-LMNGA.
        TIMETICKETS-SCRAP          = GT_ITAB-XMNGA.
        CLEAR ACT_LMNGA.
        ACT_LMNGA = TIMETICKETS-YIELD + TIMETICKETS-SCRAP.
           export gv_lmnga to memory id 'GV_LMNGA'.
        TIMETICKETS-CONF_QUAN_UNIT = GT_ITAB-AMEIN.
        TIMETICKETS-FIN_CONF       = GT_ITAB-AUERU.
        TIMETICKETS-POSTG_DATE     = GV_BUDAT.
    *--- Calculate activity
        SELECT SINGLE * FROM AFKO WHERE AUFNR = GT_ITAB-AUFNR.
        IF SY-SUBRC IS INITIAL.
          SELECT * INTO TABLE WLT_AFVC
                       FROM AFVC WHERE AUFPL = AFKO-AUFPL
                                   AND VORNR = GT_ITAB-VORNR .
          IF NOT SY-DBCNT IS INITIAL.
            SORT WLT_AFVC BY APLZL.
            LOOP AT WLT_AFVC.
              CLEAR: AFVDB_TAB[],
                     AFVDB_TAB.
              CALL FUNCTION 'ZPP_CO_DB_AFVGD_SINGLE_READ'
                EXPORTING
                  AFVG_AUFTRAG = WLT_AFVC-AUFPL
                  AFVG_VORGANG = WLT_AFVC-APLZL
                TABLES
                  AFVDB_TAB    = AFVDB_TAB
                EXCEPTIONS
                  NOT_FOUND    = 1
                  OTHERS       = 2.
              IF SY-SUBRC <> 0.
              ELSE.
                LOOP AT AFVDB_TAB WHERE AUFPL = WLT_AFVC-AUFPL
                                    AND APLZL = WLT_AFVC-APLZL.
                  CLEAR: ACT_AFVGD,
                         EXP_ACTIVITIES.
                  MOVE-CORRESPONDING AFVDB_TAB TO ACT_AFVGD.
    *-Calculate Activity values--
                  PERFORM CALCULATE_ACTCONF_QTY USING GT_ITAB-MATNR
                                                      GT_ITAB-AMEIN
                                                      ACT_LMNGA
                                                      GV_ACTMG.
                  CALL FUNCTION 'CO_R0_DET_TOTAL_ACTIVITY'
                    EXPORTING
                      ACT_AFVGD             = ACT_AFVGD
                      ACT_FLG_CONSIDER_CONF = 'X'
                      ACT_QUANTITY          = GV_ACTMG
                      ACT_DATUM             = SY-DATUM
                      ACT_FLG_MST           = 'X'
                      ACT_ARBID             = ACT_AFVGD-ARBID
                      ACT_WERKS             = ACT_AFVGD-WERKS
                    IMPORTING
                      EXP_ACTIVITIES        = EXP_ACTIVITIES
                    EXCEPTIONS
                      DIVISION_BY_ZERO      = 1
                      OTHERS                = 2.
                  IF SY-SUBRC <> 0.
                  ELSE.
                    TIMETICKETS-CONF_ACTIVITY1  = EXP_ACTIVITIES-ACTI1.
                    TIMETICKETS-CONF_ACTI_UNIT1 = EXP_ACTIVITIES-UNIT1.
                    IF GT_ITAB-CONF_ACTIVITY2 IS INITIAL.
                      TIMETICKETS-CONF_ACTIVITY2  = EXP_ACTIVITIES-ACTI2.
                    ELSE.
                      TIMETICKETS-CONF_ACTIVITY2  = GT_ITAB-CONF_ACTIVITY2.
                    ENDIF.
                    TIMETICKETS-CONF_ACTI_UNIT2 = EXP_ACTIVITIES-UNIT2.
                    IF GT_ITAB-CONF_ACTIVITY3 IS INITIAL.
                      TIMETICKETS-CONF_ACTIVITY3  = EXP_ACTIVITIES-ACTI3.
                    ELSE.
                      TIMETICKETS-CONF_ACTIVITY3  = GT_ITAB-CONF_ACTIVITY3.
                    ENDIF.
                    TIMETICKETS-CONF_ACTI_UNIT3 = EXP_ACTIVITIES-UNIT3.
                    TIMETICKETS-CONF_ACTIVITY4  = EXP_ACTIVITIES-ACTI4.
                    TIMETICKETS-CONF_ACTI_UNIT4 = EXP_ACTIVITIES-UNIT4.
                    TIMETICKETS-CONF_ACTIVITY5  = EXP_ACTIVITIES-ACTI5.
                    TIMETICKETS-CONF_ACTI_UNIT5 = EXP_ACTIVITIES-UNIT5.
                    TIMETICKETS-CONF_ACTIVITY6  = EXP_ACTIVITIES-ACTI6.
                    TIMETICKETS-CONF_ACTI_UNIT6 = EXP_ACTIVITIES-UNIT6.
                  ENDIF.
                ENDLOOP.
              ENDIF.
            ENDLOOP.
          ENDIF.
        ENDIF.
        APPEND TIMETICKETS.
        APPEND TIMETICKETSALL.
        DATA : GV_ZZSHIFT LIKE AFRU-ZZSHIFT,
               GV_ZZZOPER LIKE AFRU-ZZZOPER,
               GV_ZZZOPE1 LIKE AFRU-ZZZOPE1,
               GV_ZZZDRN1 LIKE AFRU-ZZZDRN1,
               GV_ZZZDRS1 LIKE AFRU-ZZZDRS1,
               GV_ZZZDRN2 LIKE AFRU-ZZZDRN2,
               GV_ZZZDRS2 LIKE AFRU-ZZZDRS2,
               GV_ZZZDRN3 LIKE AFRU-ZZZDRN3,
               GV_ZZZDRS3 LIKE AFRU-ZZZDRS3.
        GV_ZZSHIFT = GT_ITAB-ZZSHIFT.
        GV_ZZZOPER = GT_ITAB-ZZZOPER.
        GV_ZZZOPE1 = GT_ITAB-ZZZOPE1.
        GV_ZZZDRN1 = GT_ITAB-ZZZDRN1.
        GV_ZZZDRS1 = GT_ITAB-ZZZDRS1.
        GV_ZZZDRN2 = GT_ITAB-ZZZDRN2.
        GV_ZZZDRS2 = GT_ITAB-ZZZDRS2.
        GV_ZZZDRN3 = GT_ITAB-ZZZDRN3.
        GV_ZZZDRS3 = GT_ITAB-ZZZDRS3.
        EXPORT GV_ZZSHIFT TO MEMORY ID 'ZZSHIFT'.
        EXPORT GV_ZZZOPER TO MEMORY ID 'ZZZOPER'.
        EXPORT GV_ZZZOPE1 TO MEMORY ID 'ZZZOPE1'.
        EXPORT GV_ZZZDRN1 TO MEMORY ID 'ZZZDRN1'.
        EXPORT GV_ZZZDRS1 TO MEMORY ID 'ZZZDRS1'.
        EXPORT GV_ZZZDRN2 TO MEMORY ID 'ZZZDRN2'.
        EXPORT GV_ZZZDRS2 TO MEMORY ID 'ZZZDRS2'.
        EXPORT GV_ZZZDRN3 TO MEMORY ID 'ZZZDRN3'.
        EXPORT GV_ZZZDRS3 TO MEMORY ID 'ZZZDRS3'.
        CALL FUNCTION 'BAPI_PRODORDCONF_CREATE_TT'
          EXPORTING
            POST_WRONG_ENTRIES = '1'
          IMPORTING
            RETURN             = RETURN
          TABLES
            TIMETICKETS        = TIMETICKETS[]
            GOODSMOVEMENTS     = GOODSMOVEMENTS[]
            LINK_CONF_GOODSMOV = LINK_CONF_GOODSMOV[]
            DETAIL_RETURN      = DETAIL_RET[].
        IF RETURN-TYPE IS INITIAL .    "islem basarili
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              WAIT = 'X'.
          GT_ITAB-OK = 'X'.
          CLEAR GT_ITAB-CHK.
          GT_ITAB-ROWCOLOR = 'C510'.
          MODIFY GT_ITAB.
        ELSE.
          GT_ITAB-ROWCOLOR = 'C610'.
          CLEAR GT_ITAB-CHK.
          MODIFY GT_ITAB.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
        ENDIF.
        LOOP AT DETAIL_RET.
          MOVE-CORRESPONDING DETAIL_RET TO DETAIL_RETURN.
          APPEND DETAIL_RETURN.
          GT_ITAB-MESSAGE = DETAIL_RET-MESSAGE.
          MODIFY GT_ITAB.
        ENDLOOP.
    CALL SCREEN 300.
      ENDLOOP.
    Edited by: OSMANBIYIK on Dec 21, 2010 7:40 AM

Maybe you are looking for

  • No service for system ECC R/3 , for IDOC to file interface in SM58

    Hi all,        I am geting a error No service for system XXXXX, client 100 iIntegration Directory, when i go to IIDX2 and Updating the IDOC type , i am not able to add it is give me a error 100 please help me in this thanking you

  • Problem with page size when converting spool to PDF

    I have a SmartForm invoice which is formatted perfectly when I print it using the printer options specified when I open the form. However, when I send the output to spool, convert it to PDF using FM CONVERT_OTFSPOOLJOB_2_PDF, then print to the same p

  • Failing to refresh LOV fields added in the query panel with table

    Hi.. Iam using Jdev 11.1.1.2.0 I have a scenario like ..i need to add 2 cascaded lovs in search panel and clicking on search button, the result should be displayed in table form. For example.. I have cascaded LOV fields departmentId and Firstname , f

  • Regarding back ground job scheduling

    Hi,     one of our program was sheduled for back ground job, by another user, so just i need to knwo when this job is sheduled and it is executing daily, so, i need to knwo whether he has created a background job through , sm36, or through a program,

  • Closed Project Window Stays Open

    I have one project out of three where this is a problem.  I can end the project but the window does not close. I am using Captivate 4 and I have gone to preferences and changed end of project to be Close Project. Even at that, the last slide wants to