Problem in script ZF110_PRNM1_CHCK

hi
i have copied the script "ZF110_PRNM1_CHCK" to a new layout zf110.
when i am attaching new print program to thi script its giving me errors i.e. REGUD-txttab REGUH-lifnr like that for all that.
i feel the error is because this table isnt defined.
but unable to undstd where this is to be declared.
anyone let me know feasible solution for this.
points would be given

in this fashion the code(of main window) is coming when i am pasting in this editor...
100000023000000220000002200000032000000420000005200000062000000720000008200000092000001020000011200000123000000330000004200000132000001420000015200000162000001720000018200000192000002020000021
and driver program is
*& Report  ZCAL_AMOUNT_NET110                                          *
REPORT  ZCAL_AMOUNT_NET110  .
*&  Include           ZCAL_AMOUNT_NET                                  *
*REPORT zcal_amount_net.
TITLE               : Cheque Preparation                             *
AUTHOR              : Kiran B                                        *
DESCRIPTION         : Cheque prinitinng                              *
REFERENCE           :                                                *
FREQUENCY           : As and when required                           *
CTS:                : DS1K931025                                     *
Modification history                                                 *
Request no. |Date      |Programmer      | Description                *
DS1K931025  |10.11.2006|Kiran                                        *
DS1K931579  |24.03.2007|Jatin Sharma    | Change in logic for -ve &  *
                                        | cancelled line items       *
DS1K931667  |17.04.2007|Jatin Sharma    | Change in Code to avoid    *
                                        | code page error while      *
                                        | printing cheque.           *
DS1K931794  |18.05.2007|Jatin Sharma    | Increse lenth for variable *
                                        | counter from 2 to 3 for    *
                                        | more then 100 line items.  *
DS1K932593  |30.01.2008|Jatin Sharma    |Get employee name and       *
                                        |download data on Application*
                                        |server instead of C Drive   *
DS1K932927  |07.05.2008|Babita Sharma   |CR590                       *
TYPES: BEGIN OF ty_download,
        belnr TYPE belnr_d,
        xblnr TYPE xblnr,
        bldat TYPE char10,
       skfbt TYPE skfbt,
        skfbt TYPE char15,
       qbshb TYPE qbshb,
        qbshb TYPE char15,
       wrbtr TYPE wrbtr,
        wrbtr TYPE char15,
        END OF ty_download.
DATA: i_download TYPE STANDARD TABLE OF ty_download,
      wa_download TYPE ty_download.
*TABLES : REGUH,REGUD,REGUP.
*&      Form  CAL_NET_AMOUNT
      Calculating the Net Amount
     -->IN_TAB     Table having Gross amount and Deduction amount
     -->OUT_TAB    Table having Net amount
FORM cal_net_amount TABLES in_tab1 STRUCTURE itcsy
                           out_tab1 STRUCTURE itcsy.
Types: begin of ty_download,
        BELNR type BELNR_d,
        XBLNR type XBLNR,
        BLDAT type char10,
        SKFBT type SKFBT,
        QBSHB type QBSHB,
        WRBTR type WRBTR,
        End of ty_download.
Data: i_download type standard table of ty_download,
       wa_download type ty_download.
  DATA: v_gross TYPE char30,
  v_belnr TYPE char10,
  v_xblnr TYPE char16,
  v_bldat TYPE char10,
        v_grss2 TYPE char30,
        v_grss12 TYPE wrbtr,
        v_grss121 TYPE char16,
        v_gross1 TYPE dmbtr,
        v_dedct TYPE char30,
        v_dedct1 TYPE dmbtr,
        v_indicator TYPE char1,
        v_sum_grsamnt TYPE skfbt,
        v_sum_grs TYPE char16,
        v_sum_ded1 TYPE wrbtr,
        v_sum_ded  TYPE char16,
        v_sum_ntamnt TYPE wrbtr,
        v_sum_nt TYPE char16,
        v_net   TYPE dmbtr.
  DATA: v_netamount TYPE char16,
      v_counter   TYPE numc2,
        v_counter   TYPE numc3,
        v_15 TYPE char2,
        v_cnter   TYPE char3,
        v_counter1  TYPE i,
        v_grss_amn  TYPE char16.
      v_net_amount_j TYPE char16.
  CONSTANTS: c_15 TYPE char2 VALUE '15'.
  DATA:         v_amount     TYPE string,
          v_amount1     TYPE char16.
  CLEAR: out_tab1-value.
  READ TABLE in_tab1 INDEX 7.
  v_cnter = in_tab1-value.
  v_counter1 = v_cnter.
  v_counter1 = v_counter1 + 1.
  v_counter = v_counter1.
*>>Reading Gross Amount from REGUP-SKFBT Field*>>
  READ TABLE in_tab1 INDEX 1.
  v_gross = in_tab1-value.
*>>Removing Commas from the value field**>>
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_gross.
*>>Transfer this char field value to Currency field for calculation purpose>>>>
  v_gross1 = v_gross.
*>> Checking debit/creditor indicatior and multiplying with -1>>
  READ TABLE in_tab1 INDEX 11.
  v_indicator = in_tab1-value.
  IF v_indicator EQ 'S'.
    v_gross1 = v_gross1 * -1.
  ENDIF.
  READ TABLE in_tab1 INDEX 4.
  v_sum_grsamnt = in_tab1-value.
  v_sum_grsamnt = v_sum_grsamnt + v_gross1.
*>>Reading deduct Amount from REGUP-QBSHB Field*>>
  READ TABLE in_tab1 INDEX 2.
  v_dedct = in_tab1-value.
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_dedct.
  v_dedct1 = v_dedct.
  IF v_indicator EQ 'S'.
    v_dedct1 = v_dedct1 * -1.
  ENDIF.
**>Reading WRBTR Value for calculating correct deduction amount
  READ TABLE in_tab1 INDEX 3.
  v_grss2 = in_tab1-value.
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_grss2.
  v_grss12 = v_grss2.
  IF v_indicator EQ 'S'.
    v_grss12 = v_grss12 * -1.
  ENDIF.
  READ TABLE out_tab1 INDEX 1.
  IF v_dedct1 = '0.00'.
    v_dedct1 = v_gross1 - v_grss12.
  ENDIF.
  READ TABLE in_tab1 INDEX 5.
  v_sum_ded1 = in_tab1-value.
  v_sum_ded1 = v_sum_ded1 + v_dedct1.
  v_netamount = v_gross1 - v_dedct1.
  v_net = v_netamount.
  READ TABLE in_tab1 INDEX 6.
  v_sum_ntamnt = in_tab1-value.
  v_sum_ntamnt = v_sum_ntamnt + v_net.
  v_amount1 = v_net.
  CALL FUNCTION 'ZAMOUNT_FORMAT_INR'
    EXPORTING
      v_amount  = v_amount1
    IMPORTING
      v_string  = v_amount
    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 v_amount TO v_netamount.
  CONDENSE v_netamount.
  MOVE v_netamount TO out_tab1-value.
  MODIFY out_tab1 INDEX 1.
  READ TABLE out_tab1 INDEX 2.
  v_grss_amn = v_dedct1.
  MOVE v_grss_amn TO out_tab1-value.
  MODIFY out_tab1 INDEX 2.
  v_sum_grs = v_sum_grsamnt.
  v_sum_ded = v_sum_ded1.
  v_sum_nt =  v_sum_ntamnt.
  READ TABLE out_tab1 INDEX 3.
  MOVE v_sum_grs TO out_tab1-value.
  MODIFY out_tab1 INDEX 3.
  READ TABLE out_tab1 INDEX 4.
  MOVE v_sum_ded TO out_tab1-value.
  MODIFY out_tab1 INDEX 4.
  READ TABLE out_tab1 INDEX 5.
  MOVE v_sum_nt TO out_tab1-value.
  MODIFY out_tab1 INDEX 5.
  READ TABLE out_tab1 INDEX 6.
  MOVE v_counter TO out_tab1-value.
  MODIFY out_tab1 INDEX 6.
  v_15 = c_15.
  READ TABLE out_tab1 INDEX 7.
  MOVE v_15 TO out_tab1-value.
  MODIFY out_tab1 INDEX 7.
*>>to download the Main window contents if there are more than 15 invoices>>>>
  READ TABLE in_tab1 INDEX 8.
  v_belnr = in_tab1-value.
  READ TABLE in_tab1 INDEX 9.
  v_xblnr = in_tab1-value.
  READ TABLE in_tab1 INDEX 10.
  v_bldat = in_tab1-value.
  IF v_counter > 14.
    IMPORT i_download FROM MEMORY ID 'HK'.
    wa_download-belnr = v_belnr.
    wa_download-xblnr = v_xblnr.
    wa_download-bldat = v_bldat.
    wa_download-skfbt = v_gross1.
    wa_download-qbshb = v_dedct1.
    wa_download-wrbtr = v_net.
    APPEND wa_download TO i_download.
    EXPORT i_download TO MEMORY ID 'HK'.
  ENDIF.
  CLEAR: wa_download.
ENDFORM.                    "CAL_NET_AMOUNT
*&      Form  GET_PAYMENT_AMOUNT
      Getting Payment amount in INR Format
     -->IN_TAB     Table having Total amount
     -->OUT_TAB    Table having Total amount in INR Format
