Function module for popup window  with list display.

Hi,
   I need simple program or function module name that accepts internal table as input and displays the content of the internal table as list in popup window.
Regards
Madhu.

Hii Madhu
check this fm
<b>REUSE_ALV_POPUP_TO_SELECT</b>
check this implementation..
*& Report  ZALV_SAMPLE                                                *
*& Program for displaying data using function modules :                *
*& REUSE_ALV_LIST_DISPLAY                                              *
*& REUSE_ALV_POPUP_TO_SELECT                                           *
*& REUSE_ALV_GRID_DISPLAY                                              *
REPORT  ZALV_SAMPLE                            .
TABLES VBAK.
DATA it_vbak LIKE VBAK OCCURS 0 WITH HEADER LINE.
SELECTION-SCREEN uline.
PARAMETERS: ALV1 RADIOBUTTON GROUP ALV,       "REUSE_ALV_LIST_DISPLAY
            ALV2 RADIOBUTTON GROUP ALV,       "REUSE_ALV_POPUP_TO_SELECT
            ALV3 RADIOBUTTON GROUP ALV,       "REUSE_ALV_GRID_DISPLAY
            ALV4 RADIOBUTTON GROUP ALV.       " NORMAL DISPLAY
SELECTION-SCREEN uline.
SELECT * FROM  VBAK
         INTO CORRESPONDING FIELDS OF TABLE it_vbak
         UP TO 10 ROWS.
IF ALV1 = 'X'.
   PERFORM ALV_FUNC1.
ELSEIF ALV2 = 'X'.
   PERFORM ALV_FUNC2.
ELSEIF ALV3 = 'X'.
  PERFORM ALV_FUNC3.
ELSEIF ALV4 = 'X'.
  PERFORM NORM.
ENDIF.
*&      Form  ALV_FUNC1
*       text
*  -->  p1        text
*  <--  p2        text
FORM ALV_FUNC1 .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
    I_STRUCTURE_NAME               = 'VBAK'
  TABLES
    T_OUTTAB                       = it_vbak
   EXCEPTIONS
     PROGRAM_ERROR                  = 1
     OTHERS                         = 2
IF SY-SUBRC <> 0.
   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.                    " ALV_FUNC1
*&      Form  ALV_FUNC2
*       text
*  -->  p1        text
*  <--  p2        text
FORM ALV_FUNC2 .
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
  EXPORTING
    I_TITLE                       = 'SALES ORDER INFO'
    I_ZEBRA                       = 'X'
    I_TABNAME                     = 1
    I_STRUCTURE_NAME              = 'vbak'
  TABLES
    T_OUTTAB                      = it_vbak
   EXCEPTIONS
     PROGRAM_ERROR                 = 1
     OTHERS                        = 2
IF SY-SUBRC <> 0.
   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.                    " ALV_FUNC2
*&      Form  ALV_FUNC3
*       text
*  -->  p1        text
*  <--  p2        text
FORM ALV_FUNC3 .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    I_STRUCTURE_NAME                  = 'vbak'
    I_GRID_TITLE                      = 'SALES ORDER INFO'
  TABLES
    T_OUTTAB                          = it_vbak
   EXCEPTIONS
     PROGRAM_ERROR                     = 1
     OTHERS                            = 2
IF SY-SUBRC <> 0.
   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.                    " ALV_FUNC3
*&      Form  NORM
*       text
*  -->  p1        text
*  <--  p2        text
FORM NORM .
format intensified.
skip 1.
WRITE: /'SALES DOC.',
        '    Created on ',
        '    Time',
        '      Created by',
        '       Valid from ',
        '     Sold-to party'.
format intensified off.
skip 2.
LOOP AT it_vbak.
write: / it_vbak-vbeln,'   ',
         it_vbak-erdat,'   ',
         it_vbak-erzet,'   ',
         it_vbak-ERNAM,'   ',
         it_vbak-ANGDT,'       ',
         it_vbak-KUNNR.
endloop.
ENDFORM.                    " NORM
Reward points if helpful
Revert back for more help
REGARDS
Naresh

