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.

Similar Messages

  • FUNCTION MODULE RSDRC_INFOPROV_READ, HOW TO USE IT

    HI ALL,
               i have to use this function module RSDRC_INFOPROV_READ to access data from a remote cube, can anybody tell me how to use this function module properly. i am using a remote cube ARC_DP  which is developed by our BIW guys, i am passing all the data correctly . where the problem is coming.
    Please tell me if anybody has used this function module.
    Thanks & Regards,,
    poorna

    Hi poorna,
    I think you're talking about RSDRI_INFOPROV_READ and not RSDRC_INFOPROV_READ. RSDRI_INFOPROV_READ is pretty much used by everyone who needs to read data from InfoProviders. 
    For an example on how the function module should be used, please look at SAP's example. Check out program RSDRI_INFOPROV_READ_DEMO in SE38.  Using it is pretty straightforward. If the code in the demo is not clear, please post again and i will help.
    Hope this helps.

  • Hi experts              i have one doubt  while running dunning where can i see previous dunning notices.  vendor /customer

                    hi experts
             i have one doubt  while running dunning where can i see previous dunning notices.  vendor /customer

              hi
               thanks for you answer
    regards
    naveenkumar

  • RFC_ERROR_SYSTEM_FAILURE: The function module "DD_DTEL_GET" cannot be used.

    Hi there,
    I´m trying to launch NWCE 7.1 Webdynpro applications accessing ABAP function with no success.
    The landscape consists of an SAP NWCE 7.1 EHP1 (Trial) and an SAP NW 2004s ABAP (Licensed). NW2004s is configured as Gateway and Message Server for the SLD. I can ping/test JCOs successfully and the SLD seems to work fine. RZ70 and SM59 show no errors in the "R3" side and both systems seem to be well-registered as Technical Systems.
    I have done some simple examples in Developer Studio to ensure that the conection between both stacks is going well, but I have allways the same issue regardless using ARFC/ARFC2, new projects/old existing projects, etc.
    When I test for first time the application, the following exception is thrown:
    Caused by: com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: The function module "DD_DTEL_GET" cannot be used for 'remote' calls.
         at com.sap.mw.jco.MiddlewareJRfc.generateJCoException(MiddlewareJRfc.java:456)
         at com.sap.mw.jco.MiddlewareJRfc$Client.execute(MiddlewareJRfc.java:1416)
         at com.sap.mw.jco.JCO$Client.execute(JCO.java:4168)
         at com.sap.mw.jco.JCO$Client.execute(JCO.java:3596)
         at com.sap.mdi.jco6.Destination.execute(Destination.java:29)
         ... 136 more
    If I refresh the page the last exception disappears and a new one is thrown:
    #2# local/prjWD_Acceso_ABAP/FlightListApp#java.lang.NullPointerException
         at com.sap.mdi.ddtypes.DDDataelement.getDescription(DDDataelement.java:305)
         at com.sap.dictionary.types.mdi.util.TextServices.getDescription(TextServices.java:165)
         at com.sap.dictionary.types.mdi.util.TextServices.getQuickInfo(TextServices.java:145)
         at com.sap.dictionary.runtime.DdDataType$TextService.getQuickInfo(DdDataType.java:220)
         at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.getDisplayText(DataAttributeInfo.java:385)
         at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.getDisplayText(DataAttributeInfo.java:355)
         at com.sap.tc.webdynpro.progmodel.context.MappedAttributeInfo.getDisplayText(MappedAttributeInfo.java:292)
         at com.sap.tc.webdynpro.progmodel.view.ViewElement._getText(ViewElement.java:818)
         at com.sap.tc.webdynpro.progmodel.view.UIElement.getTooltip(UIElement.java:515)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter$OrdinaryField.getTooltip(InputFieldAdapter.java:8201)
         at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.InputFieldAdapter$OrdinaryField.getParameter(InputFieldAdapter.java:7496)
         at com.sap.tc.ls.renderer.ie6.LSInputFieldRenderer.render(LSInputFieldRenderer.java:160)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:152)
         at com.sap.tc.webdynpro.clientimpl.html.client.RenderManager.render(RenderManager.java:519)
         at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:130)
         at com.sap.tc.ls.renderer.ie6.LSColumnLayoutRenderer.renderColumnLayoutCellFragment(LSColumnLayoutRenderer.java:1882)
         at com.sap.tc.ls.renderer.ie6.LSColumnLayoutRenderer.renderColumnLayoutRowFragment(LSColumnLayoutRenderer.java:1715)
         at com.sap.tc.ls.renderer.ie6.LSColumnLayoutRenderer.renderColumnLayoutFragment(LSColumnLayoutRenderer.java:1600)
    Then, editing the application in Dev. Studio, if I delete tables and/or single fields binded to model context, the last exception doesn´t appear any more but the application enter in the catch section executing the BAPI call:
         try
              wdContext.currentBapi_Flight_Getlist_InputElement().modelObject().execute();
         catch(Exception ex)
              wdComponentAPI.getMessageManager().reportException("Execute error."+ex.toString()+ex.getMessage());
              StackTraceElement errores[] = ex.getStackTrace();
              String errorSTR = new String();
              for (int i = 0; i < errores.length; i++){
                   errorSTR += errores<i>.toString() + "
              wdComponentAPI.getMessageManager().reportException(errorSTR);
         wdComponentAPI.getMessageManager().reportSuccess("After catch.");
         // Resynchronise the data in the context with the data in the model
         wdContext.nodeOutput().invalidate();
    The first two exception seem to be related each other, and it is true that FM "DD_DTEL_GET" is not RFC enabled in R3. Should it be RFC enabled?
    As far as I know, one of the JCO conectors is used for retrieving metadata, that is, data related to types, lenghts, etc. The FM "DD_DTEL_GET" is used for that kind of operations and the second exception is related to that aswell (com.sap.mdi.ddtypes.DDDataelement.getDescription).
    I don´t know what else should I test in order to launch an RFC function from WDJ and the trial version is about to expire!
    Does anyone know about any oss note or any other tips related to this issue, please?
    I am going to test the conectivity via Visual Composer and see whether it´s possible :S
    Let me know if you need anymore info about the situation.
    Thanks a lot!

    Hi again,
    The issue hasn´t been solved yet :(.
    After applying Note 1244067 the function module has the RFC flag checked but the Null Pointer exception are still there.
    java.lang.NullPointerException
    at com.sap.mdi.ddtypes.DDDataelement.getReptext(DDDataelement.java:166)
    at com.sap.dictionary.types.mdi.util.TextServices.getColumnLabel(TextServices.java:115)
    at com.sap.dictionary.runtime.DdDataType$TextService.getColumnLabel(DdDataType.java:212)
    at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.getDisplayText(DataAttributeInfo.java:379)
    at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.getDisplayText(DataAttributeInfo.java:355)
    at com.sap.tc.webdynpro.progmodel.view.ViewElement._getText(ViewElement.java:818)
    at com.sap.tc.webdynpro.clientserver.uielib.standard.impl.Caption.getText(Caption.java:369)
    at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TableAdapter$HeaderCell.getHeaderText(TableAdapter.java:11441)
    at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TableAdapter$HeaderCell.getParameter(TableAdapter.java:11043)
    at com.sap.tc.ls.renderer.ie6.LSSapTableHeaderCellRenderer.renderSapTableHeaderCellFragment_iteration(LSSapTableHeaderCellRenderer.java:2421)
    at com.sap.tc.ls.renderer.ie6.LSSapTableRowRenderer.renderSapTableRowFragment(LSSapTableRowRenderer.java:223)
    at com.sap.tc.ls.renderer.ie6.LSSapTableRowRenderer.render(LSSapTableRowRenderer.java:122)
    at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:152)
    at com.sap.tc.webdynpro.clientimpl.html.client.RenderManager.render(RenderManager.java:519)
    at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:130)
    at com.sap.tc.ls.renderer.ie6.LSSapTableDefaultBodyRenderer.renderSapTableDefaultBodyFragment(LSSapTableDefaultBodyRenderer.java:301)
    at com.sap.tc.ls.renderer.ie6.LSSapTableDefaultBodyRenderer.render(LSSapTableDefaultBodyRenderer.java:119)
    at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:152)
    at com.sap.tc.webdynpro.clientimpl.html.client.RenderManager.render(RenderManager.java:519)
    at com.sap.tc.webdynpro.clientimpl.html.renderer.lightspeed.base.LSRenderManager.render(LSRenderManager.java:130)
    Language resources data in the webdynpro are: Current locale = "es", Default VM locale = "es_ES". The backend default language is "EN". Could this be a problem in order to retrieve descriptions or any other language dependent data?
    Thank you
    Vicente.

  • Error while using Function module SPELL_AMOUNT with arabic language AR

    Hi ,
    When i am trying to convert the number to words, using function module SPELL_AMOUNT with arabic language(AR),following abend message is coming and FM is getting abended.
    Entry AR 0 1 in table T015Z does not have a delimiter (
    Can you please provide me how to overcome this error?
    Thanks & Regards
    Seshagiri.

    Hi Santosh,
    Thanks for quick inputs.
    And amount is not having any delimitors.
    I have checked in table T015Z and it has entries with AR as SPRAS.
    All entries are having ':' at the beginning of the arabic words,and there is no single entry with ';'.
    All entries with EN as SPRAS are having delimiters ';' at the end of the words.
    Numbers are correctly converted to words in english,but abending in arabic.
    Any idea please.
    Thanks & Regards
    Seshagiri.

  • Function module SPELL_AMOUNT

    Hi All,
           I am using this function module "SPELL_AMOUNT". But this function module works with the customized tables and it gives amount into Millons and billons but i want in crores.
    I am not getting how to configure because there is difference between crores and millions & billions in terms of figure.
    I have also created my own function module "Y_SPELL_AMOUNT" But i want to use the standard one.
    Please help.
    Regards,
    Vikas Madaan

    Hi,
    Please have a look at this.
    Re: Covert INR into words
    Cheers
    Vinod

  • What are functional modules? why we use them?

    HI all,
    Please explain what are the functional modules? why we use them? I am talking in reference to SAP HR.
    Thanks,
    Rashmi

    Hi SAP Gurus,
    as now i got some idea that SAP has provided lot of funtional modules and also we can create our own function modules,
    1, can any one tell with an example when and at what cases this funtional modules are made use of,  and how will we come to know which funtional module has to be made use of and  for which specific purposes.
    2, do you mean to say SAP has provided many funtional modules but they are in Dormant stage untill activated or made use of.
    3. Is developing funtional module mainly ABAPers work or could be done by Funtional person alltogether (in case of using the existing FMs
    4, When and how this FMs work, what is the trigger point do we have to run this when required, if so how
    5, what is the difference Between FMs and UserExits
    Can anyone throw some light on this with an example,
    Points for sure for Suitable answers
    Thanks and Regards
    Sathish
    Edited by: sathish kumar on May 5, 2008 7:43 PM

  • Regarding function module spell_amount

    hi
    i am working with the function module spell_amount.
    the outcome that i am getting is different when compared with the amount in words and figures
    ex : amt is 1,800.00
    in words : one hundred eighty thousand

    check this code:
    v_i_amount = tmp_amt.
    call function 'HR_IN_CHG_INR_WRDS'
      exporting
        amt_in_num               = v_i_amount
    IMPORTING
       AMT_IN_WORDS             =  amt_in_words
    EXCEPTIONS
       DATA_TYPE_MISMATCH       = 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..
    Ur FM
    TABLES SPELL.
    DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
    DATA : PAMOUNT LIKE SPELL-NUMBER VALUE '1234510'.
    SY-TITLE = 'SPELLING NUMBER'.
    PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
    WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
    FORM SPELL_AMOUNT USING PWRBTR PWAERS.
    CALL FUNCTION 'SPELL_AMOUNT'
    EXPORTING
    AMOUNT = PAMOUNT
    CURRENCY = PWAERS
    FILLER = SPACE
    LANGUAGE = 'E'
    IMPORTING
    IN_WORDS = T_SPELL
    EXCEPTIONS
    NOT_FOUND = 1
    TOO_LARGE = 2
    OTHERS = 3.
    ENDFORM. " SPELL_AMOUNT

  • I am a new Mac user and I bought Pages and have no Idea where it is or how to use it?

    I am a new Mac user and I bought the Pages APP and have no Idea where it is or how to use it? If I go into Iwork and click Pages it shows 3 documents that I have creates. THe only option I have is to download it. Then If I click it it opend in an app called Preview.
    It is in me apps folder in Itunes. I expected it to be an app in my computer.

    Pages for IOS and Pages for OSX are 2 different programs, buying one doesn't get you the other, go to the App Store (not iTunes) on your Mac and buy it.

  • 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

  • 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

  • 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

  • Does R3 have a report or function module to process payments requests?

    HI All,
    I want R3 report or function module which will receive payment requests from vendor or customer and then procees it depending on the data.
    Does R3 have such a report or function module to process payments requests?
    Please help me.
    Thanks.

    yes SAP as got a function for this
    you can you use trannsaction code /nF111
    for these purposes

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

Maybe you are looking for

  • HP Presario 700C headphone output not working!

    Hello, I installed Windows XP on my HP Presario 700c laptop, working perfectly.  the only  thing that isn't working is the headphone output on the laptop.... When i plugin my headphone i do not get any sound, the sound still goes to the laptop speake

  • Loss of bluetooth range on mac mini (lion x/memory upgrade)

    I have a mac mini 2009. I just upgraded to lion x and added 3GB of RAM.  For some reason my bluetooth mouse and keyboard have lost their range.  They both work but I have to use them within a foot of the computer.  Ive replaced the batteries.. any he

  • Duel monitors for Lightroom

    How can I use a 2006 iMac as second monitor for 2007 iMac? Early 2006 w/osx10.6.8-mid 2007 w/osx10.9.1. 

  • Acrobat printing problems (solved)

    Hi Folk I'm getting on well with Arch apart from one problem, I can not print from Acrobat reader, it accepts the command and does precisely nothing, the jobs are appearing in cups but not being printed, I can print from Open Office and test print fr

  • Is it possible to use Acrobat link tool to link to a directory?

    I am wondering if it is possible to use the Acrobat link tool (advanced editing) to link to a directory?