Import parameter in Function Module for user exit

Hi Experts,
I need to send IDOC when PO release, for that i found an Exit M06E0004. It is having
FUNCTION EXIT_SAPLEBND_002.
""Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(I_CEKKO) LIKE  CEKKO STRUCTURE  CEKKO  " EKKO table
*"     VALUE(IT_BEKPO) TYPE  MMPUR_BEKPO OPTIONAL  " EKPO table
*"     VALUE(IT_BEKET) TYPE  MMPUR_BEKET OPTIONAL    " EKEt table
*"     VALUE(IT_EKKNU) TYPE  MMPUR_EKKNU OPTIONAL  
*"  EXPORTING
*"     VALUE(E_CEKKO) LIKE  CEKKO STRUCTURE  CEKKO
  INCLUDE ZXM06U22.
ENDFUNCTION.
All of the fields i have to take in IDOC segment r from EKKO and EKPO table, but 1 field is from MDSB table (MDSB-MATNR), how can i take it in the code i have to write. can i take TABLE: MDSB in the include, or any other way. because its standard FM we cant take it in IMPORT.
Regards,
Nik

Hello Nik
You can use a similar approach as described in thread:
Get Parameter from Standard Transaction to BADi
You need to find out in which main program MDSB is defined. Then you can try to access this field dynamically from within your exit.
Alternatively, you have to search for a function module which can retrieve this (runtime) information (MDSB-MATNR).
Regards
  Uwe

