Coding at script form side

Hi all,
I see some forms that have code in them...
The syntax is like that:
/:   PERFORM GET_ITEM_PACK IN PROGRAM ZEXPORTSALESFORM      
/:   USING &VBDKA-VBELN&                                    
/:   USING &VBDPA-POSNR&                                    
/:   USING &VBDPA-VRKME&                                    
/:   CHANGING &PACKING1&                                    
/:   CHANGING &PACKING2&                                    
/:   CHANGING &KIMYASAL&                                    
/:   ENDPERFORM       
What is the logic of writing code inside script forms...
Do we need it really?
Thanks.
Deniz.

Hi Deniz..
We can call subroutines in Script Layout set using this PERFORM command.
This is used to perform any operations from the Layout set. Bcoz we cannot directly write any code in a Script Layout set.
**These are Text symbols for storing some values
/: DEFINE &PACKING1& = ''
/: DEFINE  &PACKING2& = ''
/: DEFINE   &KIMYASAL& = ''
**Calling subroutine
/: PERFORM GET_ITEM_PACK IN PROGRAM ZEXPORTSALESFORM
/: USING &VBDKA-VBELN& "Using parameters are like Read-Only in subroutine
/: USING &VBDPA-POSNR&
/: USING &VBDPA-VRKME&
/: CHANGING &PACKING1& "Using parameters can be modified in subroutine
/: CHANGING &PACKING2&
/: CHANGING &KIMYASAL&
/: ENDPERFORM
This subroutine must be defined in the program ZEXPORTSALESFORM
FORM GET_ITEM_PACK TABLES
           INTAB STRUCTURE ITCSY  "Contains all USING parameters
           OUTTAB STRUCTURE ITCSY " Contains all CHANGING parameters
**implement the logic here
ENDFORM.
<b>REWARD IF HELPFUL.</b>

