Enterprise Resource Planning Portal

 

Advertise | Founder BLOG

ERPGenie.COM

THE ultimate ERP website

 

Forums | Vote for us |

Google    Other Search Options

ERPGenie.COM -> SAP Technical -> ABAP -> Tips and Tricks

Subcategories

SAP Training CD ROMs / SAP CBTs
  1. Download some ABAP tips and sample code (Kevin Wilson)

  2. SAP Sample ABAP Programs - Over 50 Sample programs

  3. The New ABAP Editor - Part 1 (Suresh Kumar Parvathaneni)

  4. MIGO - Passing Parameter ID for PO

  5. Launching a new transaction in a separate screen

  6. Add fields to the PO communication structure

  7. How do you repair a function group? Call the Function Builder transaction (se37), enter the function module into the field and select 'Utilities -> Repair function group' from the menu. The function group should now appear in the dialog box. Enter the function group if it does not appear by default. Select the broken portions in the following screen. Select the 'Repair' / 'Delete' icon.

  8. How do you find programs which use an SAP script layout? SE71, enter your layout set name. Go to the text elements (F9) of the main window and from there choose Insert-Symbols-Program Symbols. A list of the print programs that use the layout set will be generated. (Pavan Rachamalla)

  9. Sending attachment in background longer than 255 characters (for Excel)

  10. Activating change logs for ABAP dictionary objects and customizing objects

  11. SAP CRM ABAP Tips and Tricks

  12. Internal Tables by Jayaprakash.A.N

  13. BAPI JCO - Step by step procedure for creating a BAPI and connecting it using a Java servlet. Also included is how to configure Apache tomcat Webserver. (1MB PDF - Nagesh)

  14. Implementing BADIs (By Renier Walters)

  15. Using ALV in SAP ABAP Reports - A Great document describing how to use the ALV Grid report (Author unknown)

  16. SAP Reporting in 4.7

  17. ABAP Development Objects Quick Tool

  18. Finding a project and enhancement from a user exit function module (Kevin Wilson)

  19. Using Custom Number Range Objects (Kevin Wilson)

    TableProAllows you to download data from SAP® tables and views to Microsoft® Access or Microsoft® Excel

    Use TxShuttle™ to execute almost any transaction using data from Microsoft® Excel.

  20. Business Objects

  21. Connecting OLE-compatible Office Applications to the R-3 System

  22. Adding custom fields to VBAK and VBAP - Also to Additional Data B screen of the sales order

  23. TECHNICAL DEVELOPMENT APPROACH DOCUMENT FOR SAP IMPLEMENTATION PROJECTS (Chandra Kumar Meda)

  24. Technical Specification Template (Kevin Wilson)

  25. Simple ALV Report (Schlegel, Martin)

  26. Use SE75 to create your own custom text ID for SAVE_TEXT object

  27. Finding a user exit when you only have the function module name: Use table MODSAP with member=function module. This will give you the enhancement name that you can enter in SMOD.

  28. File Transfer to workstation in background (Kai Mindermann)

  29. Debugging a popup window (Kai Mindermann)

  30. To execute on OS command in SAP: Use program RSBDCOS0

  31. Transaction Variants

  32. Preventing Duplicate Jobs from spawning

  33. ABAP Field Exits

  34. Prevent ABAPers from accessing tables

  35. Excel upload of IDoc numbers - Changing their statuses (Kevin Wilson)

  36. ABAP - Idoc Related (Kevin Wilson)

    by Horst Keller, Joachim Jacobitz

    This 2-volume set represents the first complete and systematic language reference book for ABAP Objects. Organized logically by subject area, this comprehensive resource offers descriptions of all of the statements used for developing programs and classes in ABAP and ABAP Objects (including Release 6.20).

  37. Comprehensive ABAP Include Library (487K) - "One of the things that I've learnt are the common things that are the bread and butter of a programmers work. This collection of documents and includes contains a series of routines aimed at making the writing and maintenance of reports easy, standardizing their look and feel with no effort from the programmer. Alongside this are macros for the design of parameter screens and the handling of BDC's. Fully documented, the archive also contains hints on SQL and a framework for a programming specification." (Richard Harper)

  38. Question 1 I want to change a particular view of a material using BDC, If i record a BDC, it hardcodes the view number as 1, 2 and so on... But if for another material the same view is in different location, the BDC fails... Is there a way to use the BDC in to select a particular view.. i want to select the 'Foreign trade data' view. 
    Answer Use FUNCTION 'selection_views_find'. This will give you the Sequence and FCodes for calling all the views.
  39. Question 2 How do I find a user exit for a particular SAP functional area?
    Answer Here is the easy way to find out the exit that fits your requirement.

    1. 1.Go to Tcode: se81.

    2. 2.expand to the area you are looking at, functionally speaking.

    3. 3.select and press F9.

    4. 4.Now click on "Repositiory Infosys" button.

    5. 5.now you will see a tree form where you can see all the objects (not only exits) under that area. To only see the exits that come under this application;

    6. 6.Expand Environment->customerEnhancement->customer enhancement.

    7. 7.Double click on Customer enhancement.

    8. 8.Execute the selection screen. You will see all the cust.exits that come under your application

    9. 9.Double click on the required exit; you can see all the exits that come under that enhancement

  40. IBIP – Test Script - Data transfer tool - Mainly plant maintenance objects not covered by LSMW Santosh Koraddi)

  41. Dynamic selection screen - Would you like to be able to bring up a different selection screen based on the  t-code entered while still running the same code?

  42. Displaying transactions - Use the "System -> Status" menu option to determine the parameter ID (for those that aren't available, check for function modules that can be called to display the required document) and then call the following code:
        Set parameter ID ‘AUN’ field vbak-vbeln.

        Call transaction ‘VA03’ and skip first screen.

  43. Checkboxes in reports - Ever needed to put checkboxes in reports?

  44. BDC Programming and IDoc Status Update - When processing inbound IDocs you can use this example as a template to post the transaction and update the IDoc status.

  45. Search help- Connecting to an external source using Java Connector (Bob Billings)

  46. Restricting values on Selection Screen

  47. Codes for the standard GUI status
        BACK       %EX        RW         PRI        %SC        %SC+       P--        P-         P+         P++

  48. Initializing date ranges on selection options:
        selection-screen begin of block g1 with frame title text-000.

        select-options: s_docdat for vbak-erdat, "Document date      

        selection-screen end of block g1.                             

        * Initialization                                                      

        initialization.                                                         

         move 'I' to s_docdat-sign.                               

         move 'BT' to s_docdat-option.                            

         move sy-datum to s_docdat-high.                          

         subtract 7 from sy-datum.                                

         move sy-datum to s_docdat-low.                           

         append s_docdat.                                         

  49. Report headings - Another way to do it dynamically
        top-of-page.  

          perform top.

     

        form top.                                                       

        uline.                                                       

         write: / sy-vline no-gap,                                    

              (79) text-001 color col_heading intensified,         

              80 sy-vline,                                         

            / sy-vline no-gap,                                    

              (79) text-002 color col_heading intensified off,    

              80 sy-vline,                                        

            / sy-vline no-gap,                                     

              (79) text-003 color col_heading intensified off,    

              80 sy-vline.                                        

         uline.                                                       

        endform.                                                        

  50. Background processing check - If you want to see if the user is running the program in the foreground:
       * sy-subty = 4.    “Call type for submit otherwise it is a background submit:

        * Display the GUI status if run in foreground otherwise don’t

        if sy-subty = 4.     

          set pf-status 'GUIONLINE'.

        endif.               

  51. File processing - Need to download data to your computer?

  52. Read SAP Data from an external source using STARTRFC.EXE

  53. Function module: FLTP_CHAR_CONVERSION. - Used to convert floating point data type to character data type.
    Description: Some times SAP uses floating point data types in its transaction data like Measurement Reading in the PM module (please see table IMRG). If we would like to display this data type in a report, we would have to convert it into character data type, otherwise it’s meaningless.
    How to use this function module?
    Firstly, set a break point in FLTP_CHAR_CONVERSION function module and go to the measurement document display (t-code IK03). This is to find out what import parameter is passed into this function module. (Author: Yunaidy Yang)

  54. Question 1 I want to change a particular view of a material using BDC, If i record a BDC, it hardcodes the view number as 1, 2 and so on... But if for another material the same view is in different location, the BDC fails... Is there a way to use the BDC in to select a particular view.. i want to select the 'Foreign trade data' view.
    Answer Use FUNCTION 'selection_views_find'. This will give you the Sequence and FCodes for calling all the views.

  55. Question 2 How do I find a user exit for a particular SAP functional area?
    Answer
    Here is the easy way to find out the exit that fits your requirement.

    1.Go to Tcode: se81.

    2.expand to the area you are looking at, functionally speaking.

    3.select and press F9.

    4.Now click on "Repositiory Infosys"button.

    5.now you will see a tree form where you can see all the objects (not only exits) under that area. To only see the exits that come under this application;

    6.Expand Environment->customerEnhancement->customer enhancement.

    7.Double click on Customer enhancement.

    8.Execute the selection screen. You will see all the cust.exits that come under your application

    9.Double click on the required exit; you can see all the exits that come under that enhancement.

  56. Important tables when coding...


Other Useful Tips (Source: http://abap.mirrorz.com )

  1. Adding Custom Fields to POs, Outline Agreements, and RFOs

  2. Authorization Failures on Fixed Asset Reports

  3. Find Programs That Use a Layout Set

  4. Understanding Date Selections Using the HR Logical Database

  5. Printing Blank Lines

  6. Central Address Management

  7. Useful User Parameters

  8. Maintaining Trailing spaces when downloading to PC

  9. Up/Downloading Dynpros in 4.x

  10. List Boxes on Selection Screens

  11. Adding Custom Fields to an Infotype

  12. Step by step the method for batch input of data without using ABAP/4 or other programming language

  13. Using Application Logging

  14. Where in IMG is a table configured

  15. Finding User Exits

  16. Mass Generation of ABAP Source

  17. Specifying the Index for a Select Statement to use

  18. Hiding ABAP Source Code

  19. Standard Conversion Exits

  20. Finding a transaction code via SE93

  21. List of ways to transport variants

  22. List of methods to FTP from within SAP

  23. How to Archive (and delete) Material Master Records

  24. Explanation of Return Codes from the AUTHORITY-CHECK Command

  25. Editor Tips (*EJECT and *$*$)

  26. Change the font on the X_65_255 paper size

  27. How to find a single quote within a string

  28. Helping the DBMS find the correct index

  29. Reading from the Database

  30. Saving screens created with Screen Painter

  31. Help Views

  32. Additional Help View Information

  33. Authorization Object for a printer - S_SPO_DEV

  34. Field Exits

  35. BSEG Access

  36. Example of joining tables

  37. How to change development class of a SAPscript

  38. How to transport Standard Texts

  39. Importing Graphics (Logos) into SAPScript

  40. Other useful programs for SAPScript (provided by Paul Kjaer)

  41. Debug SAPScript (provided by Paul Kjaer)

  42. How to Change Standard Price in Material Master

Authorization Failures on Fixed Asset Reports

In Fixed Assets, a user may be unable to run a report, or unable to get results from a report without getting any authorization failures. The reason for this is the the Fixed Asset reports convert the users authorizations to select statements in logical database ADA. The authorizations are never checked directly.
The authorizations that are required to run Fixed Asset reports are A_S_ANLAL, A_S_WERK, A_S_GSBER, and A_S_KOSTL. OSS note 141876 deals with this problem, but it misses one of the required authorizations (A_S_KOSTL).

Printing Blank Lines

Use the command SET BLANK LINES ON. After that, blank lines should be printed.

Useful User Parameters

GR8 - File Download Path default
GR9 - File Upload Path default
TTD - SAPScript Form Debugger (X = start debugger)

Maintaining Trailing spaces when downloading to PC

Before calling DOWNLOAD or WS_DOWNLOAD, do a perform SET_TRAIL_BLANKS(saplgrap) using 'X'
To set the length of each record including your blanks add this code: perform SET_FIXLEN(saplgrap) using '0' '100'

Up/Downloading Dynpros in 4.x

The option to download dynpros does not appear in the menu structure in 4.x. The function is there but you just don't have access through the menu. Type 'UTDL' in the command field to dowload a dynpro (you must be in display or change mode). To upload it into another system for example, create a new dynpro and enter in edit mode. Type 'UTUL' in the command field.
Note that this works in version 3.1 and up of SAP.
Thanks for Francois Henrotte for the tip.

Adding Custom Fields to an Infotype

Starting in Version 4.5, SAP allows easy customizing of the infotype screens by providing customers with subscreens and customer specific includes for infotypes.
Transaction PM01 is used to customize the infotype, and the online help is reasonably useful in walking you through the steps needed to add your own fields to the infotype.

Step by step the method for batch input of data without using ABAP/4 or other programming language

The instructions on how to do this can be found in this document (PDF format) -

Where in IMG is a table configured

Use SM31, enter the table name.
Click on Customizing.
Enter an IMG project, or click w/o proj button.
Click enter. Gives you IMG path(s) which lead to updating given table.

Finding User Exits

Notes about user exits (valid up to at least SAP release 4.0B)
One way to find user exits applicable for a given SAP screen. From the SE38 screen, enter the desired screen main program, and click Utilities > Find In Source Code, and "CUSTOMER-FUNCTION" as the text to search for. This will give you a list of the user exits and where they are called from for all screens in the module pool.
Note: format of ABAP statement is CALL CUSTOMER-FUNCTION '009', for example. This is the statement called by a submodule attached to the main program.
Actual related function is EXIT_SAPLCOIH_009, for example. This example refers to customer function 9 in main program SAPLCOIH. Not all user exit functions are names as such, but this is the usual format.
If you are doing data validation and want to set an error message with a field open, you must be sure that the user exit you are using is linked to a calling module in the PAI section of the screen and the field you wish to be open was in the CHAIN statement which caused the PAI module to be invoked.
If you use a customer function which was invoked by a PBO module to validate data, the "MESSAGE" statement will cause the screen to return with the desired message at the bottom, but with all screen fields closed for input.
When you make changes to the include module for a given customer function, you must regenerate the related function group before you will see the changes included in the screen behaviour.

Mass Generation of ABAP Source

You can use the ABAP Load Generator (transaction SGEN) to generate ABAP loads for large numbers of programs, function groups, module pools, and so on.
This is particularly important after an upgrade, since at this point the system only contains a few ABAP loads. A load is generated automatically when you start a program if it does not already exist, however this may lead to poor performance.
The transaction SGEN replaces the report program RDDGENLD. This report program only let you regenerate those loads that were already in the system before the upgrade. No loads were generated for new programs.
The transaction SGEN has the following advantages over RDDGENLD:
You have much greater influence over the number of loads generated. This is especially important for new programs for which there were no loads before the upgrade. For example, you can generate loads only for those components that you want to use (such as HR, LO, AC or BC). This saves space in the database.
You can use the Job Monitor in transaction SGEN to control more effectively the background job that generates the load.
For a detailed description of transaction SGEN, click the pushbutton Information on any dialog box in the transaction.

Specifying the Index for a Select Statement to use

This is valid from 4.0 on.

Example:
 REPORT z_generic_test_program .
 TABLES: csks.
 START-OF-SELECTION. 
   SELECT * UP TO 10 ROWS FROM csks
                          WHERE kokrs <> space AND 
                                kostl <> space
                          %_HINTS ORACLE 'index(csks"J")'.
   WRITE: / csks. 
 ENDSELECT. 

Hiding ABAP Source Code

Please note, this tip does not appear to work in versions of SAP >= 4.6. It is very easy to hide your source code in ABAP. Simply enter *@#@@[SAP]
on the very first line of your program. This text should be the only text on the line. There is no easy way to get your source code back, so make sure you make a backup and save it to a local drive!

Standard Conversion Exits

Most conversion exits used in screens by SAP are actually function modules. You can find them by searching for CONVERSION_EXIT_name_INPUT and CONVERSION_EXIT_name_OUTPUT.

Finding a transaction code via SE93

Go to Transaction SE93 and press F4 and then Press All selections button. It will give you a better search to look for a transaction than directly going to table TSTC. (Submited by Ram Mullapudi)

List of ways to transport variants

There are at least three ways that I know of that you can transport a variant for a program.

How to Archive (and delete) Material Master Records

Use the FILTER option on the OPEN DATASET command
Have an external step in your job that runs after the dataset has been created. The external step will call a script with parameters to do the ftp.
This document was provided by Jon Davatz - Homepage for SAP Professionals -
Download the document here -

Explanation of Return Codes from the AUTHORITY-CHECK Command

Return Code Explanation
0 Passed the check.
4 User is not authorized to perform the task
8 The number of fields has exceeded 10
12 Object specified does not exist
24 FIELD names specified in the check do not match the object
28 System Error
32 System Error
36 System Error
If you have several status' for a program that are nearly identical, it can be easier to setup and maintain a single status, and just hide parts of it as required. Rember, this is sample code only. It is a snippet from a real program, and I may have forgotten to include some things.

Example:
data: BEGIN OF MTAB_UCOMM_EXCLUDE OCCURS 0,
        VALUE(4) TYPE C, 
      END OF MTAB_UCOMM. 
AT USER-COMMAND.
  PERFORM SET_PF_STATUS. ...
*---------------------------------------------------------------------*
* FORM SET_PF_STATUS *
*---------------------------------------------------------------------*
* Set up the menus/buttons for the report *
*---------------------------------------------------------------------*
FORM SET_PF_STATUS.
  CLEAR MTAB_UCOMM_EXCLUDE. 
  REFRESH MTAB_UCOMM_EXCLUDE. 
  CASE MI_CURRENT_PAGE. 
    WHEN 1. 
*-- Do not want any pushbuttons that point to items to the right 
*-- since the list is at its rightmost position
    MTAB_UCOMM_EXCLUDE-UCOMM = 'FRST'.
    APPEND MTAB_UCOMM_EXCLUDE. 
    MTAB_UCOMM_EXCLUDE-UCOMM = 'PREV'. 
    APPEND MTAB_UCOMM_EXCLUDE. 
  WHEN MI_TOTAL_PAGES. 
*-- Do not want any pushbuttons that point to items to the left 
*-- since the list is at its leftmost position 
    MTAB_UCOMM_EXCLUDE-UCOMM = 'LAST'. 
    APPEND MTAB_UCOMM_EXCLUDE.
    MTAB_UCOMM_EXCLUDE-UCOMM = 'NEXT'. 
    APPEND MTAB_UCOMM_EXCLUDE. 
  WHEN OTHERS. 
*-- Want all pushbuttons to appear on any other page 
  ENDCASE. 
  SET PF-STATUS 'MAIN' EXCLUDING MTAB_UCOMM_EXCLUDE.
ENDFORM. " SET_PF_STATUS 

Editor Tips (*EJECT and *$*$)

*EJECT - If you put *EJECT at the start of a line, it will force a new page when you print your source code. This comes in real handy when you would like to have subroutines start at the top of a new page.
*$*$* - By placing *$*$ at the beginning of a comment line will lock the line for editing. You are able to edit the line until you hit the enter key.

Change the font on the X_65_255 paper size

This tip was taken from the SAP-R3 mailing list, and is by Sheila Tichener.
If you need to use a large line-size to get all your data in I know the sap version of X_65_255 for hp laser jet 4 gives an unnecessarily small font .
You can change it in SPAD (or copy to Y_65_255) as follows.

Example:
Choose Device formats, Change
hplj4
x_65_255
Execute
Double click on printer initialisation
Change from:-
 # select Courier 16.67 CPI normal font
 \e(s0p16.67h0s0b4099T
to:-
# select arial 24 cpi 15 point normal
\e(s0p24h15v0s0b16602T
................
Also bold as follows:-
# select arial 24 cpi 15 point bold
\e(s0p24h15v0s3b16602T
It still fits and looks better.
Also the error you get when changing a format in the output screen is only a warning and can be overidden by pressing the green tick.
If the sap standard formats don't fit your requirements you can create your own eg Y_65_170 . It seems to be the numbers in the name that somehow triggers which one the abap chooses.
Sheila

How to find a single quote within a string

Use 4 single quotes to find one quote in a string. The following code snippet will replace a single quote with a double quote.

Example:
 replace '''' with '"' into field 

Helping the DBMS find the correct index

Sometime, you may find that the a SELECT that you have coded is very slow, even though you have put all the fields needed for an index in your where clause. Usually, this means that the DBMS is selecting the wrong index, you can tell if this is the case by doing an SQL trace (System - Utilities - SQL Trace). You can help the DBMS select the correct index by providing hints, include all fields from the index, and make sure that the fields are in the same order as they appear in the index.

Reading from the Database

(Provided by Paul Kjaer)
For efficiency, consider loading tables into internal tables. 200000 calls from memory structure are much more efficient than 200000 DB calls.

Saving screens created with Screen Painter

(Provided by Paul Kjaer)
If you are in Object Browser looking at the module program, you can highlight the screens and click the print button. Click no to print immediately, then go into System -- Services -- Output Control to select the spool request and then go into List -- Save -- Local File. (Of course, you can send it to a printer to see documentation on your screen).

Help Views

(Provided by Paul Kjaer)
For instance, I set this up in a multi-language environment when you have a code and text combination you want to set up. Typically, you have to set up two tables: One with just the valid codes i.e. Zxxx where the only field is the code field, the second is ZxxxT which contains the code and language as the primary index with the description as the data field. In this case, then you usually define a view H_Zxxx which is a join on these two tables. The key thing is that the Foreign Key definition for the code field in the ZxxxT must have the must have the type "Key Fields of a Text Table". This results in the Table Maintenance generator (SM30) generating a screen that allows you to maintain the code and description together for the system language.
In a related note, to set up a customer transaction for a Table Maintenance generated dialog, use SE80 and enter the function group used for the table maintenance dialog. Then Create a transaction (Zxxx) of type parameter. Fill in text, specify Transaction SM30, click on "skip initial screen" and set up default values of VIEWNAME set to Zxxx and UPDATE set to X.

Additional Help View Information

Hi,
I was reading your Hint on help view. I want to add some details to this hint.
* After defining a foreign key relation of type KEY FIELDS IN A TEXT TABLE the system automatically combines updates of the base table and the text table. Try defining two tables and the foreign key as stated above. So creating a help view is not needed for this purpose.
* The help view is useful when you want to have a matchcode-like F4 help on a specific field. Every field that is based on same domain automatically uses the help view if no other F4 help (Matchcode, Process on value request) is related. For a value table only one help view can be defined.
Example:
If you define in your abap a parameter or select-options 'parameters: pa_bukrs like t001-bukrs.' you will see that is automatically has a F4 help. This help is provided by helpview H_T001.
Kind regards,
Ben Meijs
Ben.Meijs@ctac.nl

Authorization Object for a printer - S_SPO_DEV

(Provided by Paul Kjaer)

Field Exits

(Provided by Paul Kjaer)
You cannot debug a field exit. You can at best create a small module pool with a screen that has the appropriate fields and in your PAI, call a module which calls your function that is the field exit and debug the small module pool. Good idea to keep as much of one around if you do field exits regularly.
I used CNEX0007 and CNEX0006 to add fields to the PRPS and PROJ tables respectively in the PS Module. As probably the case with most of these exits, have fun trying to figure out how to protect the fields in display mode. We lived with the fact that the save was disabled so it could not save the changes anyway. A test of the transaction code would not be complete. Use transaction SMOD to do SAP enhancements/field exits. In SMOD, you can get list of SAP enhancements that exist by Utilities - SAP Enhancements. Trying to figure out what they can be used for and how to accomplish the desired results is a major challenge.

How to change development class of a SAPscript

Use program RSWBO052 (provided by Alan Cecchini)

How to transport Standard Texts

Use Program RSTXTRAN or enter directly in transport
Put entry directly into the transport:
R3TR TEXT TEXT,Text Name,ST,Language
R3TR TEXT TEXT,Z_ALLERGAN_SWISS_DISTRIBUTOR,ST,E

Importing Graphics (Logos) into SAPScript

The program RSTXLDMC can be used to upload graphics (file extension .tif on PC files) into individual standard text.

Other useful programs for SAPScript (provided by Paul Kjaer)

RSTXFCONConverts SAPScript page formats
RSTXSCRPUpload and download SAPScript layout sets
Calling an ABAP form from SAPScript (provided by Paul Kjaer)

Example:
      In Layout Set:
        DEFINE &X& = ...
                        DEFINE &Y& = ...
                        DEFINE &Z& = ...
                        PERFORM XXXXXX  IN Zxxxxxxx
                        USING &X&
                        USING &Y&
        CHANGING &Z&

    In ABAP program Zxxxxxx
        FORM XXXXXX TABLES INPUT1 STRUCTURE ITCSY
                               OUTPUT1 STRUCTURE ITCSY

        *get input parameters
            LOOP AT INPUT1.
              CASE INPUT1-NAME.
                 WHEN 'X'.
                   INPUT_X = INPUT1-VALUE.
                 WHEN 'Y'.
                   INPUT_Y = INPUT1-VALUE.
              ENDCASE.
        ENDLOOP.

        {logic to use program variable input_x and input_y to set say program variable output_z}

        *set output variables:
        REFRESH OUTPUT1.
        OUTPUT1-NAME  = 'Z'.
        OUTPUT1-VALUE = OUTPUT_Z.
            APPEND OUTPUT1.

Debug SAPScript (provided by Paul Kjaer)

You can debug a SAPScript: Use Tools - Word Processing - Layout Set. Enter name of layout set and then Utilities - Activate Debugger.
A further note to the tip above was provided by John Verbestel: It is of no consequence which layoutset you enter when selecting the SAPscript debugger. (Menu path: Tools-Wordprocessing - Forms, Utilities - Activate Debugger) The next layoutset called will invoke the debugger. This is quite handy when verifying which layoutset is being called (Verifying customizing settings).
Another way to set the SAPScript debugger is to run program RSTXDBUG. Thanks to Amanda for this tip.

How to Change Standard Price in Material Master

The standard price can not be updated directly.
One way to update the standard price is to fill the fields Future Price (MBEW-ZKPRS) and the Effective Date (MBEW-ZKDAT) for the material on the accounting view.
Next, go to Logistics -> Materials Management -> Valuation -> Valuation
Price Determination -> Future Price -> Activate
(TCODE MR2B, program RMMR2100)
Lastly, run the BDC that was created to update the standard price.

Access SAP R/3 tables as easyly as an Access database 
with Microsoft.Net / ASP or VB

The RFC functions in the R/3 contain routines, which make it possible to bring in and run an ABAP with SAP automation / the SAP.Net Connector. SAPLink.net provides the possibility to access all R/3 Tables with a normal SQL-Select from .Net / VB


Contact Us | Polls | Add URL | Contribute | About | Privacy | Terms | Feedback | Help!

Message Board | Discussion Forum | BLOG | Consultants: Post your resume | Companies: Advertise on ERPGenie.COM | Post Job
Financials Consultant | Consultant Review | Gallia Consulting | Supply Chain Project | SAP Financials Forum
Genie Press | WorkflowGenie | ESAGenie | ERPTopSites | ABAP Tips and Tricks