Regarding the Custom screen

hai friends,
            how to dispaly the ouput of ALV  in Custom screen.
Regards,
selvamuthukumar

Hi,
Following Sample Code will help you in this way, i am using SCREEN 1 and SCREEN 2
Screen one there is a field where user enter the Number of Records he want to show from KNA1
than on SCREEN 2 there is CONTAINER where Record show as ALV
Flow Logic SCREEN 1
process before output.
  module status_0001.
process after input.
  module exit_command_0001 at exit-command.
  chain.
    field: tf_rec_no.
    module user_command_0001.
  endchain.
Flow Logic SCREEN 2
process before output.
  module status_0002.
  module display_alv.
process after input.
  module exit_command_0002 at exit-command.
  module user_command_0002.
report  zfsl_rget_from_kna1_scr_class.
tables: kna1, zsdo.
data: tf_rec_no(10).
*PARAMETERS: ptablen(10).
data: git_kna1 like standard table of kna1 with header line,
      wa_git_kna1 like kna1,
      go_grid type ref to cl_gui_alv_grid,
      go_custom_container type ref to cl_gui_custom_container.
call screen 1.
*&      Module  STATUS_0001  OUTPUT
*       text
module status_0001 output.
  set pf-status 'ZFSL_KNA1_SCR_CLASS'.
*  SET TITLEBAR 'xxx'.
endmodule.                 " STATUS_0001  OUTPUT
*&      Module  USER_COMMAND_0001  INPUT
*       text
module user_command_0001 input.
  if tf_rec_no ca 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-'.
    message 'Please enter the Valid Number' type 'E'.
  elseif tf_rec_no = 0 and tf_rec_no <> space.
    message 'Please enter the Number other than 0 (ZERO)' type 'I'.
  elseif tf_rec_no <> space.
    clear: git_kna1[], git_kna1.
    select * from kna1 up to tf_rec_no rows
      into corresponding fields of table git_kna1.
    if sy-subrc = 0.
      modify screen .
      call screen 2.
    endif.
  endif.
endmodule.                 " USER_COMMAND_0001  INPUT
*&      Module  exit_command  INPUT
*       text
module exit_command_0001 input.
  data: ok_bt1 type sy-ucomm.
*        ok_bt2 TYPE sy-ucomm.
  case ok_bt1.
    when 'BACK'.
      clear ok_bt1.
      leave to screen 0.
    when 'EXIT'.
      clear ok_bt1.
      leave program.
    when 'CANCEL'.
      clear ok_bt1.
      leave to transaction 'ZFSLSCB'.
  endcase.
endmodule.                 " exit_command  INPUT
*&      Module  STATUS_0002  OUTPUT
*       text
module status_0002 output.
  set pf-status 'ZFSL_KNA1_SCR_CLASS'.
*  SET TITLEBAR 'xxx'.
*clear: go_custom_container.
*  CALL METHOD go_grid->refresh_table_display.
  if go_custom_container is initial.
    create object go_custom_container
      exporting
        container_name = 'ALV_CONTAINER'.
    create object go_grid
      exporting
        i_parent = go_custom_container.
  endif.
  perform load_data_into_grid.
endmodule.                 " STATUS_0002  OUTPUT
*  MODULE exit_command_0002 INPUT
module exit_command_0002 input.
  data: ok_bt2 type sy-ucomm.
*        ok_bt2 TYPE sy-ucomm.
  case ok_bt2.
    when 'BACK'.
      clear ok_bt1.
      leave to screen 0.
    when 'EXIT'.
      clear ok_bt2.
      leave program.
    when 'CANCEL'.
      clear ok_bt2.
      leave to transaction 'ZFSLSCB'.
  endcase.
endmodule.                 " exit_command  INPUT
*&      Module  USER_COMMAND_0002  INPUT
*       text
module user_command_0002 input.
endmodule.                 " USER_COMMAND_0002  INPUT
*&      Form  load_data_into_grid
*       text
form load_data_into_grid.
*    SELECT * FROM kna1 UP TO tf_rec_no ROWS
*      INTO CORRESPONDING FIELDS OF TABLE git_kna1.
  call method go_grid->set_table_for_first_display
    exporting
      i_structure_name = 'KNA1'
    changing
      it_outtab        = git_kna1[].
