Function Module with Popup having F4 help field

hi,
I am looking for a Function module which would give a popup. The popup must prompt the user to enter a value. For this value he must have F4 help available.
If you know any FM that does this, please let me know...
regards,
Balaji

Hi
try this
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_auart-high.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'AUART'
dynpprog = w_repid
dynpnr = w_dynnr
dynprofield = 'S_AUART-HIGH'
value_org = 'S'
TABLES
value_tab = i_tvakt.
IF sy-subrc 0.
ENDIF.
Pls Reward if Helpful,
Gaurav J.

Similar Messages

  • Log on into the function module with different user name.

    hi,
            i log on into the system with my user id suppose 'mukka' and i have to check the authorization of another user say 'you' using the function module "authority_check_tcode". but here i am getting the problem that when i assigned sy-uname to 'you' and execute the function module it is entering into the function module with 'mukka' user name only.
    sample code:-
                                sy-uname  = p_uname.
        CALL FUNCTION 'AUTHORITY_CHECK_TCODE'  "#EC"
          EXPORTING
            tcode  = v_tcode
          EXCEPTIONS
            ok     = 1
            not_ok = 2.
    when i am changing the sy-uname with p_uname the sy-uname is changed but when i entered into the function module authority_check_tcode in the debugging mode at the below the sy-uname variable is showing  as 'mukka' only. but i need to check the authorizations of user 'you' pls give me solution to my problem.

    Hi,
    Why would you want to check the authorisation of another user and not the one currently logged in?  The idea of authorisations is to check the current user is able to perform a certain activity.  The majority of fields on SYST are constantly updated to have the correct values (partly so you can't fiddel authorisation checks like this
    Maybe if you explain to us what you are trying to do we can offer some other help.
    Gareth.

  • How to create a custom function module with the records in SAP R/3?

    Hi All,
    How to create a custom function module with the records in SAP R/3? Using RFC Adapter I have to fetch the custom function module records.
    Regards
    Sara

    Hi
    goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
    Look at the below SAP HELP links, These links will show you the way to create a Function Module
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm

  • RFC Function module-With Only Request message

    Hi
    i need a RFC with only Request message and Response message is not required.
    please help me, how to create a RFC function module with out Response message, and it should contain only Request message.
    i have created RFC in this way:
    RFC doesn't contain neither import nor export parameters. and i have defined one table in TABLE tab which refers to a ztable created already.
    when i imported RFC into XI i came to know that RFC has both Request and Response messages, but i don't need Response message.
    Thanks in advance..help would be appreciated
    Regards,
    Rajesh

    Thankx Michal,
    I have written ZRFC this way:
    insert ZMM_AUTO_GR from INPUT_TABLE .
      if sy-subrc = 0.
        commit work.
      else.
       rollback work.
    im not using neither import nor export parameters..but using only tables parameters. but when imported in XI im getting same table  structure in both request an response.
    please suggest what changes required in above code to invoke my ZRFC in async way.
    you will not get any response in XI- what chages required in my code to dnt get .reponse in XI.
    appreciate your help.
    Regards,
    Rajesh.

  • How to assign function module with process code in IDOC ?

    how to assign function module with process code in IDOC ? and what code i have to write in that function module for custom IDOC ?
    helpful answer will be rewarded?

    Hi,
    First goto transaction we42 -->editing mode --> new entries -->give name of your process code and description --> processing with alv service and function module -->then press enter -->after that enter the name of the function module you want to associate from the drop down and save it.
    Thats the way to assign function module with process code.
    In that process code we will have the Function modules and Bapi's which will take the data which we are sending through IDOC and then process it.
    for example: i am triggering the IDOC for every purchase order created then this process code in the receiver system will take the data which i have enetered in the sender system to create the purchase order and process it and creates the same purchase order in the receiver's system.
    Reward if helpful.
    with regards,
    Syed

  • How to check for a function module with its description and functionality

    Hi all,
    How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .

    Hi,
    You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
    Say for example you need to search something regarding converstion.
    Search for * CONVERT * and press F4.
    If there is something specfic like converting date to something you can give
    DATE * CONVERT *
    OR
    CONVERT * DATE *  and press F4.
    Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
    Regards,
    Pramod

  • Creating function modules with step by step

    Hi,
       plz provide me the material for creating function modules with step by step.

    Hi Nagaraju,
    Step 1.
    GO to transaction SE80.In the drop box list select function group enter your Z Function group name.Press enter it will ask for creating the function group.Create your function group.
    OR
    In SE37 transaction,in the menu bar Goto - > Function Group - > Create Group.Your Function Group will be created.
    Step 2.
    Go to transaction SE37.Enter your Z Function module name,your recently created function group name and the description.Press Enter.Now your FM is created.
    Step 3.
    Enter Export,Import parameters.In the source code tab write the code what you want to write.If any exception write in the exception tab.
    Method 2)
    First u have to create Function Group.
    1.se37->Goto->Function Group--->Create.
    2.Create FM.
    3.maintain import /export parameters and tables , exceptions.
    4.based on the ur requirement u have to bulid ur logic in Source Code by using there Import parameters and u can pass the results by using Export or table.
    5.u can raise error by using exception.
    Reward if useful.
    Thanks
    Aneesh.

  • Generic Extractor using Function module with Complex Interface

    Hi,
    Has anyone created Generic extractor using Function module with Complex Interface?
    What is the difference between Complex and Simple interface in Function module?
    Pls explain.
    Thanks,
    Gopal

    Hi,
    Go through this link.....
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    GTR

  • 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

  • Generic delta   using function module with two fields  AEDAT AND ERDAT

    Hi,
        i have scenario that i have to create a generic data source  having delta using funcation module and the delta speci fields are AEDAT AND ERDAT . Is there possibility with out using these two fields ( i mean AEDAT AND ERDAT)  in the extract structure can i create the data source . and provide sample code for me . it is very urgent.
    waiting for the reply,
    sri.c

    Hi Sri,
    here some coding, I hope this helps!
    first, get the delta-field
          LOOP AT s_s_if-t_select INTO l_s_select.
            CASE l_s_select-fieldnm.
              WHEN 'ZDATE'.
                MOVE-CORRESPONDING l_s_select TO r_date.
                IF r_date-high IS INITIAL OR r_date-high = space.
                  r_date-high = '9991231'.
                ENDIF.
                APPEND r_date.
            ENDCASE.
          ENDLOOP.
    Cursor öffnen
          OPEN CURSOR WITH HOLD s_cursor FOR
          SELECT * FROM
          WHERE  ....
          AND    erdat in r_date
          AND    aedat IN r_date.
          FETCH NEXT CURSOR s_cursor INTO CORRESPONDING FIELDS OF table e_t_data package size s_s_if-maxsize.
    regards
    Siggi
    PS: Note that this coding only works for a very straight forward extraction.
    Message was edited by: Siegfried Szameitat

  • Generic Extraction By Using function Module with Three Table fields?

    Hi,
    I need to bring the data from three tables by using function module.
    Tables: VBAK, VBAP, VBUK.
    Fields are: VBELN, ERDAT, NETWR, WEARK, POSNR, MATNR, FKART, FKTYP.
    i referred some of the documents in SDN, it explained by using two table fields.
    Please help me.

    hi, the below pseudo code should help you on creating the logic. It's based on the how to paper. So i just used the parts of intrest. You need to copy the rest form the document. Please notice that this is pseudo code. if you just copy/paste, it will not work.
    IF s_counter_datapakid = 0.
    OPEN CURSOR WITH HOLD s_cursor FOR
           SELECT fields       FROM table1         WHERE condition
          ENDIF.                             "First data package ?
    * Fetch records into interface table.
    *   named E_T_'Name of extract structure'.
          FETCH NEXT CURSOR s_cursor
                    INTO  TABLE e_t_data
                    PACKAGE SIZE s_s_if-maxsize.
         IF sy-subrc EQ 0.
           SELECT fields      FROM table2      WHERE condition into itab2 for all entries in e_t_data
           SELECT fields      FROM table3       WHERE condition into itab3 for all entries in e_t_data    
         loop at e_t_data
              read itab2. move corresponding fields to e_t_data
              read itab3. move corresponding fields to e_t_data
              collect e_t_data.
         endif.
    IF sy-subrc <> 0.
           CLOSE CURSOR s_cursor.
           RAISE no_more_data.
         ENDIF.
         s_counter_datapakid = s_counter_datapakid + 1.
       ENDIF.              "Initialization mode or data extraction ?

  • Replace REUSE_ALV function module with use of OO ALV(obect oriented)

    HI,
    I m using function module 'REUSE_ALV_GRID_DISPLAY' to disply the report but now client want to use object oriented ALV instead of REUSE_ALV function
    pls help me.its very urgent
    thanks!
    Vipin
    pls find the code below.
    FORM f0001_get-select_data .
      SELECT a~pernr
             a~endda
             a~begda
             a~bukrs
             a~werks
             a~persg
             a~persk
             a~btrtl
             a~abkrs
             a~kostl
             a~orgeh
             a~plans
             b~nachn
             b~vorna
             b~midnm
             INTO CORRESPONDING FIELDS OF TABLE i_pa0001_pa0002
             FROM pa0001 AS a INNER JOIN pa0002 AS b
             ON apernr = bpernr
             WHERE a~pernr IN s_pernr
             AND   a~werks IN s_werks
             AND   a~orgeh IN s_orgeh
             AND   a~plans IN s_plans.
      SORT i_pa0001_pa0002 BY pernr .
      IF NOT i_pa0001_pa0002[] IS INITIAL .
      CLEAR: w_i_lines.
      DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
        IF w_i_lines GT 0.
        SELECT pernr
               kostl
               lstar
               werks
               lifnr
               ebeln
               ebelp
               lstnr
               FROM pa0315
               INTO CORRESPONDING FIELDS OF TABLE i_pa0315
               FOR ALL ENTRIES IN i_pa0001_pa0002
               WHERE pernr = i_pa0001_pa0002-pernr
               AND   kostl = i_pa0001_pa0002-kostl
               AND   ebeln IN s_ebeln.
         SORT i_pa0315 BY pernr kostl.
         ENDIF.
    CLEAR: w_i_lines.
    DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
        IF w_i_lines GT 0.
        SELECT pernr
               endda
               begda
               schkz
               FROM pa0007
               INTO CORRESPONDING FIELDS OF TABLE i_pa0007
               FOR ALL ENTRIES IN i_pa0001_pa0002
               WHERE pernr = i_pa0001_pa0002-pernr
               AND   endda = i_pa0001_pa0002-endda
               AND   begda = i_pa0001_pa0002-begda.
         SORT i_pa0007 BY pernr.
    ENDIF.
    CLEAR: w_i_lines.
    DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
        IF w_i_lines GT 0.
        SELECT orgeh
               orgtx
               FROM t527x
               INTO CORRESPONDING FIELDS OF TABLE i_t527x
               FOR ALL ENTRIES IN i_pa0001_pa0002
               WHERE orgeh = i_pa0001_pa0002-orgeh.
       SORT i_t527x BY orgeh.
    ENDIF.
    CLEAR: w_i_lines.
    DESCRIBE TABLE i_pa0001_pa0002 LINES w_i_lines.
        IF w_i_lines GT 0.
        SELECT plans
               plstx
               FROM t528t
               INTO CORRESPONDING FIELDS OF TABLE i_t528t
               FOR ALL ENTRIES IN i_pa0001_pa0002
               WHERE plans = i_pa0001_pa0002-plans.
          SORT i_t528t BY plans.
       ENDIF.
      ENDIF.
    Merging data of i_pa0001_pa0002,i_pa0315 & i_pa0007 into i_outtab.
      LOOP AT i_pa0001_pa0002 INTO w_pa0001_pa0002 .
        MOVE-CORRESPONDING w_pa0001_pa0002 TO w_final.
        READ TABLE i_pa0315 INTO w_pa0315 WITH KEY  pernr =
       w_pa0001_pa0002-pernr
       kostl = w_pa0001_pa0002-kostl BINARY SEARCH.
        IF sy-subrc = 0.
          w_final-kostl   = w_pa0315-kostl.
          w_final-lstar   = w_pa0315-lstar.
          w_final-werks_p = w_pa0315-werks.
          w_final-lifnr   = w_pa0315-lifnr.
          w_final-ebeln   = w_pa0315-ebeln.
          w_final-ebelp   = w_pa0315-ebelp.
          w_final-lstnr   = w_pa0315-lstnr.
        ENDIF.
        READ TABLE i_pa0007 INTO w_pa0007 WITH KEY pernr =
       w_pa0001_pa0002-pernr BINARY SEARCH.
        IF sy-subrc = 0.
          w_final-schkz = w_pa0007-schkz.
        ENDIF.
        READ TABLE i_t527x INTO w_t527x WITH KEY orgeh = w_pa0001_pa0002-orgeh
        BINARY SEARCH.
        IF sy-subrc = 0.
          w_final-orgtx = w_t527x-orgtx.
        ENDIF.
        READ TABLE i_t528t INTO w_t528t WITH KEY plans =
    w_pa0001_pa0002-plans BINARY SEARCH.
        IF sy-subrc = 0.
          w_final-plstx = w_t528t-plstx.
        ENDIF.
        APPEND w_final to i_outtab.
      ENDLOOP.
    ENDFORM.                    "f001_get-select_data
    *&      Form  f002_display_data
          text
    FORM f0002_display_data.
    Build the field catalog
    ls_fieldcat-col_pos = '1'.
    ls_fieldcat-fieldname = 'PERNR'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname  = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '2'.
    ls_fieldcat-fieldname = 'NACHN'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0002'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '3'.
    ls_fieldcat-fieldname = 'VORNA'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0002'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '4'.
    ls_fieldcat-fieldname = 'MIDNM'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0002'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '5'.
    ls_fieldcat-fieldname = 'BUKRS'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '6'.
    ls_fieldcat-fieldname = 'WERKS'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '7'.
    ls_fieldcat-fieldname = 'PERSG'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '8'.
    ls_fieldcat-fieldname = 'PERSK'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '9'.
    ls_fieldcat-fieldname = 'BTRTL'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '10'.
    ls_fieldcat-fieldname = 'ABKRS'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '11'.
    ls_fieldcat-fieldname = 'ORGEH'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '12'.
    ls_fieldcat-fieldname = 'ORGTX'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'T527X'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '13'.
    ls_fieldcat-fieldname = 'PLANS'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '14'.
    ls_fieldcat-fieldname = 'PLSTX'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'T528T'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '15'.
    ls_fieldcat-fieldname = 'SCHKZ'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0007'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '16'.
    ls_fieldcat-fieldname = 'KOSTL'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '17'.
    ls_fieldcat-fieldname = 'LSTAR'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '18'.
    ls_fieldcat-fieldname = 'WERKS'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '19'.
    ls_fieldcat-fieldname = 'LIFNR'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '20'.
    ls_fieldcat-fieldname = 'EBELN'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '21'.
    ls_fieldcat-fieldname = 'EBELP'.
    ls_fieldcat-tabname = 'i_outab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '22'.
    ls_fieldcat-fieldname = 'LSTNR'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0315'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '23'.
    ls_fieldcat-fieldname = 'BEGDA'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    ls_fieldcat-col_pos = '24'.
    ls_fieldcat-fieldname = 'ENDDA'.
    ls_fieldcat-tabname = 'i_outtab'.
    ls_fieldcat-ref_tabname = 'PA0001'.
    APPEND ls_fieldcat TO lt_fieldcat.
    CLEAR: ls_fieldcat.
    Display the list
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = sy-cprog
         i_callback_user_command = 'USER_COMMAND'
          it_fieldcat             = lt_fieldcat
        TABLES
          t_outtab                = i_outtab.
    ENDFORM.                               " F_DISPLAY_DATA

    Hi,
    check the system defined program BCALV_EDIT_05.
    rgds,
    bharat.

  • Generic extractor based on specific function module with delta update

    Hi everybody,
    I'm trying to create a specific extractor using a specific function module and a specific structure of record.
    In my F.M i merge record from standard table MKPF and MSEg and return the result trhu the structure.
    In initialisation mode, there's no problem . But now i'm must be able to use the DELTA mode but i don't know how to do it.
    Can somebody help me?
    Here is the code of my function module , i know it's not a standard one because i'm not using cursor but i got everything i need. The delta mode must be on creattion time of record in mkpf .
    FUNCTION z_bw_extract_mvt_sortant.
    ""Interface locale :
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
    *"     VALUE(I_ISOURCE) TYPE  SBIWA_S_INTERFACE-ISOURCE OPTIONAL
    *"     VALUE(I_DSOURCE) TYPE  SBIWA_S_INTERFACE-ISOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SBIWA_S_INTERFACE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SBIWA_S_INTERFACE-INITFLAG OPTIONAL
    *"  TABLES
    *"      E_T_DATA STRUCTURE  ZBW_MVTSORTANT OPTIONAL
    *"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *récupération des données.
      CASE i_initflag.
        WHEN space.
          transfert_record it_mvtsor e_t_data i_maxsize.
         DESCRIBE TABLE it_mvtsor LINES sy-tfill.
         IF sy-tfill GT i_maxsize.
           APPEND LINES OF it_mvtsor FROM 1 TO i_maxsize TO e_t_data.
           DELETE it_mvtsor FROM 1 TO i_maxsize.
         ELSEIF sy-tfill GT 0.
           APPEND LINES OF it_mvtsor FROM 1 TO sy-tfill TO e_t_data.
           FREE it_mvtsor.
         ELSE.
           RAISE no_more_data.
         ENDIF.
        WHEN OTHERS.
    raffraichissement des variables de travails.
          FREE : r_werks , r_bwart , it_mkpf , it_mseg , it_mvtsor .
          CLEAR : r_werks , r_bwart , it_mkpf , it_mseg , it_mvtsor .
    récupération des paramètres.
          PERFORM set_selection_criteria TABLES i_t_select.
          PERFORM init_code_mouvement.
          SELECT * FROM mkpf
          APPENDING CORRESPONDING FIELDS OF TABLE it_mkpf.
    WHERE cpudt = sy-datum.
          CHECK NOT it_mkpf IS INITIAL.
          SELECT * FROM mseg
            APPENDING CORRESPONDING FIELDS OF TABLE it_mseg
            FOR ALL ENTRIES IN it_mkpf
            WHERE mblnr = it_mkpf-mblnr
              AND mjahr = it_mkpf-mjahr
              AND werks IN r_werks
              AND bwart IN r_bwart.
          LOOP AT it_mkpf ASSIGNING  .
            ENDLOOP.
          ENDLOOP.
      ENDCASE.
    ENDFUNCTION.
    Thanks in advance.

    Hi,
    first of all: The use of delta in a generic Datasource by FM is not supported by SAP standard. You need to change the extraction method in table ROOSOURCE from F2 to F1. There is no standard transaction to do this, you have to do a hard table update. Be careful not to change any standard datasource by error, otherwise you can get serious problems.
    The interface for the FM will change with the new extraction method. You will need a new parameter I_UPDMODE of type SBIWA_S_INTERFACE-UPDMODE to distinguish between Init, Delta and Full Load.
    For an example coding please refer to FM RSVD_BW_GET_DELTA_DATA.
    Hope that helps
    Stephan
    Message was edited by: Stephan Müller

  • WWI issue: function module with symbol doesn't work in conditional output

    Hi,
    I have created a function module to be used in combination with a symbol that represents the quantity of a composition item in a composition. In some cases a average quantity is not filled and the function module calculates the quantity based on the lower and upper limit of the composition item. This function works perfectly if managed in customising with a symbol or called with a symbol in WWI. When displaying the result of the symbol in a WWI word template it shows the expected value.
    However when I use the symbol with a function module (or the customised symbol with function module) in a conditional output expression, the value it represents in the expression is always equal to zero. It seems that a symbol value that is calculated using a functional module is not calculated properly when used in a conditional output expression. Setting a break in the functional module always shows the correct value, but the value as I already told, is not seen by the conditional output expression. Within the expression the value is always equal to zero.
    Does anyone know if this is a known issue in WWI? Is there any solution to handle this problem? I hope anyone can help.
    Thanks,
    Paul

    Dear Paul,
    only some add on high level ideas:
    if you look at:
    Example: Layout of an Abridged Material Safety Data Sheet - Basic Data and Tools (EHS-BD) - SAP Library
    you find the standard example of SAP for master and slave group:
    2  <11BRG003 (M,SAP_EHS_1012_004;*)> ¶
    3  <03EHS_L_TEXT(CED
      -SDB-01.002)> ¤
    <03EHS_L_TEXT(CED-
    SDB-02-07)> ¤
    <03EHS_L_TEXT(CED-
    SDB-02-05)> ¤
    4  <11BRG002 (S:POS;*)> ¿
    5 <01GESTRIDENT(I:NAM,
    6  IUPAC,;*)> <11ERG002>¤
    7
    8
    9
    <11BRG002 (S:POS; *)> ¿
    <01G1023001R2(C;*)
    ><11ERG002>¤
    <11BRG002 (S:POS;*)> ¿
    <01GESTVPRECL>
    <01GESTVCOMPL(N:" ZZ9,9")>
    <01GESTVCOMPE>
    <11ERG002> ¤
    10  <11ERG003>¶
    The "issue" is that you need to analyse by "line" of POS group; or precisely: it is easy to print lower, upper and average value if it exists.
    In conditional output this example is shown in SAP help:
    <15BIF001(AND:01G1013005VA GE 1)><01G1013005VA(;*/TL)[D:Value]>
    <15CIF001><03EHS_L_TEXT(CUST-100000000000031)[D:Density is less than 1]>
    <15EIF001>
    I believe you need a "clever" nesting together with your customer symbol
    E.g. you need first "test" the contents of the three values and decide about result
    The easiest way could be to use a "table" structure as above.
    Just use column header "lower"; "average"; "upper" value. Then you need to ask your self in which situation what need to printed.
    If you use the table structure and you print just what is there and leave simply lower / upper limit "field" empty if it does not exists (what is bad with this?) you need only this "conditional" output topic done for average value. You could check for: if value > 0.0001 then print the value (as then there is a value); if not use the report symbol in which you calculate something. In my opinion it is worth to try it.
    It is known that you can check "numeric values by using conditional output. I belive tis cintional one des work as well with the "composition" values (lwoer, upper, average),
    May be this approach might help.
    The "stack" examples which are discussed in SAP help and in the links shown are related to "characteristic" values of classes and not for composition ones.
    C.B.
    PS: If this really works you can clearly extend your solution. E.g. if lower value is empty may be print "0", If upper valus is empty may be print "100" etc. (or prepare a further costumer symbol calculating something).

  • Function Module Extraction!! Please HELP!!

    Hi Experts,
    This is my first project in BW. Please help!! The existing function module using 3 tables to extract (Full update) data. Now, I have to enable the delta for this generic extractor. I have seen RSA3_GET_DATA_SIMPLE (nothing specified for Delta) and RSVD_BW_GET_DELTA_DATA function module to make use of it using OPEN CURSOR but in that fm I can see only one table being used.
    Should I use 3 cursors to extract if so how should I join them? Can anyone please help me how to use cursors joining 3 tables and extract right delta data?
    This would be a greatest help!! Thanks in advance.
    Rishi

    Ok please find the original code below before I changed it... please do not mind as I was little scared to give exact tech names sorry... please find the code below.
    FUNCTION zz_ods_bw_extract_fm.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZZODS_BW_EXTRACT_STRUCT OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
      DATA : t_zzods_extract TYPE zzods_bw_extract_struct OCCURS 0
                                                       WITH HEADER LINE.
    Local data declarations
      DATA: l_output TYPE proj-pspid.
    Maximum number of lines for DB table
      STATICS: s_s_if TYPE srsc_s_if_simple,
               s_counter_datapakid LIKE sy-tabix.
      DATA: BEGIN OF t_prps OCCURS 0,
              posid     TYPE     ps_posid,
              psphi     TYPE     ps_psphi,
              zzdflt1     TYPE     zd_variable,
              zzdflt2     TYPE     zd_variable,
              zzdflt3     TYPE     zd_variable,
              zzdflt4     TYPE     zd_variable,
              zzdflt5     TYPE     zd_variable,
              zzdflt6     TYPE     zd_variable,
              zzdflt7     TYPE     zd_variable,
              zzdflt8     TYPE     zd_variable,
              zzdflt9     TYPE     zd_variable,
              zzdflt10     TYPE     zd_variable,
              zzdflt11     TYPE     zd_variable,
              zzvar1     TYPE     zd_var01,
              zzvar2     TYPE     zd_var02,
              zzvar3     TYPE     zd_var03,
              zzvar4     TYPE     zd_var04,
              zzvar5     TYPE     zd_var05,
              zzvar6     TYPE     zd_var06,
              zzvar7     TYPE     zd_var07,
              zzvar8     TYPE     zd_var08,
              zzvar9     TYPE     zd_var09,
              zzvar10     TYPE     zd_var10,
              zzvar11     TYPE     zd_var09,
              zzunit1     TYPE     zd_unit01,
              zzunit2     TYPE     zd_unit02,
              zzunit3     TYPE     zd_unit03,
              zzunit4     TYPE     zd_unit04,
              zzunit5     TYPE     zd_unit05,
              zzunit6     TYPE     zd_unit06,
              zzunit7     TYPE     zd_unit07,
              zzunit8     TYPE     zd_unit08,
              zzunit9     TYPE     zd_unit09,
              zzunit10     TYPE     zd_unit10,
              zzunit11     TYPE     zd_unit11,
              zztpemsnar1 TYPE     zd_tpemsnar,     
              zzrprtngyr1 TYPE     zd_rprtngyr,     
              zznonatar1       TYPE zd_nonatr,
              zzzcat1       TYPE zd_zcat,
              zzslitemar1  TYPE zd_slitemar,
              zzbnftyrs1        TYPE zd_bnftyrs,
              zzdescfrml   TYPE zd_descfrml,
             ZZFORMULA        type ZD_FRMLUSD,
            END OF t_prps.
      DATA: BEGIN OF t_emfactor OCCURS 0,
              naindex     TYPE     zd_index,     
              nayear     TYPE     zd_year,     
              cofactor     TYPE     zd_cofac,     
              vocfactor     TYPE     zd_vofac,     
              noxfactor     TYPE     zd_nofac,     
              pmfactor     TYPE     zd_pmfac,     
            END OF t_emfactor.
      DATA: BEGIN OF t_slef OCCURS 0,
             slindex     TYPE     zd_index,     
             slyear     TYPE     zd_year,     
             sltldfact     TYPE     zd_sltldfact,     
            END OF t_slef.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF i_initflag = sbiwa_c_flag_on.
    Check DataSource validity
        CASE i_dsource.
          WHEN 'ZZODS_DATA_TRANS'.
          WHEN OTHERS.
            RAISE error_passed_to_mess_handler.
        ENDCASE.
    Fill parameter buffer for data extraction calls
        s_s_if-requnr    = i_requnr.
        s_s_if-dsource   = i_dsource.
        s_s_if-maxsize   = i_maxsize.
      ELSE.                 "Initialization mode or data extraction ?
    Data transfer: First Call to pupulate data
    First data package
        IF s_counter_datapakid = 0.
    Extract data from prps for Project Types 15 and 17
          SELECT posid psphi zzdflt1 zzdflt2 zzdflt3
                 zzdflt4 zzdflt5 zzdflt6 zzdflt7
                 zzdflt8 zzdflt9 zzdflt10 zzdflt11
                 zzvar1 zzvar2 zzvar3 zzvar4 zzvar5
                 zzvar6 zzvar7 zzvar8 zzvar9 zzvar10
                 zzvar11 zzunit1 zzunit2 zzunit3 zzunit4
                 zzunit5 zzunit6 zzunit7 zzunit8
                 zzunit9 zzunit10 zzunit11
                 zztpemsnar1 zzrprtngyr1
                 zznonatar1 zzzcat1 zzslitemar1
                 zzbnftyrs1 zzdescfrml
           FROM prps
           INTO TABLE t_prps
           WHERE prart = '15' OR prart = '17'.
    Check for fetched records
          IF sy-subrc EQ 0.
            SORT t_prps BY posid.
          ENDIF.
    If the above condition is true
          IF NOT t_prps[] IS INITIAL.
    Get the data from z_fact
    Data : t_prps1 like t_prps occurs 0 with header line.
            SELECT naindex
                   nayear
                   cofactor
                   vocfactor
                   noxfactor
                   pmfactor
             INTO TABLE t_emfactor
              FROM z_fact.
    *RR          WHERE naindex = t_prps-zztpemsnar1+0(3)
    *RR           WHERE naindex = l_prps_index
    *GP        WHERE naindex = '01' or NAINDEX = '03'.
             AND  nayear  = t_prps-zzrprtngyr1.
    Sort the data by index and construction year
            IF sy-subrc EQ 0.
              SORT t_emfactor BY naindex nayear.
            ENDIF.
    Get the data from ztp_slef
            SELECT slindex
                   slyear
                   sltldfact
              INTO TABLE t_slef
               FROM ztp_slef.
    *RR           WHERE slindex = t_prps-zztpemsnar1+0(3)
    *GP        WHERE slindex = '01' or slindex = '03'.
    *RR           AND  slyear  = t_prps-zzrprtngyr1.
            IF sy-subrc EQ 0.
              SORT t_slef BY slindex slyear.
            ENDIF.
          ENDIF.
    Between this LOOP and ENDLOOP get the internal value of each project.
    Get the required data stored in above internal tables and populate
    the extract internal table
          LOOP AT t_prps.
            CLEAR l_output.
            CALL FUNCTION 'CONVERSION_EXIT_KONPD_OUTPUT'
              EXPORTING
                input  = t_prps-psphi
              IMPORTING
                output = l_output.
            t_zzods_extract-psphi  = l_output.
            CLEAR t_emfactor.
            READ TABLE t_emfactor WITH KEY NAINDEX = t_prps-zztpemsnar1+0(3)
                                           nayear  = t_prps-zzrprtngyr1
                                           BINARY SEARCH.
            IF sy-subrc EQ 0.
              t_zzods_extract-cofactor  = t_emfactor-cofactor.
              t_zzods_extract-vocfactor =      t_emfactor-vocfactor.
              t_zzods_extract-noxfactor =      t_emfactor-noxfactor.
              t_zzods_extract-pmfactor  =     t_emfactor-pmfactor.
            ENDIF.
            CLEAR t_slef.
            READ TABLE t_slef WITH KEY     slindex = t_prps-ZZSLITEMAR1+0(3)
                                           slyear  = t_prps-zzrprtngyr1
                                           BINARY SEARCH.
            IF sy-subrc EQ 0.
              t_zzods_extract-sltldfact =     t_slef-sltldfact.
            ELSE.
               t_zzods_extract-sltldfact = '0'.
            ENDIF.
            t_zzods_extract-posid    = t_prps-posid.
            t_zzods_extract-zzdflt1  = t_prps-zzdflt1.
            t_zzods_extract-zzdflt2  = t_prps-zzdflt2.
            t_zzods_extract-zzdflt3  = t_prps-zzdflt3.
            t_zzods_extract-zzdflt4  = t_prps-zzdflt4.
            t_zzods_extract-zzdflt5  = t_prps-zzdflt5.
            t_zzods_extract-zzdflt6  = t_prps-zzdflt6.
            t_zzods_extract-zzdflt7  = t_prps-zzdflt7.
            t_zzods_extract-zzdflt8  = t_prps-zzdflt8.
            t_zzods_extract-zzdflt9  = t_prps-zzdflt9.
            t_zzods_extract-zzdflt10 = t_prps-zzdflt10.
            t_zzods_extract-zzdflt11 = t_prps-zzdflt11.
            t_zzods_extract-zzvar1       = t_prps-zzvar1.
            t_zzods_extract-zzvar2       = t_prps-zzvar2.
            t_zzods_extract-zzvar3       = t_prps-zzvar3.
            t_zzods_extract-zzvar4       = t_prps-zzvar4.
            t_zzods_extract-zzvar5       = t_prps-zzvar5.
            t_zzods_extract-zzvar6       = t_prps-zzvar6.
            t_zzods_extract-zzvar7       = t_prps-zzvar7.
            t_zzods_extract-zzvar8       = t_prps-zzvar8.
            t_zzods_extract-zzvar9       = t_prps-zzvar9.
            t_zzods_extract-zzvar10  = t_prps-zzvar10.
            t_zzods_extract-zzvar11  = t_prps-zzvar11.
            t_zzods_extract-zzunit1  = t_prps-zzunit1.
            t_zzods_extract-zzunit2  = t_prps-zzunit2.
            t_zzods_extract-zzunit3  = t_prps-zzunit3.
            t_zzods_extract-zzunit4  = t_prps-zzunit4.
            t_zzods_extract-zzunit5  = t_prps-zzunit5.
            t_zzods_extract-zzunit6  = t_prps-zzunit6.
            t_zzods_extract-zzunit7  = t_prps-zzunit7.
            t_zzods_extract-zzunit8  = t_prps-zzunit8.
            t_zzods_extract-zzunit9  = t_prps-zzunit9.
            t_zzods_extract-zzunit10 = t_prps-zzunit10.
            t_zzods_extract-zzunit11 = t_prps-zzunit11.
            t_zzods_extract-zznonatar1  = t_prps-zznonatar1.
            t_zzods_extract-zzzcat1  = t_prps-zzzcat1.
            t_zzods_extract-zztpemsnar1 = t_prps-zztpemsnar1.
            t_zzods_extract-zzslitemar1 = t_prps-zzslitemar1.
            t_zzods_extract-zzrprtngyr1 = t_prps-zzrprtngyr1.
            t_zzods_extract-zzbnftyrs1  = t_prps-zzbnftyrs1.
            t_zzods_extract-zzdescfrml   = t_prps-zzdescfrml.
           t_ZzODS_EXTRACT-ZZFORMULA   = t_prps-ZZFORMULA.
            APPEND t_zzods_extract.
            CLEAR t_zzods_extract.
          ENDLOOP.
    Delete the record before filling the custom Records
          CLEAR e_t_data.
          REFRESH e_t_data.
    Submit all the extracted records to extract table
          e_t_data[] = t_zzods_extract[].
          s_counter_datapakid = s_counter_datapakid + 1.
        else.
          Raise NO_MORE_DATA.
        ENDIF.
       s_counter_datapakid = s_counter_datapakid + 1.
      ENDIF.              "Initialization mode or data extractio
    ENDFUNCTION.

Maybe you are looking for