Name of sap script form

hi ,
If I am calling a subroutine from a SAP SCRIPT ....and I want the name of the sap script which is  calling it ... means there is a subroutine which more that one script calls ...if I want to find out which one is calling it how can we find that out.for example like sy-cprog or sy-repid..is there anything????? pls advise

Hi,
I hereby attach the source code of a pgm which may be used to do a 'search' operation in source code of the SAP Script.Please note that this is not my pgm, I had downloaded from one of the sites. Unfortunately I neither remember the name of teh site nor the name of the author. However I have been using it without any problems.
REPORT ZSEARCH_ITEMS_IN_SAPSCRIPT
       NO STANDARD PAGE HEADING LINE-SIZE 208.
*=======================================================================
* Omschrijving : Searching different items (e.g. strings, field, text,
*                program-names etc..) in sapscript forms
* Auteur       : Angelo Hoppenbrouwer
* Datum        : 07-11-2001
*======================================================================*
TABLES: STXL,
        TLINE.
DATA BEGIN OF BDCDATA OCCURS 100.
        INCLUDE STRUCTURE BDCDATA.
DATA END OF BDCDATA.
DATA BEGIN OF LINES OCCURS 100.
        INCLUDE STRUCTURE TLINE.
DATA END OF LINES.
DATA: BEGIN OF STXL_ID,
        TDOBJECT LIKE STXL-TDOBJECT,
        TDNAME   LIKE STXL-TDNAME,
        TDID     LIKE STXL-TDID,
        TDSPRAS  LIKE STXL-TDSPRAS,
      END OF STXL_ID.
DATA: BEGIN OF KOP,
        TXT(208),
      END OF KOP.
DATA: I_STXL LIKE STXL OCCURS 10 WITH HEADER LINE,
      I_TAB(40) OCCURS 10 WITH HEADER LINE,
      CLIENT LIKE SY-MANDT,
      H_FIELD(40),
      H_VALUE(40),
      H_LINE LIKE SY-LINNO,
      H_OFFSET TYPE I,
      H_REGEL(70) TYPE C,
      H_TEL TYPE I,
      H_TOT TYPE I,
      H_POS TYPE I,
      H_POS1 TYPE I,
      H_POS2 TYPE I,
      H_LEN TYPE I,
      VORIGE_TDSPRAS_TDNAME(71) TYPE C,
      HUIDIGE_TDSPRAS_TDNAME(71) TYPE C,
      P_NAAM LIKE RSEUX-CP_VALUE,
      H_TXT1(40),
      H_TXT2(40),
      H_WINDOW(132),
      H_STRING(40),
      H_STRING1(40),
      H_STRING2 LIKE H_STRING1,
      H_LINE1 LIKE LINES-TDLINE,
      H_LINE2 LIKE H_LINE1.
SELECTION-SCREEN BEGIN OF BLOCK ZOEK_ITEM
                       WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: PA_ITEM1 RADIOBUTTON GROUP ITEM DEFAULT 'X'.
SELECTION-SCREEN COMMENT 4(16) TEXT-011.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: PA_ITEM2 RADIOBUTTON GROUP ITEM.
SELECTION-SCREEN COMMENT 4(16) TEXT-012.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: PA_ITEM3 RADIOBUTTON GROUP ITEM.
SELECTION-SCREEN COMMENT 4(16) TEXT-013.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: PA_ITEM4 RADIOBUTTON GROUP ITEM.
SELECTION-SCREEN COMMENT 4(16) TEXT-014.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: PA_ITEM5 RADIOBUTTON GROUP ITEM.
SELECTION-SCREEN COMMENT 4(16) TEXT-015.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK ZOEK_ITEM.
SELECTION-SCREEN BEGIN OF BLOCK ITEM_WAARDE
                       WITH FRAME TITLE TEXT-002.
PARAMETERS: PA_STR(40) OBLIGATORY,
            PA_MANDT LIKE SY-MANDT DEFAULT SY-MANDT.
SELECTION-SCREEN END OF BLOCK ITEM_WAARDE.
SELECTION-SCREEN BEGIN OF BLOCK FORM
                       WITH FRAME TITLE TEXT-003.
SELECT-OPTIONS: SO_NAME  FOR STXL-TDNAME  NO INTERVALS
                                          DEFAULT 'Z*'
                                          OPTION CP,
                SO_SPRAS FOR STXL-TDSPRAS NO INTERVALS
                                          DEFAULT 'NL'.
