Skip to Content
author's profile photo Former Member
Former Member

sample scripts for trainig example

hi experts,

i want some sample standard trainig example(SAP SCRIPTS) which are there in the system.

like smart form: sf_example_01.

best regards,

ashok.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Apr 29, 2008 at 09:26 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 29, 2008 at 09:38 AM

    hi,

    There are some Standard Sap Scripts in SAP. We cant directly execute them in scripts we have to use some T-codes and by giving some input to the required fields we can see the output printform.

    I will show one example. There are some Standard Sap Scripts such as MEDRUCK which is a standard Sap Script for Purchase Order and RVINVOICETH for Sales Order billing and so on...

    To see oupt of MEDRUCK go to T-code ME9F give purchase order number and execute select one number and click on dislplay messages button on application tool bar you can find the print form of MEDRUCK.

    You cannot change the Standard Sap Scripts but you can use Standard Sap Scripts and Copy them to userdefined Script and can make changes to them and replace standard Sap Script with usedefind script.

    Ex: Go to SE71,

    on menu bar u find Utilities->copy from Client. click on it u ll find new screen showing

    Form name:

    Source Clinet:

    Target Form:

    give Form name as usedefined form name EX: ZFORM1

    Source client as 000 and

    Target form as MEDRUCK.

    execute.

    Now, the standard from MEDRUCK is copyied to your form ZFORM1.

    NOW, go to SE71 and give form name as ZFORM1 and do some changes to the form such as adding logo any thing. save and Activate.

    Now, you have done changes to the Form ZFORM1 and u have to replace your form with standard SAP Script.

    Go to NACE Transaction.

    on Applications select EF for purchase order and click Output types button on application tool bar.

    now select NEU as output types dobule click on Processing Routines.

    now click on Change option on application tool bar and on right side u find MEDRUCK in form place replace MEDRUCK with ZFORM1 and SAVE.

    go back twice and now go to T-code ME9F give the purchase order number and execute and select one option and click on display messges button .

    you will find the changes that you have done in ZFORM1. so we cant chage the standard Sap Scripts by copying the Standard Sap Scripts we can chage and replace with our forms.

    Hope this helps, Do reward.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 29, 2008 at 09:52 AM
  • author's profile photo Former Member
    Former Member
    Posted on Apr 29, 2008 at 09:58 AM

    follow the link for detailed info on sapcript

    http://www.thespot4sap.com/Articles/SAPscript_elements_more.asp

    coding example

    REPORT YLSD999A.

    DATA W_LENGTH TYPE I.

    • GENERAL PURPOSE SUBROUTINES FOR CALLING FROM SAPSCRIPTS

    *----

    -


    *----

    -


    FORM DISPLAY_POUND TABLES IN_TAB STRUCTURE ITCSY

    OUT_TAB STRUCTURE ITCSY.

    DATA: COUNT TYPE P VALUE 16.

    DATA: W_VALUE(17) TYPE C. "defined as 7 chars to remove pence

    DATA: W_CHAR TYPE C.

    DATA: W_DUMMY TYPE C.

    DATA: W_CURR(3) TYPE C.

    • Get first parameter in input table.

    READ TABLE IN_TAB INDEX 1.

    WRITE IN_TAB-VALUE TO W_VALUE .

    • get second parameter in input table

    READ TABLE IN_TAB INDEX 2.

    MOVE IN_TAB-VALUE TO W_CURR.

    IF W_CURR = 'GBP'.

    W_CURR = '£'.

    ENDIF.

    W_LENGTH = STRLEN( W_CURR ).

    • look for first space starting at right.

    WHILE COUNT > -1.

    W_CHAR = W_VALUE+COUNT(1).

    • W_CHAR = IN_TAB-VALUE+COUNT(1).

    IF W_CHAR = ' '.

    COUNT = COUNT - W_LENGTH + 1.

    W_VALUE+COUNT(W_LENGTH) = W_CURR.

    COUNT = -1.

    ELSE.

    • W_VALUE+COUNT(1) = W_CHAR.

    COUNT = COUNT - 1.

    ENDIF.

    ENDWHILE.

    • read only parameter in output table

    READ TABLE OUT_TAB INDEX 1.

    OUT_TAB-VALUE = W_VALUE.

    MODIFY OUT_TAB INDEX SY-TABIX.

    ENDFORM.

    cheers,

    sharad

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.