Doubt in function module BAL_DSP_LOG_DISPLAY

Hai, guys,
i have doubt in the function module BAL_DSP_LOG_DISPLAY.
actually after executing the functin module bapi_acc_document_post, how to pass bapi return table to this function module bal_dsp_log_display.
if any one know means please tell me with sample coding.
thanks in advance.
From Elamaran.

Hi Elamaran!
Did you try to use SE37 with this module and use "Where-Used List" (CTRL + SHIFT + F3)? This should give you enough examples to look through.
Best regards
Wolfgang
Message was edited by: Ralf Wolfgang Geithner

Similar Messages

  • Doubt About Function Module

    Hi Experts,
    I want one function module which wil allows us to attach a attachment to the material in the SAP PLM System.
    Please clear my doubt . Why Because i got strucked here in this issue of selecting a right Function Module.
    Please clear my doubt. Helpful ANswers wil be Reward.
    Regards
    Khanna

    Hi khanna,
    try this MATERIAL_MAINT_DIAL_GET_DOC Functional Module for attachment in Material Master,
    In DIR try this CV110_DOC_ASSIGN_FILE,
    Regards
    Rehman

  • Doubt on function module

    in function module how to export all the fields in a table ..
    i.e. i am giving these fields..
    in
    IMPORT
    P_EBELN LIKE EKKO-EBELN
    IN
    EXPORT
    BUKRS LIKE EKKO-BUKRS
    and in source code
    SELSCT SINGLE BUKRS INTO BUKRS
    WHERE EBELN = EBELN.
    and i am getting for one record
    but if  i want to export more than one columns
    how to code it in source code.
    and what is the use of  TABLES in FM
    AND HOW TO EXPORT  full table columns ?
    and how to code it ...
    plz help me .......

    Hi
    See the doc on fun modules and create accordingly
    Function Modules;
    Check this matter.
    Function Modules are Global ABAP programs created by SAP for reusable purpose.they have IMPORT,EXPORT and TABLE parameters, and EXCEPTIONS to through when error occurs.
    You can create them from TCode SE37.
    Go through the following doc:
    Function modules are cross-program, reusable procedures that are organized into function groups, and whose functions are implemented between the statements FUNCTION and ENDFUNCTION. Function modules and their interfaces are created in the Function Builder.
    Function Module Interfaces
    The parameter interface of a function module is defined in the Function Builder. It includes the definition of interface parameters and the specification of exceptions that can be triggered by a function module. The Function Builder automatically generates comment lines below the FUNCTION statement in the source code of the function module, which represent the interface of the function module with the following syntax:
    Syntax
    ... [IMPORTING parameters]
    [EXPORTING parameters]
    [CHANGING parameters]
    [TABLES table_parameters]
    [{RAISING|EXCEPTIONS} exc1 exc2 ...]
    The syntax and semantics of IMPORTING, EXPORTING, CHANGING, RAISING, and EXCEPTIONS mainly correspond to the definition of method interfaces with [CLASS-]METHODS. The additional option of defining table parameters using TABLES is obsolete.
    Interface parameters
    The interface parameters are defined on the relevant tab pages in the Function Builder.
    IMPORTING parameters are input parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input parameter. The content of the actual parameter is passed to the input parameter when the call is made. The content of an input parameter for which 'pass by reference' is defined cannot be changed in the function module.
    EXPORTING parameters are output parameters. When the function module is called, a suitable actual parameter can be specified for every output parameter. The content of an output parameter that is defined for 'pass by value' is transferred to the actual parameter if the function module is completed without errors. An output parameter that is defined for pass by reference is not initialized when the function module is called.
    CHANGING parameters are input and output parameters. When the function module is called, a suitable actual parameter must be specified for every non-optional input or output parameter. When the function module is called, the content of the actual parameter is passed to the input/output parameter, and when the function module is completed, the content of the input/output parameter is passed to the actual parameter.
    TABLES parameters are table parameters. Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
    Exceptions
    The exception of a function module are defined on the Exceptions tab page in the Function Builder. Here you can select exception classes to define whether class-based exceptions are declared or non-class-based exception are defined. Class-based exceptions are represented in the above syntax by RAISING, and non-class-based exceptions are represented by EXCEPTIONS.
    The addition RAISING is used to declare class-based exceptions that can be propagated from the function module to the caller. Exceptions in the categories CX_STATIC_CHECK and CX_DYNAMIC_CHECK must be explicitly declared, otherwise a propagation can lead to an interface violation. A violation of the interface leads to the treatable exception CX_SY_NO_HANDLER. Exceptions of the category CX_NO_CHECK are implicitly always declared. The declaration of exceptions of the category CX_STATIC_CHECK is statically checked in the syntax check. For exceptions of the category CX_DYNAMIC_CHECK, the check is not performed until runtime. In a function module in which class-based exceptions are declared with the RAISING addition, the statement CATCH SYSTEM-EXCEPTIONS cannot be used. Instead, the relevant treatable exceptions should be handled in a TRY control structure.
    The addition EXCEPTIONS is used to define a list of non-class-based exceptions that can be triggered in the function module using the statements RAISE or MESSAGE RAISING. Exceptions defined in this way - as with formal parameters - are bound to the function module and cannot be propagated. If an exception of this type is triggered in a function module, and no return value has been assigned to it with the homonymous addition EXCEPTIONS of the CALL FUNCTION statement when the call was made, this leads to a runtime error.
    Note
    For new developments after release 6.10, SAP recommends that you work with class-based exceptions that are independent of the function module.
    RFC is a technology which is used to access a functions (Modules) from
    the remote systems.
    If a function module is set as remote enabled which can be access from
    the remote system via RFC.Eg: U can access the Remote enabled function modules in ur VB,Webdynpro,Java,Visual composer program.
    A function module can be set as remote enabled by SE37->Go to ur FM->click the option Button "remote enabled".
    But Normal function modules can not accessd from the remote system.
    Good Example for RFC enabled function module is : BAPI(Business Application Programming Interface)
    Note: All BAPIs are Remote enabled but not all remote enabled function modules are BAPI.
    CALLING A FUNCTION MODULE:
    1)In U ABAP Editor --> Click "Patter" ---> Selection Option Button "Call Function"
    --> Write the Corresponding FM name --> Hit Enter
    2)The appropriate import ,export Parameters will be displayed in ur editor
    3)Pass the Values Here.
    Also check these links.
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    Check this link:
    http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    See the following links:
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Doubt in function module...Urgent!!

    hii all
         I want to find the difference between sy-datum and BLDAT and have to get only the days value...
    for eg...
        sydatum(28.11.2007) - bldat(24.11.2007)= Days(4)
    4 must the result... so i used the function module C14B_DIFF_BT_2_DATES..
    but im unable to get the result...
    my code is.....
    *& Report  ZAGE1
    REPORT  ZAGE1.
    type-pools : slis,icon.
    tables : bsid,kna1,knvv.
    data : d_fieldcat type slis_t_fieldcat_alv,
           d_fieldcat_wa type slis_fieldcat_alv.
    data : begin of itab_bsid occurs 0,
           kunnr like bsid-kunnr,
           bukrs like bsid-bukrs,
           bldat like bsid-bldat,
           waers like bsid-waers,
           belnr like bsid-belnr,
           end of itab_bsid.
    data : begin of itab_kna1 occurs 0,
           kunnr like kna1-kunnr,
           end of itab_kna1.
    data : begin of itab_knvv occurs 0,
           kunnr like knvv-kunnr,
           zterm like knvv-zterm,
           end of itab_knvv.
    data : begin of itab_key occurs 0,
            kunnr like bsid-kunnr,
           bukrs like bsid-bukrs,
           bldat like bsid-bldat,
           waers like bsid-waers,
           belnr like bsid-belnr,
           zterm like knvv-zterm,
           due type i,
           end of itab_key.
    selection-screen : begin of block blk1 with frame title text-001.
    parameters : p_cc like bsid-bukrs.
    selection-screen : end of block blk1.
    select distinct kunnr bukrs bldat waers belnr from bsid into corresponding fields of table itab_bsid where bukrs = p_cc.
    if not itab_bsid[] is initial.
    select kunnr from kna1 into corresponding fields of table itab_kna1 for all entries in itab_bsid where kunnr = itab_bsid-kunnr.
    if not itab_kna1[] is initial.
    select kunnr zterm from knvv into corresponding fields of table itab_knvv for all entries in itab_kna1 where kunnr = itab_kna1-kunnr.
    endif.
    endif.
         loop at itab_bsid.
         itab_key-kunnr = itab_bsid-kunnr.
         itab_key-bukrs = itab_bsid-bukrs.
         itab_key-bldat = itab_bsid-bldat.
         itab_key-waers = itab_bsid-waers.
         itab_key-belnr = itab_bsid-belnr.
         append itab_key.
         clear itab_key.
         endloop.
         sort itab_key by kunnr.
         loop at itab_key.
         read table itab_knvv with key kunnr = itab_key-kunnr.
         if sy-subrc = 0.
         itab_key-zterm = itab_knvv-zterm.
         modify itab_key transporting zterm.
         endif.
         endloop.
        d_fieldcat_wa-fieldname = 'KUNNR'.
        d_fieldcat_wa-seltext_l = 'CUSTOMER'.
        d_fieldcat_wa-col_pos = 1.
        append d_fieldcat_wa to d_fieldcat.
        clear d_fieldcat_wa.
         d_fieldcat_wa-fieldname = 'BUKRS'.
        d_fieldcat_wa-seltext_l = 'COMPANY CODE'.
        d_fieldcat_wa-col_pos = 2.
        append d_fieldcat_wa to d_fieldcat.
        clear d_fieldcat_wa.
         d_fieldcat_wa-fieldname = 'WAERS'.
        d_fieldcat_wa-seltext_l = 'CURRENCY'.
        d_fieldcat_wa-col_pos = 3.
        append d_fieldcat_wa to d_fieldcat.
        clear d_fieldcat_wa.
         d_fieldcat_wa-fieldname = 'BLDAT'.
        d_fieldcat_wa-seltext_l = 'DOCUMENT DATE'.
        d_fieldcat_wa-col_pos = 4.
        append d_fieldcat_wa to d_fieldcat.
        clear d_fieldcat_wa.
         d_fieldcat_wa-fieldname = 'BELNR'.
        d_fieldcat_wa-seltext_l = 'DOCUMENT NO'.
        d_fieldcat_wa-col_pos = 5.
        append d_fieldcat_wa to d_fieldcat.
        clear d_fieldcat_wa.
         d_fieldcat_wa-fieldname = 'ZTERM'.
        d_fieldcat_wa-seltext_l = 'PAYMENT TERMS'.
        d_fieldcat_wa-col_pos = 6.
        append d_fieldcat_wa to d_fieldcat.
        clear d_fieldcat_wa.
    *data : due type i.
    loop at itab_key.
       CALL FUNCTION 'C14B_DIFF_BT_2_DATES'
         EXPORTING
           I_DATE_FROM                     = itab_key-bldat
           I_DATE_TO                       = sy-datum
        IMPORTING
          E_DAYS                          = itab_key-due
         E_MONTHS                        = months
        E_YEARS                         = years
       EXCEPTIONS
         PLAUSIBILITY_CHECK_FAILED       = 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.
    append itab_key.
    endloop.
        d_fieldcat_wa-fieldname = 'DUE'.
        d_fieldcat_wa-seltext_l = 'DUE DATE'.
        d_fieldcat_wa-col_pos = 7.
        append d_fieldcat_wa to d_fieldcat.
        clear d_fieldcat_wa.
        data : gd_repid like sy-repid.
        gd_repid = sy-repid.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
         EXPORTING
          I_INTERFACE_CHECK                 = ' '
          I_BYPASSING_BUFFER                = ' '
          I_BUFFER_ACTIVE                   = ' '
           I_CALLBACK_PROGRAM                = gd_repid
          I_CALLBACK_PF_STATUS_SET          = ' '
          I_CALLBACK_USER_COMMAND           = ' '
          I_CALLBACK_TOP_OF_PAGE            = ' '
          I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
          I_CALLBACK_HTML_END_OF_LIST       = ' '
          I_STRUCTURE_NAME                  =
          I_BACKGROUND_ID                   = ' '
          I_GRID_TITLE                      =
          I_GRID_SETTINGS                   =
          IS_LAYOUT                         =
           IT_FIELDCAT                       = d_fieldcat
          IT_EXCLUDING                      =
          IT_SPECIAL_GROUPS                 =
          IT_SORT                           =
          IT_FILTER                         =
          IS_SEL_HIDE                       =
          I_DEFAULT                         = 'X'
          I_SAVE                            = ' '
          IS_VARIANT                        =
          IT_EVENTS                         =
          IT_EVENT_EXIT                     =
          IS_PRINT                          =
          IS_REPREP_ID                      =
          I_SCREEN_START_COLUMN             = 0
          I_SCREEN_START_LINE               = 0
          I_SCREEN_END_COLUMN               = 0
          I_SCREEN_END_LINE                 = 0
          I_HTML_HEIGHT_TOP                 = 0
          I_HTML_HEIGHT_END                 = 0
          IT_ALV_GRAPHICS                   =
          IT_HYPERLINK                      =
          IT_ADD_FIELDCAT                   =
          IT_EXCEPT_QINFO                   =
          IR_SALV_FULLSCREEN_ADAPTER        =
        IMPORTING
          E_EXIT_CAUSED_BY_CALLER           =
          ES_EXIT_CAUSED_BY_USER            =
          TABLES
            T_OUTTAB                          = itab_key[]
        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.
    Urgent plz help me....!!
    Regards
    Asha

    Check the following code for subtract years/months/date from particular date:
    DATA: EDAYS LIKE VTBBEWE-ATAGE,
    EMONTHS LIKE VTBBEWE-ATAGE,
    EYEARS LIKE VTBBEWE-ATAGE.
    PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
    TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
    call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
    exporting
    i_date_from = FROMDATE
    i_date_to = TODATE
    I_FLG_SEPARATE = ' '
    IMPORTING
    E_DAYS = EDAYS
    E_MONTHS = EMONTHS
    E_YEARS = EYEARS.
    WRITE:/ 'Difference in Days ', EDAYS.
    WRITE:/ 'Difference in Months ', EMONTHS.
    WRITE:/ 'Difference in Years ', EYEARS.
    INITIALIZATION.
    FROMDATE = SY-DATUM - 60.
    For difference between two dates.
    data : date1 like sy-datum,
    date2 like sy-datum,
    diff(10 ) type c.
    date1 = '20071003'.
    date2 = '20071104' .
    CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
    EXPORTING
    I_DATUM_BIS = date1
    I_DATUM_VON = date2
    I_KZ_EXCL_VON = '0'
    I_KZ_INCL_BIS = '0'
    I_KZ_ULT_BIS = ' '
    I_KZ_ULT_VON = ' '
    I_STGMETH = '0'
    I_SZBMETH = '1'
    IMPORTING
    E_TAGE = diff
    EXCEPTIONS
    DAYS_METHOD_NOT_DEFINED = 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 .

  • Doubt In Function module : Write_Form_Lines in Sap Scripts

    Friends,
      I wanted to know for what purpose the funtion module Write_Form_Lines is used in SAP SCRIPTS.
    Regards
    Yamini

    From SAP documentation:
    The function module outputs the text lines in table LINES into the specified form window. The text lines must have the SAPscript ITF format. From the data in the text header, the system uses only the field TDSTYLE to apply the formatting attributes defined in the specified style for this text. If the field is empty, the system uses the identically named formatting attributes (character and paragraph formats) of the form.
    Use parameter WINDOW to specify into which of the windows defined in the form you want to output the text. You can specify any window used in the form. The parameter FUNCTION determines how to merge the text lines to be output with any existing contents in the window. There are differences between the different window types or areas.
    Prabhu Rajesh.

  • Doubt in function module relating to delta upload

    Hi,
        Is there any ABAPer alive around who can tell me how i can write a funtion module to update data to BW side.
    They only tell me data is not going to BW side. Can anyone throw light as to how function module should be structured. I  have a function module that works very finely for full update mode in RSA3. What should be done in my function module for delta update mode to work on BW side?????
    <h1> THIS IS CRITICAL </h1>
    Regards,
    Prakash.K

    Critical?  Why?  Should I respond faster because you've a problem that's urgent for you?
    Does full extraction work when you run the extraction from BW?  Extraction only stops when you return an empty package.  Hence, RSA3 won't tell you if you've made this mistake. RSA3 will work fine, but the extraction will never end when run from BW.  I refer you to this discussion I had earlier. [Re: Transport Organ9izer]  I'll emphasise one important point: Also SAP supply RSAX_BIW_GET_DATA_SIMPLE as an example of how to write FM extractors 
    If your FM is actually working with full, then to get your function module to work as a delta load, you need to be able to determine which data records have changed with since the last extraction, and only send those.  How you do this depends very much on the data.  You'll also have to define the datasource as Generic.
    matt

  • Doubt on Function Modules

    Hi Experts,
          I am creating one user defind function module. When i am giving table parameters,
    For example
    git_out like vbak
    it shows the error tables are obsolete..
    Please can any one tell me whats that error and any one tell me how to do that one..
           Thanks in Advance
    Thanks and Regards
    Srihari.

    Hi,
    As suggsted you need to move the parameter to CHANGING parameters.
    Since you are referenceing VBAK, but need a table, you need to refer the parameter to a table type.
    Hence in CHANGING parameter you put as so:
    git_out TYPE TAB_VBAK.
    After this, you would have to create a work area for the table in the code and always loop at the git_out into this work area for all operations.
    The work area should have type VBAK.
    Also, when calling the FM from program, you need to pass the body of the internal table to this parameter, i.e. if internal table is it_vbak, then you need to pass it_vbak[].
    Regards,
    Aditya
    Edited by: Aditya Laud on Feb 5, 2008 6:50 AM

  • Hi Experts. I hav a doubt in Function Module SPELL_AMOUNT how to use it ?

    Parameters: p_num type c.
    Data: Res_in_Words Type c.
    CALL FUNCTION 'SPELL_AMOUNT'
    EXPORTING
       AMOUNT          = p_num
      CURRENCY        = ' '
      FILLER          = ' '
       LANGUAGE        = SY-LANGU
    IMPORTING
       IN_WORDS        = Res_in_Words.
    EXCEPTIONS
      NOT_FOUND       = 1
      TOO_LARGE       = 2
      OTHERS          = 3
    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: /3 Res_in_Words.
    When I execute it, program goes to Dump due to an exception in the program, that is, in the parameter IN_WORDS of the FM, the parameter passed is of type not matching with the type to be sent to that parameter. So run time error occured.
    Can any one pls. resolve it soon.
    Thanks in advance.
    Moderator Message: This type of questions have been asked many times in the forum. Search for them. Also, do NOT ask the forum members to "resolve your issue soon". We all have full-time jobs and are not getting paid to resolve your issues, especially the ones that have been asked and answered many times in the forum.
    Edited by: kishan P on May 26, 2011 1:09 PM

    Hi,
    If you pass the following values into the FM,
    AMOUNT                          10000
    CURRENCY                        INR
    LANGUAGE                        EN
    you will get the output as
    IN_WORDS                           000000000000100000 2 ONE HUNDRED
    Here the last two digit of the amount is considered as decimal place in INR currency.
    Check whether you are passing the right amount with considering decimal places according to the passed currency.

  • Doubt in function module

    Hi ,
          iam creating RFC ennabled FM , where import parameter has from date and to date range .Based on this date range i need to select the data's from data base tables using the from date and to date .
    How can i use in where conditon in select qurey  can any one give me some sample codes.
    Regards,
    veera

    HI,
    I hope these links may help you:
    code for difference of dates
    Period difference
    Reward points if found helpful...
    Cheers ,
    Chandra Sekhar.

  • Doubt in  export, import and table para when creating Function Module

    Dear fellow ABAPers,
    I have a doubt in defining export, import and table parameter while creating a function module.
    I am calling a function module inside a user exit. Now in the user exit the SAP fills an internal table called i_lfa1 with all the data user has eneterd.
    Now I want to pass this whole internal table to function module and the perform some checks on the values of internal table.
    After that function module fills an error structure with values depending on some check.
    1)
    How do I pass this internal table to function module ? 
    When I am creating function module in se37 where do I define this iternal table type ? Is it in Import or Table parameter during function module creation?
    2)
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Please clear my doubt..
    Relevant points will be awarded.
    Regards,
    Tushar.

    Hi Tushar,
    1. How do I pass this internal table to function module ?
       I assume u are creating your own Y/Z FM.
       Pass it thru TABLES parameter.
    2. When I am creating function module in se37 where do I define this iternal table type
       Define this in TABLES interface.
       What Type ?
       THE SAME TYPE WHICH HAS BEEN DEFINED
        WHILE PASSING IN THE USER-EXIT FUNCTION MODULE.
       IF U SEE THE FM OF THE USER-EXIT,
       U WILL COME TO KNOW.
    3.
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Define it in TABLES interace. (not in export, import)
      (Since what u are going to return is an internal table)
      U can take for eg. BDCMSGCOLL.
      OR u can create your own Y/Z structure
    for the same purpose.
      (or u can use the structure type T100)
    I hope it helps.
    Regards,
    Amit M.

  • Doubt in using :Function Module : MS_CONVERT_TO_OTHER_CURRENCY

    Hi ,.
    In the Function Module :MS_CONVERT_TO_OTHER_CURRENCY.
    I have to export following parametes:
    DATE            
    FROM_CURRENCY   
    FROM_AMOUNT     
    TO_CURRENCY     
    COMPANY_CURRENCY
    RATE  (optional)    .
    Here my doubt is :what is the purpose of COMPANY_CURRENCY .What value i have to populate here , how i have to find the  company currency?
    I think we have to find this COMPANY_CURRENCY  based on the sales organization.
    Please update me regarding this COMPANY_CURRENCY .
    Thanks,
    Suresh.

    Have you tried using 'CONVERT_TO_FOREIGN_CURRENCY' instead?
    DATA: v_amount TYPE p DECIMALS 2.
    CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'
    EXPORTING
    date = sy-datum
    foreign_currency = 'INR'
    local_amount = '1.00'
    local_currency = 'USD'
    IMPORTING
    foreign_amount = v_amount
    EXCEPTIONS
    no_rate_found = 1
    overflow = 2
    no_factors_found = 3
    no_spread_found = 4
    derived_2_times = 5
    OTHERS = 6.
    IF sy-subrc = 0.
    WRITE: / 'US dollar to Indian rupees - ', v_amount.
    ENDIF.

  • Doubts about some popular function modules?

    Hi all,
    I have doubts about these function modules (see in parenthesis)
    ws_filename_get (to get the file name at ...?)
    ws_query (to get file size and environment variables from the presentation server to the ...?)
    upload and download (what are the new function modules used in place of these (I know they are obsolete now)
    what is the Object oriented equivalents of these functions?
    Thanks.
    Charles.
    ++++++++++++++++++++++++++++++++++++

    <i>(1)What is the use of ws_filename_get? Please be specific in your answer, about where the file resides: application server, presentation server or the ABAP program.</i>
    It is simply providing an interface for the user to choose a filename which resides on the frontend PC(presentation server). As suggested already, this has been replaced with FILE_OPEN_DIALOG method of the class CL_GUI_FRONTEND_SERVICES.
    <i>2)What is the use of ws_query? Please be specific in your answer, about where the file resides: application server, presentation server or the ABAP program.</i>
    Again, already answered,  this has been replace by multiple more specific methods of the same class mentioned above.
    <i>How can GUI_UPLOAD be a substitute of Upload? It is a substitute of WS_UPLOAD as upload is used to transfer data from presentation server to the ABAP program, whereas the other two are used to get it from presentation server to the application server.</i>
    They all transafer data from the presentation to your application.  They are all interchangable(in a sense), but you should be using the GUI_UPLOAD method of the class CL_GUI_FRONTEND_SERVICES.
    Regards
    Rich Heilman

  • Doubt in update function module

    dear friends..
    i have created an UPDATE function module with Processing type- Update Module, Start Immediate. i have handled the exceptions using Raise statement in the function module..
    the call function looks as..
      CALL FUNCTION 'ZFI_LCTXN_TABLES_UPDATE'
        in update task
        EXPORTING
          ZLCTMB1  = p_lctmb1
          NU_ENTRY = p_global-ins_zlctmb1
        TABLES
          UPD_PO   = UPD_PO
          UPD_SH   = UPD_SH
        EXCEPTIONS
          ERROR    = 1
          OTHERS   = 2.
      p_subrc = sy-subrc.
      commit work.
    but if the update fails, and even though the RAISE ERROR works, and update termination message is registered in SM13, i dont get the value for sy-subrc as 1 .
    is it the right way..if yes please tell me how to generate an error message within the transaction..so that the user knows the update has failed..
    thank you for your time
    Nivin

    Hi,
    Maybe it's usefull  for you.
    <b>
      IF sy-subrc EQ 4.
        MESSAGE e001 RAISING not_found.
      ELSEIF sy-subrc EQ 8.
        MESSAGE e002 RAISING not_found.
      ELSE.
      ENDIF.</b>
    Using this to create a message and raise in the same time !
    Regards.
    Marcelo Ramos

  • Doubt in RFC Function module

    Hi,
    I am creating one RFC in that i need to declare one import parameter whose length is is.
    when i am giving like i_exclide like kna1-loevm is not accepting.
    when i am declaring like i_exclude like char1.
    it is giving error like reference parameters are not allowed in RFC.
    anybody can tell me how to declare.
    thanks,
    maheedhar

    Hi,
    Go to se37,
    Give ur RFC function module and click change.
    Go to "Import" tab , you can find a checkbox "Pass Value" , check this checkbox.
    Now you try to compile the code , you wont get that error.
    Reward points for useful answer.
    Thanks,
    Jey

  • Doubt in the function module POPUP_GET_VALUES

    Hi,
    i am using the function module POPUP_GET_VALUES. I am giving the table name and field name but the field name shows in display mode i am not able to enter any values in the given popup. What is the problem

    Hi,
    U can go through the FM documentation:
    Dialog box for the display and request of values, without check
    Preliminary comment
    This function module has been released.
    The documentation is being revised so that it conforms to the requirements for released function modules.
    Function
    This function module sends a dialog box and includes the fields specified in the FIELDS interface table. The fields specified in the FIELDS table must be defined in the ABAP Dictionary.
    If no text is specified for a field, the ABAP Dictionary key word is displayed. The key words and fields can be displayed normally or highlighted. You must also define whether the fields are ready for input or not, and whether they are mandatory or not. Defaults can be defined for the fields.
    After the display, the values entered by the user in the date and time fields are checked for formatting and plausability. Otherwise, the values entered are returned to the user unchecked.
    The function module can be used, for example, to:
    Display information
    Request values which do not need to be checked
    Request values to limit data accesses ( from - to)
    Support prototyping
    Examples
    For examples, see the program RSSPO410.
    Notes
    Conversion exits are handled normally.
    References from CURR and QUAN fields are handled if the reference fields are also specified. The display of the reference fields can be suppressed.
    If a currency field (type CURR) is specified, then the field assigned in the ABAP Dictionary for the currency key (type CUKY) must also be specified. The display of the currency key field can be suppressed (if filled initially).
    Dates are checked according to the definition in the user master data.
    Times must be entered using the '__:__:__' template.
    F1 help and F4 help are supported.
    Each field can be specified once only. Repeated fields or field groups are not supported. Table names preceded by an asterisk are an exception to this.
    Only fields wih the ABAP type C, N, T, D, P, or Integer are permitted.
    No updates are performed.
    A maximum of ten fields can be displayed in a dialog box. If there are more than ten fields, a dialog box with a scroll bar is sent. You can use the POPUP_GET_VALUES_SET_MAX_FIELD function module to change the maximum number of fields in a dialog box.
    If you use this function module, remember that ABAP Dictionary tables are sent implicitly using variables. A cross-reference across tables used in programs cannot determine these tables. For this reason, declare the tables under TABLES in the calling program.
    Hope this helps.

Maybe you are looking for