SELECTION-SCREEN END OF BLOCK FORM.
START-OF-SELECTION.
  CLIENT = SY-MANDT.
  CLEAR: H_STRING1, H_STRING2.
  IF NOT PA_ITEM1 IS INITIAL.          " Standaardtekst
    CONCATENATE 'include' PA_STR INTO H_STRING1 SEPARATED BY ' '.
    H_TXT1 = 'standard text'.
  ENDIF.
  IF NOT PA_ITEM2 IS INITIAL.          " Tabel (+veld)
    CONCATENATE '&' PA_STR INTO H_STRING1.
    H_TXT1 = 'table (+field)'.
  ENDIF.
  IF NOT PA_ITEM3 IS INITIAL.          " Hulpveld
    CONCATENATE '&' PA_STR '&' INTO H_STRING1.
    H_TXT1 = 'variable'.
  ENDIF.
  IF NOT PA_ITEM4 IS INITIAL.          " Programma
    CONCATENATE 'in program' PA_STR INTO H_STRING1 SEPARATED BY ' '.
    H_TXT1 = 'program'.
  ENDIF.
  IF NOT PA_ITEM5 IS INITIAL.          " String
    H_STRING1 = PA_STR.
    H_TXT1 = 'string'.
  ENDIF.
  CONCATENATE '"' PA_STR '"' INTO H_TXT2.
  FORMAT COLOR COL_HEADING INTENSIFIED ON.
  CONCATENATE 'Use of'
              H_TXT1
              H_TXT2
              'in forms'
              INTO KOP SEPARATED BY ' '.
  WRITE: / KOP.
  ULINE.
  FORMAT COLOR COL_HEADING INTENSIFIED OFF.
  WRITE: /         'Clt',
          005      'Form',
          036      'Lang',
          041(030) 'Window',
          072(002) 'Fm',
          077(132) 'Row'.
  ULINE.
  FORMAT COLOR COL_NORMAL INTENSIFIED ON.
  STXL_ID-TDOBJECT = 'FORM'.
  STXL_ID-TDID = 'TXT'.
  SELECT * FROM STXL CLIENT SPECIFIED
          WHERE MANDT    = PA_MANDT
            AND RELID    EQ 'TX'
            AND TDOBJECT EQ 'FORM'
            AND TDID     EQ 'TXT'
            AND TDNAME   IN SO_NAME
            AND TDSPRAS  IN SO_SPRAS.
    MOVE-CORRESPONDING STXL TO I_STXL.
    APPEND I_STXL.
  ENDSELECT.
  SORT I_STXL.
  CLEAR HUIDIGE_TDSPRAS_TDNAME.
  CLEAR VORIGE_TDSPRAS_TDNAME.
  LOOP AT I_STXL.
    STXL_ID-TDNAME  = I_STXL-TDNAME.
    STXL_ID-TDSPRAS = I_STXL-TDSPRAS.
    STXL_ID-TDID    = I_STXL-TDID.
    CONCATENATE STXL_ID-TDSPRAS STXL_ID-TDNAME
                INTO HUIDIGE_TDSPRAS_TDNAME.
    IF HUIDIGE_TDSPRAS_TDNAME <> VORIGE_TDSPRAS_TDNAME.
      CONCATENATE STXL_ID-TDSPRAS STXL_ID-TDNAME
                                  INTO VORIGE_TDSPRAS_TDNAME.
      REFRESH LINES.
      CLEAR H_TEL.
      IMPORT TLINE TO LINES FROM DATABASE STXL(TX)
                                 CLIENT   I_STXL-MANDT
                                 ID       STXL_ID.
      LOOP AT LINES.
        IF LINES-TDFORMAT = '/W'.
          H_WINDOW = LINES-TDLINE.
        ENDIF.
        SEARCH LINES-TDLINE FOR H_STRING1.
        IF SY-SUBRC <> 0 AND H_STRING2 <> SPACE.
          SEARCH LINES-TDLINE FOR H_STRING2.
        ENDIF.
        IF SY-SUBRC EQ 0 AND LINES-TDFORMAT NE '/*'.
          H_POS = SY-FDPOS.
          IF NOT PA_ITEM1 IS INITIAL.
            ADD 8 TO H_POS.
          ENDIF.
          IF NOT PA_ITEM4 IS INITIAL.
            ADD 11 TO H_POS.
          ENDIF.
          H_LEN = STRLEN( PA_STR ).
          H_STRING = LINES-TDLINE+H_POS(H_LEN).
          IF H_TEL EQ 0.
            HIDE I_STXL-MANDT.
            HIDE STXL-TDNAME.
            HIDE I_STXL-TDSPRAS.
            WRITE: /001 I_STXL-MANDT,
                    005 STXL-TDNAME HOTSPOT ON,
                    036 I_STXL-TDSPRAS,
                    041 H_WINDOW(30).
            CLEAR STXL-TDNAME.
          ELSE.
            WRITE: /041 H_WINDOW(30).
          ENDIF.
          WRITE: 072 LINES-TDFORMAT.
          H_POS1 = 77 + H_POS.
          H_POS2 = H_POS + STRLEN( H_STRING ).
          IF H_POS EQ 0.
            CLEAR H_LINE1.
          ELSE.
            H_LINE1 = LINES-TDLINE(H_POS).
          ENDIF.
          H_LINE2 = LINES-TDLINE+H_POS2.
          H_POS2 = H_POS2 + 77.
          WRITE: 077       H_LINE1,
                 AT H_POS1 H_STRING COLOR COL_HEADING,
                 AT H_POS2 H_LINE2.
          H_TEL = H_TEL + 1.
          H_TOT = H_TOT + 1.
        ENDIF.
      ENDLOOP.
      IF NOT H_TEL IS INITIAL.
        ULINE.
      ENDIF.
    ENDIF.
  ENDLOOP.
  FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
  SKIP 1.
  WRITE: / 'Number of hits:', H_TOT.
