Itcsy structure

Hello,
I am calling a subrouting from SAP SCRIPT.
But in the subroutine I am not able to change the currecy value to integer.
FORM cal_Tot tables ntwr structure itcsy
tot structure itcsy.
DATA value type vbap-netwr.
value = ntwr-value.
ENDFORM.
If the value of ntwr-value is 300.0 its working but
if the value of ntwr-value is 1,345.0 this is giving runtime error.
How can store 1,345 into variable value

hi,
try to replace command ',' with ' '. it will work i think..
REPLACE ',' IN L_QUANTITY WITH ' '.
    CONDENSE L_QUANTITY NO-GAPS.
I THINK IT WILL WORK

Similar Messages

  • How to add new fields in sap copied standard form using itcsy structure

    hi guys,
      i want add some fields in sap script copied standard form using itcsy structure.
    let me know the procedure with any example.
    thanks,
    anitha.

    Hii anitha
    plz c code below
    Syntax goes like this
    /: 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.
    Example:
    In script form
    /: PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
    /: USING &EKKO-EKORG&
    /: USING &EKPO-WERKS&
    /: USING &EKKO-EKGRP&
    /: USING &EKKO-BSTYP&
    /: CHANGING &COMPNAME&
    /: CHANGING &SENDADR&
    /: CHANGING &INVCADR&
    /: CHANGING &COMPADR&
    /: CHANGING &COVERLTR&
    /: CHANGING &SHIPADR&
    /: CHANGING &REMINDER&
    /: CHANGING &REJECTION&
    /: CHANGING &POSTADR&
    /: CHANGING &LOGO&
    /: ENDPERFORM
    In program
    FORM Read_texts - To extract the standard texts from the table *
    FORM READ_TEXTS TABLES IN_PAR STRUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA : L_EKORG TYPE EKORG,
    L_WERKS TYPE WERKS_D,
    L_BSTYP TYPE BSTYP,
    L_EKGRP TYPE BKGRP.
    READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
    CHECK SY-SUBRC = 0.
    L_EKORG = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
    CHECK SY-SUBRC = 0.
    L_WERKS = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
    CHECK SY-SUBRC = 0.
    L_EKGRP = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
    CHECK SY-SUBRC = 0.
    L_BSTYP = IN_PAR-VALUE.
    CLEAR Z08M1_ORG_TEXTS.
    SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
    AND WERKS = L_WERKS
    AND EKGRP = L_EKGRP
    AND BSTYP = L_BSTYP.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
    AND WERKS = L_WERKS
    AND EKGRP = L_EKGRP
    AND BSTYP = SPACE.
    ENDIF.
    READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'SENDADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'INVCADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'COMPADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'REMINDER'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'REJECTION'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'POSTADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'LOGO'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    reward points if useful
    regards
    Jaipal

  • Script itcsy structure problem

    HI Friends,
    Using ITCSy structure , when i try to add fields its not picking up the data .
    please can any body help in this ..
    if any body have any sample program please send it to me.
    Here my requirement is to add two new fields (bkpf-bktxt,bseg-sgtxt) in main window of script.
    im declaring my perform like this:
    perform <formname> in program <prog name>
    using &bsik-blnr&
    changing &v_y&.
    my report form look like this:
    *& Report ZFI_VENDOR
    REPORT ZFI_VENDOR.
    TABLES : bsik,bkpf.
    data:v_y type bkpf-bktxt,
    v_z type bseg-sgtxt,
    x(20) type c .
    Form Z_HEADER tables INPUT STRUCTURE ITCSY
    tables OUTPUT STRUCTURE ITCSY .
    break-point.
    CLEAR : v_y,
    x.
    loop at input WHERE NAME = 'BELNR'.
    x = INPUT-VALUE .
    select single bktxt from bkpf into v_y where belnr = x.
    select single sgtxt from bseg into v_z where belnr = x.
    endloop .
    output-name = 'bktxt'.
    output-value = v_y.
    append output.
    *output-name = 'sgtxt'.
    *output-value = v_z.
    *append output.
    please cany body can guide me in abvoe what is problem...
    its very urgent.
    Good solutions will get good reward points.
    Regards,
    Vamsi

    Hi Vamsi,
    Please try like this....
    Loop at input where NAME = 'BSIK-BELNR'. " since you have used 'bsik-belnr' in the using clause in the script.
    Endloop.
    Also in the changing clause since you have used 'v_y' you should use the same in NAME of output...
    OUTPUT-NAME = 'v_y'
    try like this you should be able to get.
    Reward if helpful
    Thanks & Regards,
    Anil

  • What is ITCSY structure

    Hi
    what is ITCSY structure
    Regards
    Suresh

    hi,
    itcsy is a structure.
    when u want to fetch additional data to pritn in u r layout with out changing the standard driver program
    then we have to use this structure through suroutine pool program.
    syntax is
    FORM<FORM>TABLES IN_TAB STRUCTURE ITCSY
    OUT-TAB STRUCTURE ITCSY.
    ENDFORM.
    HERE IN_TAB IS INTERNAL TABLE
    and one more example is
    The structure ITCSY contains field name and field value.
    The system does not execute the PERFORM command within
    SAPscript replace modules, such as TEXT_SYMBOL_REPLACE or TEXT_INCLUDE_REPLACE.
    The replace modules can only replace symbol values or
    resolve include texts, but not interpret SAPscript control commands.
    Syntax in a form window:
    /: PERFORM <form> IN PROGRAM <prog>
    /: USING &INVAR1&
    /: USING &INVAR2&
    /: CHANGING &OUTVAR1&
    /: CHANGING &OUTVAR2&
    /: ENDPERFORM
    plz reward me if helpful...

  • Use of ITCSY STRUCTURE

    Hi Experts,
    can any one can explain why ITCSY STRUCTURE IS USED PLS explain step by step.which i mean say which i should understand easily with ur answer,becaz i dont know any more?
    Thanks.

    Hello!
    I supose you are using SAPSCRIPT and wanting to use a perform statement on in. Am I right?
    ITCSY is a structure that you must use to receive/send parameters from SAPCRIPT to a REPORT where the form statement will be implemented.
    As an example,
    In sapscript, you have PERFORM get_address ... program ZGETADDRESS.
    So, you must have a report called ZGETADDRESS with a code similar to this.
    REPORT ZGETADDRESS .
    FORM get_address TABLES in_par STRUCTURE itcsy
                                              out_par STRUCTURE itcsy.
      READ TABLE in_par WITH KEY name = 'COUNTRY'.
      CHECK sy-subrc = 0.
      READ TABLE out_par WITH KEY name = 'TEXT'.
      CHECK sy-subrc = 0.
      out_par-value = 'England'.
      MODIFY out_par INDEX sy-tabix.
    ENDFORM.
    Best regards.
    Valter Oliveira.

  • How to add new fields in sap scripts using itcsy structure

    hi guys,
               could u provide the screen-shots for adding field in scripts. copied standard forms .
    thanks& regards
    eswar.

    Hi,
    you cannot add new fields using ITCSY. It is the interface structure between a SAPscript an a value-changing form-routine.
    Need example anyway?
    Good luck!
    Jo

  • Itcsy structure problem

    Hello Friends,
    when i pass outtab value from subroutine to sapscript  say for eg 4500 this value is getting passed as char ie 4500 only but i want to print it as 4,500.
    As per my knowledge itcsy can only pass character value so
    pls let me knw how to put separators in the value ?
    Regards,
    Sunny

    Hi,
    In the script declare one more field of type i (w_no), and
    w_no =  outtab value .
    Regards.

  • Problem with itcsy in script

    Hi friends,
                I have created a layout fo medruck for which i'm using the standard driver program. In one window i'm using the perform statement for collecting values from the program for which im using the itcsy structure intab & outab. Here in my internal table i'm getting 2 values. My second value is over-writing the first value and getting displayed in the lay-out.
    This is myy code.
    LOOP AT it_cdpos.
          IF sy-subrc = 0.
            READ TABLE outab INDEX 6.
            MOVE it_cdpos-matnr TO outab-value.
            SHIFT outab-value LEFT DELETING LEADING '0'.
            MODIFY outab INDEX sy-tabix.
            READ TABLE outab INDEX 7.
            MOVE it_cdpos-desp TO outab-value.
            MODIFY outab INDEX sy-tabix.
            READ TABLE outab INDEX 8.
            MOVE it_cdpos-meins TO outab-value.
            MODIFY outab INDEX sy-tabix.
            READ TABLE outab INDEX 9.
            MOVE it_cdpos-value_old TO outab-value.
            MODIFY outab INDEX sy-tabix.
            READ TABLE outab INDEX 10.
            MOVE it_cdpos-value_new TO outab-value.
            MODIFY outab INDEX sy-tabix.
            READ TABLE outab INDEX 11.
            MOVE it_cdpos-prdat TO outab-value.
            MODIFY outab INDEX sy-tabix.
            READ TABLE outab INDEX 12.
            MOVE it_cdpos-maktx TO outab-value.
            MODIFY outab INDEX sy-tabix.
          ENDIF.
        ENDLOOP.
    here only my latest value is updating, but i need all the values to get updated... PLZ help me...
    Thanks and regards,
    subbu.

    use this..................
    if the particular field r variable is holding value......then dont allow in to that...
    if <field or var> is initial.
    endif.
    like that use use for everything..........
    regards
    Anbu

  • Itcsy

    plz.explain me the itcsy structure.how to use this in modifyong latout and its fields.

    Hi
    ITCSY is a structure used to call a script from subroutine program
    It contains following fields
    NAME
    VALUE
    To call ABAP subroutines from within a form we use the
    PERFORM... IN PROGRAM ... statement , the advantage of
    using it is that the print program is not required to cahnge and we
    can get the new data from the subroutine which is placed in a Z
    report . To pass and get the values from th subroutine the
    parameters are passed which are of type structure ITCSY.
    e.g. /:PERFORM get_date IN PROGRAM zreport
    /:USING &SALESORDER&
    /:CHANGING &S_DATE&
    /:ENDPERFORM
    The date &S_DATE& ....
    The ABAP Code would be
    REPORT zreport.
    TABLES ztab.
    FORM get_date TABLES in_tab STRUCTURE ITCSY out_tab
    STRUCTURE ITCSY .
    READ TABLE in_tab INDEX 1.
    SELECT some_date FROM ztab WHERE salesorder = in_tab-value.
    IF sy-subrc EQ 0.
    READ TABLE out-tab INDEX 1.
    MOVE ztab-somedate TO out_tab-value
    MODIFY out_tab INDEX 1.
    ENDIF.
    ENDFORM.
    In the above code USING is used to pass the value to the
    subroutine while changing is used to recieve the value from th
    subroutine ,for further paramters we can use either USING or
    CHANGING .
    In the subroutine the type of paramter is always an internal table of
    type ITCSY irrespective of the value passed.The VALUE field
    of the internal table is used to fill and recieve the values .
    The print program is used to print the actual form ,the functions the print program has to do include retrieving of data from database tables , selecting a FORM and printing of TEXT ELEMENTS in a desired sequence.
    The function modules used in aprint prgram are :
    OPEN_FORM
    START_FORM
    WRITE_FORM
    CONTROL_FORM
    END_FORM
    CLOSE_FROM
    To start printing a form we must use OPEN_FORM and in the end we should use CLOSE_FORM to complete the spool request.
    Function modules in detail.
    OPEN_FORM function module
    This function module should be called first before any printing can take place , here we specify the name of the form and the print language.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    DIALOG = 'X'
    DEVICE = 'PRINTER'
    FORM = form name
    LANGUAGE = SY-LANGU
    OPTIONS =
    EXCEPTIONS
    CANCELLED = 1
    DEVICE = 2
    FORM = 3
    OTHERS = 11
    IF SY-SUBRC NE 0.
    MESSAGE ...
    ENDIF.
    In the above function module the parameter
    FORM = Name of form
    DEVICE = PRINTER (print using spool),TELEFAX (fax output)
    SCREEN (output to screen)
    OPTIONS = It is a structure of type ITCPO and it controls the various
    attributes like number of copies , print preview etc.
    START_FROM function module
    This function module is called if we want to use different forms with similar characterstics in a single spool request,it must be closed by END_FORM function module.
    CALL FUNCTION 'START_FORM'
    EXPORTING
    FORM =
    LANGUAGE =
    STARTPAGE =
    EXCEPTIONS
    FORM = 1
    OTHERS = 7
    IF SY-SUBRC NE 0.
    MESSAGE ...
    ENDIF.
    WRITE_FORM Function module
    This function module is used to write text in a window in the form using
    text elements (/:E element). We can specify whether the text is to be appended , replaced or added and in which portion of the window it will be printed i.e TOP, BOTTOM ,BODY. In this function module actual printing takes place.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
    ELEMENT =
    FUNCTION =
    TYPE =
    WINDOW =
    EXCEPTIONS
    ELEMENT = 1
    OTHERS = 9
    IF SY-SUBRC NE 0.
    MESSAGE ...
    ENDIF.
    Here in this function module the ELEMENT specifies which textelement is
    printed . WINDOW specifies which window of the form to be print in.
    TYPE specifies the output area of the window TOP,BOTTOM,BODY.
    FUNCTION specifies whether the text is to be appended , replaced or added.
    CLOSE_FORM function module
    This function module should be called in the end and it has no exporting
    parameter.
    CALL FUNCTION 'CLOSE_FROM'
    IMPORTING
    RESULT =
    EXCEPTIONS
    UNOPENED = 1
    OTHERS = 5
    IF SY-SUBRC NE 0.
    MESSAGE ...
    ENDIF.
    Here the result parameteer returns the status information and print/fax parameters after the form has been printed.
    CONTROL_FORM function module
    This function module is used to insert SAPScript control commands like NEW-PAGE etc from whithin the ABAP program.
    CALL FUNCTION 'CONTROL_FORM'
    EXPORTING
    COMMAND =
    EXCEPTIONS
    UNOPENED = 1
    OTHERS = 3
    IF SY-SUBRC NE 0.
    MESSAGE ...
    ENDIF.
    NOTE: The print program and the form are stored in the table TNAPR
    To use graphics in the SAPScript FORMS they must be imported to R/3 system for this we use transaction SE78 or report RSTXLDMC and give the graphics a name . The image type is generally .TIF(tagged image format) or .BMP (windows bitmap file) .
    The RSTXLDMC report is used to import images which are in Tagged Image Format (.TIF) into R/3 and saved as standard text (OBJECT TEXT and ID ST) in the system. Since these images (.TIF) are stored as standard text they can be included in the sapscript using the standard INCLUDE statement. The image to be used if is not in .TIF format than it should be converted to this format e.g. by using IMAGING program in WINDOWS.
    Once converted to .TIF they can be used in RSTXLDMC report. The image is stored by the name of ZHEX-MARCO-name . The other parameters in this report e.g. are used to indicate the type of IMAGE
    BCOL for color or BMON for mono color images.
    e.g. /:INCLUDE ZHEX-MARCO-name OBJECT TEXT ID ST
    After the graphics has been imported we can use the INCLUDE statement to include the graphics or use the menu Edit->Graphics->Create.
    e.g. /:BITMAP logo OBJECT GRAPHICS ID BMAP .
    The above include statement is inserted automatically if we use the menu command.
    BOXES and LINES
    To use boxes in the form or to create a table in the form we use BOX statement. a table can be constructed by using a combination of BOXes.
    /:BOX XPOS val unit YPOS val unit WIDTH val HEIGHT val INTENSITY val FRAME val unit .
    The Unit used in the sapscript cane be:
    TW twip
    MM milimeter
    CM centimeter
    LN line
    CH character
    IN inch
    PT point
    The parameters like WIDTH , XPOS etc should be followed by a proper unit.
    The INTENSITY is in the percentage of the grey scale.
    The FRAME parameter is the thickness of the frame the default value is 0.
    e.g.
    /:BOX XPOS '5' CM YPOS '2' CM WIDTH '14' CM HEIGHT '20' CM FRAME 20 TW INTENSITY 10.
    e.g.
    /:BOX INTENSITY 10
    will fill the current window background with a shading of grey scale 10%..
    To draw a horizontal line we set the HEIGHT parameter to the value of 0.
    e.g.
    /:BOX XPOS '5' CM HEIGHT 0 TW FRAME 10 TW.
    This will draw a horizontal line across the top edge of the window.
    To draw a horizontal line we should set the value of WIDTH parameter to 0.
    e.g.
    /:BOX XPOS '5' CM YPOS WIDTH '0' TW FRAME 10 TW.
    This will draw a vertical line across the complete height of the left edge of the current window.
    POSITION and SIZE
    We can use POSITION and SIZE to set default position and size of the window and also for relative positioning. With POSITION we can use the paramters XORIGIN , YORIGIN ,WINDOW. With SIZE we can use WIDTH and HEIGHT and WINDOW and PAGE.
    e.g.
    /:POSITION XORIGIN '5' CM YORIGIN '5'CM
    /:SIZE HEIGHT '5' CM WIDTH '14' CM
    /:BOX FRAME 10 TW INTENSITY 10
    POSITION WINDOW
    We can use POSITION WINDOW to set the position relative to current window i.e to the left,top of the current window ,then we can use POSITION with XORIGIN and YORIGIN to specify the current position relative to the start of the window, we can use '+' and '-' with the values.
    e.g.
    /:POSITION WINDOW
    /:POSITION XORIGIN '5' CM YORIGIN '5' CM
    In the above example the position now becomes 5 CM left from the origin of the window and 5 CM from the top of the window.
    WINDOW sets the value of the WIDTH and HEIGHT to current window and
    PAGE sets the value of the WIDTH and HEIGHT to current page.
    e.g.
    /:SIZE WINDOW
    e.g.
    /:SIZE PAGE.
    Check my reply here
    Check this sample coding
    see the sample sub routines and do accordingly
    How to call a subroutine form SAPscripts
    The Form :
    /: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 <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.
    Example:
    In script form
    /: PERFORM READ_TEXTS IN PROGRAM 'Z08M1_FORM_EKFORM1'
    /: USING &EKKO-EKORG&
    /: USING &EKPO-WERKS&
    /: USING &EKKO-EKGRP&
    /: USING &EKKO-BSTYP&
    /: CHANGING &COMPNAME&
    /: CHANGING &SENDADR&
    /: CHANGING &INVCADR&
    /: CHANGING &COMPADR&
    /: CHANGING &COVERLTR&
    /: CHANGING &SHIPADR&
    /: CHANGING &REMINDER&
    /: CHANGING &REJECTION&
    /: CHANGING &POSTADR&
    /: CHANGING &LOGO&
    /: ENDPERFORM
    In program
    * FORM Read_texts - To extract the standard texts from the table *
    FORM READ_TEXTS TABLES IN_PAR STRUCTURE ITCSY
    OUT_PAR STRUCTURE ITCSY.
    DATA : L_EKORG TYPE EKORG,
    L_WERKS TYPE WERKS_D,
    L_BSTYP TYPE BSTYP,
    L_EKGRP TYPE BKGRP.
    READ TABLE IN_PAR WITH KEY 'EKKO-EKORG' .
    CHECK SY-SUBRC = 0.
    L_EKORG = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKPO-WERKS' .
    CHECK SY-SUBRC = 0.
    L_WERKS = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKKO-EKGRP' .
    CHECK SY-SUBRC = 0.
    L_EKGRP = IN_PAR-VALUE.
    READ TABLE IN_PAR WITH KEY 'EKKO-BSTYP' .
    CHECK SY-SUBRC = 0.
    L_BSTYP = IN_PAR-VALUE.
    CLEAR Z08M1_ORG_TEXTS.
    SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
    AND WERKS = L_WERKS
    AND EKGRP = L_EKGRP
    AND BSTYP = L_BSTYP.
    IF SY-SUBRC NE 0.
    SELECT SINGLE * FROM Z08M1_ORG_TEXTS WHERE EKORG = L_EKORG
    AND WERKS = L_WERKS
    AND EKGRP = L_EKGRP
    AND BSTYP = SPACE.
    ENDIF.
    READ TABLE OUT_PAR WITH KEY 'COMPNAME'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COMP.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'SENDADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_ADRS.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'INVCADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_INVC.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'COMPADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_CPAD.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'COVERLTR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_COVR.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'SHIPADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_SHIP.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'REMINDER'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RMDR.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'REJECTION'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_RJCT.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'POSTADR'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_POST.
    MODIFY OUT_PAR INDEX SY-TABIX.
    READ TABLE OUT_PAR WITH KEY 'LOGO'.
    OUT_PAR-VALUE = Z08M1_ORG_TEXTS-TXT_LOGO.
    MODIFY OUT_PAR INDEX SY-TABIX.
    ENDFORM.
    REPORT ZMPO1 .
    form get_freight tables in_par structure itcsy out_par structure itcsy.
    tables: ekko,konv,t685t.
    data: begin of itab occurs 0,
    ebeln like ekko-ebeln,
    knumv like ekko-knumv,
    end of itab.
    data: begin of itab1 occurs 0,
    knumv like konv-knumv,
    kposn like konv-kposn,
    kschl like konv-kschl,
    kbetr like konv-kbetr,
    waers like konv-waers,
    kwert like konv-kwert,
    end of itab1.
    data: begin of iout occurs 0,
    kschl like konv-kschl,
    vtext like t685t-vtext,
    kbetr like konv-kbetr,
    kwert like konv-kwert,
    end of iout.
    data v_po like ekko-ebeln.
    read table in_par with key 'EKKO-EBELN'.
    if sy-subrc = 0.
    v_po = in_par-value.
    select
    ebeln
    knumv
    from ekko
    into table itab
    where ebeln = v_po.
    if sy-subrc = 0.
    loop at itab.
    select
    knumv
    kposn
    kschl
    kbetr
    waers
    kwert
    into table itab1
    from konv
    where knumv = itab-knumv and
    kappl = 'M'.
    endloop.
    loop at itab1.
    if itab1-kposn <> 0.
    select single * from t685t
    where kschl = itab1-kschl
    and kappl = 'M'
    and spras = 'EN'.
    iout-vtext = t685t-vtext.
    iout-kschl = itab1-kschl.
    iout-kbetr = itab1-kbetr.
    iout-kwert = itab1-kwert.
    append iout.
    clear iout.
    endif.
    endloop.
    sort itab1 by kposn.
    loop at iout.
    sort iout by kschl.
    if ( iout-kschl eq 'GSDC' OR
    iout-kschl eq 'GSFR' OR
    iout-kschl eq 'GSIR' ).
    at end of kschl.
    read table iout index sy-tabix.
    sum.
    * write:/ iout-kschl,iout-vtext,iout-kwert.
    out_par-name = 'A1'.
    out_par-value = iout-vtext.
    append out_par.
    out_par-name = 'A2'.
    out_par-value = iout-kwert.
    append out_par.
    endat.
    endif.
    endloop.
    endif.
    endif.
    endform.
    * IN THE FORM I AM WRITING THIS CODE.
    /:DEFINE &A1& = ' '
    /:DEFINE &A2& = ' '
    /:PERFORM GET_FREIGHT IN PROGRAM ZMFORM_PO1
    /:USING &EKKO-EBELN&
    /:CHANGING &A1&
    /:CHANGING &A2&
    /:ENDPERFORM
    * &A1&
    * &A2&
    This Code is to be written in the PO form under ADDRESS window.
    /:DEFINE &A1& = ' '
    /:DEFINE &A2& = ' '
    /:DEFINE &A3& = ' '
    /:DEFINE &A4& = ' '
    /:DEFINE &A5& = ' '
    /:DEFINE &A6& = ' '
    /:PERFORM GET_VENDOR IN PROGRAM ZMFORM_PO
    /:USING &EKKO-EBELN&
    /:CHANGING &A1&
    /:CHANGING &A2&
    /:CHANGING &A3&
    /:CHANGING &A4&
    /:CHANGING &A5&
    /:CHANGING &A6&
    /:ENDPERFORM
    * &A1&
    * &A2&
    * &A3&
    * &A4&
    * &A5&
    * &A6&
    Regards
    Pavan
    Message was edited by:
            Pavan praveen

  • Scripts -ITCSY ?

    what is ITCSY Structure ? y r u using this ?

    Hi,
    1. This structure ITSCSY
    (which is actually of type ITCSY)
    2. is usually used in SAPSCRIPT (SE71)
    while calling EXTERNAL SUBROUTINES.
    3. the DEFINITION of this
    FORM,
    contains two parameters, IN and OUT,
    which are of tuype ITCSY
    4. These internal tables, then , contain
    the
    VARIABLENAME, AND VARIABLE VALUE,
    which is passed using PERFORM.
    You can call a Routine in any program in SAPScript.
    For eg: if you have a subroutine named ADD_INCOME in a program ZSHAIL_BASIC, you can call the subroutine in SAPScript as follows:
    /: PERFORM ADD_INCOME IN PROGRAM ZSHAIL_BASIC
    /: USING &var1&
    /: CHANGING &var2&
    /: ENDPERFORM.
    Here the input parameter to the subroutine is var1 and the value returned by the subroutine is var2.
    In the program ZSHAIL_BASIC, you have to call the subroutine as
    FORM ADD_INCOME TABLES IN_TAB STRUCTURE ITCSY OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    IN_TAB is a structure of type ITCSY,which has 2 components, NAME and value.
    So in the program, var1(which is sent from SAPScript) , will be stored as IN_TAB-NAME and its value will be in IN_TAB-VALUE. You can utilise the IN_TAB-VALUE and after performing the required operations, the return value should be assigned to table OUT_TAB.
    This value can thus be obtained in var2 specified in SAPScript.
    Refer
    https://forums.sdn.sap.com/click.jspa?searchID=11491102&messageID=1538230
    Regards
    Kiran Sure

  • Scripts : ITCSY STRUCURE

    Hi,
    2 parameters used in itcsy structure explain them?
    thanks

    1. This structure ITSCSY
    (which is actually of type ITCSY)
    2. is usually used in SAPSCRIPT (SE71)
    while calling EXTERNAL SUBROUTINES.
    3. the DEFINITION of this
    FORM,
    contains two parameters, IN and OUT,
    which are of tuype ITCSY
    4. These internal tables, then , contain
    the
    VARIABLENAME, AND VARIABLE VALUE,
    which is passed using PERFORM.
    You can call a Routine in any program in SAPScript.
    For eg: if you have a subroutine named ADD_INCOME in a program ZSHAIL_BASIC, you can call the subroutine in SAPScript as follows:
    /: PERFORM ADD_INCOME IN PROGRAM ZSHAIL_BASIC
    /: USING &var1&
    /: CHANGING &var2&
    /: ENDPERFORM.
    Here the input parameter to the subroutine is var1 and the value returned by the subroutine is var2.
    In the program ZSHAIL_BASIC, you have to call the subroutine as
    FORM ADD_INCOME TABLES IN_TAB STRUCTURE ITCSY OUT_TAB STRUCTURE ITCSY.
    ENDFORM.
    IN_TAB is a structure of type ITCSY,which has 2 components, NAME and value.
    So in the program, var1(which is sent from SAPScript) , will be stored as IN_TAB-NAME and its value will be in IN_TAB-VALUE. You can utilise the IN_TAB-VALUE and after performing the required operations, the return value should be assigned to table OUT_TAB.
    This value can thus be obtained in var2 specified in SAPScript.
    Regards,
    Santosh

  • Itcsy - Medruck

    Hi all,
            I need to include Contact phone number and Logo on the script in me22n t-code.
    In the vendor and in consignee address i need to include Phone number and i also need to chang the logo.
    Kindly say me how to include or call ITCSY structure here.
    Regards,
    Rakesh.

    define tables
    tables: Mara,ekpo.
    internal table for mara
    Data: begin of it_mara occurs 0,
    end of it_mara.
    create subroutine.
    form GET_VENDOR_DATA TABLES T_INTAB STRUCTURE ITCSY
    T_OUTTAB STRUCTURE ITCSY.
    DATA: L_EBELN LIKE EKKO-EBELN.
    READ TABLE T_INTAB INDEX 1.
    L_EBELN = T_INTAB-VALUE.
    you can use select for mara
    SELECT SINGLE * FROM EKKO WHERE EBELN = L_EBELN.
    SELECT SINGLE * FROM LFA1 WHERE LIFNR = EKKO-LIFNR.
    SELECT SINGLE * FROM ADRC WHERE ADDRNUMBER = LFA1-ADRNR.
    SELECT SINGLE * FROM ADRCT WHERE ADDRNUMBER = LFA1-ADRNR.
    T_OUTTAB-NAME = 'TELNO'.
    T_OUTTAB-VALUE = ADRC-TEL_NUMBER.
    APPEND T_OUTTAB.
    T_OUTTAB-NAME = 'ATTN'.
    T_OUTTAB-VALUE = ADRCT-REMARK.
    APPEND T_OUTTAB.
    ENDFORM.
    Activate this program
    *And do changes in ur z_medruck.
    In Main window findout this element and add this type of code.
    /E ITEM_LINE_A
    /: PERFORM GET_VENDOR_DATA IN PROGRAM ZHP_PO_DATA
    /: USING &EKKO-EBELN& *you can use like &ekpo-matnr&
    /: CHANGING &TELNO&
    /: CHANGING &ATTN&
    /: ENDPERFORM
    as Attn : &attn&
    as Tel No : &telno&
    activate it and see the result...
    Hope this will help you...

  • Query regarding passing of an internal table data to a form

    Hi All,
    Please help me out regardingmy query.
    I have a standard driver program and a Z form(SAPSCRIPT). Suppose i have an RFQ and it has number of line items in it, I need to fetch them all for a RFQ and then pass to the form and as this functionality is not available in the driver program, i want to  achieve via a subroutine pool. Passing of the data via the itcsy structure and all or by calling a write_form and passing the element to it.
    Can u all let me know whether i can pass the data ie., multipe records of data to form from a program otehr than the driver program?
    Regards
    Priya

    Hi Priya,
                  Why you need separate subroutine, you will find all the required data in the driver program itself.
    Just identify the Standard Subroutine in NACE tcode,
    For all Standard Driver program is SAPFM06P
    For RFQ
    Application type is 'EA'
    Output types are
    1) New
    2) Reminder
    3) Quotation rejection
    Further standard subroutines used for each output type are
    1)ENTRY_NEU  -  New
    2)ENTRY_MAHN - Reminder
    3)ENTRY_ABSA - Quotation rejection
    and the above mentioned subroutines get the data required for the corresponding sapscript
    RFQ Docno :- ekpo-ebeln
    RFQ Item   :- ekpo-ebelp
    Regards
    Bala Krishna

  • Goods Receipt Slip Requirement

    Dear Experts,
    I am developing a FORM which is the "Goods Receipt slip" with "WE03" output type.
    My Boss want to add 3 informations into the FORM header:
    1.Inbound Number : (Available in VL33N) LIKP-VBELN
    2.Transportation Number : (Available in VT03N) VTTK-TKNUM
    3.Shipment Number : (Available in VI03) VFKK-FKNUM
    Now i try to finish this requirement.....
    The first information i can use MKPF-XBLNR directly output to the form. It is easy ...
    And the second information i can write ABAP code, select the VTTP table and get the TKNUM field throught link the delivery note number ....
    (Question : Is this logic correct ? My sense tell me that probably it is incorrect because of i am selecting the items data... usually, the delivery note number are placed in the header table.... Does it has another beatiful solutions ?)
    Third, the shipment number. I found it in VFKK table as well, but it is the same situration. It placed the Transportation Number into the item Table VFKP as a reference field.... i need the Transportation number to make a WHERE statement ...
    Has someone can give me advise ?
    Thanks in advanced,
    Carlos Zhang

    Copy ur SAP Standard Script to Zscript and this zlayout should assign One output type,probably this would be new output type.
    Output type configured by Functional Consultant and give ur Layout name so that he will configure.
    Depends on Ur requirement we need to use print Program.
    If there are so many changes and need to modify lot of things then i would prefer Copy ur print program to zprint program and do the changes.
    if not do not modify (I mean only layout like windows modification).
    if you do not modify print program and eventhough you need to get data from some other tables ,.. use
    /: PERFORM NAME IN PROGRAM NAME
    /: USING  VAR1
    /: USING VAR2
    /;CHANGING OUTPUT.
    /:ENDPERFORM
    Call your form routine in se38 by creation of program and this form routine will use ITCSY Structure..
    Reward Points if it is useful
    Thanks
    Seshu

  • Calling different pages in smartforms

    Dear Friends,
    I need one solution in smartforms, i need to print the different labels in my smartform. For example i have to print three labels
    and one normal layout. Three labels means having some fixed data of three rows maximum and these labels repetatively i need to print based on some conditions those conditions i am doing in driver program itself.
    For example assume first label i need to print 2 times,second 2 times and third 14 times then final layout contains header and items  section as usual.
    So here in the first page only i need to print first label then i have to call the new page to print second label then i have to call the
    new page to print third label as there are 14 labels in third page i have to print 9 labels and in the fourth page i have to print remaining  5 labels and i need to call new page to print the last section, the last section is like normal layout there mainwindow and everything is there.
    Please help me to handle this scenario.
    Any help will be highly appreciated.
    Thanks a lot in advance.

    This approach to make call from SAPscript. Its concept is similar to make call to a subroutine in another program. I would presume you understand how to use USING and CHANGING parameter. =)
    SAPscript -
    /: Perform get_date in program z_at_date
    /:    using &p_year&
    /:    changing &new_date&
    /: endperform.
    program z_at_date -
    form get_date TABLES rec_in  STRUCTURE itcsy
                                    rec_out STRUCTURE itcsy..
    DATA:
       v_year type char10.
    sap script and subroutine uses itcsy structure to transmit parameters
    first parameter is incoming while second parameter is out going
    their function is like an internal table with header line
    all data types between SAPscript and subroutine are string.
    so, you might need additional conversion.
    read incoming parameter with exact name from SAPscript
      READ TABLE rec_in WITH KEY name = 'P_YEAR'.
      IF sy-subrc EQ 0.
        v_year = rec_in-value.
      ENDIF.
    to return value, use the exact name on the second structure
        CONCATENATE v_year v_year INTO v_year.
        READ TABLE rec_out WITH KEY name = 'NEW_DATE'.
        IF sy-subrc EQ 0.
          rec_out-value = v_year.
          MODIFY rec_out TRANSPORTING value WHERE name = 'NEW_DATE'.
        ENDIF.
    endform.
    Hope this helps =)