FORM get_payment_amount TABLES in_tab2 STRUCTURE itcsy
                               out_tab2 STRUCTURE itcsy.
  DATA: i_text(4096) TYPE c OCCURS 0.
  DATA: v_payamnt TYPE char30,
        v_payamnt1 TYPE rwbtr,
        v_payamnt2 TYPE string,
        v_payamnt3 TYPE char16,
        v_rwbtr    TYPE char18,
        v_path     TYPE string,
        v_doc_no   TYPE vblnr,
        v_belnr    TYPE belnr,
        v_bukrs    TYPE bukrs,
        v_gjahr    TYPE gjahr.
  CLEAR: out_tab2-value.
  READ TABLE in_tab2 INDEX 1.
  v_payamnt = in_tab2-value.
  READ TABLE in_tab2 INDEX 2.
  v_doc_no = in_tab2-value.
  READ TABLE in_tab2 INDEX 3.
  v_belnr = in_tab2-value.
  READ TABLE in_tab2 INDEX 4.
  v_bukrs = in_tab2-value.
  READ TABLE in_tab2 INDEX 5.
  v_gjahr = in_tab2-value.
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_payamnt.
  v_payamnt1 = v_payamnt.
  v_payamnt3 = v_payamnt1.
  CALL FUNCTION 'ZAMOUNT_FORMAT_INR'
    EXPORTING
      v_amount  = v_payamnt3
    IMPORTING
      v_string  = v_payamnt2
    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.
  READ TABLE out_tab2 INDEX 1.
  WRITE v_payamnt2 TO v_rwbtr.
  SHIFT v_rwbtr RIGHT.
Translate v_rwbtr using ' *'.
  v_payamnt = v_rwbtr.
  CONCATENATE '**' v_payamnt '**' INTO v_payamnt.
  CONDENSE v_payamnt NO-GAPS.
  MOVE v_payamnt TO out_tab2-value.
  MODIFY out_tab2 INDEX 1.
  IF NOT i_download[] IS INITIAL.
    wa_download-belnr = text-002. " VOUCHER REFERENCE
    wa_download-xblnr = text-003. " INVOICE REFERENCE
    wa_download-bldat = text-004. " INVOICE DATE
    wa_download-skfbt = text-005. " GROSS AMOUNT
    wa_download-qbshb = text-006. " DEDUCTIONS
    wa_download-wrbtr = text-007. " NET AMOUNT
    INSERT wa_download INTO i_download INDEX 1.
    EXPORT i_download TO MEMORY ID 'HK'.
    CONCATENATE text-001 sy-datum '\' v_bukrs '_' v_doc_no  '_' v_gjahr '.xls' INTO v_path.
    IMPORT i_download FROM MEMORY ID 'HK'.
  Download convert data to Presentation Server
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename              = v_path
        filetype              = 'ASC'
        write_field_separator = 'X'
      TABLES
        data_tab              = i_download.
   IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
   ENDIF.
    FREE MEMORY ID 'HK'.
  ENDIF.
ENDFORM.                    "GET_PAYMENT_AMOUNT
*&      Form  AMNT_IN_WORDS
      Writing Total in Words
     -->IN_TAB     Total Having amountin Total
     -->OUT_TAB    Table having amount in Words
FORM amnt_in_words TABLES in_tab3 STRUCTURE itcsy
                          out_tab3 STRUCTURE itcsy.
  DATA: v_total TYPE char30,
        v_total1 TYPE rwbtr,
        v_total2 TYPE char16,
        v_inwrds TYPE char255,
        v_inwrds1 TYPE char255,
        v_inwrds2 TYPE char255,
        v_inwrds3 TYPE char255,
        v_spell   TYPE spell.
  DATA: i_tline TYPE STANDARD TABLE OF tline,
        wa_tline TYPE tline.
  CONSTANTS: v_star   TYPE char2 VALUE '##'.
  CLEAR: out_tab3-value.
  READ TABLE in_tab3 INDEX 1.
  v_total = in_tab3-value.
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_total.
  v_total1 = v_total.
  v_total2 = v_total1.
  CALL FUNCTION 'ZSPELL_AMOUNT_INR'
    EXPORTING
      v_amount   = v_total2
      v_currency = 'INR'
      filler     = ' '
      v_language = sy-langu
    IMPORTING
      v_spell    = v_spell
    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.
  READ TABLE out_tab3 INDEX 1.
  IF v_spell-decword IS INITIAL.
    CONCATENATE v_spell-word 'ONLY***' INTO v_inwrds SEPARATED BY space.
  ELSE.
    CONCATENATE v_spell-word 'AND PAISA' v_spell-decword 'ONLY***' INTO v_inwrds SEPARATED BY space.
  ENDIF.
  CONCATENATE '***' v_inwrds INTO v_inwrds.
**>>Splitting word in to two if the lenght is more than 80>>
  DATA: len TYPE i,
        v_len TYPE numc3,
        len1 TYPE i.
*>> Begin of Mod-Kiran on 05-03-2007>>>
  DATA: BEGIN OF rec_head.             " Header struct for item texts
          INCLUDE STRUCTURE thead.
  DATA: END OF rec_head.
*>> end of Mod-Kiran on 05-03-2007>>>
  len = STRLEN( v_inwrds ).
  v_len = len.
*>>>Begin Of Mod-Kiron on 05-03-2007>>>
  IF len GE 80.
    SEARCH v_inwrds FOR ' HUNDRED'.
    IF sy-subrc EQ 0.
      SPLIT v_inwrds AT ' HUNDRED' INTO v_inwrds1 v_inwrds2.
      CONCATENATE ' HUNDRED' v_inwrds2 INTO v_inwrds2.
   ENDIF.
    ELSE.
   SEARCH v_inwrds FOR ' HUNDRED'.
   IF sy-subrc EQ 0.
     SPLIT v_inwrds AT ' HUNDRED' INTO v_inwrds1 v_inwrds2.
     CONCATENATE ' HUNDRED' v_inwrds2 INTO v_inwrds2.
   ELSE.
      SPLIT v_inwrds AT '  ' INTO v_inwrds1 v_inwrds2.
    ENDIF.
ENDIF.
  ENDIF.
len1 = len / 2.
V_INWRDS1 = V_INWRDS+0(len1).
V_INWRDS2 = V_INWRDS+len1(len).
**<<End Of Split<<
  READ TABLE out_tab3 INDEX 1.
  MOVE v_inwrds1 TO out_tab3-value.
  MODIFY out_tab3 INDEX 1.
  READ TABLE out_tab3 INDEX 2.
  MOVE v_inwrds2 TO out_tab3-value.
  MODIFY out_tab3 INDEX 2.
  READ TABLE out_tab3 INDEX 3.
  MOVE v_inwrds TO out_tab3-value.
  MODIFY out_tab3 INDEX 3  .
  READ TABLE out_tab3 INDEX 4.
  MOVE v_len TO out_tab3-value.
  MODIFY out_tab3 INDEX 4  .
*>>>End Of Mod-Kiron on 05-03-2007>>>
ENDFORM.                    "AMNT_IN_WORDS
*&      Form  GET_AMOUNT_INR
      Formating the GROSS & DEDUCT Amount in INR
     -->IN_TAB5    Containing Gross and Deduct amount
     -->OUT_TAB5   Containing Formatted amount
FORM get_amount_inr TABLES in_tab5 STRUCTURE itcsy
                           out_tab5 STRUCTURE itcsy.
  DATA: v_grss_amount30 TYPE char30,
        v_grss_amount   TYPE char16,
        v_indicator TYPE char1,
        v_grss_amount1 TYPE char30,
        v_dedct_amount TYPE char30,
        v_gross_amt   TYPE wrbtr,
        v_amount     TYPE string,
        v_amount1     TYPE char16,
        v_dedct_amt   TYPE wabzv.
  READ TABLE in_tab5 INDEX 3.
  v_indicator = in_tab5-value.
  READ TABLE in_tab5 INDEX 1.
  v_grss_amount30 = in_tab5-value.
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_grss_amount30.
  v_gross_amt = v_grss_amount30.
  IF v_indicator = 'S'.
    v_gross_amt = v_gross_amt * -1.
  ENDIF.
  v_amount1 = v_gross_amt.
  CALL FUNCTION 'ZAMOUNT_FORMAT_INR'
    EXPORTING
      v_amount  = v_amount1
    IMPORTING
      v_string  = v_amount
    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.
  v_grss_amount = v_amount.
*>>Formating Amount for DEDUCTION Amount>>
  CLEAR: v_amount, v_amount1.
  READ TABLE in_tab5 INDEX 2.
  v_dedct_amount = in_tab5-value.
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_dedct_amount.
  v_dedct_amt = v_dedct_amount.
  IF v_indicator = 'S'.
    v_dedct_amt = v_dedct_amt * -1.
  ENDIF.
  v_amount1   = v_dedct_amt.
  CALL FUNCTION 'ZAMOUNT_FORMAT_INR'
    EXPORTING
      v_amount  = v_amount1
    IMPORTING
      v_string  = v_amount
    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.
  v_dedct_amount = v_amount.
  READ TABLE out_tab5 INDEX 1.
Condense V_GRSS_AMOUNT.
  SHIFT v_grss_amount RIGHT.
  MOVE v_grss_amount TO out_tab5-value.
  MODIFY out_tab5 INDEX 1.
  READ TABLE out_tab5 INDEX 2.
Condense V_DEDCT_AMOUNT.
  MOVE v_dedct_amount TO out_tab5-value.
  MODIFY out_tab5 INDEX 2.
ENDFORM.                    "GET_AMOUNT_INR
*&      Form  GET_SUM_INR
      GET SUM TOTALS FOR GROSS AND DEDUCT AMOUNT
     -->IN_TAB6    TABLES FOR GROSS AND DEDUCT AMOUNT
     -->OUT_TAB6   FORMATTED AMOUNT FOR GROSS AND DEDUCT VALUES