AT LINE-SELECTION.
  CHECK STXL-TDNAME <> SPACE.
  GET CURSOR FIELD  H_FIELD
             VALUE  H_VALUE
             LINE   H_LINE
             OFFSET H_OFFSET.
  CHECK H_FIELD = 'STXL-TDNAME'.
  CHECK I_STXL-MANDT = SY-MANDT.
  REFRESH BDCDATA.
  PERFORM BDC_DYNPRO USING 'SAPMSSCF'      '1102'.
  PERFORM BDC_FIELD  USING 'RSSCF-TDFORM'  STXL-TDNAME.
  PERFORM BDC_FIELD  USING 'RSSCF-TDSPRAS' I_STXL-TDSPRAS.
  CALL TRANSACTION 'SE71'  USING BDCDATA.
  CLEAR STXL-TDNAME.
*&      Form  BDC_DYNPRO
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
  CLEAR BDCDATA.
  BDCDATA-PROGRAM  = PROGRAM.
  BDCDATA-DYNPRO   = DYNPRO.
  BDCDATA-DYNBEGIN = 'X'.
  APPEND BDCDATA.
ENDFORM.                               " BDC_DYNPRO
*&      Form  BDC_FIELD
FORM BDC_FIELD USING FNAM FVAL.
  CLEAR BDCDATA.
  BDCDATA-FNAM = FNAM.
  BDCDATA-FVAL = FVAL.
  APPEND BDCDATA.
ENDFORM.                               " BDC_FIELD
*Comment Angelo:
*Selection-texts:
*PA_ITEM1
*PA_ITEM2
*PA_ITEM3
*PA_ITEM4
*PA_ITEM5
*PA_MANDT     Client
*PA_STR       Search-item
*SO_NAME      Form
*SO_SPRAS     Language
*Text-symbols:
*001     Selection search-item
*002     Value
*003     Selection form(s)
*011     Standard text
*012     Table (+ field)
*013     Variable
*014     Program
*015     String
Once you copy the above mentioned program.Just run this pgm with the parameters:-
Selection search text: String
Search text: PERFORM name_of_the_subroutine
Selection Forms: Z*
Language: E
& it will display all the SAP Scripts from where this routine is being called.
I hope this helps,
Regards
Raju Chitale