endform.                    "load_data_into_grid
Please Reply if any Issue.
Kind Regards,
Faisal
Edited by: Faisal Altaf on Feb 17, 2009 7:28 PM

Similar Messages

  • Process chain status message in the custom screen.

    HI All,
    We have created a custom screen for hierarchy upload in BW once the file has been uploaded it will trigger an event which is triggering a process chain. The process happen like
    Upload the file from desktop it will go and sit in al11 folder
    Trigger an event which will trigger the process chain
    Infopackge routine has been written which will download the file for al11.Please find the attached screenshot is for your reference.
    Once the DTP has been completed we need to trigger a message which will tell us the status of the DTP like finished successfully or not. This message should have to show in the custom screen which we have provided to the customer.
    We are aware of mail recipient list option. Please suggest further options
    Many thank sin advance.
    Regards,
    Sakthivel S

    Hi Appana,
    Yes, we can identify any screen changes from sy-datar. It is set when I make any changes in the custom screen also. But I dont want to give a pop up every time I leave the custom screen. I want to give raise a pop up for saving the delivery document just like any other SAP screen (For eg. SAP Screens do not give a pop up when we move from one screen to another screen, but it gives a pop up if we try to do a subsequent functions like picking without saving the changes in delivery).
    Thanks
    Anil

  • How to open a Excel file and display on the custom screen

    Guys, I am new to screen programming. In my first screen (SCREEN #9000) I want to put a field, where I must be able to select a file from my desktop and when I click the DISPLAY button, it should suck all the data from the spread sheet in to an internal table, and should display the next screen  (SCREEN #9001), displaying the data from the internal table along with a button called LOAD. Now when I click the LOAD button after reviewing the data, it must load the data to my custom table in R/3. I know how to load an Excel spreadsheet to R/3 without the custom screens. But my requirement now is to do from custom screens like I mentioned above. Any ideas how to do this? Thanks.
    Dan

    Hi Dan,
    In my first screen (SCREEN #9000) I want to put a field, where I must be able to select a file from my desktop and when I click the DISPLAY button, it should suck all the data from the spread sheet in to an internal table, and should display the next screen (SCREEN #9001)
    For  this create a MPP program and create a Push button. Write the code for this to open a file like use f4_filename.From here you are able to select a file.
    + displaying the data from the internal table along with a button called LOAD. Now when I click the LOAD button after reviewing the data, it must load the data to my custom table in R/3.+
    With the above you are able to open a file and now you have to load that data into internal table. Select the file from the desktop.
    Totally you have to create 1) Screen 2) Push button( Open File) 3) Load data ( From file) .
    [Create Push Buttons|http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba9a635c111d1829f0000e829fbfe/content.htm]
    Check this if there is any please post.
    Regards,
    Madhu.

  • Print the custom screen

    hi
      I need some clarifications in the module pool programming. I need to print the custom screen. Is there any standard function module or a standard program which prints the screen

    HI
    fcode for print is fcode = 'UTPR'.
    call function 'SET_EDITOR_HANDLE'
    call function 'SWITCH_FRAMEWORK
    call method get_cursor
    call method source_instance->get_state
    if me->editormode-casemode = '0' or
    me->editormode-casemode = 'L'.
    case_mode = 'LOWER'.
    elseif me->editormode-casemode = '1'.
    case_mode = 'UPPER'.
    elseif me->editormode-casemode = '2'.
    case_mode = 'HIKEY'.
    elseif me->editormode-casemode = '3'.
    case_mode = 'LOKEY'.
    endif.
    cursor-new_index = cursor-index.
    cursor-new_offset = cursor-offset.
    me->edit-buf_scline = content_display..
    me->edit-buf_culine = cursor-index.
    me->edit-buf_cuoffs = cursor-offset.
    if source_instance->l_control_instance_identical = space.
    source_instance->l_backend_actual =
    call method source_instance->get_source_tab
    call method source_instance->get_compressed_source
    describe table content lines content_fill.
    call method source_instance->set_lineindex.
    call method source_instance->get_lineindex
    importing
    lineindex = lineindex[].
    call method source_instance->get_linenumbers
    importing
    linenum = linenum[].
    call method source_instance->get_modification_inf
    call method source_instance->get_state
    call method source_instance->get_change_information
    call method me->get_editor_mode
    CALL FUNCTION 'SET_EDITOR_HANDLE'
    Hope this is useful.....
    Regards,
    Pavan

  • Identifying changes in the custom screen added to Delivery

    Hello,
    I have added a custom screen in delivery transaction(VL02n) at header level. I used BADI LE_SHP_TAB_CUST_HEAD to do that. Now if user comes and enters some data on the custom screen, then goes to menu option Subsequent processing-->Create Transfer Order, user is not prompted with a pop up screen to save changes.
    It happens with SAP Standard screens for any data changes. How do we achieve the same functionality to prompt a popup message for any changes in the custom screen and save the data?
    Thanks
    Anil

    Hi Appana,
    Yes, we can identify any screen changes from sy-datar. It is set when I make any changes in the custom screen also. But I dont want to give a pop up every time I leave the custom screen. I want to give raise a pop up for saving the delivery document just like any other SAP screen (For eg. SAP Screens do not give a pop up when we move from one screen to another screen, but it gives a pop up if we try to do a subsequent functions like picking without saving the changes in delivery).
    Thanks
    Anil

  • Regarding the Customer Proprietary Network Information Notice

    >> Duplicate post removed to comply with Verizon Wireless Terms of Service.  See Regarding the Customer Proprietary Network Information Notice <<
    Message was edited by: Verizon Moderator

    You do realize you opted in the day you signed up for verizon, right? As for certain parts, you can opt out via your my verizon

  • Adding the customer screen to enhance the header for Enjoy PO

    Dear Expert's,
    My requirement is to add a new tab on Header for Enjoy PO by enhancing ME21N/ME22N and ME23N.
    I have already implemented the BADI's ME_GUI_PO_CUST and ME_PROCESS_PO_CUST.
    Actions Taken:
    I have created a custom Function group and subscreen '9000'.
    I have created a 'Z' structure as per the screen layout on the Header Tab
    I have appended the custom fields in EKKO custom include CI_EKKO.
    Reactions:
    1. I am able to successfully display the screen on additional tab at header level.
    2. The Display & Change is working perfectly for screen '9000' on ME21N/ME22N and ME23N header.
    Problem:
    I am unable to read the 'Z' fields from EKKO to populate the TAB Screen '9000' and neither able to save the 'Z' fields from '9000' TAb screen for header data.
    I am not using any EXIT for this and have to use only BADI for this solution. Please help me to implement this solution using BADI only.
    Also i have tried implementaing the transport Data object -> Model + Model -> Dynpro + Dynpro -> Model + Model -> Data object methods, but these methods are not getting triggered.
    Please let me know if i can use EVENT_PBO & EVENT_PAI if yes , than how to trigger these events and where..?

    Hi ,
    try to enhance PO header using SAP Note 407975
    Summary
    Symptom
    You are using SAP customer enhancement MM06E005. There is no sample source
    code for this enhancement.
    More Terms
    User exit, customer enhancement, MM06E005, example, sample
    Cause and Prerequisites
    You want to activate user exit MM06E005. Note that this is a consulting
    note and not a correction of the user exit.
    Solution
    You can use the sample source code attached here to recognize the basic
    functions of the exit. This example is, however, only one of many options
    that are offered by the customer enhancement.
    The sample source code includes the following functions:
    o Supply of an additional field on header level
    o Supply of an additional field on item level
    o Derivation of a field on item level from the copied reference
    document
    Now, in order to be able to use the sample source code, you must create
    field ZZFLAG on the header level of the document and field ZZFIELD on the
    item level.
    Double-click on Include table CI_EKKODB
    Enter the following values:
    - Name Component type DType Length DecPlace Short text
    - ZZFLAG CHAR1 CHAR 1 0 1-digit indicator
    Save and activate the include table.
    Double-click on Include table CI_EKPODB
    Enter the following values:
    - Name Component type DType Length DecPlace Short Text
    - ZZFIELD CHAR1 CHAR 1 0 1-digit indicator
    Save and activate the include table.
    In order to activate the sample source code, you additionally have to carry
    out the following changes on screens 0101 and 0111.
    1. Screen 0101: Create the following fields:
    2010.02.05 Page 2 of 3
    SAP Note 407975 - MM06E005: Collective note: Examples for
    implementation
    "Checkbox" Name: EKKO_CI-ZZFLAG
    2. Screen 0111: Create the following fields:
    "Input/output field" Name: EKPO_CI-ZZFIELD
    "Pushbutton" Name: BUTTON
    FctCode: ZZDETERMINE
    The following assignments apply to the sample source code:
    EXIT_SAPMM06E_006 --> LXM06F36
    EXIT_SAPMM06E_007 --> LXM06F38
    EXIT_SAPMM06E_008 --> LXM06F37
    EXIT_SAPMM06E_009 --> LXM06F39
    EXIT_SAPMM06E_016 --> LXM06F41
    EXIT_SAPMM06E_017 --> LXM06F42
    EXIT_SAPMM06E_018 --> LXM06F40
    Copy the source code from the attachment and insert it into the
    corresponding function modules. Save and activate the function modules.
    Create the following variables in the corresponding TOP include in order
    not to get any syntax errors:
    INCLUDE ZXM06TOP
    data: gl_aktyp type c,
    gl_no_screen type c,
    gl_rekko like ekko,
    gl_ekko_ci like ekko_ci,
    gl_ekpo_ci like ekpo_ci,
    gl_ekpo like ekpo,
    gl_ucomm like sy-ucomm.
    types: begin of ekpo_tab,
    ebeln like ekpo-ebeln,
    ebelp like ekpo-ebelp,
    ekpo like ekpo,
    end of ekpo_tab.
    data: gt_ref_ekpo_tab type table of ekpo_tab.
    Save and activate the TOP include.
    On header level, you can now store a character, X or space, via field
    ZZFLAG on the database with the document and read it also again.
    On item level, you can fill field ZZFIELD with a one-digit value and save
    it with the document. If you copy this document, the system displays an
    additional function button on tab page "Customer data". If you press this
    button, the value of the reference document is copied to field ZZFIELD.
    If you want to store the source code as sample source code in your system,
    start Transaction SMOD. Enter MM06E005 as an enhancement. Select
    "Components". Press "Change". Position the cursor on the corresponding
    module and choose "Sample code". Create the corresponding include and copy
    2010.02.05 Page 3 of 3
    SAP Note 407975 - MM06E005: Collective note: Examples for
    implementation
    the source code from the note. Save the include. Note that, of course,
    syntax errors may occur when you check components. This is because the
    includes of the sample code are not integrated into a program but rather
    are completely independent and, therefore, do not have any relationship to
    each other either. For this reason, only save the include and do not
    activate or check it. The sample code has to be copied into the
    corresponding function modules in order to become active.
    If you use the user exit in the new purchase order, it is not guaranteed
    that the customer screen is always processed. To make sure that possible
    required fields are checked, include a corresponding message into the
    EXIT_SAPMM06E_012. This screen is always processed.

  • Workflow actions like FORWARD, RETURN, CANCEL in the Custom Screens

    We have a requirement to perform the Workflow actions like FORWARD, RETURN, CANCEL from a Custom transaction Screen.
    Usually these Workflow actions can be performed from SAP Inbox SWBP of the user and related WF logs are reflected by SAP automatically. 
    For example,
    we will add the Push buttons in CC02 transaction and want to perform these Workflow Actions, Is it possible to do so? If possible, How can I reflect these changes into WF logs and all similar to Standard SAP?
    Help is appreciated.
    Thanks,
    Prathap

    we will add the Push buttons in CC02 transaction and want to perform these Workflow Actions,
    Is it possible to do so? If possible, How can I reflect these changes into
    WF logs and all similar to Standard SAP?
    Question & Answers
    we will add the Push buttons in CC02 transaction ?
    Are you going to add only one button or three separate buttons, if you can add three separate buttonts then under each button action,
    For Forward  =  SAP_WAPI_FORWARD_WORKITEM make use of the standard FM.
    For Retrun ( Assuming that you want to put back the workitem ID back to the user's inbox ) in that case use of FM SAP_WAPI_PUT_BACK_WORKITEM.
    For Cancel   =  SAP_WAPI_WORKITEM_DELETE this might help you to cancel ( Assuming that Cancelling means Deleting the workitem...
    Note : to make use of all the above FM you need to have the workitem ID, Will you be able to determine the exact workitem id?
    for more :
    Now you can find more FM regarding the workitem by simple search in SE37 Txn by using the term SAP_WAPI_*.

  • Changing the customer screen tab name in transaction co02

    I have done a exit in transaction CO02.Added one tabstrip in the screen.Its named as customer screen there.How to change this name.please provide with steps.

    Hi
    I'm working on 46C and ECC 6.00: it works fine in the both realeses.
    So I suppose it'll have to work on 470
    I run SMOD trx (no CMOD)
    Insert PPCO0012 and press TEST icon
    Doubleclick on line Exit Menu
    A popup is shown and here I can change the description and the icon for function +COI
    That's all.
    If you're getting the error "Non-existent components: Menu option SAPLCOCU+COI", try to check the sap note 626530
    Max

  • Regarding the print screen

    Hi,
    i want to add a print button to the toolbar and when i click on that i want my content(entries in the tablecontrol) to be printed.
    how can i do this?
    is there ne way other than leave to list-processing?
    thanks,
    vijaya.

    Hi Vijaya,
    If you have screen created for this purpose,
    AT USER-COMMAND set the PF status(sy-Ucomm) for the buttons created so based upon the PF status fill the data in the output screen and fill the table control with the required data.
    AT USER-COMMAND
    case sy-ucomm
    when 'Button1'
    ..... fill the data / display the data to table control
    when 'button2'
    endcase
    Regards
    Shiva

  • I have read the posts regarding the split screen prooblem which I have. I have read the posts and I do not have fox splitter add-on. Is there another way I can eliminate split screen?

    I have firefox installed on two computers. The desktop does not show the split screen, but the laptop does. I have checked the posts and I do not have fox splitter add-on but still get the split screen when I click on a second site.

    Right-click that bookmark and select '''Properties''', then un-check the preference for '''Load this bookmark in the sidebar''', and then click Save.
    Using JavaScript buttons on web pages for "Bookmark this Page" causes that preference to be selected when saving the bookmark in that manner. So, don't use those buttons, use the "Bookmark this Page" feature that is built into Firefox instead.

  • Issue regarding the customer specific price

    Hi Guru:
    Please see my case as below:
    1 I created the table condition 805 (sold to specific price) and 806 (ship to specific) and had assigned these two table conditions to the access sequence ca01,and I created the condition type ca01,I assigned the access sequence ca01 and price procedure caa001 in it,and finally I maintained them in ovkk with the specific sales organization/distribution/division channel.
    2 Then I maintained the price condition type via vk11 as below,please note that sold to 1 linked with ship to 16,
    sold to 1 ,material 64,50 eur/kg
    ship to 16,material 64,55 eur/kg
    3 And I went to the transaction va01 and was going to place the sales order for them to have a test,it looks good for picking 1 as sold to as well as ship to,and the price of material 64 is 50 eur/kg
    But when I chose customer 1 as sold to whereas 16 as ship to,the price of the material 64 still be 50 eur/kg
    My question is that normally the price of ship to specific should override the one with sold to specific,so based on my example above,the price of material 64 should be 55 eur/kg
    So am I missing something in customization? Please help to fix!

    Hi,
    U have assigned Access Seq - tables in following sequence as per result u have written
    805  Exclusive Ticked
    806  Exclusive Ticked
    Now in both tables records maintained ...
    Now when u run order .. system goes to first table --- condition record found so it will never go to second table which is Ship to.
    Hence the way you have defined logic is wrong.
    Desired Logic - If u need that if Ship to Diferent frm sold to then pick price from ship to or if ship to and sold to are same pick price from sold to.
    If this is what u had desired. then u can maintain only one table with Ship-to and maintain prices for all ship to. so even the sold to in sap is ship to unless we specify seperately so if u maintain for all ship to the result will be as u desired like
    Condition record in Ship to table - (delete sold to table from access seq)
    1. Customer 1 - 50
    2. Customer 2 - 55
    Now if u run order and give sold to 1 then by default ship to = 1 so price 50 now if u chnage ship to in this order to 16 then price will be 55.
    Regards
    Krishna

  • Regarding the Customer and Vendor insurance

    Hi Gurus,
    My client is dealing with food materials,the requirement of the client is he will take an insurance policy say for 1cr and is valid accross India.The moment any sale or purchase takes place and which is transported in a truck,the invoiced amount should be automatically deducted from the policy and the system should warn them if the amount or validity date is near lapse so that they can renew the policy.
    If any customer is picking the goods then the amount should not be deducted from the policy.Can anyone please help me in this issue.
    Thanks in advance,
    Ramesh.
    Edited by: malladirb on Jul 28, 2011 7:18 AM
    Edited by: malladirb on Jul 29, 2011 11:37 AM

    Dear Sreenivas,
    My client deals with food materials.He buys the raw materials from farms and transports from different locations to the main plant where the material is processed.Similar is the scenario with the sales.The customers of the  Client r in different locations in the country.The requirement here is,if the client sells or procures any material which involves transportation by a truck (in case of any accident taking place) he can claim the insurance for the amount.
    What ever the amount which is invoiced in the above explained scenarios should be deducted from the insurance policy which is an Inland Transit Insurance policy and similar is the case with the expots also.
    I hope my explanation is clear to u.
    Thanks & Regards,
    Ramesh.

  • Regarding the LTO1 screen...

    Hi ABAP guru's,
    In this screen LT01 craetes a transfer order by the enduser,Few values are displaying by defaul loke whearhouse and the movememnt type. now the requirment is i need to duisplay material of the corresponding purchase order and the balance quantity of the materila i  need to dipslay  when user enter LT01 t-code.
    Please help me in this concern. I tried with the user exit available for the screen.when i set the break point for the exisiting user exit . it is not stopping there.Please help  me in this concen,
    Regards
    Sekhar

    I don't think it can be achived thru user exits. you can create own Z transaction & create new selection screen as they want. Then pass those values to LT01. If business don't want anyone to use std transaction they can remove authorization.

  • Regarding the selection screen..

    Hi all,
      i have a requirement that.i need to create two selection screens..i.e. in the first selection screen i need to enter some values after that if i execute then another selection screen need to come and make the user to enter the values.

    Hi,
    You can make this definitely through Dialog Programming.
    I am attaching the code for that.
    *& Module Pool       SAPMZDS_CRTSCREEN
    INCLUDE MZDS_SUBSCREENTOP.
    *INCLUDE MZDS_IOCHKRBTTOP.
    INCLUDE MZDS_SUBSCREENO01.
    *INCLUDE MZDS_IOCHKRBTO01.
    INCLUDE MZDS_SUBSCREENI01.
    *INCLUDE MZDS_IOCHKRBTI01.
    INCLUDE MZDS_SUBSCREENF01.
    *GUI Texts
    * TITLE --> MODULE POOL PROGRAM BY DS
    TOP INCLUDE
    *& Include MZDS_CRTSCREENTOP                                 Module Pool      SAPMZDS_CRTSCREEN
    PROGRAM  SAPMZDS_CRTSCREEN.
    TABLES: SPFLI,SBOOK.
    DATA: OK_CODE TYPE SYUCOMM.
    CONTROLS TAB1 TYPE TABSTRIP.
    DATA: BEGIN OF IT_SPFLI OCCURS 0,
          CITYFROM TYPE SPFLI-CITYFROM,
          AIRPFROM TYPE SPFLI-AIRPFROM,
          CITYTO TYPE SPFLI-CITYTO,
          AIRPTO TYPE SPFLI-AIRPTO,
      END OF IT_SPFLI.
    DATA: IT_SBOOK TYPE SBOOK.
    DATA: DYNNR TYPE SY-DYNNR.
    DATA: DEP_CITY(20) TYPE C,
          DEP_AIR(20) TYPE C,
          DES_CITY(20) TYPE C,
          DES_AIR(20) TYPE C.
    DATA: FLDATE(20) TYPE C,
          BOOKNO(20) TYPE C,
          CUSTNO(20) TYPE C.
    DATA:CITY_FROM(20) TYPE C,
         AIRP_FROM(20) TYPE C,
         CITY_TO(20) TYPE C,
         AIRP_TO(20) TYPE C.
    DATA: FL_DATE(20) TYPE C,
          BOOKID(20) TYPE C,
          CUSTOMID(20) TYPE C.
    DATA: BEGIN OF RBT,
          SPFLI VALUE 'X',
          SBOOK,
          END OF RBT.
    PBO
    *&  Include           MZDS_CRTSCREENO01
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'BASE'.
      SET TITLEBAR 'TITLE'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  CLEAR_OKCODE  OUTPUT
    *       text
    MODULE CLEAR_OKCODE OUTPUT.
    CLEAR OK_CODE.
    ENDMODULE.                 " CLEAR_OKCODE  OUTPUT
    MODULE DISPLAY_DATA OUTPUT.
    CASE 'X' .
       WHEN RBT-SPFLI.
        SELECT CITYFROM AIRPFROM CITYTO AIRPTO FROM SPFLI
        INTO CORRESPONDING FIELDS OF TABLE IT_SPFLI
        WHERE CARRID = SPFLI-CARRID
        AND CONNID = SPFLI-CONNID.
    FLDATE = ' '.
    BOOKNO = ' '.
    CUSTNO = ' '.
    LOOP AT IT_SPFLI.
       DEP_CITY = IT_SPFLI-CITYFROM.
       DEP_AIR = IT_SPFLI-AIRPFROM.
       DES_CITY = IT_SPFLI-CITYTO.
       DES_AIR = IT_SPFLI-AIRPTO.
    ENDLOOP.
      WHEN RBT-SBOOK.
        SELECT SINGLE FLDATE BOOKID CUSTOMID FROM SBOOK
        INTO CORRESPONDING FIELDS OF IT_SBOOK
        WHERE CARRID = SPFLI-CARRID
        AND CONNID = SPFLI-CONNID.
       FLDATE = IT_SBOOK-FLDATE.
       BOOKNO = IT_SBOOK-BOOKID.
       CUSTNO = IT_SBOOK-CUSTOMID.
    DEP_CITY = ' '.
    DEP_AIR = ' '.
    DES_CITY = ' '.
    DES_AIR = ' '.
    ENDCASE.
    ENDMODULE.
    *&      Module  CALL_DYNNR  OUTPUT
    *       text
    MODULE CALL_DYNNR OUTPUT.
    CASE TAB1-ACTIVETAB.
      WHEN 'SPFLI'.
        DYNNR = 102.
      WHEN 'SBOOK'.
        DYNNR = 103.
      WHEN OTHERS.
        TAB1-ACTIVETAB = 'SPFLI'.
        DYNNR = 102.
    ENDCASE.
    ENDMODULE.                 " CALL_DYNNR  OUTPUT
    *&      Module  DISPLAY_SFLIGHT  OUTPUT
    *       text
    MODULE DISPLAY_SFLIGHT OUTPUT.
    SELECT CITYFROM AIRPFROM CITYTO AIRPTO FROM SPFLI
        INTO CORRESPONDING FIELDS OF TABLE IT_SPFLI
        WHERE CARRID = SPFLI-CARRID
        AND CONNID = SPFLI-CONNID.
    CITY_FROM = IT_SPFLI-CITYFROM.
    AIRP_FROM = IT_SPFLI-AIRPFROM.
    CITY_TO = IT_SPFLI-CITYTO.
    AIRP_TO = IT_SPFLI-AIRPTO.
    ENDMODULE.                 " DISPLAY_SFLIGHT  OUTPUT
    *&      Module  DISPLAY_SBOOK  OUTPUT
    *       text
    MODULE DISPLAY_SBOOK OUTPUT.
    SELECT SINGLE FLDATE BOOKID CUSTOMID FROM SBOOK
        INTO CORRESPONDING FIELDS OF IT_SBOOK
        WHERE CARRID = SPFLI-CARRID
        AND CONNID = SPFLI-CONNID.
    FL_DATE = IT_SBOOK-FLDATE.
    BOOKID = IT_SBOOK-BOOKID.
    CUSTOMID = IT_SBOOK-CUSTOMID.
    ENDMODULE.                 " DISPLAY_SBOOK  OUTPUT
    PAI
    *&  Include           MZDS_CRTSCREENI01
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE USER_COMMAND_0100 INPUT.
    CASE OK_CODE.
      WHEN 'BACK'.
        LEAVE TO SCREEN 0.
      WHEN 'SPFLI' OR 'SBOOK'.
         TAB1-ACTIVETAB = OK_CODE.
      WHEN 'EXIT'.
        LEAVE PROGRAM.
      WHEN 'CANCEL'.
        LEAVE TO SCREEN 100.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    FORM Routine
    *&  Include           MZDS_SUBSCREENF01
    FORM DISPLAY_SPFLI_DATA.
    *SELECT CITYFROM AIRPFROM CITYTO AIRPTO FROM SPFLI
    *    INTO CORRESPONDING FIELDS OF TABLE IT_SPFLI
    *    WHERE CARRID = SPFLI-CARRID
    *    AND CONNID = SPFLI-CONNID.
    *CITY_FROM = IT_SPFLI-CITYFROM.
    *AIRP_FROM = IT_SPFLI-AIRPFROM.
    *CITY_TO = IT_SPFLI-CITYTO.
    *AIRP_TO = IT_SPFLI-AIRPTO.
    ENDFORM.
    FORM DISPLAY_SBOOK_DATA.
    *SELECT SINGLE FLDATE BOOKID CUSTOMID FROM SBOOK
    *    INTO CORRESPONDING FIELDS OF IT_SBOOK
    *    WHERE CARRID = SPFLI-CARRID
    *    AND CONNID = SPFLI-CONNID.
    ENDFORM.
    HTH
    Regards,
    Dhruv Shah

Maybe you are looking for

  • Problems setting up C8180 software Ps_A10_02_NET_FULL_WIN_WW_130_140uu (311.96mb) HELP!

    Problems setting up C8180 software Ps_A10_02_NET_FULL_WIN_WW_130_140uu (311.96mb) HELP!

  • Error in phase "main_shdrun/act_upg" upgrade sapnetweaver 7.0 to EHP1

    Hello expert, I get error when upgrade our sapnetweaver pi 7.0 SP09 to EHP1 in phase MAIN_SHDRUN/ACT_UPG. I've try many suggestion in sdn forums, but cannot resolve my troubles. This is the content of file ACTUPG.ELG in my EHPI\abap\log:   LIST OF ER

  • Intermittent GPIB error 6 (EABO)

    my system: Mac OS 8.6, Labview 5.1, NI-488.2 for Mac OS version 7.6.3, PCI-GPIB card, Keithley 2182 Nanovoltmeter and Keithley 24xx Sourcemeters. I have a Labview application (modeled on Keithley's application note "Automatic Resistance Measurements

  • Creating navigation through panels in lookout

    Hi, Im trying to create some navigation through different panels in lookout using Push buttons. They work fine on the server machine. But when i copy the client processes to another computer and try to navigate through the windows on the client they

  • My mac notebook won't open

    MY mac notebook won't open.  It was working fine but when I went to open it the next day it won't open.  When I turn it on the screen is silver and the little wheel symbol goes found and round and the closes down. THe is also a long thin box which ha