FORM get_sum_inr TABLES in_tab6 STRUCTURE itcsy
                        out_tab6 STRUCTURE itcsy.
  DATA: v_sum_grss TYPE char30,
        v_sum_dedct TYPE char30,
        v_amount     TYPE string,
        v_amount1     TYPE char16,
        v_sum_grss1 TYPE wrbtr,
        v_sum_dedct1 TYPE wabzv.
  READ TABLE in_tab6 INDEX 1.
  v_sum_grss = in_tab6-value.
*****************START OF CODE COMMENT BY Jatin.
CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
   CHANGING
     telnumber = v_sum_grss.
*****************END OF CODE COMMENT BY Jatin.
  v_sum_grss1 = v_sum_grss.
  v_amount1 = v_sum_grss1.
  CALL FUNCTION 'ZAMOUNT_FORMAT_INR_CHK1'
    EXPORTING
      v_amount  = v_amount1
    IMPORTING
      v_string  = v_amount
    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.
  v_sum_grss = v_amount.
*>>Formating Amount for DEDUCTION Amount>>
  CLEAR: v_amount, v_amount1.
  READ TABLE in_tab6 INDEX 2.
  v_sum_dedct = in_tab6-value.
*****************START OF CODE COMMENT BY Jatin.
CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
   CHANGING
     telnumber = v_sum_dedct.
*****************END OF CODE COMMENT BY Jatin.
  v_sum_dedct1 = v_sum_dedct.
  v_amount1   = v_sum_dedct1.
  CALL FUNCTION 'ZAMOUNT_FORMAT_INR_CHK1'
    EXPORTING
      v_amount  = v_amount1
    IMPORTING
      v_string  = v_amount
    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.
  v_sum_dedct = v_amount.
  READ TABLE out_tab6 INDEX 1.
  CONDENSE v_sum_grss.
  MOVE v_sum_grss TO out_tab6-value.
  MODIFY out_tab6 INDEX 1.
  READ TABLE out_tab6 INDEX 2.
  CONDENSE v_sum_dedct.
  MOVE v_sum_dedct TO out_tab6-value.
  MODIFY out_tab6 INDEX 2.
ENDFORM.                    "GET_SUM_INR
*&      Form  GET_SUM_NET
      Summing Net Amount in INR Format
     -->IN_TAB6    Net Amount
     -->OUT_TAB6   INR format of Net Aount Sum
FORM get_sum_net TABLES in_tab7 STRUCTURE itcsy
                        out_tab7 STRUCTURE itcsy.
  DATA: v_sum_net TYPE char30,
        v_amount     TYPE string,
        v_amount1     TYPE char16,
        v_sum_net1 TYPE rwbtr.
  READ TABLE in_tab7 INDEX 1.
  v_sum_net = in_tab7-value.
*****************START OF CODE COMMENT BY Jatin.
CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
   CHANGING
     telnumber = v_sum_net.
*****************End OF CODE COMMENT BY Jatin.
  CLEAR: v_amount, v_amount1.
  v_sum_net1 = v_sum_net.
  v_amount1   = v_sum_net1.
  CALL FUNCTION 'ZAMOUNT_FORMAT_INR_CHK1'
    EXPORTING
      v_amount  = v_amount1
    IMPORTING
      v_string  = v_amount
    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.
  v_sum_net = v_amount.
  READ TABLE out_tab7 INDEX 1.
  MOVE v_sum_net TO out_tab7-value.
  MODIFY out_tab7 INDEX 1.
ENDFORM.                    "GET_SUM_NET
Begin of comment  for CR590
Company address is now printed on Stationaery only , so form get_header is commented
**&      Form  GET_HEADER
      Get Company Code Details for Header Window
     -->IN_TAB8    Company Code details
     -->OUT_TAB8   Company code text for header window
*FORM get_header TABLES in_tab8 STRUCTURE itcsy
                      out_tab8 STRUCTURE itcsy.
DATA: v_compcode TYPE bukrs,
       v_adrnr    TYPE adrnr,
       v_text1    TYPE char40,
       v_city1    TYPE char10,
       v_postcode TYPE char6,
       v_pcode    TYPE char22,
       v_street   TYPE char50,
       v_text2    TYPE char100,
       v_state TYPE char15.
CONSTANTS : c_up TYPE char15 VALUE 'UTTAR PRADESH',
             c_hiphen TYPE char1 VALUE '-',
             c_comma TYPE char1 VALUE ',' .
TYPES: BEGIN OF ty_header,
        name1 TYPE ad_name1,
        city1 TYPE ad_city1,
        post_code1 TYPE ad_pstcd1,
        street TYPE ad_street,
        END OF ty_header.
DATA: wa_header TYPE ty_header.
CLEAR: wa_header.
READ TABLE in_tab8 INDEX 1.
v_compcode = in_tab8-value.
SELECT adrnr FROM t001 INTO v_adrnr WHERE bukrs = v_compcode.
ENDSELECT.
IF sy-subrc EQ 0.
   SELECT name1 city1 post_code1 street FROM adrc INTO wa_header WHERE addrnumber = v_adrnr.
   ENDSELECT.
   IF sy-subrc EQ 0.
     READ TABLE out_tab8 INDEX 1.
     v_text1 = wa_header-name1.
     MOVE v_text1 TO out_tab8-value.
     MODIFY out_tab8 INDEX 1.
     v_city1 = wa_header-city1.
     TRANSLATE v_city1 TO UPPER CASE.
     v_postcode = wa_header-post_code1.
     v_street   = wa_header-street.
     TRANSLATE v_street TO UPPER CASE.
     CONCATENATE c_up c_hiphen v_postcode INTO v_pcode.
*****IF v_compcode = 2030.
clear v_state.
v_state = 'MAHARASHTRA'.
ELSEIF v_compcode = 2020.
   v_state = 'TAMIL NADU'.
   elseif v_compcode = 2000 or v_compcode = 2010 or v_compcode = 2040 or v_compcode = 2050.
   v_state = 'UTTAR PRADESH'.
   ENDIF.
      CONCATENATE v_state c_hiphen v_postcode INTO v_pcode SEPARATED BY space.
     CONCATENATE c_hiphen v_postcode INTO v_pcode SEPARATED BY space.
     CONCATENATE v_street c_comma v_city1 v_pcode INTO v_text2 SEPARATED BY space.
     READ TABLE out_tab8 INDEX 2.
     MOVE v_text2 TO out_tab8-value.
     MODIFY out_tab8 INDEX 2.
   ENDIF.
ENDIF.
*ENDFORM.                    "GET_HEADER
End of comment for CR590
*&      Form  BANK_STATEMENT
      Printing Bank Statement
     -->IN_TAB8    text
     -->OUT_TAB8   text
FORM bank_statement TABLES in_tab11 STRUCTURE itcsy
                       out_tab11 STRUCTURE itcsy.
  DATA: v_cocode  TYPE dzbukr,
        v_chekno  TYPE chect,
        v_ntam   TYPE char25,
        v_amount     TYPE string,
        v_amount1     TYPE char16,
        v_ntm   TYPE rwbtr.
  READ TABLE in_tab11 INDEX 1.
  v_cocode = in_tab11-value.
  READ TABLE in_tab11 INDEX 2.
  v_chekno = in_tab11-value.
  v_chekno = v_chekno - 1.
  CONDENSE v_chekno.
*Get the Cheque amount from PAYR Table .
  SELECT SINGLE rwbtr FROM payr INTO v_ntm WHERE zbukr = v_cocode
                                                AND rzawe = 'C'
                                                AND chect = v_chekno.
  v_ntm = v_ntm * -1.
  v_amount1   = v_ntm.
  CONDENSE v_amount1.
  CALL FUNCTION 'ZAMOUNT_FORMAT_INR'
    EXPORTING
      v_amount  = v_amount1
    IMPORTING
      v_string  = v_amount
    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.
  v_ntam = v_amount.
  IF sy-subrc EQ 0.
    READ TABLE out_tab11 INDEX 1.
    MOVE v_ntam TO out_tab11-value.
    MODIFY out_tab11 INDEX 1.
  ENDIF.
ENDFORM.                    "BANK_STATEMENT
*&      Form  CHECK_GROSS
      Checking the Gross Amount fiels is Having Value or not.
     -->IN_TAB12   text
     -->OUT_TAB12  text
FORM check_gross TABLES in_tab12 STRUCTURE itcsy
                       out_tab12 STRUCTURE itcsy.
  DATA: v_skfbt TYPE char16,
  v_skfbt1 TYPE skfbt,
        v_pswbt TYPE char16,
        v_amount     TYPE string,
        v_amount1     TYPE char16,
        v_grass TYPE char16,
        v_grassamn TYPE char30.
  READ TABLE in_tab12 INDEX 1.
  v_skfbt = in_tab12-value.
  CONDENSE v_skfbt.
  READ TABLE in_tab12 INDEX 2.
  v_pswbt = in_tab12-value.
  IF v_skfbt = '0.00'.
    v_skfbt = v_pswbt.
  ENDIF.
  v_grassamn = v_skfbt.
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_grassamn.
  v_skfbt1 = v_grassamn.
  v_amount1 = v_skfbt1.
  CONDENSE v_amount1.
  CALL FUNCTION 'ZAMOUNT_FORMAT_INR'
    EXPORTING
      v_amount  = v_amount1
    IMPORTING
      v_string  = v_amount
    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.
  v_grass = v_amount.
  READ TABLE out_tab12 INDEX 1.
  MOVE v_grass TO out_tab12-value.
  MODIFY out_tab12 INDEX 1.