Similar Messages

  • Sap script form perform statement

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

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

  • Version Management on SAP Script Forms

    Hello,
        Is there a version management for SAP Script forms
    like what we have in ABAP programs?
    I need to revert back the old version of my SAP scrip form like what I used to do in an ordinary ABAP program.
    Is this possible?
    Need your views on this.
    Thank you very much,
    Jeffrey A. Prado

    Hello Jeffrey,
    as far as I know there are just two versions stored in the system, the active one and the one you work on. As long as you do not activate your work, you should be able to track your changes. The other way (which I use) is to save the original version with another name and simply load it back when needed. Since we are working with an old Release I do not how it looks in the "new world".
    Greetings,
    Sebastian

  • Issue on Sap Script Forms

    Hi ABAP Experts,
    i got one object on SAP Script Forms, this is first time i am doing sap scripts, my issue is i created a form Debit memo from scratch and now i want to assign this form to standard print program RFK0RD00(PAYMENT NOTICE) and for this print program the standard layout form is F140_PAY_CONF_01.can u please tell what is the output type of this form and where to assign this ?
    Thanks in Advance...

    Hello Srini,
    First thing,how to find output type?
    -Go to table TNAPR and enter your print program name in TNAPR-PGNAM and form name in TNAPR-FONAM.
    -Look for the entry, the field value of TNAPR-KSCHL will give you the output type for your Print program and sap script form.
    -TNAPR-KAPPL will give you the value for Application.
    Second thing,how to assign?
    -Go to transaction NACE
    -Select the application(TNAPR-KAPPL).
    -Press the button 'OUTPUT TYPES'
    -Select the corresponding output type(TNAPR-KSCHL)
    -Now select the folder 'Processing routines' on the left side.
    -Enter your Program name (RFK0RD00), form routine name(mostly it is ENTRY) and then enter your form name (form designed by you from scratch).
    Kinldy reply if this has helped you.

  • Download of SAP Script form.

    Hi All,
    I need to take a backup of the SAP Script form.
    I may use it to upload later.
    how can I do this?.

    1)There is a report program RSTXSCRP which can be used to import/export the Sapscript form from/to text file on presentation server.
    This program gives two options: importing and exporting. Just give the path of the file to be uploaded/downloaded
    2)For SapScript, use 'Form' option'.
    In object name, give the SapScript/filename.
    In mode, choose either of Import/Export whichever applicable for you.
    Now you can choose between Application/Presentation server
    And, finally give the file path

  • Copy an existing sap-script form

    hi,
    is it possible to copy an existing sap-script form ?
    Regards
    Marco m.
    Edited by: Marco M on Sep 4, 2009 1:27 PM

    Hi,
    It is very much possible.
    To do this first create a new form with a different name, inside the form select FORM->Copy From and give the form name and the language. Press ok to copy it. Now save and activate the new form.
    Regards
    Karthik D

  • How to get the last page  SAP Script form

    How to get the last page  SAP Script form.
    I want to print a specific information in the last page of SAP form (Script). Please tell me how to get the last page number.
    Regards

    Hi
    You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.
    From SAP Help:
    This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .
    Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.
    /: IF &NEXTPAGE& = '0'
       Last page
    /: ENDIF
    Max

  • How to change sign negative to positive in sap script form

    Hi Guru,
    I had wriiten a below piece of code in my sap script form.Now I need all the negative sign to be convert to positive number means
    if KOMVD-KWERT = 123,98.00-  ,    then require 123,98.00 ..
    And for this I know the synatax is
    &KOMVD-KWERT(S)& .Bur the probleam is how to manage this  (I13) ...Because if i am wriiting
    &KOMVD-KWERT(S)(I13)&    getting no value ...Please help..
    IF &TNAPR-KSCHL& = 'ZD06'.
    &KOMVD-KWERT(I13)&
    endif.
    Thanks
    susri

    Hi SUSRIKANT,
    You can try this logic .
    DATA  : LV_KWERT TYPE STRING,
                  LV_LEN TYPE I,
                 LV_F_KWERT TYPE STRING.
    LV_KWERT = KOMVD-KWERT.
    LV_LEN = STRLEN( LV_KWERT ).
    LV_LEN = LV_LEN - 1.
    IF LV_KWERT +LV_LEN(1) = '-'.
    LV_F_KWERT = LV_KWERT + 0 (LV_LEN).
    ELSE.
    LV_F_KWERT = LV_KWERT.
    ENDIF.
    I hope this logic will be helpful for your issue.
    Thanks & Regards,
    Kumaran Duraiswamy.

  • Enhancement for  J_1IEWT_CERT sap script form.

    Hi,
    In T- Code J1INCERT ie TDS Certificate Print  used SAP Script Form  J_1IEWT_CERT. i want to do enhancement in out put of first page. A certificate is generated in preview mode with 2 lines for same challan number. In the new enhancement form a single line should be printed for the same challan number. and amount should be added. in same. hence pl advice, how to go head.
    Regards
    kamal

    Dear  Raghu
    In the NACE tcode select the application and then click on output types and then select the output types and then processing routines.
    Also, please, verify the SE71 transaction code.
    Regards,
    Paulo

  • SAP SCRIPT FORMS with UNICODE FORMAT ??

    Hi guru's,
    this is sunny newly joined in sap forum,am ABAP doveloper .
    now am extensivelly working on upgrradation project(4.6B TO ECC6.0) , my work perticularlly on UNICODE
    >> now am working on  SAP SCRIPT FORMS, so could you please let me know how to check the scripts in UNICODE FORMAT .
    >> Is that usefull to check with UCCHECK
    Its urgent
    Best Regards
    Sunny..

    SAP Scripts needs no checks. but you have to keep attention to the fact, that the spoollists must be converted manually by a report written by SAP, and this report is not able to transform sapscripts which are still in the spool. After unicode conversion every sapscript spoollist is lost!

  • Perform a form routine within a sap script form

    Hi!
    How can I
    perform a form routine within a sap script form.
    Regards
    sas

    OK,
    many thanks for your kindly reply.
    But basically there is a matter which I don't understand.
    Which way is the better way to loop at internal table:
    Solution1:
    FORM xxx.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
       DEVICE                           = 'PRINTER'
       FORM                             = 'ZSD_PACKING_LIST'
       LANGUAGE                     =  SY-LANGU   .
    LOOP AT gt_versand_plan INTO gw_versand_plan.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'SHELEM'
       FUNCTION                       = 'SET'
       TYPE                           = 'BODY'
       WINDOW                         = 'MAIN' .
    ENDLOOP.
    CALL FUNCTION 'CLOSE_FORM'.
    ENDFORM.
    Solution 2:
    Having the LOOP within the  sapscript form -> 'ZSD_PACKING_LIST'
    Regards
    sas

  • Is it possible to a coloured background in sap script Form.

    Hi all,
    Is it possible to a coloured background in sap script Form.
    Point is guranted

    Hi,
    In Sap Scripts Colouring is not Possible.
    But We Can do Colouring  In Smartforms.

  • How to View Smartforms or SAP Script Forms in Web Dynpro ABAP

    Do anyone have idea of how to View Smartforms or SAP Script Forms in Web Dynpro ABAP?
    Please let me know. Thanks

    Hi Sameeksha,
    You can display an smartform in WDA as an pdf file. Try go through this [article |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785]where Nanda does explain about the same.
    Regards,
    Uday

  • Transport.of SAP script form , printer def and device type is not enaugh

    I transported the SAP script form , printer definition and device types of a thermal printer.
    On original system the printout is ok but on target system not. What should I do?

    Thank you for your fast answer
    As the matther of fact I am technical person. I think Output type belongs to application. However the difference is visible in  se71 ->Utilities->Printing test -> output device ->print preview.
    As I wrote I transpored corresponding. SAP script form , printer def and device type

  • Tool for sap script form designing

    Friends,
    Is there any any tool or transaction available through which we can design the sap script form.
    Apart from menu painter in se71.
    Thanks,
    Albert.

    Hi Albert,
       Check these links,
    http://www.sap-img.com/sapscripts.htm
    Sapscript
    http://help.sap.com/saphelp_47x200/helpdata/en/d6/0db74a494511d182b70000e829fbfe/frameset.htm
    sap-script query
    Hope this is useful. Reward if helpful.
    Regards,
    Tushar

