+ All Categories
Home > Education > General discussion-abap-tips-1222362261851517-8

General discussion-abap-tips-1222362261851517-8

Date post: 07-Nov-2014
Category:
Upload: wingsrai
View: 616 times
Download: 1 times
Share this document with a friend
Description:
 
Popular Tags:
19
General ABAP Discussion Tips and Tricks Michelle Crapo [email protected]
Transcript
Page 1: General discussion-abap-tips-1222362261851517-8

General ABAP Discussion

Tips and Tricks

Michelle Crapo

[email protected]

Page 2: General discussion-abap-tips-1222362261851517-8

Who is this person?

Michelle Crapo Perrigo – produce over the counter

pharmaceuticals. (Rx) 1998 Started in SAP Titles varied by the year:

Programmer/ Analyst, Sr. Project Manager, Business Analyst

I enjoy riding horses. I have 2 horses, 2 miniatures and one pony.

Page 3: General discussion-abap-tips-1222362261851517-8

Expectations

Page 4: General discussion-abap-tips-1222362261851517-8

Tips – ZMD_CONSTANT

ZMD_CONSTANT contains: MANDT Program or name Subroutine – usually empty Statement - plant Generic count as part of the key Sign – I or E Option – EQ, BT FIELD LOW - Value Field High – Value or empty

Used All over in custom code

Page 5: General discussion-abap-tips-1222362261851517-8

Pros/Cons ZMD_CONSTANT

Value – Pros One Place to find all changes. IE A new material

group is added. That material group should work the same in all programs. Normally all programs would be searched for similar constants. In ZMD_CONSTANT there is only one place to change it.

No programming change required. User can not “mess it up”.

Drawbacks – Cons It has be transported. Custom table. Multiple entries for the same thing with the program

field.

Page 6: General discussion-abap-tips-1222362261851517-8

ZMD_CONSTANT at work

Demo ZMCSIMPLE ZMD_CONSTANT

document ZMD_CONSTANT E

xample

Page 7: General discussion-abap-tips-1222362261851517-8

Tip - Change Documents

Transaction SCDO. Generated code for audit trails. Easy to add to custom code, all the

code has been written.

Page 8: General discussion-abap-tips-1222362261851517-8

Pros and Cons Change Documents

Pro Programming for change is done for

you. SCU3 can be used to display changes.

Cons Not all data elements have the change

document checked. Change data uses CDHDR, and CDPOS

Page 9: General discussion-abap-tips-1222362261851517-8

Demo Change documents

DEMO ZSPN, ZSPINSTR Example of Change documents

Page 10: General discussion-abap-tips-1222362261851517-8

Tips - Search Helps

Quick and easy way to provide for searching tables – custom screens or adding to the SAP search help.

Page 11: General discussion-abap-tips-1222362261851517-8

Pros and Cons Search Help

Pros Ease of use No programming

Cons More custom objects on system. Parameter IDs become important.

Page 12: General discussion-abap-tips-1222362261851517-8

Search Help Demo

Demo ZM_RID1, ZID_INIT Search Help Example

Page 13: General discussion-abap-tips-1222362261851517-8

ALV Grid

Used instead of list reports. It contains functionality that will help users – help themselves. Sub-total, sort, total..

It is like excel. That makes it very easy to learn, and use.

Page 14: General discussion-abap-tips-1222362261851517-8

Pros and Cons ALV Grid

Pros Like Excel Easy to code User friendly

Cons None that I know of???

Page 15: General discussion-abap-tips-1222362261851517-8

Demo

Link to ALV grid document Layout User-command ZQM0050 – Object ZPP0102

Page 16: General discussion-abap-tips-1222362261851517-8

Misc.

Enqueue Dequeue Table Maintenance generator Custom Transaction Read/loop/if/exit/endloop vs. loop

where

Page 17: General discussion-abap-tips-1222362261851517-8

Suggestions by the crowd!

Notes: For non-dumps - SM37 - Set the breakpoints for a

scheduled job, then run JDBG to restart from first loop for a canceled job

Triggering debug while on a pop-up screen.  Create a file on the desktop. "SAP Debug.txt". The

contents of the file contains four lines of text: [FUNCTION]

Command=/HTitle=DebuggerType=SystemCommand

Drag and drop this on the GUI; it's as if you had typed /H.

Thank you Jeffrey Hopwood for that one.

Page 18: General discussion-abap-tips-1222362261851517-8

Suggestions by the crowd – cont.

 ABAP Docs is from the monthly SDN.  Here's the link:  To avoid modification of SAP code - use field symbols in your

user exit.   Then you can point to any field in the SAP program.   Please note!  User exits can be called from many places, if that field is not in the other programs, it will cause them to short-dump.

 MM01/MM02 - when recording a BDC - go to the first view and then move to the others.  This is a good trick for any screen similiar to MM01 or MM02 that does not have a BAPI.

SE11 - generate table maintenance for a table.  Utilities -> table maintenance generator, you can change the table in SM30.  To limit so that only that table can be maintained.  Create a parameter transaction.

Name of screen - Update  value X Name of screen - viewname value - your table name. transaction SM30 - skip first screen.

Page 19: General discussion-abap-tips-1222362261851517-8

Suggestions by the crowd – Cont.

You can use these routines to parse any input file, to see if your field definitions in the record layout match the data, or to print a subset of fields from an input file (e.g. list just the vendor number or employee number, etc).  The p_any_rec values above can literally  be changed to any structured record definition.  I mostly use this when working on new interfaces, or when diagnosing a problem with an interface file. From Gordon Tobias

Program for Parsing


Recommended