ENDFORM.                    "CHECK_GROSS
*&      Form  PRINT_BANK_STATEMENT
      Bank Statement in Window2
     -->IN_TAB12   text
     -->OUT_TAB12  text
FORM print_bank_statement TABLES in_tab13 STRUCTURE itcsy
                       out_tab13 STRUCTURE itcsy.
*Data: V_NETAMOUNT_STATE type char16,
     V_CHECKNUM   type char8,
     V_CHECK_DATE type char10,
     V_BANK_NAME  type char25.
     READ TABLE IN_TAB13 INDEX 1.
     V_NETAMOUNT_STATE = IN_TAB13-value.
     CONDENSE V_NETAMOUNT_STATE.
     READ TABLE IN_TAB13 INDEX 2.
     V_CHECKNUM = IN_TAB13-value.
     READ TABLE IN_TAB13 INDEX 3.
     V_CHECK_DATE = IN_TAB13-value.
     READ TABLE IN_TAB13 INDEX 4.
     V_BANK_NAME = IN_TAB13-value.
CALL FUNCTION 'WRITE_FORM'
             EXPORTING
               element  = '100-K'
               window   = 'WINDOW2'
             EXCEPTIONS
               window   = 1
               element  = 2.
ENDFORM.                    "PRINT_BANK_STATEMENT
*&      Form  GET_GROSS_DEDUCT_BSAK
      Get the Gross and Deduction amount pick from the BSAK Table
     -->IN_TAB13   text
     -->OUT_TAB13  text
FORM get_gross_deduct_bsak TABLES in_tab14 STRUCTURE itcsy
                       out_tab14 STRUCTURE itcsy.
  DATA: v_company_code TYPE bukrs,
        v_lineitem TYPE buzei,
        v_fiscal_year  TYPE gjahr,
        v_fiscal_year1 TYPE char4,
        v_doc_number   TYPE belnr_d,
        v_vblnr        TYPE vblnr,
        v_net_amount   TYPE dmbtr,
        v_net_amount11 TYPE char30,
        v_net_amount1  TYPE char16,
        v_vendor_num   TYPE lifnr,
        v_company_code1 TYPE char4,
        v_doc_number1   TYPE char10,
        v_vendor_num1   TYPE char10,
        v_gross_bsak   TYPE char16,
        v_deduct_bsak  TYPE char16,
        v_grossbsak    TYPE dmbtr,
        v_grossbsak1   TYPE char30,
        v_qbshb        TYPE qbshb,
        v_xblnr       TYPE char16,
        v_docdate     TYPE char10,
        v_qbshb1       TYPE char30,
        v_deductbsak   TYPE qbshb,
        v_deductbsak1  TYPE char30,
        v_flag         TYPE char1,
        v_fdoc        TYPE char1.
  DATA:   v_sum_grsamnt TYPE dmbtr,
          v_sum_grsamnt1 TYPE char30,
          v_sum_grs TYPE char16,
          v_nt_amn  TYPE char16,
          v_sum_ded1 TYPE qbshb,
          v_sum_ded11 TYPE char30,
          v_sum_ded  TYPE char16,
          v_sum_ntamnt TYPE dmbtr,
          v_sum_ntamnt1 TYPE char30,
          v_sum_nt TYPE char16,
          v_indicator TYPE char1,
          v_amount     TYPE string,
          v_amount1     TYPE string,
          v_cnter   TYPE char3,
          v_counter1  TYPE i,
          v_counter   TYPE numc3,
          l_v_ded  TYPE wt_wt1,            "Add by Jatin on 22.03.2007
          l_v_ded1  TYPE wt_wt1,            "Add by Jatin on 22.03.2007
          l_v_ded2 TYPE char30.            "Add by Jatin on 22.03.2007
  TYPES: BEGIN OF ty_bsak,
          bukrs TYPE bukrs,
          lifnr TYPE lifnr,
          gjahr TYPE gjahr,
          belnr TYPE belnr_d,
          shkzg TYPE shkzg,
          dmbtr TYPE dmbtr,
          qbshb TYPE qbshb,
          blart TYPE blart,                 "Add by Jatin on 22.03.2007
          xragl TYPE char1,
          END OF ty_bsak.
  DATA: wa_bsak TYPE ty_bsak.
Start of code add by Jatin on 22.03.2007
  TYPES: BEGIN OF ty_with_item,
          bukrs    TYPE bukrs,            "Company Code
          belnr    TYPE belnr_d,          "Accounting Document Number
          gjahr    TYPE gjahr,            "Fiscal Year
          wt_qbshb TYPE wt_wt1,           "Withholding tax amount in document currency
          END OF ty_with_item.
  DATA: it_with_item TYPE STANDARD TABLE OF ty_with_item
        WITH NON-UNIQUE KEY bukrs belnr gjahr,
        wa_with_item TYPE ty_with_item.
End of code add by Jatin on 22.03.2007
  READ TABLE in_tab14 INDEX 1.
  v_doc_number = in_tab14-value.
  READ TABLE in_tab14 INDEX 2.
  v_fiscal_year = in_tab14-value.
  READ TABLE in_tab14 INDEX 3.
  v_company_code = in_tab14-value.
  READ TABLE in_tab14 INDEX 4.
  v_vendor_num = in_tab14-value.
  READ TABLE in_tab14 INDEX 5.
  v_net_amount11 = in_tab14-value.
****************Code added by Jatin
  IF v_net_amount11 CA '-'.
    v_flag = 'X'.
  ENDIF.
**Begin of Removing commas >>
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_net_amount11.
  v_net_amount = v_net_amount11.
  IF v_flag = 'X'.
    v_net_amount = 0 - v_net_amount.
    CLEAR v_flag.
  ENDIF.
End of code added by Jatin
  READ TABLE in_tab14 INDEX 6.
  v_sum_grsamnt1 = in_tab14-value.
****************Code added by Jatin
  IF v_sum_grsamnt1 CA '-'.
    v_flag = 'X'.
  ENDIF.
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_sum_grsamnt1.
  v_sum_grsamnt = v_sum_grsamnt1.
  IF v_flag = 'X'.
    v_sum_grsamnt = 0 - v_sum_grsamnt.
    CLEAR v_flag.
  ENDIF.
End of code added by Jatin
  READ TABLE in_tab14 INDEX 7.
  v_sum_ded11 = in_tab14-value.
****************Code added by Jatin
  IF v_sum_ded11 CA '-'.
    v_flag = 'X'.
  ENDIF.
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_sum_ded11.
  v_sum_ded1 = v_sum_ded11.
  IF v_flag = 'X'.
    v_sum_ded1 = 0 - v_sum_ded1.
    CLEAR v_flag.
  ENDIF.
End of code added by Jatin
  READ TABLE in_tab14 INDEX 8.
  v_sum_ntamnt1 = in_tab14-value.
****************Code added by Jatin
  IF v_sum_ntamnt1 CA '-'.
    v_flag = 'X'.
  ENDIF.
  CALL FUNCTION 'TELNUMBER_REMOVE_SPECIAL_CHAR'
    CHANGING
      telnumber = v_sum_ntamnt1.
  v_sum_ntamnt = v_sum_ntamnt1.
  IF v_flag = 'X'.
    v_sum_ntamnt = 0 - v_sum_ntamnt.

