Passing Currency field to external subroutine from script

Hi,
            I am passing one currency field to external subroutine from script. In subroutine we can get that currency in character format. I want to convert that into currency format. how can i do that?
thnk u

easy conversion:
number = character_parameter

Similar Messages

  • External subroutine in script

    Hi,
    Could any one tell me is that possible to use external subroutine.  Actually my script is the output of ML83. Driver program which passing the info. to script is Std one.  Is there any filed relavent to this driver program is updating when 'Service entry is revoked'.  Plz help me out... this is very urgent.
    Thanks
    Sai.

    Hi,
    'Service entry is revoked' means blocked or released..
    Sorry..I am not an expert on Service entry..But I am trying to search for the fields which you are looking for..
    Thanks,
    Naren

  • Error while calling Subroutine from Script

    HI Friends,
    I am getting a short dump whilecalling a suboutine from Script.
    Please suggest if am wrong with below code
    /: PERFORM GET_ADDRESS IN PROGRAM ZSUBROUTINES
    /: USING &MHND-KUNNR&
    /: CHANGING &ADRS-LINE0&
    /: CHANGING &ADRS-LINE1&
    /: ENDPERFORM
    All above fields are available in script window
    In the program
    FORM get_address    TABLES in_tab STRUCTURE itcsy
                                       out_tab stucture itcsy.
    ENDFORM.
    Thanks

    HI,
    Your code is correct, in the FORM and ENDFORM in the program, read the INPUT table and get the values and write your logic using these values and send back the values to the SCRIPT using the OUTTABLE. here you need to use the MODIFY statment for the outtable using Sy-TABIX.
    Regards
    Sudheer

  • Run external executable from script

    Hi,
    it's possible launch an external executable (Es. .\smsclient.exe "3201234567" "SMSClient.exe Tested on %date% at %time%")  from script .aef (not from CAD)?

    Hi Anthony,
    i have developed a Java class how you said me. I receive the sms, if run application from Eclipse. But if I invoke this class from script .aef not operate. For an simply example i have also created an Notepad example but not open pop up with notepad but also in this case if I run application from Eclipse all correctly function.
    Above there is my script and java source for Notepad example.
    Have you any suggestion?
    ***************************************SCRIPT testNOTEPAD.AEF********************************
    Start
    Do
              testpackage.Notepad AA = new testpackage.Notepad();
    End
    In console i read this output:
    Begin Debugging C:\UCCX_Script_Esempi\TestNotepad.aef...
    when i stop debug:
    Done Debugging C:\UCCX_Script_Esempi\TestNotepad.aef.
    but Nptepad.exe not running
    *******************************************JAVA SOURCE ********************************************
    package testpackage;
    import java.io.*;
    public class Notepad {
          public static void Main(String args[]) {
               try {
                   Runtime rt = Runtime.getRuntime();
                   Process pr = rt.exec("notepad.exe");
                   BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
                   String line=null;
                   while((line=input.readLine()) != null) {
                       System.out.println(line);
                   int exitVal = pr.waitFor();
                   System.out.println("Exited with error code "+exitVal);
               } catch(Exception e) {
                   System.out.println(e.toString());
                   e.printStackTrace();

  • Is it possible to pass a field symbol as parameter from any method of view?

    Hi
    Is it possible to pass a field symbol as an importing parameter to teh globally declared attribute??

    While it is true that you can pass field symbols, they must be fully typed at the time you pass them  and they will be passed by value, not by reference. If you want to pass generically typed variables use a data reference (TYPE REF TO) instead.

  • Very urgent : Problem in currency field while downloading file from excel.

    I downloaded a excel file to my ABAP program.It contains a currency field which has comma in it. When i do operations on the currency field it says unable to interpret the number.Can anybody help me on this.
    Message was edited by:
            Bharath Srinivas
    Message was edited by:
            Bharath Srinivas

    Hi,
    Try this. In ur excel right click on that column wher u have the currency, go to format cells and there uncheck the box which shows 'Show tousands (,) seperator).That shud solve the problem.
    Thanks
    Vasudha

  • Calling subroutine from scripts

    I am calling a subroutine form a standard text, the subroutine is getting called but the input table is comming empty.
    can any one please advise me what could be the problem.
    /:PERFORM GET_APP_DATA IN PROGRAM YHR_APP_DATA
    /:USING &P0001-PERNR&
    /:CHANGING &GRADE&
    /:ENDPERFORM

    Check this sample code...may be it will help u to identify the prob...
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY u2018PAGEu2019.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018NEXTPAGEu2019.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY u2018BARCODEu2019.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = u2018|u2019. "First page
    ELSE.
    OUT_PAR-VALUE = u2018||u2019. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = u2018Lu2019. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    Regards,
    JOy.

  • Script external subroutine for multiple fileds display

    Hi,
    can anybody tell
    how to write external subroutine in script.
    i want to display multiple fields data in script by using external subroutine.
    Regards,
    Kumar.

    HI,
    You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM

  • Error while sending data to a subroutine in script

    Hi,
      While passing a currency field for calculation to a subroutine through perform statement iam getting runtime error saying "unable ti interpret 5000.00 as a number. 5000.00 is nothing but the first currency value which iam sending for calculation.in the code the error is raised on the bold line .
    rf140-wrshb has value 5000.00 .the code which i have written in subroutine is as follows.
    READ TABLE I_IN WITH KEY NAME = 'RF140-WRSHB'.
    MOVE I_IN-VALUE TO LV_SUM1. 
    CLEAR I_IN.
    DATA: SUM_C TYPE N.
      SUM1 = SUM1 + LV_SUM1.
      READ TABLE I_OUT WITH KEY NAME = 'LV_BALANCE'.
    MOVE SUM1 TO I_OUT-VALUE.
      MODIFY I_OUT TRANSPORTING VALUE WHERE NAME = 'LV_BALANCE'.
      CLEAR I_OUT.
    lv_balance is the one which receives the output value.
    can anyone tell me what is the mistake i have done nd how to rectify it.
    Thanks,
    Rose.

    Hi,
    I have done something similar so below is the code while passing currency fields to subroutines:
    Actually I was retrieving 2 fields from scripts and then substract them and then send back the result to the script. Hope it works out for you, try it out and REWARD POINTS IF HELPFUL!! (also for your prev post!!)
    FORM get_pay TABLES in_tab STRUCTURE itcsy out_tab STRUCTURE itcsy.
      DATA: lv_var(255)  TYPE c, "dmbtr,
            lv_var1(255) TYPE c, "qsshb,
            lv_var2(255) TYPE c, "dmbtr.
            var(20) TYPE c,
            var1(25) TYPE c,
            var2(25) TYPE c,
            var3(25) TYPE c,
            var4(25) TYPE c,
            var5(25) TYPE c,
            var6(25) TYPE c,
            vari TYPE ztemp,
            vari2 TYPE ztemp,
            vari3 TYPE ztemp.
      DATA: lv_var4 TYPE dmbtr,
            lv_var5 TYPE qsshb,
            lv_var6 TYPE dmbtr,
            len TYPE i,
            len1 TYPE i,
            dot TYPE c.
      READ TABLE in_tab WITH KEY 'REGUP-DMBTR'.
      IF sy-subrc EQ 0.
        lv_var = in_tab-value.
        len = STRLEN( lv_var ).
        len1 = len - 3.
        dot = lv_var+len1(1).
        IF dot = ','.
          SPLIT lv_var AT ',' INTO var1 var2.
          REPLACE '.' IN var1 WITH ','.
          CONCATENATE '.' var2 INTO var2.
          CONCATENATE var1 var2 INTO var.
          CONDENSE var.
          vari = var1.
          SHIFT vari LEFT DELETING LEADING '0'.
          CONCATENATE vari var2 INTO vari.
          lv_var4 = vari.
        ELSE.
          SPLIT lv_var AT '.' INTO var1 var2.
          REPLACE '.' IN var1 WITH ','.
          CONCATENATE '.' var2 INTO var2.
          CONCATENATE var1 var2 INTO var.
          CONDENSE var.
          vari = var1.
          SHIFT vari LEFT DELETING LEADING '0'.
          CONCATENATE vari var2 INTO vari.
          lv_var4 = vari.
        ENDIF.
        CLEAR: dot, len, len1.
      ENDIF.
      lv_var = vari.
      CALL FUNCTION 'CHAR_NUMC_CONVERSION'
        EXPORTING
          input   = lv_var
        IMPORTING
          numcstr = lv_var4.
      READ TABLE in_tab WITH KEY 'REGUP-QBSHB'.
      IF sy-subrc EQ 0.
        lv_var1 = in_tab-value.
        len = STRLEN( lv_var1 ).
        len1 = len - 3.
        dot = lv_var1+len1(1).
        IF dot = ','.
          SPLIT lv_var1 AT ',' INTO var3 var4.
          REPLACE '.' IN var3 WITH ','.
          CONCATENATE '.' var4 INTO var4.
          CONDENSE var.
          vari2 = var3.
          SHIFT vari2 LEFT DELETING LEADING '0'.
          CONCATENATE vari2 var4 INTO vari2.
          lv_var6 = vari2.
        ELSE.
          SPLIT lv_var1 AT '.' INTO var3 var4.
          REPLACE '.' IN var3 WITH ','.
          CONCATENATE '.' var4 INTO var4.
          CONDENSE var.
          vari2 = var3.
          SHIFT vari2 LEFT DELETING LEADING '0'.
          CONCATENATE vari2 var4 INTO vari2.
          lv_var6 = vari2.
        ENDIF.
        CLEAR: dot, len, len1.
      ENDIF.
      lv_var1 = vari2.
      CALL FUNCTION 'CHAR_NUMC_CONVERSION'
        EXPORTING
          input   = lv_var1
        IMPORTING
          numcstr = lv_var6.
      lv_var5 = lv_var4 - lv_var6.
      lv_var2 = lv_var5.
      var = lv_var5.
      WRITE lv_var5 TO var CURRENCY 'SG'.
      READ TABLE out_tab WITH KEY 'LV_PAY'.
      IF sy-subrc EQ 0.
        out_tab-value = var.
        MODIFY out_tab INDEX 1.
      ENDIF.
    ENDFORM.                    "get_PAY
    Regards,
    Narendra.

  • Custom (Z fields) to External Tax systems

    Hello,
    I have a requirement to pass custom attributes (Z fields) to External Tax calculator Sabrix from CRM.  Does anyone have a solution for this?
    I tried searching some notes but without luck.
    Thanks for your help.
    Regards,
    Padma

    Hi,
    Originally it was not possible but when I went to SAP, they provided provision to pass Z fields to external tax.
    So you have to do the following: (Assumption: Ofcourse fields have to be part of pricing field catalog)
    1. Add the Z field to the attribute list of the tax routines (500 / 300 / 501 / 301).
    2.  Implement the CRM_COND_COM_BADI (or optimizing pricing badi) for the fields as you do for any Z field in pricing field catalog.
    3. Add these fields to the structure "BBPS_TAX_CAL_ITEM_IN00".  (This is part of the RFC call RFC_CALCULATE_TAXES_DOC that triggers external tax).
    You need to restart the external tax connection and VMC reset after this.
    Let me know if this helps.
    Thanks,
    Padma

  • Stock account currency field in MB5L report

    Hi!
    can any one tell me in MB5L report for field materials currency and stock account currency, from system will pick up the values?
    I think materials currency field will pick up from GL accounts?
    But stock account currency, from where it will pick up value?
    regs,
    ramesh b

    Hi!
    both are not GL account balances.
    I have studied the report and understood.
    the material currency field: just it will take total stock avialable * std price/MAV price ( it will be equal to value in material master, MB5B, MB51 )
    the stock account currency field: it will take GL account balance via valuation class ( OBYC setting BSX)
    Here for example if you select only one material in MB5L report , it won't show the GL balance pertaining to that material, it will simply show the total GL balances that means system won't check material number existed in line items ( BSEG table).
    any way thanks for your inputs.
    regs,
    ramesh b

  • Currency field in PERFORM, -- SAP Script

    Hi,
    I am calling a zperform from SAP Script and sending two currency values as input and after doing subtraction , I want the result value from the Zperform.
    When I send 1,000,000.00 as input to PERFORM. I am getting a dump when I try to assign the in_par-value to a currency field in FORM.
    The error is "Unable to interpret "1,000,000.00 " as a number." Please let me know how to handle this case. I mean is there any converstion routine to convert the external currency value to internal format?

    You must remove the commas.
    Warren

  • How to call a subroutine from sap script

    hi friends,
    Can anybody tell me How to call a subroutine from sap script .
    thanks n regards .
    Mahesh

    hi..
    Calling ABAP Subroutines: PERFORM 
    You can use the PERFORM command to call an ABAP subroutine (form) from any program, subject to the normal ABAP runtime authorization checking. You can use such calls to subroutines for carrying out calculations, for obtaining data from the database that is needed at display or print time, for formatting data, and so on.
    PERFORM commands, like all control commands, are executed when a document is formatted for display or printing. Communication between a subroutine that you call and the document is by way of symbols whose values are set in the subroutine.
    The system does not execute the PERFORM command within SAPscript replace modules, such as TEXT_SYMBOL_REPLACE or TEXT_INCLUDE_REPLACE. The replace modules can only replace symbol values or resolve include texts, but not interpret SAPscript control commands.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    INVAR1 and INVAR2 are variable symbols and may be of any of the four SAPscript symbol types.
    OUTVAR1 and OUTVAR2 are local text symbols and must therefore be character strings.
    The ABAP subroutine called via the command line stated above must be defined in the ABAP report prog as follows:
    FORM <form> TABLES IN_TAB STRUCTURE ITCSY
    OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    The values of the SAPscript symbols passed with /: USING... are now stored in the internal table IN_TAB . Note that the system passes the values as character string to the subroutine, since the field Feld VALUE in structure ITCSY has the domain TDSYMVALUE (CHAR 80). See the example below on how to access the variables.
    The internal table OUT_TAB contains names and values of the CHANGING parameters in the PERFORM statement. These parameters are local text symbols, that is, character fields. See the example below on how to return the variables within the subroutine.
    From within a SAPscript form, a subroutine GET_BARCODE in the ABAP program QCJPERFO is called. Then the simple barcode contained there (‘First page’, ‘Next page’, ‘Last page’) is printed as local variable symbol.
    Definition in the SAPscript form:
    /: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
    /: USING &PAGE&
    /: USING &NEXTPAGE&
    /: CHANGING &BARCODE&
    /: ENDPERFORM
    / &BARCODE&
    Coding of the calling ABAP program:
    REPORT QCJPERFO.
    FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA: PAGNUM LIKE SY-TABIX, "page number
    NEXTPAGE LIKE SY-TABIX. "number of next page
    READ TABLE IN_PAR WITH KEY ‘PAGE’.
    CHECK SY-SUBRC = 0.
    PAGNUM = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY ‘NEXTPAGE’.
    CHECK SY-SUBRC = 0.
    NEXTPAGE = IN_PAR-VALUE.
    READ TABLE OUT_PAR WITH KEY ‘BARCODE’.
    CHECK SY-SUBRC = 0.
    IF PAGNUM = 1.
    OUT_PAR-VALUE = ‘|’. "First page
    ELSE.
    OUT_PAR-VALUE = ‘||’. "Next page
    ENDIF.
    IF NEXTPAGE = 0.
    OUT_PAR-VALUE+2 = ‘L’. "Flag: last page
    ENDIF.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    regards,
    veeresh

  • Looking for a way to pass parameter to external list from infopath

    Hey, i have a Sharepoint 2010 list for which I want to create Infopath form. I have an external content type and external list based on it.
    I want to prepopulate some fields in my Sharepoint list with data from external list. I tried to use external list as a secondary data source and query it for needed values. The issue I encounter is that my ECT has a finder with filter and I can't figure
    out how to pass a value to this filter within infopath.
    How can it be done with infopath? How can I pass the filter value to the external list using Infopath?

    Hi,
    According to your post, my understanding is that you wanted to pass parameter to external list from infopath.
    You need to query the external list from InfoPath using coding and CAML Query.
    Here is a similar thread for your reference:
    http://sharepoint.stackexchange.com/questions/33575/filtering-sharepoint-external-list-bcs-from-infopath
    Thanks,
    Linda Li
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • Short dump while reading a currency field from Flat file into internal tabl

    Hi,
    I am getting a short dump........saying number conversion dump (while reading a currency value into field in internal table from a fixed lenght flat file).........
    Do I need to use a string variable to get the value from flat file or how ??
    Please suggest.

    Santosh,
    Thanks for your inputs,
    But my internal table type is of DEC (5,2) , I am getting that... it needs to be of type 'C'. Can you suggest.
    Ex :
    MOVE wa_temp-infile_string+106(8)  TO wa_item-QT_PERCENT
    This didnt work
    so i tried moving into a seperate variable
    MOVE wa_temp-infile_string+106(8)  TO v_percent.
    and then write to
    WRITE v_percent to  wa_item-QT_PERCENT.

Maybe you are looking for