Perform syntax in script

Hi all,
I want to display user name using subroutines in script..my code is not working.. pls check and let me know the correct way.
/: PERFORM get_user IN PROGRAM ZTEST USING &UNAME&
/: ENDPERFORM.
/: &UNAME&.
REPORT ZTEST.
FORM GET_USER USING UNAME.
UNAME = SY-UNAME.
ENDFORM.
thanks
mallika

Hi,
If  FROM_OBJ is the form being called then it should look like:
FORM get_obj TABLES in_tab STRUCTURE itcsy
                    out_tab STRUCTURE itcsy.
Since you know the parameters you are passing, use that as an index to retrieve/update the corresponding value of the variable.
e..g READ TABLE in_tab Index 1.
Similarly use 'Modify' to update the value of the variable you are interested in out_tab.
I hope this helps,
Regards
Raju Chitale

Similar Messages

  • How to write a perform in Sap Script

    Hi Guys,
    Can anyone let me know how to write a perform statement in Sap Script.
    Thanks,
    Ramesh

    I just took this example from SAP Help
    =======================================
    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.

  • Perform in SAP script

    how should i call a perform statement in SAP script
    I have been trying to use it in sap script but it is giving me a dump
    the code extract looks as follows:
    iN DRIVER'S PROGRAM
    FORM POP_ADD USING V_parvw like vbpa-parvw.
    READ TABLE i_addr WITH KEY WF_PARVW = 'WE'.
    ENDFORM.
    IN SAP SCRIPT
    /:   DEFINE &V_PARVW& = &VBPA-PARVW&          
    /:   PERFORM POP_ADD IN PROGRAM ZSD_SCR_INVOICE
    /:   USING            &V_PARVW&               
    /:   ENDPERFORM                               
    /    &i_addr-WF_PARVW&                        
    IT IS GIVING SHORT DUMP SAYING
    In a subroutine call, there were more parameters than in the                  
    routine definition.                                                           
    Error in ABAP application program.                                                                               
    The current ABAP program "ZSD_SCR_INVOICE " had to be terminated because one of
    the                                                                          
    statements could not be executed.                                                                               
    This is probably due to an error in the ABAP program.

    Hi,
    The PERFORM in your program should have the following syntax:
    FORM POP_ADD TABLES IN_TAB  STRUCTURE ITCSY
                        OUT_TAB STRUCTURE ITCSY.
    READ TABLE in_tab WITH KEY 'V_PARVW'.
    CHECK sy-subrc EQ 0.
    ENDFORM.
    Take a look at http://www.sapfans.com/forums/viewtopic.php?t=131082&highlight=perform for an example of the required syntax.
    Hope this helps.
    Regards

  • Performance syntax loop at  and read table

    in the routine , for reading one line in a internal table  , the syntaxe
      loop at  xxx where   and read tabl exxx   with key     XXXX
    has a great difference on performance or not?

    Loop at statement is used only for processing multiple records.Read table is used for reading a particluar record of an internal table.If you just need to check whether record exists in internal table, use can sort and use binary search with TRANSPORTING NO FIELDS addition. Also, try to use field symbols so that performance is increased.

  • Perform - syntax

    Hi ,
        Iam trying to write an extractor for open and closed items ie form BSAD and BSID .
    So i have written the logic .when i tryed to modularise the code .the function module is not acteping the perform statment
    Ie when i tryed to put the logic in to a perfoem its giving a syntax error like
    "Field "E_T_DATA" is unknown. It is neither in one of the specified          
    tables nor defined by a "DATA" statement . . . . . . . . . .     "     
    can you please provide me a solution for this .
    Thanks ,
    Sriram.

    Hi ,
      As you have asked for below i have attached the code .
    PERFORM FETCH_BSID .
    *PERFORM FETCH_BSAD TABLES E_T_DATA.
    this are the two perform iam trying to create just to moduralize the code .it it showing an error like .E_T_DATA is not defined which is the final extract structure .
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA TYPE  ZBIAR_EXTRACTOR_AR1 OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    *& Function Module  : Z01_FBIWI_AR_EXTRACTOR                               *
    *& Title            : Extractor Industrial - AR                            *
    *& Programmer       : TSHANKAR                                             *
    *& Date             : 16/11/2007                                           *
    *& Transaction      :                                                      *
    *& Description      : This extractor fetches data fetches data from        *
                        tables BSID ,BSAD, KNVP,Z02TOTC_AR_DOC_H for closed  *
                         and open item and populate into final extract       *
                         structure FOR CLOSED                                *
    Modification Log:                                                        *
    Date      Author       Corr. #      Description                          *
    mm/dd/yy  SAPLOGONNAM  xxxxxxxxxx   Initial program development          *
              TSHANKAR                  Changes made to the application      *
                                        path                                 *
    **DATA DECLERATION
    Maximum number of lines for DB table
      STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    counter
               S_COUNTER_DATAPAKID LIKE SY-TABIX,
    Cursor
               S_CURSOR TYPE CURSOR,
               S_CURSOR1 TYPE CURSOR.
    DATA : FLAG_BSID TYPE I VALUE 0.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF I_INITFLAG = SBIWA_C_FLAG_ON.
        APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
    Fill parameter buffer for data extraction calls
        S_S_IF-REQUNR    = I_REQUNR.
        S_S_IF-DSOURCE = I_DSOURCE.
        S_S_IF-MAXSIZE   = I_MAXSIZE.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
        APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
      ELSE.           "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
        IF S_COUNTER_DATAPAKID = 0.
    Fill range tables BW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'BUKRS'.
            MOVE-CORRESPONDING L_S_SELECT TO R_BUKRS.
            APPEND R_BUKRS.
          ENDLOOP.
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'KUNNR'.
            MOVE-CORRESPONDING L_S_SELECT TO R_KUNNR.
            APPEND R_KUNNR.
          ENDLOOP.
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'GJAHR'.
            MOVE-CORRESPONDING L_S_SELECT TO R_GJAHR.
            APPEND R_GJAHR.
          ENDLOOP.
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CPUDT'.
            MOVE-CORRESPONDING L_S_SELECT TO R_CPUDT.
            APPEND R_CPUDT.
            ENDLOOP.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
            OPEN CURSOR WITH HOLD S_CURSOR FOR
                  SELECT MANDT KUNNR WRBTR XREF3 BUKRS BELNR GJAHR BUZEI WAERS BLDAT
                         BUDAT BLART XBLNR SHKZG DMBTR GSBER ZFBDT ZLSCH ZUONR ZTERM
                         KIDNO XREF1 XREF2 SGTXT MABER HKONT PRCTR KOSTL AUFNR PROJK
                         VBUND
                          FROM BSID WHERE  BUKRS IN R_BUKRS AND KUNNR IN R_KUNNR AND
                                                            GJAHR IN R_GJAHR AND
                                                            CPUDT IN R_CPUDT .
              OPEN CURSOR WITH HOLD S_CURSOR1 FOR
                  SELECT MANDT KUNNR WRBTR XREF3 BUKRS BELNR GJAHR BUZEI WAERS BLDAT
                         BUDAT BLART XBLNR SHKZG DMBTR GSBER ZFBDT ZLSCH ZUONR ZTERM
                         KIDNO XREF1 XREF2 SGTXT MABER HKONT PRCTR KOSTL AUFNR PROJK
                         VBUND
                          FROM BSAD WHERE  BUKRS IN R_BUKRS AND KUNNR IN R_KUNNR AND
                                                            GJAHR IN R_GJAHR AND
                                                            CPUDT IN R_CPUDT .
          ENDIF.               "First data package ?
    Fetch records into interface table.
          FETCH NEXT CURSOR S_CURSOR
                     APPENDING CORRESPONDING FIELDS
                     OF TABLE IT_BSID
                     PACKAGE SIZE S_S_IF-MAXSIZE.
         FETCH NEXT CURSOR S_CURSOR1
                    APPENDING CORRESPONDING FIELDS
                    OF TABLE IT_BSAD
                    PACKAGE SIZE S_S_IF-MAXSIZE.
          IF SY-SUBRC <> 0.
            CLOSE CURSOR S_CURSOR.
            RAISE NO_MORE_DATA.
          ENDIF.
          S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
        ENDIF.                  "Initialization mode or data extraction ?
    PERFORM FETCH_BSID .
    *PERFORM FETCH_BSAD TABLES E_T_DATA.
    *FORM FETCH_BSID TABLES P_E_T_DATA type  ZBIAR_EXTRACTOR_AR2.
          SORT IT_BSID BY KUNNR BUKRS GJAHR .
       CHECK  NOT IT_BSID[] IS INITIAL .
       PERFORM FILL_Z02TOTC_AR_DOC_H.
       PERFORM FILL_KNVP.
       LOOP AT IT_BSID .
         READ TABLE IT_Z02TOTC_AR_DOC_H WITH KEY BELNR = IT_BSID-BELNR
                                                 BUKRS = IT_BSID-BUKRS
                                                 GJAHR = IT_BSID-GJAHR
                                                 BUZEI = IT_BSID-BUZEI.
         LOOP AT IT_Z02TOTC_AR_DOC_H FROM SY-TABIX.
           IF SY-SUBRC IS INITIAL .
             IF IT_Z02TOTC_AR_DOC_H-BELNR <> IT_BSID-BELNR
              OR IT_Z02TOTC_AR_DOC_H-BUKRS <> IT_BSID-BUKRS
              OR IT_Z02TOTC_AR_DOC_H-GJAHR <> IT_BSID-GJAHR.
              OR IT_Z02TOTC_AR_DOC_H-BUZEI <> IT_BSID-BUZEI.
               EXIT .
             ENDIF .
             READ TABLE IT_KNVP WITH KEY KUNNR = IT_BSID-KUNNR
                                         VKORG = IT_BSID-BUKRS.
             IF SY-SUBRC IS INITIAL.
               MOVE-CORRESPONDING IT_KNVP TO E_T_DATA.
               MOVE-CORRESPONDING IT_Z02TOTC_AR_DOC_H TO E_T_DATA.
               MOVE-CORRESPONDING IT_BSID TO E_T_DATA.
               APPEND E_T_DATA.
             ENDIF .
           ENDIF.
         ENDLOOP .
       ENDLOOP .
    *FREE : IT_BSID ,IT_Z02TOTC_AR_DOC_H ,IT_KNVP.
    *ENDFORM.
      ENDFUNCTION.  " End of Function Z01_FBIWI_AR_EXTRACTOR
    **form for fetching cleared entries
    *FORM FETCH_BSAD using  P_E_T_DATA LIKE ZBIAR_EXTRACTOR_AR2
                   changing e_t_data type p_e_t_data.
          SORT IT_BSAD BY KUNNR BUKRS GJAHR .
       CHECK  NOT IT_BSAD[] IS INITIAL .
       PERFORM FILL_Z02TOTC_AR_DOC_H_BSAD.
       PERFORM FILL_KNVP_BSAD.
       LOOP AT IT_BSAD .
         READ TABLE IT_Z02TOTC_AR_DOC_H_BSAD WITH KEY BELNR = IT_BSAD-BELNR
                                                      BUKRS = IT_BSAD-BUKRS
                                                      GJAHR = IT_BSAD-GJAHR
                                                      BUZEI = IT_BSAD-BUZEI.
         LOOP AT IT_Z02TOTC_AR_DOC_H_BSAD FROM SY-TABIX.
           IF SY-SUBRC IS INITIAL .
             IF IT_Z02TOTC_AR_DOC_H_BSAD-BELNR <> IT_BSAD-BELNR
              OR IT_Z02TOTC_AR_DOC_H_BSAD-BUKRS <> IT_BSAD-BUKRS
              OR IT_Z02TOTC_AR_DOC_H_BSAD-GJAHR <> IT_BSAD-GJAHR.
              OR IT_Z02TOTC_AR_DOC_H-BUZEI <> IT_BSID-BUZEI.
               EXIT .
             ENDIF .
             READ TABLE IT_KNVP_BSAD WITH KEY KUNNR = IT_BSAD-KUNNR
                                              VKORG = IT_BSAD-BUKRS.
             IF SY-SUBRC IS INITIAL.
               MOVE-CORRESPONDING IT_KNVP_BSAD TO P_E_T_DATA.
               MOVE-CORRESPONDING IT_Z02TOTC_AR_DOC_H_BSAD TO P_E_T_DATA.
               MOVE-CORRESPONDING IT_BSAD TO P_E_T_DATA.
               APPEND P_E_T_DATA.
             ENDIF .
           ENDIF.
         ENDLOOP .
       ENDLOOP .
    *FREE : IT_BSAD ,IT_Z02TOTC_AR_DOC_H ,IT_KNVP.

  • Please help for using perform in SAP script

    As subject.
    My sap script code as below:
    /: PERFORM GET_CHAMT_DATE IN PROGRAM ZRAP004
    /:USING    &SPELL-WORD&
    /:CHANGING &SPELL-WORD&
    /:ENDPERFORM
    My program ZRAP004 code as below:
    FORM get_chamt_date USING u_iword TYPE spell-word
                       CHANGING u_oword TYPE spell-word.
    CONCATENATE u_iword '&#20803;&#25972;'(t01) INTO u_oword.
    endform.
    This form is for check printing.
    It's by standard function 'F110' to excute check printing.
    But when i finished this transaction. System return error message as below:
    <b>This routine contains 2 formal parameters, but the current call
    contains 4 actual parameters.</b>
    Please help. Thanks a lot!!

    Hiii
    PERFORM CDE_CENT IN PROGRAM ZKRPMM_PERFORM_Z1MEDRUCK
    /:USING &EKKO-EBELN&
    /:CHANGING &CDECENT&
    /:ENDPERFORM
    The report :
    REPORT zkrpmm_perform_z1medruck .
    DATA : BEGIN OF it_input_table OCCURS 10.
           INCLUDE STRUCTURE itcsy.
    DATA : END OF it_input_table.
    déclaration de la table output_table contenant les
    variables exportées
    DATA : BEGIN OF it_output_table OCCURS 0.
           INCLUDE STRUCTURE itcsy.
    DATA : END OF it_output_table.
    DATA : w_ebeln LIKE ekko-ebeln,
          w_vbeln LIKE vbak-vbeln,
          w_zcdffa LIKE vbak-zcdffa.
    FORM CDE_CENT
    FORM cde_cent TABLES input output.
    it_input_table[] = input[].
    it_output_table[] = output[].
    READ TABLE it_input_table INDEX 1.
    MOVE it_input_table-value TO w_ebeln.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
               input  = w_ebeln
          IMPORTING
               output = w_ebeln.
    SELECT SINGLE zcdffa FROM ekko
    INTO w_zcdffa
    WHERE ebeln = w_ebeln.
    it_output_table-name = 'CDECENT'.
    MOVE w_zcdffa TO it_output_table-value.
    MODIFY it_output_table INDEX 1.
    output[] = it_output_table[].
    ENDFORM.

  • Perform statment in script

    I have written form statment in subroutine program and  calling in script layout using perform statment it is not calling in the script.
    i written following code in the subroutine program .
    PROGRAM  ZWHDTAX.
    form WHDTAX  tables in_tab     structure itcsy
                         out_tab     structure itcsy.
    data:  A_SKFBT type regup-skfbt,
           A_WRBTR type regud-wrbtr ,
           C_WTAX TYPE regup-skfbt,
           E_FLOAT     TYPE     F,
           E_DEC     TYPE     ESECOMPAVG,
           E_DECIMALS     TYPE     I,
           TELNUMBER1(30)  TYPE C.
    read table in_tab WITH KEY NAME = 'REGUP-SKFBT'.
    check sy-subrc = 0.
    MOVE IN_TAB-VALUE TO TELNUMBER1.
    CALL FUNCTION 'C14W_CHAR_NUMBER_CONVERSION'
      EXPORTING
        I_STRING                         = TELNUMBER1
    IMPORTING
       E_FLOAT                          =   E_FLOAT
       E_DEC                            =   E_DEC
       E_DECIMALS                       =   E_DECIMALS
    EXCEPTIONS
      WRONG_CHARACTERS                 = 1
      FIRST_CHARACTER_WRONG            = 2
      ARITHMETIC_SIGN                  = 3
      MULTIPLE_DECIMAL_SEPARATOR       = 4
      THOUSANDSEP_IN_DECIMAL           = 5
      THOUSAND_SEPARATOR               = 6
      NUMBER_TOO_BIG                   = 7
      OTHERS                           = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    A_SKFBT  = E_DEC.
    CLEAR TELNUMBER1.
    read table in_tab WITH KEY NAME = 'REGUD-WRBTR'.
    check sy-subrc = 0.
    MOVE IN_TAB-VALUE TO TELNUMBER1.
    CALL FUNCTION 'C14W_CHAR_NUMBER_CONVERSION'
      EXPORTING
        I_STRING                         = TELNUMBER1
    IMPORTING
       E_FLOAT                          =  E_FLOAT
       E_DEC                            =  E_DEC
       E_DECIMALS                       =  E_DECIMALS
    EXCEPTIONS
      WRONG_CHARACTERS                 = 1
      FIRST_CHARACTER_WRONG            = 2
      ARITHMETIC_SIGN                  = 3
      MULTIPLE_DECIMAL_SEPARATOR       = 4
      THOUSANDSEP_IN_DECIMAL           = 5
      THOUSAND_SEPARATOR               = 6
      NUMBER_TOO_BIG                   = 7
      OTHERS                           = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    A_WRBTR  = E_DEC.
    C_WTAX = A_SKFBT  - A_WRBTR.
    read table out_tab index 1.
    check sy-subrc = 0.
    out_tab-value = C_WTAX.
    modify out_tab index 1.
    *endif .
    endform.
    following code i written in script layout it is not calling in the script.
    /:PERFORM WHDTAX IN PROGRAM ZWHDTAX
    /:USING  &REGUP-SKFBT&
    /:USING  &REGUD-WRBTR&
    /:CHANGING  &C_WTAX&
    /:ENDPERFORM.

    The modification of your table is not really clean.
    here one of my example:
      FORM P_GET_DATA_FEBCL                                             *
      Get data for the FORM ZF_M40S_CHEQUE of the table FEBCL           *
    FORM p_get_data_febcl TABLES it_in  STRUCTURE itcsy
                                 it_out STRUCTURE itcsy.
      DATA : w_kukey  TYPE kukey_eb ,
             w_esnum  TYPE esnum_eb ,
             w_selvon TYPE sel01_f05a .
    Get the value of the parameter KUKEY.
      READ TABLE it_in
           WITH KEY name = 'FEBEP-KUKEY'.
      IF sy-subrc EQ space.
        MOVE it_in-value TO w_kukey.
      ENDIF.
    Get the value of the parameter ESNUM.
      READ TABLE it_in
           WITH KEY name = 'FEBEP-ESNUM'.
      IF sy-subrc EQ space.
        MOVE it_in-value TO w_esnum.
      ENDIF.
    Select the value of ZUONR.
      SELECT selvon
             UP TO 1 ROWS
             INTO w_selvon
             FROM febcl
             WHERE kukey EQ w_kukey
             AND   esnum EQ w_esnum
             AND   selfd EQ 'ZUONR'.
      ENDSELECT.
    Send back the value of the ZUONR field.
      IF sy-subrc EQ space.
        READ TABLE it_out
             WITH KEY name = 'ZUONR'.
        IF sy-subrc EQ space.
          MOVE w_selvon TO it_out-value.
          MODIFY it_out INDEX sy-tabix.
        ENDIF.
      ENDIF.
    ENDFORM.                     " P_GET_DATA_FEBCL.

  • Performance - SQL Statements- Script needed

    Hi All
    I am working on Performance Tuning on Oracle 10g/ Solaris environment.
    I am looking for a shell script that gives top 10 Time Consuming SQL Statements...... My client does not want me to use statspack or OEM for somereasons which i dont know. I am wondering if any of you might help me out ....
    thanks in advance
    riah

    .>> My client does not want me to use statspack
    Your client does not want you to use the scripts provided by Oracle that do exactly what you want but will allow you to run sripts that come from some unknown (to the client, at least) source????

  • How can i write this syntax in script logic....

    hi all
    i need to write below syntax in bpc script logic..
    If Headcount = 0, then Salary = 0 Else:
    If Month <> March and Month <> September:
    Salary = Salaryprevious month1 + [(Headcountcurrent month - Headcountprevious month1) * (Band Rate + Band Salary Factor)]
    If Month = March:
    Salary = [Salaryprevious month1 + [(Headcountcurrent month - Headcountprevious month1) * (Band Rate + Band Salary Factor)]  ] * (100% + Band Annual Increase + Band Annual Increase Factor)
    in the above code headcount,salary,bandrate etc all got ids.
    thanks guys

    Hi,
    In your query, when you say that headcount = 0, do you mean the signed data? In this case, it will difficult to do. When you have a signed data as 0 in SQL, once you optimize the application or compress it, that particular record will go and your logic will not work.
    If I look at your logic,
    If Headcount = 0, then Salary = 0 Else:
    If Month March and Month September:
    Salary = Salaryprevious month1 + (Headcountcurrent month - Headcountprevious month1) * (Band Rate + Band Salary Factor)
    If Month = March:
    Salary = [Salaryprevious month1 + (Headcountcurrent month - Headcountprevious month1) * (Band Rate + Band Salary Factor)] * (100% + Band Annual Increase + Band Annual Increase Factor)
    If the application has been compressed or optimized, it will not get any record for that particular headcount and will directly go into the "else" loop. Though, its not correct.
    I hope you got my point.

  • Rs.LoadReport syntax within Script Component of SSIS task

    Hello,
    please, what does Row.path, Row.name etc.... stand for?
    How should I enter folder path, report name...What about this:
    /FolderName/ReportName....Can not get rid of syntax errors what ever try...If possible, please example...
    Thanks
    string extension, mimetype, encoding;
                string[] streamIds;
                SC_7bb1aae362d44e26a741ccbbecdc6e18.csproj.ReportExecution2005.Warning[] warnings;
                byte[] results;
                rs.LoadReport(Row.path + Row.name, null);
                results = rs.Render(Row.reportformat, null, out extension, out mimetype, out encoding, out warnings, out streamIds);
                System.IO.FileStream writer = System.IO.File.OpenWrite(Row.folderPath + "\\" + Row.name + "." + Row.Extension);
                writer.Write(results, 0, results.Length);

    Please, this
    //Load Report       
            rs.LoadReport(Row.ReportPath , null);
    I read in:
    Bulk Report Generation using SSIS and SSRS 2008 R2 from MSDN
    while from an tutorial I found this:
    rs.LoadReport(Row.path + Row.name, null);It is suppose to be the same? Is plus sign correct or it is suppose to be comma?Please, can you instruct me which is which? Script component is my case...

  • Syntax in script logic

    Hi Friends,
    I have input schedule in below format.
    Product   Rate/2011.INP  Packing/2011.INP QTY/2011.APR AMOUNT/2011.APR QTY/2011.MAY AMOUNT/2011.MAY
    PM         3                 3              3               27            4         36
    PN        5            2          2          20     3  30
    Here Amount= Rate*Packing*QTY. Pls correct below script logic and make it generic for all months.
    *XDIMMEMBERSET TIME=2011.APR,2011.MAY,2011.INP
    *XDIMMEMBERSET ACCT=QTY,RATE,PACK,AMOUNT
    *WHEN ACCT
    *IS QTY
    *WHEN TIME
    *IS 2011.APR,2011.MAY,2011.INP
    *REC(EXPRESSION=%VALUE% * ([ACCT].[RATE],[TIME].[2011.INP])
                             * ([ACCT].[PACK],[TIME].[2011.INP]),
                                 [ACCT]=AMOUNT,[TIME].[2011.APR])
    *ENDWHEN
    *ENDWHEN
    *COMMIT
    Thanks,
    Naresh

    Hi,
    You can simply write this using MDX formula,
    [ACCT].[#AMOUNT]=[ACCT].[PACK]*([ACCT].[RATE],[TIME].[2011.INP])*([ACCT].[QTY],[TIME].[2011.INP])
    Run this code with required months from DM package it gets executed for defined time periods.
    Hope this helps,
    Regards,
    G.Vijaya Kumar

  • Unable to log into Facebook. Script errors stacking up. Tried everything...syntax errors, script errors stacking up in error logs

    Alittle over a month ago, started intermittently experiencing problems logging into Facebook. Sometimes it would work, other times nothing..just the dreaded 'circle of no progress'..I have tried everything from clear cache to clicking my heels together..I am now at my wits end. I cannot be the only one? I see everything from syntax errors to declaration dropped errors in the error console. When I get pissed enough, I am suddenly allowed to log in, but then I get stuck in facebook, if I stay in there too long, unable to navigate. Is this my machine telling me I need to be more productive oir is this browser truly as messed as it appears?
    ''[Profanity removed by moderator. Please read [[Forum and chat rules and guidelines]], thanks.]''

    Not flash/real player related. Thats been eliminated long time ago..I don't even use real player, and not receiving any flash crashes/hangs. I am not able to log into ONE site (Facebook) When I go into error console it is jammed full of errors:
    Timestamp: 8/12/2012 6:03:23 PM
    Warning: Error in parsing value for 'filter'. Declaration dropped.
    Source File: http://s.ytimg.com/yt/cssbin/www-embed-vflKqOFPz.css
    Line: 1
    (about 20 of those in there)
    Timestamp: 8/12/2012 6:03:23 PM
    Warning: Unknown property '-moz-box-shadow'. Declaration dropped.
    Source File: http://s.ytimg.com/yt/cssbin/www-embed-vflKqOFPz.css
    Line: 1
    Timestamp: 8/12/2012 6:03:23 PM
    Warning: Unknown property '-moz-border-radius'. Declaration dropped.
    Source File: http://s.ytimg.com/yt/cssbin/www-embed-vflKqOFPz.css
    Line: 1
    Timestamp: 8/12/2012 6:03:23 PM
    Warning: Error in parsing value for 'background-image'. Declaration dropped.
    Source File: http://s.ytimg.com/yt/cssbin/www-embed-vflKqOFPz.css
    Line: 1
    support.mozilla.org : server does not support RFC 5746, see CVE-2009-3555
    Timestamp: 8/12/2012 6:04:17 PM
    Error: The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol.
    Source File: about:plugins
    Line: 0
    Timestamp: 8/12/2012 6:06:34 PM
    Error: TypeError: window.fsr$removeListener is not a function
    Source File: http://forums.adobe.com/themes/adobe_forums_global/adobe.assets/ubi/foresee/foresee-trigger.js
    Line: 194
    These are just a few cut and pasted off the console...there are about 60 ++ in there off ab out 6 log in attempts. Went back in and was able to log in..logged out..tried to go back and same thing, can't log on.

  • FormCalc syntax and scripting issues

    Hi, I'm a total beginner at LiveCycle and FormCalc. I have been trying to create a simple form for a school assignment in which the user enters numeric data into a table and the last coloum then is calculated via FormCalc scripting. The equation which I have been attempting to express using FormCalc is  simple, (Cell1-Cell2)/Cell3*Cell4. I skimmed through a few tutorials but obviously my understanding of FormCalc and LiveCycle in general is insuffecient. I am hoping someone who could easily do this will help save me from having to learn FormCalc, any help or advice will be very much appreciated.

    You just need to select the field you want the calculation to appear in and go to the calculate event in the script window and use the following in formcalc
    $ = ( Cell1 - Cell2 ) / ( Cell3 * Cell4 )
    or whatever the corresponding field names are.
    Also, you need to cater for empty fields, either set the cells to be numeric with a default value or extend the script to test if a value has been entered yet. Something like
    if ( HasValue( TextField3 ) and HasValue( TextField4 ) ) then
        $ = ( TextField1 - TextField2 ) / ( TextField3 * TextField4 )
    else
         < some other calc here / or nothing>
    endif

  • Sap script form perform statement

    HI ALL ,
    CAN ANYONE HELP ME WITH SAP-SCRIPT FORM AND PERFORM SYNTAX. THAT IS WHEN U NEED TO ADD A FIELD TO AN EXISTING SAPSCRIPT, BY USING AN EXTERNAL SUBROUTINE.
    i NEED THE SYNTAX BOTH FOR PERFORM AND ENDPERFORM STATEMENT AND ALSO THE FORM STSEMENT. ANOTHER TRHING IS IF CAN LET ME KNOW HOW TO USE DEFINE STATEMENT IN SAPSCRIPT. WHATS ITS USE AND IS IT RELATED TO THE QUERY ABOVE.
    else,
    U PLZ LET ME KNOW ANY HELPFUL LINKS TO GO THROUGH.
    THANLS IN ADVANCE,
    ANUPMA.

    Hi anupma,
    1. while calling subroutines from sapscripts,
    there is a special technique,
    which has got its own limitations.
    2.
    FORM abc
    TABLES
    in_tab STRUCTURE itcsy
    out_tab STRUCTURE itcsy.
    ENDFORM.
    3. The perform in se38 program should be of the
    above format only.
    4. We cannot pass internal tables.
    5. Rather we need to pass
    VARIABLE NAME
    VARIABLE VALUE
    (see the structure of itcsy in se11)
    6. In this form, we have to read
    the internal table in_tab
    to capture the variable name and its value.
    7. Similary, to return the values,
    we have to put one record (for each variable)
    in out_tab.
    regards,
    amit m.

  • Standard text and perform in scripts

    Hi guys,
    can any body tell me how to use<b> perform</b> in scripts.
    and how to include these statement it doesn't look like standard text
    /: INCLUDE &ZTXTNAME& OBJECT BOM ID MZU
    have a nice weekend

    Hi Deepthi,
    The syntax of Perform statement is
    /: PERFORM <form_name> in PROGRAM <program_name>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM.
    In the program <program_name> , you can write the form <form_name> as:
    FORM <form_name> TABLES INTTAB STRUCTURE ITCSY
                            OUTTAB STRUCTURE ITCSY.
    endform.
    INTTAB will contain all the input parameters like INVAR1, INVAR2 etc and OUTTAB will contain all the output parameters like OUTVAR1, OUTVAR2 etc.
    You can download a nice document on SAPScript from this link , but within 1 day.
    https://www7.sendthisfile.com/d.jsp?t=asglGjpv25aba8T8sp2G1zyd
    Regards,
    Amit.

Maybe you are looking for