Similar Messages

  • Inbound Idoc function module  for Cycle count with msg type WVINVE

    Can any one tell me which is the standard function Module which processes Cycle count for message type WVINVE.
    My requirement is to setup Inbound Idoc for cycle processing with message type WVINVE.

    Hi Mukesh,
             Inbound FM is IDOC_INPUT_STORE_INVENTORY , and Process code is WVIN.
             Yoou can check this in Tcode WE42 for process code WVIN.
    Regards
    Srikanth M

  • Function module for error message with language param

    any Function Module that has language param in it?
    thanks,

    Dear Rayann,
    Use FM FORMAT_MESSAGE.
    Thanks & Regards,
    Nagaraj Kalbavi

  • Custom pushbutton in ME21N should display a popup window with item details

    Hello,,
    The requirement is to
    1. Add a custom pushbutton in ME21N screen at header level.
    2. The user will select some PO line items and will click on this push button.
        This inturn should trigger a popup window with item details only for those selected PO line items along with schedule line qty.
    I have created the custom push button in a custom tab using the BADI ME_GUI_PO_CUST.
    Now I am not able to retrieve item details and schedule line details inside the PAI of the custom tab..
    i.e., when i click on the custom push button, I am not able to retrive the item data and schedule line data.
    Please help me to retrive PO line item data and schedule line data.
    Regards,
    Sharah

    JSF is not so relevant in this question. It's all about how the generated client side code look like. Which is usually a bunch of HTML/CSS/JS (open page in browser, rightclick and view source). If you know HTML, you should know that using target="_blank" in a <form> or <a> element would open a new window. If you know JS, you should know that using window.open() would open a new window.
    Apply this so in the JSF source code so that the generated HTML/JS output is exactly what you want.

  • I upgraded to Mountain Lion (MacbookPro). Now when I open ical I get a popup window with a list I had added to Reminders app with the message 'Your calendar couldn't be refreshed' it won't go away-'delete' is greyed out-can't access calendar! Help!

    I upgraded to Mountain Lion (MacbookPro). Now when I open ical I get a popup window with a list I had added to Reminders app with the message 'Your calendar couldn't be refreshed' i--t won't go away-'delete' is greyed out--can't access calendar! Help!

    I upgraded to Mountain Lion (MacbookPro). Now when I open ical I get a popup window with a list I had added to Reminders app with the message 'Your calendar couldn't be refreshed' i--t won't go away-'delete' is greyed out--can't access calendar! Help!

  • Is there any function module for getting distribution list name

    Hi all,
    Is there any function module for getting distribution list name when there is same description for two distribution list name.
    or
    help me how to fetch the correct distribution name when there is same description.
    In order to send mails.
    Tell me ASAP.
    thanks
    sagar.

    http://www.sapbrainsonline.com/REFERENCES/FunctionModules/SAP_function_modules_list.html
    list of Fms

  • Problem with Time stamp function module for converting US to Japan

    Hi All,
    I need standard function module for converting US Timestamp to Japan, Can any one let me know is there any standard function modules.
    thanks in advance!
    Regards,
    Kalidas.T
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:29 PM
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PM
    Edited by: Kalidas Thirumoorthy on May 5, 2009 5:30 PM

    Try this way:
    CONVERT TIME STAMP <tst> TIME ZONE <tz> INTO DATE <d> TIME <t>.
    CONVERT DATE <d> TIME <t> INTO TIME STAMP <tst> TIME ZONE <tz>.
    <tst> is of type P(8) or P(11) with 7 decimal places
    <tz> of type C(6)
    Refer to help.sap.com for more details.

  • Function module for displaying the location

    Hi,
          Could anyone tell  the Function module for displaying the location in our system  without a  file name while downloading, when the user press f4.
    thanks

    * read the default pathname on application server
      call function 'FILE_GET_NAME'
           exporting
    *           CLIENT                  = SY-MANDT
                logical_filename        = lc_logical_filename_ftappl
                operating_system        = sy-opsys
    *           parameter_1             = ' '
    *           PARAMETER_2             = ' '
    *           USE_PRESENTATION_SERVER = ' '
    *           WITH_FILE_EXTENSION     = ' '
    *           USE_BUFFER              = ' '
           importing
                emergency_flag          = l_emergency_flag
                file_format             = l_file_format
                file_name               = l_file_name_ftappl
           exceptions
                file_not_found          = 1
                others                  = 2.

  • Function module for creation of Installed base along with product

    Hi,
            Function module for creation of installed based with product for the business partner.

    Try
    BAPI_IBASE_CREATE
    IB_IBASE_CREATE
    IB_IBASE_CREATE_INITIAL
    CRM_IBASE_COMP_CREATE
    CRM_IBASE_CREATE
    IB_COM2_CREATE_IBASE
    IB_COM_CREATE_IBASE_INITIAL
    Regards,
    Kaushal

  • Any BAPI/Function Module for adding new record with dates in PA0027

    Hi all,
    I am tryig to find is there any BAPI/Function module for updating new record with Start Date and End date for specified Personal Number in PA0027 Table.
    In PA0027 table i will be passing start date and end date for selected personal number, it needs to add new record with this details in the table checking the condition that this start date and end dates should not be between any of of start date and end dates for the specified personal number.
    thanks for ur time.
    Murali

    Hi Raj/Suresh thanks for ur answers.
    but i am having a problem,i gave this values.
    INFTY               -
                0027
    NUMBER              -
                00000010
    SUBTYPE             -
                010
    OBJECTID
    LOCKINDICATOR
    VALIDITYEND         -
                03/12/2006
    VALIDITYBEGIN       -
                03/01/2006
    RECORDNUMBER        -
                000
    RECORD              -
                P0027
    OPERATION           -
                CHK
    TCLAS               -
                A
    DIALOG_MODE         -
                0
    NOCOMMIT            -
                Y
    VIEW_IDENTIFIER
    SECONDARY_RECORD
    i am getting short dump saying that
    The source field is too short.
    The current program, "SAPLHRMM", tried to assign a field to a field symbo
    However, the field is shorter than the type of the field symbol, which
    is not allowed.
    The statement in question is in the form ASSIGN f TO <fs> CASTING or
    ASSIGN f TO <fs> with a field symbol that was created using the
    STRUCTURE addition.
    I tried  operation - Chage,Create (same thing for all inputs)
    is this correct funtion moduel for my requirment?
    what ever i am passing the start and end dates this should check in the table records with this personal number and if this start date and end dates are not between of any start and end dates then it should add new record with this dates.
    Thanks for ur time.
    Murali.

  • Function module to find the attachment list for an accounting document?

    Is there a function module to find the attachment list for an accounting document? Or which table stores such references?
    I know I can find this info from the transaction FB03, but is there a function module to find the attachments for an accounting document? So far I only found the attachments are stored in the table SOOD, and archived documents in table TOA03, but I can't find the table that stores the links between the accounting document and its attachments?
    <b><REMOVED BY MODERATOR></b>
    Thanks,
    Ning
    Message was edited by:
            Alvaro Tejada Galindo

    Hi,
      i_object1-typeid = 'YARSATTA'.  "<<< Give your Object id name
      i_object1-catid  = 'BO'.
      i_object1-instid = i_yarsitem-docno.    "<<<< Document Number
      call method cl_gos_attachment_query=>count_for_object
        exporting
         is_object = i_object1
         ip_arl    = space
        receiving
         rt_stat   = i_stat1.
      read table i_stat1 into wa_stat1 index 1.
      if sy-subrc eq c_0.
         move wa_stat1-counter to v_attno1.
      endif.
    For link you need to check for table SRGBTBREL
    and also please check class CL_GOS*

  • User command is not getting triggered in interactive ALV with LIST display

    Hi experts,
    I have developed an interactive ALV report with LIST display. Here, the issue is, when i double click a record in the primary ALV list, the control must go to the USER COMMAND event which i have written in my report. But the user command event is not getting triggered at all when i double click any record.
    It gives the following information instead.
    "Choose a valid function".
    (My user command name and its respective form name are same.)
    Here is my code..
    START-OF-SELECTION.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_structure_name         = p_table
          i_callback_user_command  = 'TST1'
          i_callback_pf_status_set = 'SET_PF_STATUS'
        TABLES
          t_outtab                 = <dyn_table>
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
      ENDIF.
    FORM tst1 USING r_ucomm LIKE sy-ucomm
                    rs_selfield TYPE slis_selfield.
    * Local data declaration
      DATA: li_tab TYPE REF TO data,
            l_line TYPE REF TO data.
    * Local field-symbols
      FIELD-SYMBOLS:<l_tab> TYPE table,
                    <l_wa>  TYPE ANY.
    * Create table
      CREATE DATA li_tab TYPE STANDARD TABLE OF (p_table).
      ASSIGN li_tab->* TO <l_tab>.
    * Create workarea
      CREATE DATA l_line LIKE LINE OF <l_tab>.
      ASSIGN l_line->* TO <l_wa>.  CASE r_ucomm.
    *   When a record is selected
        WHEN '&IC1'.
    *     Read the selected record
          READ TABLE <dyn_table> ASSIGNING <dyn_wa> INDEX
          rs_selfield-tabindex.      IF sy-subrc = 0.
    *       Store the record in an internal table
            APPEND <dyn_wa> TO <l_tab>.
    *       Fetch the field catalog info
            CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
              EXPORTING
                i_program_name         = 'Z_DEMO_PDF_JG'
                i_structure_name       = p_table
              CHANGING
                ct_fieldcat            = i_fieldcat
              EXCEPTIONS
                inconsistent_interface = 1
                program_error          = 2
                OTHERS                 = 3.
    Please advice what is the msitake i have done here..

    Read the following code:
    pass the  i_callback_user_command = g_user_command to the ALV function module and write the FORM user_command USING ucomm    LIKE sy-ucomm
                            selfield TYPE slis_selfield.
    as shown below.
    thanx
    Data for ALV display
    DATA  : gt_fieldcat TYPE slis_t_fieldcat_alv,
            gt_events           TYPE slis_t_event,
            g_variant LIKE disvariant,
            g_user_command      TYPE slis_formname VALUE 'USER_COMMAND',
            g_status            TYPE slis_formname VALUE 'SET_PF_STATUS',
            gt_list_top_of_page TYPE slis_t_listheader,
            g_repid LIKE sy-repid,
            gf_pos TYPE i
    Data for ALV display
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
               EXPORTING
              i_callback_program      = g_repid
                 i_callback_program      = sy-repid
                 it_fieldcat             = gt_fieldcat[]
           it_events               = gt_events[]
              i_callback_user_command = g_user_command
                 i_save                  = 'A'
                 is_variant              = g_variant
               TABLES
                 t_outtab                = it_print.
    FORM user_command USING ucomm    LIKE sy-ucomm
                            selfield TYPE slis_selfield.
      CASE ucomm.
        WHEN '&IC1'.
          CASE selfield-sel_tab_field.
            WHEN '1-KUNNR'.
              READ TABLE it_print INTO wa_print INDEX selfield-tabindex.
              IF sy-subrc = 0.
                SET PARAMETER ID 'BPA' FIELD wa_print-kunnr.
                CALL TRANSACTION 'BP'.
              ENDIF.
            WHEN '1-MATNR'.
              READ TABLE it_print INTO wa_print INDEX selfield-tabindex.
              IF sy-subrc = 0.
                SET PARAMETER ID 'JP_ISS' FIELD wa_print-matnr.
                CALL TRANSACTION 'JP29' AND SKIP FIRST SCREEN..
               GET PARAMETER ID 'WRK' FIELD wa_zprint-werks.
               SET PARAMETER ID 'VKO' FIELD wa_zprint-vkorg.
               SET PARAMETER ID 'VTW' FIELD wa_zprint-vtweg.
               CALL TRANSACTION 'JP29' AND SKIP FIRST SCREEN.
              ENDIF.
    Endcase.
    Endform.

  • Function Module for search help Exit

    How to create a function Module for search help exits?
    please explain in details with step by step process.

    Hi,
    How to create a function Module for search help exits?
    function module for search help F4IF_SHLP_EXIT_EXAMPLE
    dynamic search help use 'F4IF_INT_TABLE_VALUE_REQUEST'
    please check out the link below it will help you
    A repository object maintained in the ABAP Dictionary. It supplies input fields on Dynpros with single- or multi-column input helps. Search helps can be linked in the Dictionary with components from structures, data elements, and check tables. A search help enables you to search for entry values with assigned data, without you having to know the exact spelling of the value.
    http://help.sap.com/saphelp_46c/helpdata/EN/cf/21ee52446011d189700000e8322d00/content.htm
    please explain in details with step by step process.
    create a search help exit:
    1. create an fm with this interface:
    *" TABLES
    *" SHLP_TAB TYPE SHLP_DESCR_TAB_T
    *" RECORD_TAB STRUCTURE SEAHLPRES
    *" CHANGING
    *" VALUE(SHLP) TYPE SHLP_DESCR_T
    *" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
    put this logic in it:
    Delete duplicate filter logic.
    This logic only needs to apply at the 'DISP' event - which is just
    before the hit list is displayed
    if callcontrol-step = 'DISP'.
    delete adjacent duplicates from record_tab.
    endif.
    2. edit your search help in se11 and enter the name of the above search help exit fm
    check this sample code..for dynamic search help
    REPORT  ZTEST_F4HELP                              .
    *---Report with selection screen and to display the list of
    possible entries for field 'B' as per the value in field 'A'.
    parameters: p_vbeln type vbak-vbeln,
                p_posnr type vbap-posnr.
    at selection-screen on value-request for p_posnr.
      data: begin of help_item occurs 0,
              posnr type vbap-posnr,
              matnr type vbap-matnr,
              arktx type vbap-arktx,
            end of help_item.
      data: dynfields type table of dynpread with header line.
      dynfields-fieldname = 'P_VBELN'.
      append dynfields.
      call function 'DYNP_VALUES_READ'
           exporting
                dyname               = sy-cprog
                dynumb               = sy-dynnr
                translate_to_upper   = 'X'
           tables
                dynpfields           = dynfields
           exceptions
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                invalid_parameter    = 7
                undefind_error       = 8
                double_conversion    = 9
                stepl_not_found      = 10
                others               = 11.
      read table dynfields with key fieldname = 'P_VBELN'.
      p_vbeln = dynfields-fieldvalue.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = p_vbeln
           importing
                output = p_vbeln.
      select posnr matnr arktx into table help_item
                     from vbap
                          where vbeln = p_vbeln.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'POSNR'
                dynprofield = 'P_POSNR'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = help_item.
    also check this link it will help you
    /message/3854825#3854825 [original link is broken]
    *********please reward points if the information is helpful to you*************

  • Function Modules for Order Settlement

    Hi,
    I need simulate the transaction KO88 for Order Settlement with a function module but without batch input. Please, somebody can tell me which function module I can use and give me a example?
    Also, I need another function module for order release...
    Thanks in advance,
    Regards,
    Irina

    Here`s the way to find out how its using ...
    GO to TR.SE93-> give "KO88" 0>  click display
    Double click program name and find "call fucntion" when list come up "serach "Settlement" . You`ll get idea.
    Hope this’ll give you idea!!
    <b>Pl... award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • Function Module for open Purchase Order & Sales Order?

    Hi, commonly I read the data from tables and calculate the open quantity for sales order and purchase order, but I want to know, are there any standard function modules for getting the list of open "purchase order" and "sales order" respectively?
    Thanks and Regards.

    hi Ren,
    u can check all these bapi's related to salesorder
    BAPI_SALESORDER_CHANGE Sales order: Change Sales Order
    BAPI_SALESORDER_CONFIRMDELVRY Sales Order: Confirmation of Delivery; Document Flow Update
    BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
    BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance
    BAPI_SALESORDER_GETLIST Sales order: List of all Orders for Customer
    BAPI_SALESORDER_GETSTATUS Sales Order: Display Status
    BAPI_SALESORDER_SIMULATE Sales Order: Simulate Sales Order
    May be this FM can help you
    MB_ADD_PURCHASE_ORDER_QUANTITY (Reading and adding open purchase order quantities)
    Regards,
    Naveen

