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

Similar Messages

  • 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

  • Why compilation error--when trying to access the table from itcsi schema

    Hi,
    when querying the table from itcsi.app iam able to see the data but used in proc saying invalid table name. Whats the problem
    when declared p_app_i_old app.app_i%type----It is throwing pls-00201 error
    1 Create or replace procedure Test_insert(p_app_i_old integer,
    2 p_app_i_new integer,
    3 p_APP_ISAC_CPT_I varchar2)
    4 is
    5 cursor c1 is
    6 select distinct table_name,owner
    7 from all_tab_columns
    8 where owner = 'ITCSI' and column_name='APP_I';
    9 t_tablename varchar2(25);
    10 t_string varchar2(300);
    11 t_num number;
    12 Begin
    13 For c2 in c1 loop
    14 t_num := 0;
    15 t_string := 'SELECT count(*) FROM ' || c2.owner ||'.'||c2.table_name||' WHERE APP_I = '||p_
    16 execute immediate t_string into t_num;
    17 if t_num > 0 then
    18 -- dbms_output.put_line('The table name is '||c1_rec.table_name);
    19 if c2.Table_name = 'APP' Then
    20 INSERT INTO itcsi.App
    21 SELECT p_app_i_new,
    22 app_acrnym_c,
    23 app_x,
    24 app_desc_t,
    25 app_ipads_t,
    26 app_prdcn_stat_t,
    27 app_prdcn_stat_d,
    28 app_isd_tier_c,
    29 app_bus_cont_c,
    30 app_extnl_cstm_c,
    31 app-ecrpt_lvl_c,
    32 app_isac_cpt_i,
    33 dsw_gpn_i,
    34 ed_cntnt_srce_t,
    35 usr_upd_uunm_i,
    36 ed_upd_m
    37 FROM itcsi.APP
    38 WHERE app_i = p_app_i_old;
    39 elsif c2.Table_name = 'APP_CETRN' Then
    40 Insert into itcsi.APP_CETRN
    41 select p_app_i_new,
    42 app_cetrn_i,
    43 app-curr_cmplnc_t,
    44 app_rqr_cmplnc_t,
    45 dsw_gpn_i,
    46 ed_cntnt_srce_t,
    47 usr_upd_uunm_i,
    48 ed_upd_m
    49 FROM itcsi.APP_CETRN
    50 WHERE app_i = p_app_i_old;
    51 elsif c2.Table_name = 'APP_GPC' Then
    52 Insert into itcsi.APP_GPC
    53 select p_app_i_new,
    54 gpc_dpnt_x,
    55 gpc_elemy_x,
    56 pro_i,
    57 dsw_gpn_i,
    58 ed_cntnt_srce_t,
    59 usr_usr_upd_uunm
    60 FROM itcsi.APP_GPC
    61 WHERE app_i = p_app_i_old;
    62 End if;
    63 End if;
    64 End loop;
    65 --Commit;
    66* End;
    SQL> /
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE TEST_INSERT:
    LINE/COL ERROR
    20/2 PL/SQL: SQL Statement ignored
    37/23 PL/SQL: ORA-00942: table or view does not exist
    40/2 PL/SQL: SQL Statement ignored
    Thanks

    how do i check the grant?
    if am in my own schema,how do i connect to itcsi
    schema?if you are using a schema other than the ITCSI schema, you need to login as ITCSI. or if you have dba user account you can grant a privilege of
      GRANT ALL on ITCSI.APPS to <other SCHEMA>;

  • 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

  • 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

  • How to get a field more than 255 char back in ITCSY stru

    I am getting multiple invoice numbers from the calling pg. The calling pring pg is standard, so cannot touch that.
    Now in my sapscript, i have to concatenate all invoice numbers and show them.
    I had used a perform to do so.
    It was fine till now. But recently we found that invoice numbers can be so many as to cross 255 char in total.
    How to get it done now? ITCSY struc has limitation of only 255 char .
    Please advise.
    Thanks in adv

    hi,
    say for example the number was around 300 characters.... so when you are calling the subroutine pass on 2 variables with two different names say var1 and var2 these both can accommodate around 255 characters each....
    now in the subroutine split the values into these two variables....
    and in script 
    &var1[c]&&var2[c]&
    this will compress the spaced between them.... hence its similar to concatenate...
    Regards,
    Siddarth

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

  • 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

  • Wht does itcsy refers and how this statment in frm or program works

    hi
    when we call a program frm a form we use the below code can anyone explain me the full implication and process and how it works and waht it refers to
    fsap script form code : PERFORM GET_CODE IN PROGRAM  z_PH3
    using USING &vbak-VBELN& changing &ZINT&.....
    program code in z_ph3
    FORM get_code TABLES inttab STRUCTURE itcsy
                               outtab STRUCTURE itcsy.
    code...
    endforms
    WHAT DOES THIS ITCSY REFERS AND HOW IT IS CALLED AND HOW VALUES ARE PASSED AND WHT DOES USING AND CHANGING REFERS HERE AND CAN ANYONE EXPLAIN ME THE WHOLE PROCESS HOW THIS CODE WILL CALL AND WORK AND WHAT DOES THE VARIUS THING MENTION IN IT WORKS LIKE INTTAB OUTTAB SYTRUCTURE ITCSY AAND ITS USE ETC
    REGARDS
    arora

    Hi
    ITCSY is the structure to create the interface for routines called by a sapscript.
    A routine of this kind has to be like this:
    FORM <NAME FORM>  TABLES INTAB    STRUCTURE ITCSY
                                                      OUTTAB STRUCTURE ITCSY.
    DATA: MY_VAR LIKE ... 
    * In INTAB there are the variables inserting by USING:
    READ TABLE INTAB WITH KEY NAME = <VARIABLE NAME>.
    IF SY-SUBRC = 0.
    *---> Get the value from INTAB-VALUE
      MOVE INTAB-VALUE TO MY_VAR.
    ENDIF.
    * In OUTTAB there are the variables inserting by CHANGING:
    READ TABLE OUTTAB WITH KEY NAME = <VARIABLE NAME>.
    IF SY-SUBRC = 0.
    *---> Set the value to OUTTAB-VALUE
      MOVE MY_VAR TO OUTTAB-VALUE.
      MODIFY OUTTAB INDEX SY-TABIX.
    ENDIF.
    ENDFORM
    Max

  • 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

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

  • What is ITCSY

    hi
       i would like to know about ITCSY.
    regards
    ratna

    hi,
    In sap scripts, there are certain cases where we need to use some external subroutines which should be called by the script to achieve certain functionality. So these external subroutines are defined with an input and output structure which is of type ITCSY.
    FORM F_GET_HEADER_DETAILS TABLES ITAB   STRUCTURE ITCSY
                                     OTAB   STRUCTURE ITCSY.
    * Warehouse number
      CLEAR V_LGNUM.
      READ TABLE ITAB WITH KEY NAME = 'LTAK-LGNUM'
             TRANSPORTING VALUE.
      V_LGNUM = ITAB-VALUE.
    *-Get TO number
      CLEAR V_TO_NO.
      READ TABLE ITAB WITH KEY NAME = 'LTAK-TANUM'
           TRANSPORTING VALUE.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
                INPUT  = ITAB-VALUE
           IMPORTING
                OUTPUT = V_TO_NO.
      OTAB-VALUE = V_TO_NO.
      MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'TO_NO'.
    *-Get Plant
      READ TABLE ITAB WITH KEY NAME = 'LTAP-WERKS'
           TRANSPORTING VALUE.
    *-Get Company Name
      CLEAR V_COMPANY_NAME.
      SELECT T001~BUTXT INTO V_COMPANY_NAME
        UP TO 1 ROWS
        FROM T001K JOIN T001
          ON T001K~BUKRS = T001~BUKRS
          WHERE BWKEY = ITAB-VALUE(4).
      ENDSELECT.
      IF SY-SUBRC = 0.
        OTAB-VALUE = V_COMPANY_NAME.
        MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'COMPANY_NAME'.
      ENDIF.
          SELECT VBPA~ADRNR
                 ADRC~NAME1
                 ADRC~NAME2
                 ADRC~NAME3
                 ADRC~NAME4
                 ADRC~CITY1
                 ADRC~CITY2
                 ADRC~POST_CODE1
                 ADRC~STREET
                 ADRC~REGION
                 ADRC~TEL_NUMBER
                 ADRC~MC_STREET
            INTO X_ADRC
            UP TO 1 ROWS
            FROM VBPA JOIN ADRC
              ON VBPA~ADRNR = ADRC~ADDRNUMBER
              WHERE VBELN = V_DEL_NO
              AND   POSNR = C_000000
              AND   PARVW = 'WE'.           
          ENDSELECT.
          IF SY-SUBRC = 0 AND X_ADRC-ADRNR NE X_KNA1-ADRNR.
            WRITE X_KNA1-ERDAT TO OTAB-VALUE.
            MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'ISS_DT'.
            OTAB-VALUE = X_KNA1-KUNNR.
            MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'CUS_NO'.
            OTAB-VALUE = X_ADRC-NAME1.
            MODIFY OTAB TRANSPORTING VALUE WHERE NAME = 'CUS_NAME'.
         endif.
    This way the value is passed from the program to the scripts.
    Hope this helps.
    Regards,
    Richa

  • 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

Maybe you are looking for