Maybe you are looking for

  • [SOLVED] X11 hid support broken on fresh macbook install

    Hi! The solution was elementary indeed, I was missing xf86-input-keyboard and xf86-input-mouse. (looooooooooool) What bugs me though, is how this could happen to an already working system. From what I remember I didn't touch those drivers on my previ

  • How to call webservice from OAF

    Hi, I need to call a webservice in one of my custom OAF page. I am very new to OAF and Java and have no idea about how webservice works. Does anybody has any example of that, are there any setups I need to perform. I will appreciate if someone can sh

  • How to disable the ribbon using javascript

    when open a PDF document using acrobat X, there is a Tool ribbon in the top right side (there is also a comment ribbon and share ribbon), how to disable or remove the Tool ribbon using javascript? I try to use app.listToolbarButtons() and app.hideToo

  • TS3276 Problem deleting messages in Mail

    Using a hotmail account on iMac in Mail.  I get this error message: The message "name of message" could not be moved to the mailbox "Trash--Hotmail".  "3541.emix" couldn't be copied to messages because an item with the same name exists. Very much app

  • Using Acrobat 6 with inDesign CS2

    Hi, Recently purchased CS2 Standard (inDesign, Photohop, Illustrator), and need to add on Acrobat. Can I add on 6.0 instead of 7.0, and still get easy exporting of pdf's from inDesign (seems like I just need to adjust my preferences and/or print dial