Similar Messages

  • CS07 - Functional Module ? User Exit ?

    Hi ,
    Is anybody can give me some instruction ?
    We would like trigger another program which we developed by ourself when use T-Code:CS07 to assign BOM to Plant .
    Is any functional module or user exit we can use ?
    Thanks !

    Hi Denny,
    The following are the User Exits available for CS07 transaction,
    PCSD0001            Applications development R/3 BOMS
    PCSD0002            BOMs: Customer fields in item
    PCSD0003            BOMs: Customer fields in header
    PCSD0004            BOM comparison
    PCSD0005            BOMs: component check for material items
    PCSD0006            Mass changes user exit
    PCSD0007            Check changes in STKO
    PCSD0008            WBS BOM: Customer-specific explosion for creating
    PCSD0009            Order/WBS BOM, determine URL page
    PCSD0010            Order/WBS BOM, determine explosion date
    PCSD0011            Knowledge-based order BOM, parallel update
    PCSD0012            Customer - Mat. number/mat. number during material exchange
    PCSD0013            Customer-specific processing of an explosion for BOM browser
    Please select the appropriate exit which meets ur requirement.
    Reward Points if useful.
    Thanks & regards
    Mahesh

  • Checkbox as import parameter in function module

    Hi all,
    how to create a checkbox as import parameter in function module,
    thnx in advance

    ?? Function modules don't have screens...they do have import, export parameters.
    If you look at how "checkboxes" are stored in db tables, you'll see that the previous replies are precisely correct.  A check box is a char1 field...it is on when 'X' (ABAP_TRUE) and off when blank (initial)....you would call your FM with an import field of type char1 set to 'X' or set to space, and handle accordingly in your FM code.
    If you have a checkbox on a selection screen, then the value of that parameter is either 'X' or space, depending upon whether or not the user checked the box.

  • Execute a function module when user exits.

    Dear All,
    Do tell me like there is a FM wherein I can pass a username and TCode for the user at the start up,
    NAVIGATION_SET_START_TCODE
    is there any for EXITS/LOGOFF. We have an requirement wherein we need to update some details when user logoff from system so login validations can be flagged accordingly.
    Regards,
    Dantham Conpolwedson

    Hello Dantham
    Probably you are looking for user-exit SUSR0001 ( User exit after logon to SAP System ) consisting of the following components:
    EXIT_SAPLSUSF_001   " Customer-Specific Check After Every User Logon
    Regards
      Uwe

  • Funtion Module for user exits  variables in BEx Queries.

    Hi,
    This is for BW Query customer exit variable (zvar2) for include ZXRSRU01 and exit :EXIT_SAPLRRS0_001.
    Can anyone please suggest the function modules that can be used to do the following.
    1)Read value of zvar1 from selection screen whatever 
      user enters at run time.
    2)How to define the zvar2 in the include. zvar2 is the 
      variable created in BEx to be populated from this
      customer exit.
    3)How to use case statment where once the value for zvar1
      is determined then,
       Case zvar1.
       when zvar1 = 0 , then zvar2 = 10
       when zvar1 = 1 , then zvar2 = 20
    3) Assign zvar2 value as computed in the case statement.
    Can anyone please help with the code to achieve this.
    Any information regarding function modules that can help write user exits for variable reading and input will be greatly helpful.
    Thanks
    Sarah.

    Hi Sarah,
    You don't need any FM for your issue.
    Please try thie sample code :
    DATA: VAR_INPIUT LIKE RRRANGEEXIT.
    CASE I_VNAM.
      WHEN 'ZVAR2'.
       CLEAR L_S_RANGE.
       IF I_STEP = 2."PROCESSED AFTER VARIABLE INPUT
    *Reading value of ZVAR1
        LOOP AT I_T_VAR_RANGE INTO VAR_INPIUT
          WHERE VNAM = 'ZVAR1'.
          CASE VAR_INPIUT-LOW.
    *FILLING ZVAR2
           WHEN 0.
              L_S_RANGE-LOW     = 10.
           WHEN 1.
              L_S_RANGE-LOW     = 20.
          ENDCASE.
          L_S_RANGE-SIGN     = 'I'.
          L_S_RANGE-OPT      = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
          EXIT.
        ENDLOOP.
      ENDIF.
    ENDCASE.
    Hope this helps
    Joe

  • Funtion Module for user exits for variables used in BEx Queries.

    Hi,
    This is for BW Query customer exit variable (zvar2) for include ZXRSRU01 and exit :EXIT_SAPLRRS0_001.
    Can anyone please suggest the function modules that can be used to do the following.
    1)Read value of zvar1 from selection screen whatever
    user enters at run time.
    2)How to define the zvar2 in the include. zvar2 is the
    variable created in BEx to be populated from this
    customer exit.
    3)How to use case statment where once the value for zvar1
    is determined then,
    Case zvar1.
    when zvar1 = 0 , then zvar2 = 10
    when zvar1 = 1 , then zvar2 = 20
    3) Assign zvar2 value as computed in the case statement.
    Can anyone please help with the code to achieve this.
    Any information regarding function modules that can help write user exits for variable reading and input will be greatly helpful.
    Thanks
    Sarah.

    Hi Sarah,
    You don't need any FM for your issue.
    Please try thie sample code :
    DATA: VAR_INPIUT LIKE RRRANGEEXIT.
    CASE I_VNAM.
      WHEN 'ZVAR2'.
       CLEAR L_S_RANGE.
       IF I_STEP = 2."PROCESSED AFTER VARIABLE INPUT
    *Reading value of ZVAR1
        LOOP AT I_T_VAR_RANGE INTO VAR_INPIUT
          WHERE VNAM = 'ZVAR1'.
          CASE VAR_INPIUT-LOW.
    *FILLING ZVAR2
           WHEN 0.
              L_S_RANGE-LOW     = 10.
           WHEN 1.
              L_S_RANGE-LOW     = 20.
          ENDCASE.
          L_S_RANGE-SIGN     = 'I'.
          L_S_RANGE-OPT      = 'EQ'.
          APPEND L_S_RANGE TO E_T_RANGE.
          EXIT.
        ENDLOOP.
      ENDIF.
    ENDCASE.
    Hope this helps
    Joe

  • How to block particular function module for user or users

    Hi,
       Can anyone let me know that if I want to prevent users for certain function module or modules.Is it possible to do so.Please let me know.
    Have a great day ahead.

    Please take note that there are hundreds of thousands of function modules in any one SAP system (see table TFDIR) and a large number of them can do very very powerfull and even dangerous things when executed on their own in the test mode.
    It shounds as if you are only worried about only one (probably some famous one...) and want to range around it's name. This is not a good idea and will not work anyway.
    Cheers,
    Julius

  • Function modules for User check and Product search

    Hi,
    Please give me the names of function module which are used for user login check, and Product search.
    Thanks,
    Devender V

    Hi,
    For User login check belwo Function module,
    SUSR_LOGIN_CHECK_RFC for ECC/R3
    CRM_ISA_LOGIN_R3USER_CHECKS for CRM
    For product try below Function module.
    BAPI_MATERIAL_GET_DETAIL
    I hope this information will help you.
    Regards.
    eCommerce Developer

  • Function module for user details.

    Hi all,
    I have to retrieve user email address based on the sap user id. Is there any function module to handle this.
    If there is no function module can anyone give me other alternatives.
    Regards,
    Gautham

    hi,
    check BAPI_USER_GET_DETAIL
    Check this FM.
    CNV_GET_USER_ROLE
    SO_CHECK_USER_ROLE
    try this..
    RSRA_USERS_OF_AGR_GET
    Kishi.

  • Use Long Text as Import Parameter in function module

    Hi,
    I need to use long text as import parameter and also in tables tab also. Can anybody suggest me the proper data dictionary names?
    aRs

    Try with :
    CLTLINE  - Text line with language key
    CODELINE - coding line
    RTLINES
    RTFLINES
    RFCLINES
    RFC_TLINE
    TLINE
    TLINE10
    TLINE11
    TLINE12
    TLINE13
    TLINE14
    TEXTLINES
    Thanks
    Seshu

  • Any function modules or user exit for confirmation mail

    Hi,
        I am in SAP system , there is data distribution happening with SAP and non SAP system through middleware XI system.
    pls help me suppose there is an error happens how SAP can send
    an email to nonsap system or suppose data updated it should be
    an confirmation email. pls help me regarding this

    Hi,
    i have alredy implement EXIT_SAPMM06E_013 but the program do not stop there.Do i miss something?I activete the project and saw that  EXIT_SAPMM06E_007 EXIT_SAPMM06E_013 and EXIT_SAPMM06E_016 are implemented and active.

  • Passing parameter in function module

    hi friends,
    I have created one function module in which i need to pass PO/SO number from standard EKKO/VBAK tables through the select option parameter S_POSONO. Inside the function module I have a select query which fetches the records from a Z-table which has a field called 'REFERENCE' which is 16-char long. Hence the length mismatches with PO/SO no which is 10-char long. the first 10-char from 'REFERENCE' is PO/SO number, next 3-char is line-item num, and the last three char is schedule item num. It is required to match only first 10-char with the parameter passed i.e, S_POSONO and display only those datas.
    The function module is as follows.....
    Function :
    CALL FUNCTION 'YFIIN_RETRIEVE_SOURCE_DATA'
    EXPORTING
       LT_RANGE_BUKRS          = S_BUKRS[]
       LT_RANGE_DOCNO          = S_POSONO[]
       LT_RANGE_DOCDATE        = S_DATUM[]
       LT_RANGE_CURRENCY       = S_FCURR[]
      TABLES
        IT_TEMEXPOSU            = LT_TEMEXPOSU
    EXCEPTIONS
       INVALID_SELECTION       = 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.
    Source code inside function module:
      SELECT * FROM ZFIGL_TEMEXPOSU INTO  TABLE IT_TEMEXPOSU
                                     WHERE   COMPANY_CODE IN LT_RANGE_BUKRS
                                     AND  currency in LT_RANGE_CURRENCY
                                     and  REFERENCE in LT_RANGE_DOCNO
                                     and  doc_date in LT_RANGE_docdate.
    IF SY-SUBRC = 0.
    SELECT COMPANY_CODE ATTRIBUTE_01 REFERENCE CREATION_DATE FOREIGN_CURR                                                               
               FROM TEMT_RAWEXPOS APPENDING CORRESPONDING FIELDS OF
                   TABLE IT_TEMEXPOSU WHERE COMPANY_CODE IN  LT_RANGE_BUKRS
                                     AND REFERENCE in LT_RANGE_DOCNO
                                     AND CREATION_DATE IN  LT_RANGE_DOCDATE
                                     AND FOREIGN_CURR IN LT_RANGE_CURRENCY.
       ENDIF.
    Import Parameter of Function Modules :
    LT_RANGE_BUKRS   - type - BUKRS
    LT_RANGE_DOCNO  - type - EBELN
    LT_RANGE_DOCDATE - type - DOKDATS
    LT_RANGE_CURRENCY - type - WAERS
    please help me to solve this problem..

    Hi Ram Tej,
    Try this.
    First Read all the records without Checking REFERENCE field with LT_RANGE_DOCNO into an internal Tbale.
    Then looping at that internal table delete records from the same internal table where REFERENCE(10) <> LT_RANGE_DOCNO.
    Hope this may help ur requirement.
    Award points if useful.

  • 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*************

  • Any function module for getting fiscal year week numbers

    can any one provide me function module for getting fiscal year week numbers ? if no function module please let me know work around.
    Thanks!
    Lakshmikandh

    hi,
    Use FM <b>'DATE_GET_WEEK'</b>...
    parameter D1 LIKE SCAL-DATE.
    Data w like scal-week.
    CALL FUNCTION <b>'DATE_GET_WEEK'</b>
    EXPORTING
    date = D1
    IMPORTING
    WEEK = W
    EXCEPTIONS
    DATE_INVALID = 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.
    write W+4(2).
    Regards,
    Santosh

  • 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.

Maybe you are looking for