Similar Messages

  • Not able to print the script form from print preview

    Hi Experts,
    I need to print one of the script form from print preview. As per the req. first i need to generate a print preview of this form and if required should be able to print it from this preview.
    i am able to generate print preview and also able to see the print option but when i try to print it is going to the spool (which i dont want). I want it to be printed directly to the printer instead of sending it to the spool.
    Please suggest me
    The way i coded it is
    DATA: arcpar TYPE arc_params,
                pripar TYPE pri_params.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          layout                 = 'X_65_132'
          line_count             = 65
          line_size              = 132
        IMPORTING
          out_parameters         = pripar
          out_archive_parameters = arcpar
          valid                  = val
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
      pr_options-tddest = ''.
      pr_options-tdpreview = 'X'.
      pr_options-tdnoprint = ''.
      pr_options-tdsuffix1 = 'STUFF'.
      pr_options-tdsuffix2 = matnr.
      pr_options-tdimmed = ''.
      pr_options-tdlifetime = '2'.
      pr_options-tdprogram = Form-name.
    CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          device   = 'PRINTER'
          dialog   = space
          form     = "purchase or"
          language = sy-langu
          OPTIONS  = pr_options
        EXCEPTIONS
          canceled = 01
          device   = 02
          form     = 03
          OPTIONS  = 04
          unclosed = 05.
      CALL FUNCTION 'START_FORM'.
    ENDFORM.                    " open_and_start_form
    Thank you.

    Hi,
       Just pass the value 'X' to "pr_options-tdimmed" field.Try this.
    I hope,it help you
    <=<< Sharing Knowledge is a way to Innovative  >=>>
    By,
      Yoga

  • SAP Script Form - manual / guide

    Hi Experts,
    I want to modify a SAPScript form where I want to insert a field at the right hand side of a line. For the tag column , I put 'IL' just follow the previous line.
    the line begins like this:
    ,,,,,,,,&field&  (is doesn't go to right end), but when I put ,,,,,,,,,,,,(6 tabs) , it go to next line .
    Any other way to position the fields beside using TAB ?
    kindly provide links that useful for Script Form - manual / guide
    Thanks.
    Janice

    follow these links
    Smartforms
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    SapScript
    http://www.sap-img.com/sapscripts.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    cheers,
    sharad

  • Debug dynpro + call script form

    Hello ,
    I have a req, I need to debug the few dynpro, and one of the dynpro is calling a form and I have to figure it out, which form is this ( and from where it is called ). I have never worked with script form before, can any one let me know how I can figure it out that ( how to call a form, I mean it should be statemnt like, call form .... or ) ?
    One another thing, I went into the coding, and there I see the screen ( in execution mode, the screen shows some button, ( e.g show , and after pressing this button show ,the form appers ), but when I went in flowlogic of the screen, I cant see those button ?
    Any idea....
    Regards,

    Shah,
    Do like this.You might be pressing some push button after which the smart form or script is appearing.
    do screen debugging.
    enter /h in the command field and press enter.
    now press the push button.
    this will take you to the logic in the driver program where the smartform or script is getting invoked.
    if it is a smartform you will see a function module SSF_FUNCTION_MODULE_NAME.
    smartform name will be stored in LF_FORMNAME
    put a watch point here to get the smartform name.
    if it is a script you will come across the following functional modules.
    open_form,write_form,close_form.
    Script name will be given in the open form functional module.
    If any doubt revert it.
    K.Kiran.
    Message was edited by:
            Kiran K

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

  • 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 insert the new field to standard scheduling agreement script form.

    Hi Gurus,
    how to insert the new fields to standad sheduling agreement script form. its a need for me, i want to display the AEDAT field in scheduling agreement form ,
    The below one is my requirement,
    ex:-   Itu2019s requested the change of Scheduling Agreement printout. Itu2019s requested for this type of   document, the insertion, into the field u201CData Emissionu201D into the print, of the document last modify date instead of the document creation date. (This change will be done only for position change into the Scheduling Agreement). No change into the PO.
    Change SAPSCRIPT printout. Introduction, into the Scheduling Agreement, of last modified  
          document date (field EKPO-AEDAT).
    Thanks & Regards
    chinnu

    open TNAPR table and give the output type you need to modify.... get the print program name and check if some structure already have the date you wanted... if you have it already... then open the form in SE71 tr. and provide the strcuture name - feild in the position you want to have the date...
    se71--->
    &<str. name>-AEDAT&

  • How to fill data when call function of sap standard script form?

    Hi every experts,
    <Priority Normalized>
    In our system, when we log in 'FR', we can print purchase order in language Franch,in t_code:ME22N.  And when logging in 'EN', we can print it in language English, in ME22N. The English form is just only translated from Franch, with all same structure and frame.  The form is done by script form.
    And when logging in 'ZH', we create a new program, calling function smartform, instead of translating from EN language. Because of different structure and frame, I don't know the way to write script, so  I print puchase order by smartform, when logging in 'ZH'.
    But I have a new issue. Our MM module consultant needs me to print Chinese form if one condition, print English form in other condition.
    So I have no idea to solve it. Because in my program, I get data to fill smartform and call function of smartform. And I don't know how to get data to fill script form. I only know the function name, 'OPEN_FORM' 'WRITE_FORM' 'CLOSE_FORM'.....
    If I only call the several functions, I will get only frame without no data. So who can tell me how to do????
    <Urgency downgraded>
    Edited by: Suhas Saha on Jul 26, 2011 3:34 PM
    Edited by: Vinod Kumar on Jul 26, 2011 4:09 PM

    Hi,
    Normally if we look in NACE transaction, you can see that upto five different FORMS can be assigned to a single output type . i.e. for each form there will be a seperate routine through which it gets called. But it all start from the first form only.
    so you need to write your code in the ENTRY of the first form and if it does not satisfy do not go for processing of it but just exit of that form ENTRY. so that it will take you to next form.
    hope this helps.
    Thanks,
    Venkatesh

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

  • Line items in script form

    hi,
    in my script form i was displaying line items for PO in main window. my problem is, the values of the line items are not displaying in the same line. example:
    item             material                 material description                qty.
    01                 123456                  adfsgdfhdj
                                                                                    1 each
    1 each should also in the same line as item, material and material description.
    please help.
    thanks.

    Hi,
    This is a typical problem faced in alligning the text and the cause of it is window size.
    In the table, please check that you have assigned the correct line type.
    Also check the column width in the line type for the column in which the line item is getting displayed.
    Also in the texts where you assing the line type, try adjusting the new cell and skip cell settings.
    regards,
    Gaurav

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

  • Not able to edit my Sap script form using se71 ?

    I have been working on SAP Script say ZKI_FORM using se71 in polish language.
    Today When I try to make changes as usual, it is not allowing me to go into change mode . It is giving Error in object Editing like below.
    " Changes to Repository or cross-client Customizing are not permitted
    Choose 'Display object' or 'Cancel'. "
    My functional consultant doesn't know why it is happened like that ? Even my team lead doesn't know this.
    COULD ANY BODY PLEASE SUGGEST HOE TO GO TO CHANGE MODE OF THE SCRIPT FORM AND MAKE MY CHANGES  ?
    THANKS IN ADVANCE .

    hi
    Give the form name ..
    menuiten--> utilities --> convert original language
    Step by step for copying form.
    give the standard form name in SE71 and language as DE
    click create.
    popup come... check radibutton copy from original..
    given the zformname and green check.
    save it and back.
    give the zformname again and language DE and click change..
    go to menuitem Utilities --> Convert original language
    give new language to EN.. green check..
    SAve and BACK.
    give zformname and language as EN and change..
    there u can do all modifications..
    Or use SE76 give formname and source language and target language...
    then change and press SAVE.
    Regards
    SAB

  • 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

  • Execution of Coded UI scripts with least possible test execution time in Windows7 Operating system using Visual Studio Test Agent 2010 without VS2010 installed

    Hi All,
    We are trying to execute coded UI scripts without Visual Studio installed. We are using “Visual Studio Test Agent 2010” for executing coded UI scripts without VS2010 in Windows 7, it is working fine. Also we verified executing the same script with VS2010
    Premium, it works fine as well.
    Here the challenge we are facing is with the Test execution time.
    When we run the coded UI script with IE11-Windows 7 OS-Visual Studio 2010 Premium it takes
    3min 36sec to complete the execution whereas with IE11-Windows 7 OS-Visual Studio Test Agent 2010  it takes
    6min 40sec for the same script to execute (which is almost double the time it takes while executing using VS2010).
    My question is what may be the reason for this difference? and how we can reduce the test execution time when running from Test Agent 2010?
    Kindly let us know what is the best practice to execute the coded UI scripts with least test execution time in Windows 7 Operating system using Visual Studio Test Agent 2010 without VS2010
    installed.
    Looking forward for your positive response.
    Thanks in advance..!!

    Tina-Shi, Thanks for the information.
    As you mentioned, we tried to execute the coded UI test using Mstest.exe in command on VS2010 Premium and checked on the execution
    time, there was a slight difference.
    Please find below execution time.
    Using Mstest.exe in command on VS2010 Premium/Win7 – 3.47 minutes
    Using VS2010 Premium/Win7 – 3.53 minutes
    Using Test Agent/Win7 – 7.3 minutes
    Also, I closed all the other processes in Task manager before starting up the execution.
    Still , I am facing the same Issue. Could you please suggest any other way to reduce the scripting time of coded UI script execution
    through Test agent 2010.
    Looking forward for your earliest response.

  • Smart and script forms..?

    hi experts
    Can anybody explain me about the SAP SMART and SCRIPT forms ..
    1.What is Script and Smart forms.?
    2.Give some examples of both script and smart forms? (RFQ,PO,Sub-sontract challan, RG23A..registers ..)
    3.what is the difference between script and smart forms,?
    Thanks
    SAP-MM

    Dear Friend,
    Both smart form and script are output tools for print out, script is the older version
    1.SCRIPTS ARE CLIENT DEPENDENT
    SMARTFORMS ARE CLIENT INDEPENDENT
    2.WE CANNOT ADD COLORS IN SCRIPTS
    WE CAN ADD COLORS IN SMARTFORMS
    3.WE CANNOT GET THE FUNCTION MODULE WHEN WE ACTIVATE THE PROGRAM
    WHEN WE ACTIVATE THE PROGRAM WE GET FUNCTION MODULE
    4.WE CAN WRITE ENTIRE CODE IN SMARTFROM ITSELF
    Regards
    Pramod

Maybe you are looking for

  • Restoring my new Iphone 5 from my backup. It is asking for an encryption password but i never set one up

    I've backuped my phone and then had it replaced as it was broken. Went to retore my new phone Iphone 5 and it is asking for a encryption password. I didn't set one two days ago. I have tried my itunes password, the computer password my iphone lock pa

  • Error in using bapi

    Hi, I am using bapi 'BAPI_QUOTATION_CREATEFROMDATA' for creating quotation. it is giving error 'External number assignment is not defined for document type ZSQ' Can you please suggest me the reason of this error. Thanks, Sushant.

  • Sending Email with Query Result (Table Format)

    Hi, I have a query result from ExecuteSQL task e.g.: ID Product 1     Pencil 2     Crayon 3     Eraser I want to send an email with the above query result and I want it to be in Table format (such as in Microsoft Word with rows and column lines) to a

  • Catalog Replication without TREX

    Can I replicate a catalog without using TREX?

  • Incorrect Date in Portal Production

    Problem is that the date is incorrect in the portal banner. eg. it now says feb. 02 when it's actually the 12th??? Anyone have ideas why it's doing this. I read about turning caching off but that is only a quick fix. It seems that different dates exi