Maybe you are looking for

  • LSMW error in material consumption value upload

    Hi Guys, I am using standard program RMDATIND for creating LSMW to upload consumption value for materials , i am getting error consumption period can not be determined, can anybody tell me what period format should be used? Thanks and regards Thamizh

  • Implementation of SEM 6.0 as comapred to SEM 4.0

    Hi, I've worked on R/3 4.7 + SEM BCS 4.0. I've fair idea about how the data flows from R/3 to BW and then BW to SEM. 1. Could you advise in case of ECC6.0+ SEM BCS 6.0 how is this set up different? My question is more like what is different in the da

  • Frequent DSL Dropouts at Night-West​wood, Los Angeles

    Hi, I'm hoping someone here can advise me.  I've had 7Mbt DSL in tthis apartment for several months now,  but for the last month and a half or so I've been getting booted off of the internet multiple times every night.  Sometimes it can happen every

  • POC on JDBC adapter capabilities

    We have a customer requesting us to accomplish a Proof of Concept work with PI 7.1 SP08. The customer came up with a predefined scenario, more like a flowchart, and asked if PI is capable of doing the scenario according to steps just like documented

  • What's the best Telephoto Zoom lens for canon rebel T3??

    Hi, i have a canon rebel t3 and i want a telephoto lens , but i don't know which lens to take between Canon EF 75-300mm f/4-5.6 III USM and Canon EF-S IS 55-250mm f/4-5.6 IS II, I generally like to shoot street, abstract and nature photos and I'm not