Similar Messages

  • Problem in script format

    hi,
    i am having problem in script , the problem is
    s.no|    descriptio                           |   UOM                      |          Qty                   |             Rate           |          AMT            |
    01     aaaaaaaaaaaaaaaaaaaaa       11.01                             17.28                     170000000               2400000
    this is fine but when the 1st column is shot other also get affected.
    s.no|    descriptio                           |   UOM                      |          Qty                   |             Rate           |          AMT            |
    01     aa       11.01                             17.28                     170000000               2400000
    and i cannot draw vertical line here .what is the solution for this.
    Edited by: jaihind on Mar 6, 2010 12:21 PM
    hi,
    problem is if the description field is long then other coloum are comming fine but if description caloumn is small then other also get affected and its comes towards left .
    Edited by: jaihind on Mar 6, 2010 12:22 PM

    Hi
    For this u can resolve by using the Formatting characters ......
    This is your layout ..
    s.no| descriptio | UOM | Qty | Rate | AMT |
    01 aaaaaaaaaaaaaaaaaaaaa 11.01 17.28 170000000 2400000
    Assume that   your field names like  
    s.no      |  description  |    UOM      |    Qty      |      Rate      |         AMT       |
    &sno&      &desc&         &UOM&       &Qty&         &rate&         &AMT&
    asseme that  length of these fields(in characters) as per your requirement will be ...
    s.no      |  description  |    UOM      |    Qty      |      Rate      |         AMT       |
    8                  15                  5                8                 10                  15
    For these use formatting characters    like   ...
                  s.no      |  description      |    UOM      |    Qty      |      Rate      |         AMT       |
    1stLine  &sno& ,,  &desc+0(15)&,,  &UOM&       &Qty&        &rate&         &AMT&
    2ndline                 &desc+15(15)&     
    &desc+0(15)&  -  it will print  first 15 characters from 0th position
    &desc+15(15)&- From 15th position it will print 15 characters ..
    Hope you resolve your issue
    Let me know if Any concerns,.......

  • Priniting problem in script

    Hi friends,
    i am facing a problem in script. i have developed the form
    and it is working fine .in print preview every thing seems to be ok.
    when we try to take a print the right side characters are cutting down by 2
    characters every time.
    i have moved the content to left but the result is the same.
    can any one tell me how to solve the issue.
    Regards,
    Srinivas

    Hi,
    Try to check the lenght of the field/var that you are printing.
    change the alignment doesnt solve the problem.
    Check in your code what is the lenght and if is the same in your form.
    Sample:
    &j_1bprnfli-cfop(4C)&
    prints only 4 digits of the variable j_1bprnfli-cfop.
    Regards.
    Rodrigo Paisante

  • Problem in script printing

    Hi Guru's
    I have a problem in script printing.
    The quantity and netprice are printing incorrectly. i.e., quantity should print as 1.000 where as it is printing as 1,000 and net price is printing as 5,30 instead of 5.30.
    I have checked in the owndata settings it is like 1,234,56.00.
    I would like to know whether any settings will be there or i need to do any modificatione
    Waiting for you reply.

    Hi!
    Here you can find the SAPScript formatting options.
    http://help.sap.com/saphelp_47x200/helpdata/en/d1/803411454211d189710000e8322d00/content.htm
    If it is not good for you, you might code it in your printer program and put it into a character variable.
    Regards
    Tamá

  • Lately and i dont know why i see a pop up about a problem with script. can some1 help me?

    there is a pop up about a problem with script. it ask me end and contuniue the script. i didnt have that problem before. plz help me it gets really irritating. it asks a lot

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Having multiple problems with script - NTFS Permissions and AD Groups

    Hi, all!  I'm having multiple problems with my first script I've written with Powershell.  The script below does the following:
    1. Prompts the user for a corporate division under which a shared folder will be created, and adjusts variables accordingly.
    2. Prompts if the folder will be a global folder or an office/location-specific folder, and makes appropriate adjustments to variables.
    3.  If a global folder, prompts for the name.  If an office/location-specific folder, prompts for each component of the street address, city and state and an optional modifier.  I've prompted for this information in this way because the information
    is used differently later on in the script.
    4.  Verifies the entered information and requests confirmation to proceed.
    5.  Creates the folder.
    6.  Creates an AD OU and/or security group(s).
    7.  Applies appropriate security groups to the new folder and removes undesired permissions.
    Import-Module ActiveDirectory
    $Division = ""
    $DivAbbr = ""
    $OU = ""
    $OUDrive = "AD:\"
    $FolderName = ""
    $OUName = ""
    $GroupName = ""
    $OURoot = "ou=DFS Restructure Testing OU,ou=Pennsylvania Camp Hill 4410 Industrial Park Rd,ou=Locations,ou=Camp Hill,dc=jacobsonco,DC=com"
    $FSRoot = "E:\"
    $FolderPath = ""
    $DefaultFolders = "Archive","Customer Service","Equipment","Inbounds","Management","Outbounds","Processes","Projects","Quality","Reports","Returns","Safety","Schedules","Time Keeping","Training"
    [bool]$Location = 0
    do {
    $userInput = Read-Host "Enter CLS Division: (W)arehousing, (S)taffing, or (P)ackaging"
    Switch ($userInput)
    W {$Division = "Warehousing"; $DivAbbr = "WHSE"; $OU = "ou=Warehousing,"; break}
    S {"Staffing is not yet implemented."; break}
    P {"Packaging is not yet implemented."; break}
    default {"Invalid choice. Please re-enter."; break}
    while ($DivAbbr -eq "")
    write-host ""
    write-host ($Division + " was selected.")
    $FolderPath = $Division + "\"
    write-host ""
    $choice = ""
    do {
    $choice = Read-Host "Will this be a (G)lobal folder or (L)ocation folder?"
    Switch ($choice)
    G {$Location = $false; break}
    L {$Location = $true; $FolderPath = $FolderPath + "Locations\"; $OU = "ou=Locations," + $OU; break}
    default {"Invalid choice. Please re-enter."; $choice = ""; break}
    while ($choice -eq "")
    write-host ""
    write-host ("Location is set to: " + $Location)
    write-host ""
    if ($Location -eq $false) {
    $FolderName = Read-Host "Please enter folder name:"
    $GroupName = $DivAbbr + " " + $FolderName
    } else {
    $input = Read-Host "Please enter two-letter state abbreviation:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter city:"
    $FolderName = $FolderName + $input + " "
    $input = Read-Host "Please enter street address number only:"
    $FolderName = $FolderName + $input
    $GroupName = $DivAbbr + " " + $FolderName
    $FolderName = $FolderName + " "
    $input = Read-Host "Please enter street name:"
    $FolderName = $FolderName + $input
    $input = Read-Host "Please enter any optional information to appear in folder name:"
    if ($input -ne "") {
    $FolderName = $FolderName + " " + $input
    $OUName = $FolderName
    write-host
    write-host "Path for folder: "$FSRoot$FolderPath$FolderName
    write-host "AD Path: "$OUDrive$OU$OURoot
    write-host "New OU Name: "$OUName
    write-host -NoNewLine "New Security Group names: "$GroupName
    if ($Location -eq $true) { write-host " and "$GroupName" MGMT" }
    write-host
    $input = Read-Host "Please confirm creation of new site/folder: (Y/N) "
    if ($input -ne "Y") { Exit }
    write-host
    write-host -NoNewLine "Folder exists: "; Test-Path ($FSRoot + $FolderPath + $FolderName)
    if (Test-Path ($FSRoot + $FolderPath + $FolderName)) {
    Write-Host "Folder already exists! Skipping folder creation..."
    } else {
    write-host "Folder does not exist. Creating..."
    new-item -path ($FSRoot + $FolderPath) -name $FolderName -itemtype directory
    Set-Location ($FSRoot + $FolderPath + $FolderName)
    if ($Location -eq $true) {
    $tempOUName = "ou=" + $OUName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "OU exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "OU already exists! Skipping OU creation..."
    } else {
    write-host "OU does not exist. Creating..."
    New-ADOrganizationalUnit -Name $OUName -Path ($OU + $OURoot) -ProtectedFromAccidentalDeletion $false
    $GroupNameMGMT = $GroupName + " MGMT"
    if (!(Test-Path ($OUDrive + "CN=" + $GroupName + "," + $tempOUName + $OU + $OURoot))) { write-host "Normal user group does not exist. Creating..."; New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    if (!(Test-Path ($OUDrive + "CN=" + $GroupNameMGMT + "," + $tempOUName + $OU + $OURoot))) { write-host "Management user group does not exist. Creating..."; New-ADGroup -Name $GroupNameMGMT -GroupCategory Security -GroupScope Global -Path ("OU=" + $OUName + "," + $OU + $OURoot)}
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    # $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    write-host $BIUsersSID.Value
    # out-string -inputObject $BIUsers
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $objUser = New-Object System.Security.Principal.NTAccount($ADGroupName)
    $objUser.Translate([System.Security.Principal.SecurityIdentifier]).Value
    write-host $ADGroupName
    write-host $objUser.Value
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    $ADGroupName = "JACOBSON\" + $GroupNameMGMT
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    Out-String -InputObject $ar
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    } else {
    $tempOUName = "cn=" + $GroupName + ","
    write-host
    write-host $OUDrive$tempOUName$OU$OURoot
    write-host
    write-host -NoNewLine "Group exists: "; Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)
    if (Test-Path ($OUDrive + $tempOUName + $OU + $OURoot)) {
    Write-Host "Security group already exists! Skipping new security group creation..."
    } else {
    write-host "Security group does not exist. Creating..."
    New-ADGroup -Name $GroupName -GroupCategory Security -GroupScope Global -Path ($OU + $OURoot)
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $ADGroupName = "JACOBSON\" + $GroupName
    $FolderACL.SetAccessRuleProtection($True,$True)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($ADGroupName,"Modify","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    My problems right now are in the assignment/removal of security groups on the newly-created folder, and the problems are two-fold.  Yes, I am running this script as an Administrator.
    First, I am unable to remove the BUILTIN\Users group from the folder when this is an office/location-specific folder.  I've tried to remove the group in several different ways, and none are having any effect.  Oddly, if I type in the lines directly
    into Powershell, they work as expected.  I've tried the following methods:
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $FolderACL.Access | where {$_.IdentityReference -eq "BUILTIN\Users"} | %{$FolderACL.RemoveAccessRuleAll($_)}
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    $FolderACL.SetAccessRuleProtection($True,$True)
    $BIUsers = New-Object System.Security.Principal.NTAccount("BUILTIN\Users")
    $BIUsersSID = $BIUsers.Translate([System.Security.Principal.SecurityIdentifier])
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($BIUsersSID.Value,"ReadAndExecute,AppendData,CreateFiles,Synchronize","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.RemoveAccessRuleAll($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    In the first case, the script goes through and has no apparent effect because afterwards, I do a get-acl and the BUILTIN\Users group is still there, although when looking through the GUI, inheritance appears to have been broken from the parent folder.
    In the second case, I get the following error message:
    Exception calling "RemoveAccessRuleAll" with "1" argument(s): "Some or all identity references could not be translated."
    At C:\Users\tesdallb\Documents\FileServerBuild.ps1:110 char:5
    +     $FolderACL.RemoveAccessRuleAll($Ar)
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : IdentityNotMappedException
    This seems strange that the local server is unable to translate the SID of a BUILTIN account.  I've also tried explicitly putting in the BUILTIN\Users SID in place of the variable in the New-Object line, but that gives me the same error.  I've
    also tried the solutions given in this thread:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/ad59dc58-1360-4652-ae09-2cd4273cbd4f/remove-acl-issue?forum=winserverpowershell and at this URL:
    http://technet.microsoft.com/en-us/library/ff730951.aspx but these solutions also failed to have any effect.
    My second problem is when I try to apply the newly-created security groups, I also will get the "Some or all identity references could not be translated."  I thought I had found a workaround to the problem by adding the -PassThru option to
    the New-ADGroup commands, because it would output the SID of the group after creation, however a few lines later, the server is unable to translate the account to apply the security groups to the folder.
    My first Powershell script has been working well up to this point and now I seem to have hit a showstopper.  Any help is appreciated.
    Thanks!

    I was hoping to stay with strictly Powershell, but unless I can find a Powershell solution, I may resort to ICACLS.
    As for the problems with my groups not being translatable right after creating them, I think I have solved this problem by using the -Server parameter on all my New-ADGroup commands and this example code seems to have gotten around the translation problem,
    again utilizing the -Server parameter on the Get-ADGroup command:
    get-acl ($FSRoot + $FolderPath + $FolderName) | fl
    $FolderACL = get-acl ($FSRoot + $FolderPath + $FolderName)
    # Add the new normal users group to the folder with Read and Execute permissions
    $GroupSID = Get-ADGroup -Identity $GroupName -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity,"ReadAndExecute","ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    # Add the management users group to the folder with Modify permissions
    $GroupMGMTSID = Get-ADGroup -Identity $GroupNameMGMT -Server chadc01.jacobsonco.com | Select-Object -ExpandProperty SID
    $SIDIdentity = New-Object System.Security.Principal.SecurityIdentifier($GroupMGMTSID)
    $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule($SIDIdentity, "Modify", "ContainerInherit, ObjectInherit", "None", "Allow")
    $FolderACL.AddAccessRule($Ar)
    Set-ACL ($FSRoot + $FolderPath + $FolderName) $FolderACL
    Going this route seems to ensure that the Domain Controller I'm creating my groups on is the same one that I'm querying for the group's SID to use in the FileSystemAccessRule.  It's been working fairly consistently.
    Still having issues with the translation of the BUILTIN\Users group, though. 

  • Page problem in script

    Hi,
    I have one more problem. Actually my script having only one page output. But in second page also logo is printing.
    I don't want second page. In first page I have only two windows main & logo.
    Could you please suggest me how to do it.

    Hi!
    You have to set up 2 pages in SE71, FIRST, and NEXT.
    FIRST has to contain the LOGO and MAIN windows.
    NEXT has to contain only the MAIN window.
    At the FIRST page you have to set the next page as NEXT page.
    At the NEXT page you have to set the next page as NEXT page (same as FIRST).
    This makes your NEXT sides not to print the logo and handles accidentally data overflow to your second page.
    Check out if there is an explicit /: NEW-PAGE in your sapscript, this causes problems also.
    Regards
    Tamás
    Message was edited by:
            Tamás Nyisztor

  • Problem in script output sending mail

    hi ,
    I have a problem sending a mail with script output as attachment . I have searched in the forum for the answers but none is solved my question.
    I am sending the data to the otf and it is getting the otfdata. but it is not showing  the data on the script when it is sent as an attachment to the email , but it is showing only script with null values filled.( means i am getting the mail with attachment but in that attachment there is no data filled in the script send).
    the code is like this ..
    here i am filling the otfdata and i am exporting the otfdata
    CALL FUNCTION 'ZMM_ARRANG_ENTRY_ABR_NATRAB'
        EXPORTING
          i_nast       = nast
          i_fonam      = tnapr-fonam
          i_xscreen    = pi_xscreen
          i_arc_params = arc_params
          i_toa_dara   = toa_dara
        IMPORTING
          e_retcode    = px_retcode
        EXCEPTIONS
          OTHERS       = 1.
      IF ( sy-subrc <> 0 ).                "Fehler
        MOVE sy-subrc TO px_retcode.
        IF ( pi_xscreen = 'X' ).           "Ausgabe auf Bildschirm
          MESSAGE ID     sy-msgid
                  TYPE   sy-msgty
                  NUMBER sy-msgno
                  WITH   sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
      ELSE.
    *---Import OTFDATA from the memory
        IMPORT  it_otfdata FROM MEMORY ID 'OTF'.
      ENDIF.
      wa_maildata-obj_name = 'EMAIL'.
      wa_maildata-obj_descr = 'Settlement Details'.
    *-----mail contents
      it_mailtext-line = 'Sub-sequent settlement Details'.
      APPEND it_mailtext.
      DESCRIBE TABLE it_mailtext LINES v_lines.
      READ TABLE it_mailtext INDEX v_lines.
      wa_maildata-doc_size = ( v_lines - 1 ) * 255 + STRLEN( it_mailtext ).
    *Creation of the entry for the compressed document
      CLEAR it_mailpack-transf_bin.
      it_mailpack-head_start = 1.
      it_mailpack-head_num   = 0.
      it_mailpack-body_start = 1.
      it_mailpack-body_num   = v_lines.
      it_mailpack-doc_type   = 'RAW'.
      APPEND it_mailpack.
    *-----Get OTF data
      LOOP AT it_otfdata.
        it_mailcont-line = it_otfdata.
        APPEND it_mailcont.
      ENDLOOP.
    *---Move  OTF data into binary table
      LOOP AT it_mailcont.
        MOVE-CORRESPONDING it_mailcont TO it_mailbin.
        APPEND it_mailbin.
      ENDLOOP.
    *---Get no of lines in Binary data table
      DESCRIBE TABLE it_mailbin LINES v_lines.
    *---Fill name of the header of email
      it_mailhead = 'Subsequent Settlement Details.OTF'.
      APPEND it_mailhead.
    *---Creation of the entry for the compressed attachment
      it_mailpack-transf_bin   = 'X'.
      it_mailpack-head_start   = 1.
      it_mailpack-head_num     = 1.
      it_mailpack-body_start   = 1.
      it_mailpack-body_num     = v_lines.
      it_mailpack-doc_type     = 'OTF'.
      it_mailpack-obj_name     = 'EMAIL'.
      it_mailpack-obj_descr    = 'Settlement Details'.
      it_mailpack-doc_size     = v_lines * 255.
      APPEND it_mailpack.
    *----Get email address from the address number of vendor
      CALL FUNCTION 'ADDR_GET_REMOTE'
        EXPORTING
          addrnumber = l_adrnum
        TABLES
          adsmtp     = it_adsmtp.
    *----Get mail address
      READ TABLE it_adsmtp WITH KEY remark = 'AP_SUB_SETT'.
      IF sy-subrc = 0.
        it_mailrec-receiver   = it_adsmtp-smtp_addr.
        it_mailrec-rec_type   = 'U'.
        it_mailrec-com_type   = 'EXT'.
        APPEND it_mailrec.
    *---Send email with PDF attachment
        CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
          EXPORTING
            document_data = wa_maildata
            put_in_outbox = 'X'
            COMMIT_WORK   = 'X'
          TABLES
            packing_list  = it_mailpack
            object_header = it_mailhead
            contents_bin  = it_mailbin
            contents_txt  = it_mailtext
            receivers     = it_mailrec.
      ELSE.
        MESSAGE 'No email id Exist for the vendor' TYPE 'E'.
      ENDIF.
    please suggest me with your valuable answers .
    Regards,
    Venkat Appikonda.

    Hi venkat
    Just check if this helps you.
    The following part of the code does exactly that.
    Selecting details from the spool request table.
      SELECT * FROM tsp01 INTO TABLE tb_spool
               WHERE rqowner = sy-uname.
      IF sy-subrc EQ 0.
        SORT tb_spool DESCENDING BY rqcretime.
        CLEAR : tb_spool.
        READ TABLE tb_spool INDEX 1.
    convert spool into PDF format.
        CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
             EXPORTING
                  src_spoolid = tb_spool-rqident
             TABLES
                  PDF         = tb_lines.
      ENDIF.
    After this, on execution we get the below mentioned message.
    This indicates that a PDF of the SAP Script has been created which is in the format u201C132-long stringsu201D.
    In order to send the mail across, the mailing format of the PDF supports u201C255-long stringsu201D. So, the present u201C132-long stringsu201D needs to be converted into u201C255-long stringsu201D. This along with the mail code is mentioned below.
      DATA: lv_receiver(50) TYPE c.
      REFRESH: tb_obj_txt,
               tb_obj_bin,
               tb_obj_head,
               tb_paklist,
               tb_receiver.
      CLEAR: tb_obj_txt,
             tb_obj_bin,
             tb_paklist,
             tb_obj_head,
             tb_receiver.
      CLEAR: tb_adrc.
    IF NOT tb_adrc[] IS INITIAL.
    Reading the address table with the key as address number.
        READ TABLE tb_adrc WITH KEY addrnumber = tb_kna2-adrnr.
        IF sy-subrc EQ 0.
    Vendor Email ID.
          SELECT SINGLE smtp_addr
             FROM adr6
             INTO wf_mailaddr
             WHERE addrnumber = tb_adrc-addrnumber.
          IF sy-subrc EQ 0.
    Moving the mail address to the receiver itab
            MOVE wf_mailaddr TO tb_receiver-receiver.
            tb_receiver-rec_type = text-011.
            APPEND tb_receiver.
          ELSE.
            CONCATENATE text-004 tb_kna2-kunnr text-005 INTO lv_receiver
                                       SEPARATED BY space.
    If pa_call is initial, the receiver ID is printed; else an INVALID E-mail ID    message gets flashed.
            IF pa_call IS INITIAL.
              WRITE :/ lv_receiver.
            ENDIF.
            CLEAR: itab.
            itab-kunnr = tb_kna2-kunnr.
            itab-message = lv_receiver.
            APPEND itab.
            EXIT.   u201CNo mailing for invalid Email id
          ENDIF.
        ENDIF.
      ENDIF.
      wf_name = sy-uname.
      wf_year = tb_main-bldat(4).
      wf_mon = tb_main-bldat+4(2).
    *This FM gives the name of the months. 
    CALL FUNCTION 'MONTH_NAMES_GET'
           EXPORTING
                language    = sy-langu
           TABLES
                month_names = tb_months.
      IF sy-subrc EQ 0.
        READ TABLE tb_months WITH KEY mnr = wf_mon.
        IF sy-subrc EQ 0.
          wf_name = tb_months-ktx.
        ENDIF.
      ENDIF.
      CLEAR: tb_contp.
    IF NOT tb_contp[] IS INITIAL.
    *Reading the contp itab as per the customer entered on the selection screen.
        READ TABLE tb_contp WITH KEY bukrs = pa_bukrs
                                     kunnr =  tb_kna2-kunnr.
        IF sy-subrc EQ 0.
        CONCATENATE text-006 text-008 tb_contp-contp text-008 tb_kna2-kunnr
                              text-008 wf_name text-008 wf_year INTO wf_sub.
        ENDIF.
      ELSE.
        CONCATENATE text-006 text-008 tb_kna2-kunnr text-008 wf_name
                                        text-008 wf_year INTO wf_sub.
      ENDIF.
    Subject and Description
      CLEAR wa_docdata.
      wa_docdata-obj_name  = text-007.
      wa_docdata-obj_descr = wf_sub.
      wa_docdata-obj_langu = sy-langu.
    Write main body
      tb_obj_txt = text-009.
      APPEND tb_obj_txt.
      CLEAR tb_obj_txt.
      CLEAR  tb_paklist.
      tb_paklist-head_start = 1.
      tb_paklist-head_num   = 3.
      tb_paklist-body_start = 1.
      tb_paklist-body_num   = 60.
      tb_paklist-doc_type   = text-012.
      APPEND tb_paklist.
      CLEAR  tb_paklist.
    create PDF file
    Transfer the 132-long strings to 255-long strings
      LOOP AT tb_lines.
        TRANSLATE tb_lines USING ' ~'.
        CONCATENATE wf_buffer tb_lines INTO wf_buffer.
      ENDLOOP.
      TRANSLATE wf_buffer USING '~ '.
      DO.
        tb_obj_bin = wf_buffer.
        APPEND tb_obj_bin.
        SHIFT wf_buffer LEFT BY 255 PLACES.
        IF wf_buffer IS INITIAL.
          EXIT.
        ENDIF.
      ENDDO.
      DESCRIBE TABLE tb_obj_bin LINES lv_lines.
      READ TABLE tb_obj_bin INDEX lv_lines.
      lv_size = ( lv_lines - 1 ) * 255 + STRLEN( tb_obj_bin ).
    Create attachment notification
      tb_paklist-transf_bin = co_x.
      tb_paklist-head_start = 1.
      tb_paklist-head_num   = 0.
      tb_paklist-body_start = 1.
      tb_paklist-body_num   = lv_lines.
      tb_paklist-doc_type   = text-013.
      tb_paklist-obj_descr  = text-010.
      tb_paklist-obj_name   = text-010.
      tb_paklist-doc_size   = lv_size.
      APPEND tb_paklist.
    *mail the PDF to the receiver.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = wa_docdata
                sender_address             = wf_name
                sender_address_type        = text-014
           TABLES
                packing_list               = tb_paklist
                object_header              = tb_obj_head
                contents_bin               = tb_obj_bin
                contents_txt               = tb_obj_txt
                receivers                  = tb_receiver
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
      IF sy-subrc <> 0.
        CONCATENATE text-003 tb_kna2-kunnr text-005 INTO lv_receiver
                                SEPARATED BY space.
        CLEAR: itab.
        itab-kunnr = tb_kna2-kunnr.
        itab-message = lv_receiver.
        APPEND itab.
        IF pa_call IS INITIAL.
          WRITE :/ lv_receiver.
        ENDIF.
      ELSE.
        CONCATENATE text-002 tb_kna2-kunnr text-005 INTO lv_receiver
                                SEPARATED BY space.
        CLEAR: itab.
        itab-kunnr = tb_kna2-kunnr.
        itab-message = lv_receiver.
        APPEND itab.
        IF pa_call IS INITIAL.
          WRITE :/ lv_receiver.
        ENDIF.
      ENDIF.
    Hope this helps.
    Harsh

  • Problem with scripts

    Certain sites, most recently The Daily Show, will not load for me. I get a box that says:
    "Warning: unresponsive script
    A script on this page may be busy, or it may have stopped responding. You can stop the script now, or you can continue to see if the script will complete.
    Script: resource://gre/modules/ConsoleAPIStorage.jsm:157
    [Continue] [Stop script]"
    Whether I click to continue or stop the script, nothing happens except that the box goes away and then comes up again. If I try to close the tab, it just hangs and then finally shows the box again.
    Finally, Firefox just gets completely hung up, and I have to close it out with the task manager.
    Meanwhile, everything runs fine in Internet Explorer.
    Can anyone please help me solve this problem?
    Thanks,
    Ellen

    Is DOM storage enabled?
    You can check the value of the dom.storage.enabled pref on the about:config page.
    *http://kb.mozillazine.org/about:config
    You can also try to delete the webappsstore.sqlite file in the Firefox Profile Folder to remove all data (cookies) stored in DOM storage.
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    You can try to reset Firefox and create a new profile.
    *https://support.mozilla.org/kb/reset-firefox-easily-fix-most-problems

  • Abt clear value problem in scripts

    Hi,
    Im working on scripts.in scripts im calculating totals by using subroutine.but im facing problem.
    my problem is first time i calculated it's working fine.
    when i go back and enter other order number it's taking previous order number and present total and it displays these totals.
    i clear the it_out in se38 and the varible which holds the total.
    but it's not working.
    please help me in this.
    Thanks & Regards,
    Srinivas

    Hi this is my abap code.
    FORM get_extpr_tot TABLES it_input STRUCTURE itcsy it_output STRUCTURE itcsy.
    REFRESH : it_output.
    CLEAR v_extpr_tot.
      DATA: v_vbeln2(10) TYPE n.
      REFRESH it_input.
      Clear v_vbeln2.
    clear v_extpr_tot1.
      READ TABLE it_input INDEX 1.
      MOVE it_input-value TO v_vbeln2.
      READ TABLE it_input INDEX 2.
      MOVE it_input-value TO v_extpr_tot.
      v_extpr_tot1 = v_extpr_tot1 + v_extpr_tot.
      READ TABLE it_output INDEX 1.
      WRITE v_extpr_tot1 TO it_output-value LEFT-JUSTIFIED.
      MODIFY it_output INDEX 1.
       Clear it_output.
      clear v_extpr_tot1.
    REFRESH it_output.
    ENDFORM.                    "GET_EXTPR_TOT
    and my se71 code is
    PERFORM GET_EXTPR_TOT IN PROGRAM ZSP_SD_ORDCM.
    USING &VBDKA-VBELN&
    USING &V_PRICE&
    CHANGING &V_EXTPR_TOT1&
    ENDPERFORM
    please help me

  • Typical problem in SCRIPTS

    Hello Experts,
    I am working on SAP script where i have to display the records in a page from a internal table.
    begin of xtab occurs 0,
    vbeln like vbak-vbeln,
    matnr like mara-matnr,
    maktx like makt-maktx,
    erdat like vbak-erdat,
    date_var(1),       "indicates date change with 'x'
    status(1),         "indicates vbeln change with 'x'
    end of xtab.
    now my requirement to display to have the script is
    1) when ever the date_var is 'X' a new page should trigger.
    2) when ever status = 'X' there should be
    a line after the display of records indicating the change of vbeln saying
    "there are xxx number of materials for vbeln"
    THE PROBLEM:-
        suppose if a page can hold 20 records. and if I have 23 records.  the 3 records are dispalying in next page, with "there are xxx number of materials for vbeln"
    which is fine.
         But if when there is change of date at 24th record, where a new page should trigger- this
         is not happening and further more records from 24 index are attaching after the
         "there are 23 number of materials for vbeln are used".
        My exceptation over this display should is - it should display 20 records in frist page
        and move to next page to display 3 records along with "there are 23 number of materials for
        vbeln are used"  ( As the page could hold only 20 records). and THEN AFTER THIS AS THERE IS
        CHANGE IN DATE IT SHOULD TRIGGER A NEW PAGE to display from 24th record.
      Please Help me in giving the code for this.
    Thanks
    Mary

    Hi Mary,
    I suppose you can modify the printing program.
    Try to work with an internal table like:
    <i>erdat like vbak-erdat,
    vbeln like vbak-vbeln,
    matnr like mara-matnr,
    maktx like makt-maktx,</i>
    So the code could be something as:
    <i>SORT XTAB BY ERDAT VBELN
    LOOP AT XTAB
    AT NEW ERDAT
      if sy-tabix > 1.
        NEW-PAGE (function).
      endif.
    ENDAT
    AT END OF VBELN.
      WRITE_FORM (function)
      Element = text containing numbers of materials
    ENDAT
    ENDLOOP</i>

  • Total Problem in scripts

    Hi,
    I'm facing one big issue in scripts.ie: in printing totals.
      for totals i write a subroutine in scripts.
      it's working fine.it's displaying totals well.here my problem is first i see the print preview.at that time total is correct.but when i came back and see the print preview again it displaying wrong.ie if first time the total is 'A'.Then second time it displaying like (A+A).
      other problem is when i see the print preview and displays it and go back and took the print at that time also it displaying (A+A).
    My code is like :
    *&      Form  GET_EXTPR_TOT
        this routine will get the LINE ITEM EXTENDED PRICE TOTALS When
        there is no PROMO CODE.
    form get_extpr_tot tables it_input structure itcsy it_output structure itcsy.
      data: v_vbeln2(10) type n.
      clear it_input.
      clear v_vbeln2.
      read table it_input index 1.
      move it_input-value to v_vbeln2.
      read table it_input index 2.
      move it_input-value to v_extpr_tot.
      v_extpr_tot1 = v_extpr_tot1 + v_extpr_tot.
      read table it_output index 1.
      write v_extpr_tot1 to it_output-value left-justified.
      modify it_output index 1.
      clear it_output.
    endform.                    "GET_EXTPR_TOT
    Please Send ur valuable answers.
    Thanks,
    Srinivas.

    Hi Srinivas,
    In your script you can define the total variable in one of the header related elements that will be called. for exaple you can define it in the element
    /E HEADER_TARGET_VALUE
    /: DEFINE &V_EXTPR_TOT1& = ' '
    and change your code in ITEM_LINE_PRICE_QUANTITY element as follows
    /E ITEM_LINE_PRICE_QUANTITY
    /* Begin of modification (RICEF/Issue Number:F-SD-04) by sbhavanam
    /: PERFORM GET_EXTPR_TOT IN PROGRAM ZSP_SD_ORDCM.
    /: USING &VBDKA-VBELN&
    /: USING &V_PRICE&
    /: CHANGING &V_EXTPR_TOT1&
    /: ENDPERFORM
    your abap should look like this.
    FORM get_extpr_tot TABLES it_input STRUCTURE itcsy it_output STRUCTURE itcsy.
    DATA: v_vbeln2(10) TYPE n
    * CLEAR it_input.
    CLEAR v_vbeln2.
    CLEAR v_extpr_tot.
    READ TABLE it_input INDEX 1.
    MOVE it_input-value TO v_vbeln2.
    READ TABLE it_input INDEX 2.
    MOVE it_input-value TO v_extpr_tot.
    read table it_input index 3.
    move it_input-value to v_extpr_tot1.
    v_extpr_tot1 = v_extpr_tot1 + v_extpr_tot.
    * v_extpr_tot_tst = v_extpr_tot_
    READ TABLE it_output INDEX 1.
    WRITE v_extpr_tot1 TO it_output-value LEFT-JUSTIFIED.
    MODIFY it_output INDEX 1.
    CLEAR it_output.
    ENDFORM. "GET_EXTPR_TOT
    that should solve your issues.
    -Kalyan

  • Problem : tcl script for filter IPSec cosmetic log

    Hi all, I would like some advice from anyone who ever see this case. I applied tcl script for filter ipsec error log that log is cosmetic. But my site want to don't see this log from router log. I already create tcl script for filter it out. Ok script can work fine but it more work. It filter other message not just ipsec log out. I check cisco device that support script. How can I fix this problem.
    See my detail of script and ios version of router :
    script :
    # VPN_Error.tcl  This script deletes all log messages about VPN error messages
    # The script will filter by combination between facility-serverity and mnemonic      
    # Created on 05-Oct-2012.
    set msgs [list {CRYPTO-4-RECVD_PKT_MAC_ERR} {VPN_HW-1-PACKET_ERROR} {CRYPTO-4-RECVD_PKT_NOT_IPSEC} {CRYPTO-4-PKT_REPLAY_ERR}]
    set fac_sev_mnem "${::facility}-${::severity}-${::mnemonic}"
    foreach msg $msgs {
        if { $msg == $fac_sev_mnem } {
        return ""
    return $::orig_msg
    ios router version :
    : c2800nm-adventerprisek9-mz.124-25f.bin
    : c2800nm-adventerprisek9-mz.124-7b.bin
    log information and configuration
    When I applied command:
    logging filter flash:VPN_Filter2.tcl
    logging buffered filtered 4096 debugging
    show log file:
    router#sh logg
    Syslog logging: enabled (11 messages dropped, 1 messages rate-limited,
                    0 flushes, 0 overruns, xml disabled, filtering enabled)
        Console logging: level debugging, 18145 messages logged, xml disabled,
                         filtering disabled
        Monitor logging: level debugging, 428 messages logged, xml disabled,
                         filtering disabled
            Logging to: vty322(2)
        Buffer logging: level debugging, 0 messages logged, xml disabled,
                        filtering enabled (0 messages logged)
        Logging Exception size (4096 bytes)
        Count and timestamp logging messages: disabled
    Filter modules:
        flash:VPN_Filter2.tcl  
        Trap logging: level informational, 47011 message lines logged
            Logging to 10.145.0.25 (udp port 514, audit disabled, link up), 47011 message lines logged, xml disabled,
                   filtering disabled
            Logging to 10.247.17.41 (udp port 514, audit disabled, link up), 47011 message lines logged, xml disabled,
                   filtering disabled
            Logging to 10.247.17.45 (udp port 514, audit disabled, link up), 47011 message lines logged, xml disabled,
                   filtering disabled
    --More--                          
    Log Buffer (4096 bytes):
    router#
    If you have some more information. Please tell me.
    Thank you for your advice

    It looks like your script has an error.  You have an extra '}'.  It should be:
    # VPN_Error.tcl  This script deletes all log messages about VPN error messages# The script will filter by combination between facility-serverity and mnemonic       # Created on 05-Oct-2012.#set msgs [list {CRYPTO-4-RECVD_PKT_MAC_ERR} {VPN_HW-1-PACKET_ERROR} {CRYPTO-4-RECVD_PKT_NOT_IPSEC} {CRYPTO-4-PKT_REPLAY_ERR}]set fac_sev_mnem "${::facility}-${::severity}-${::mnemonic}"foreach msg $msgs {    if { $msg == $fac_sev_mnem } {        return ""    } } return $::orig_msg

  • InDesign Fonts problem Bookmark Script

    Dear All,
    We developed one script for creation of Bookmark in InDesign CS2. When we are runnign this script content formatting is getting anmoly changed, I analyzed InDesign file and came to know that due to a font called "Trade Gothic Bold No. 2" due to this font all formatting of the content is getting change.
    But in script I am not doing anything with fonts, only we are untagging the content to take the reference for creation of bookmark. The script is working very fine for other files from last 6-7 months but only this file is having this kind of problem.
    If any one know the reason please let me know, I know this might be not related to scripting forum but if we recieved any issue related to it. Please let me know the solutions also how to aviod these kind of problem.
    Regards,
    Rajeev

    In all likelihood, you have based one or more of your paragraph styles on "[Basic Paragraph]". If the Basic Paragraph style differs from document to document, then when you paste text in it will change to match Basic Paragraph in this doc instead.
    Edit the styles in both documents to be based on "No Style" instead.

  • Having problems compiling script

    I am rather new to java an started a couple of days ago and I ran into a problem compiling this script in the command line
    class VariableDemo {
    public static void main (String args[]) {
    int num = 1000;
    System.out.println (num + " is the value of num") ;
    At first I forgot to capitolize the 'S' in System (which is why I was getting errors) but after I had corrected it , I still could not get it to compile in a command prompt
    even after I corrected my mistakes, I still get this error:
    error: cannot read: VariableDemo.java
    1 error
    When I ran it through JCreator it compiled it just fine and found no errors. SO I just want to know if it is some thing that has to do with the command line or is there an error I am not seeing?
    I am running Windows XP Pro with service pack 2 and using JCreator 3.50.010

    Sorry, I am new to this I just called it script out of ignorance, but, yes it is in the same directory. I even Pathed it out again to be sure.

Maybe you are looking for

  • MS-6191 256mb PC100

    Hello all, Recently I bought a 256mb PC100 stick to install on my MS6191 but the bugger doesn't want to boot with it. According to the manual the board can take 256mb per bank upto 512mb max on 2 banks.The new stick is tested and found ok in another

  • Dynamic Configuration Header is Missing

    Hi, Am getting this following when I tried a simple UDF in mapping, please let me know your thoughts "Exception caught by adapter framework: Dynamic Configuration Header is Missing." UDF DynamicConfiguration conf = (DynamicConfiguration) container.ge

  • BPEL tutorial or Jdeveloper 11g ?

    Hi all, I have just installed SOA suite 11g.I am trying to create a sample BPEL process,I am unable to find create new BPEL project in Jdev 11g. Can anyone kindly post the link for bepl development tutorial in j developer 11g ? Thank You

  • How to read an Excel "~$" Lock File in VBA?

    When Excel opens a Workbook for possible updating it creates a temporary hidden file in the same folder as the document being opened:  its file-name is the same as the workbook but with the special characters "~$" in front. This Excel "Lock File" con

  • ADF One to Many relationship

    I'm a bit confused on how to create one to many relationships with ADF. Let's say I have a make and model table. One make can have many models. Now let's say I create a Business Facade like this (I'm using JavaBeans): public Collection getMakes () {