Maybe you are looking for

  • How do I Send a xml to client?

    Hi friends: It is possible to send a xml to client without a xml file in the server? I create a Document in the server and the code is :                                                                DocumentBuilderFactory df=DocumentBuilderFactory.n

  • IPad WiFi Disconnect Issue

    I can connect my new iPad to my wiFi router (Actiontec) but after several minutes connection is lost. I need to re-sign in. I worked with Verizon to reset router per Apple instructions (kb/T53304) but nothing helped. Switching from WEP to WPA or WPA2

  • ASIO audio driver in UDP 1.13

    Just wondering if anyone is able to use the ASIO audio driver successfully with the 1.13 drivers? On my system every time I call up the NVASIO Control Panel from a host application and then click OK, it crashes. (tried this in Cubase SX, FruityLoops,

  • Multiple value in one column issue

    Dear proffessionals, i'm trying to put more than one value in one column, so i have next problem: 1. Query select cr_pjid from acc_users where username='ACCBTPS121' give result CR_PJID  '26','63'2. Query select * from acc_accbtp_nova_view where ed_id

  • I can't download my e-mail attachments in Yahoo! mail.

    I followed Yahoo's troubleshooting advice and upgraded my browser to the latest version of Firefox, and I don't have any file types blocked in my settings. I still can't download my attachments. No warnings or error messages pop up, but when I click