Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
4Activity
×
0 of .
Results for:
No results containing your search query
P. 1
ABAP Program Tips v3

ABAP Program Tips v3

Ratings: (0)|Views: 2,096|Likes:
Published by api-3856831

More info:

Published by: api-3856831 on Oct 19, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See More
See less

03/18/2014

pdf

text

original

ABAP Program Tips
K. Wilson
http://www.sapgenie.com/abap
Table of Contents
3.3.4
REPORT HEADINGS................................. 19
3.3.5
POPUP SELECTION \u2013 GET FILENAME........ 20
CHAPTER 1 USEFUL TRANSACTIONS
3
3.3.6
CHECKBOXES IN REPORTS....................... 20
3.3.7
LIST BOXES ON SELECTION SCREENS...... 20
1.1
EDI SPECIFIC TRANSACTIONS---------------3
3.3.8
AT LINE SELECTION................................. 21
1.1.1
SCHEDULING AGREEMENTS....................... 3
3.3.9
TABSTRIPS ON A SELECTION SCREEN....... 21
1.2
MESSAGE CONTROL----------------------------3
3.3.10 DYNAMIC SELECTION SCREENS................22
1.2.1
DELIVERY................................................. 3
3.4
FILE PROCESSING----------------------------- 23
1.2.2
INVOICE.................................................... 3
3.4.1
DOWNLOADING TO EXCEL....................... 23
1.2.3
ORDER RESPONSE.................................... 3
3.4.2
FTP A FILE TO ANOTHER SERVER............. 24
1.3
IDOC ADMINISTRATION-------------------------3
3.4.3
DATASET............................................. 25
3.4.4
WS_DOWNLOAD................................. 26
1.4
IDOC DEVELOPMENT----------------------------4
3.4.5
GUI_DOWNLOADWITH POPUPFILENAM E
REQUEST27
1.5
REQUIREMENTS CODING----------------------4
1.6
SALES-------------------------------------------------4
3.5
MACROS------------------------------------------- 28
1.7
GENERAL--------------------------------------------4
3.6
SELECT STATEMENTS----------------------- 29
1.7.1
COMMON TABLES...................................... 5
3.6.1
JOINS..................................................... 29
CHAPTER 2 USEFUL PROGRAMS
7
3.7
SAPSCRIPT--------------------------------------- 30
3.7.1
CHANGING THE SUBJECT FOR EMAIL ORDER
CONFIRMATIONS....................................................30
2.1
FUNCTION MODULES---------------------------7
2.1.1
USEREXIT_KOMKBV1_FILL. ................ 7
3.8
GENERAL------------------------------------------ 31
2.1.2
MASTER_IDOC_DISTRIBUTE.............. 7
3.8.1
RETRIEVING THE EMAIL ADDRESS OF AN SAP
USER
31
2.1.3
IDOC_STATUS_WRITE_TO_DATABASE
7
3.8.2
EXECUTING A PROGRAM.......................... 31
2.1.4
IDOC_TYPE_COMPLETE_READ......... 7
3.8.3
CHANGING \ CREATING REQUIREMENTS ... 32
3.8.4
DISPLAYING TRANSACTION...................... 32
2.2
PROGRAMS--------------------------------------- 11
3.8.5
GUI-STATUS.......................................... 32
2.2.1
RHSOBJCH \u2013 FIXES PD CONTROL TABLES
MISSING IN TXSWU3............................................. 11
3.8.6
DOCUMENT FLOW................................... 32
3.8.7
MAINTAINING TRAILING SPACES WHEN
DOWNLOADING TOPC........................................... 32
2.2.2
RV80HGEN.......................................... 11
2. 2. 3
SCHEDULING OF SYSTEM MAINTENANCE JOBS....12
3.8.8
HIDING ABAP SOURCE CODE................. 32
2.3
INCLUDES----------------------------------------- 12
3.8.9
WHERE IN IMG IS A TABLE CONFIGURED .. 33
2.3.1
MBDCONWF \u2013 IDOC DEFINITIONS......... 12
3.8.10 EDITOR TIPS (*EJECTAND *$*$)............33
3.8.11 LIST OF WAYS TO TRANSPORT VARIANTS..33
2.4
FIELDS---------------------------------------------- 12
3.8.12 CHECKING FOR BACKGROUND PROCESSING33
CHAPTER 3 GENERAL PROGRAMMING
14
CHAPTER 4 WORKFLOW PROGRAMS
34
3.1
BAPIS----------------------------------------------- 14
4.1
VIEWING PARTICULAR USERS INBOX -- 34
3.2
DIALOG PROGRAMMING--------------------- 14
3.2.1
PROCESS ON VALUE REQUEST \u2013 F4......... 14
CHAPTER 5 ALV GRID CONTROL
37
3.3
REPORTS------------------------------------------ 15
5.1 TOP-OF-PAGE---------------------------------37
3.3.1
REFRESHING DATA ON REPORTS............. 15
3.3.2
TREE REPORTS...................................... 16
3.3.3
INITIALIZING DATE RANGES ON SELECTION-
OPTIONS19
CHAPTER 6 OBJECT PROGRAMMING
39
ABAP Programming Tips
Page 1 of 158
6.1
SAP DEMO REPORTS------------------------- 39
6.2
TREE REPORTS--------------------------------- 39
6.3
ALV GRID CONTROL--------------------------- 49
6.3.1
ADDING CUSTOM BUTTONS ON ALVGRID
CONTROLS............................................................49
6.3.2
HIGHLIGHT LINES.................................... 53
6.3.3
FIRST LINE VISIBLE.................................. 53
6.3.4
READ ONLY TEXT BOX.............................. 54
6.3.5
ENTERING TEXT...................................... 54
CHAPTER 7 IDOC PROGRAMMING
56
7.1
CREATING AN IDOC---------------------------- 56
7.2
SENDING AN IDOC------------------------------ 56
7.3
CHANGING AN IDOC--------------------------- 56
7.4
CHANGING AN IDOC\u2019S STATUS----------- 57
7.5
READING AN IDOC----------------------------- 57
7.5.1
EXAMPLE \u2013 OPEN DOCUMENT FOR READ .. 57
7.6
DISPLAYING AN IDOC------------------------- 58
7.7
IDOC TYPE POOL------------------------------- 58
7.8
LAUNCHING AN ERROR WORKFLOW --- 58
7.9
RETURNING IDOCS LINKED TO
DOCUMENTS---------------------------------------------- 60
7.9.1
* RETURN THE LIST OF IDOCS LINKED TO THE
DELIVERY6 0
7.9.2
* RETURN THE LIST OF IDOCS LINKED TO THE
INVOICE60
7.9.3
VERSION 4.6X........................................ 60
7.10
EXAMPLES------------------------------------- 62

7.10.1 WRITE IDOC STATUS...............................62 7.10.2 BDC PROCESSING & IDOC STATUS UPDATE62 7.10.3 MAILING IN SAP......................................64 7.10.4 PROGRAM EXAMPLE \u2013 REPORT TO SHOW EDI

STATUS69

7.10.5 EXAMPLE UPLOAD FILE TO IDOC...............82 7.10.6 IDOC CREATION FROM INBOUND FILE........89 7.10.7 LIST TRANSACTIONS..............................100 7.10.8 REPORT WITH JOINS AND MACROS.........102 7.10.9 GRAPHICAL POPUP PROGRESS DISPLAY109 7.10.10

CHANGE IDOC STATUS TO ERROR STATUS
AND SEND TO WORKFLOW....................................110
7.10.11
REPORT TO DOWNLOAD PROGRAMS ... 117
7.10.12
DISPLAY TABLE IN HTML................... 126
7.10.13
TREE REPORTS................................. 128
7.10.14
SHELL LIST REPORT OFF A TABLE - NAST
131
7.10.15
ALV REPORT.................................... 136
7.10.16
SAP GENERATED REPORT \ DIALOG
PROGRAM 141
7.10.17
LIST OF TRANSACTIONS REPORT......... 151
CHAPTER 8 BASIS ERRORS AND RESOLUTIONS
154
8.1
CANNOT ACTIVATE A TABLE------------ 154
CHAPTER 9 INDEX
156
ABAP Programming Tips
Page 2 of 158
CHAPTER 1 USEFUL TRANSACTIONS
IDoc Development class: SED.
1.1 EDI SPECIFIC TRANSACTIONS
VOE1
Translation between EDI categories and SD item categories
VOE2
Table EDSC view. Customer link to sales area detail.
VOE3
Table view EDPVW. Add partner types that will be transferred to the IDoc.
VOE4
Table view EDPAR. Link external partner number with our internal number.
OVAI

Create entries for each Vendor / Partner description combination. (Vendors must match sold-to Acct. at Cust., and Partner descriptions must match ship-to Partner descriptions.) This transaction updates table T661W. SAP uses this table to determine the schedule agreement sold-to partner.

1.1.1 Scheduling agreements
OVA9

Create entries for each sold-to customer for which you will receive EDI schedule releases. At implementation, the only field that needs to be maintained is "Check PO number," which causes SAP to make sure that the PO number sent on the release matches the PO number on the schedule agreement. This transaction updates table T663A. SAP will not post an EDI schedule release, if this record is missing.

OVAJ

If you would like SAP to post schedule requirements using discrete dates only, instead of weekly and/or monthly buckets, you can indicate the days of the week that you deliver to this customer. SAP will divide the customer's quantity for a week or month evenly into the days of the week specified by the distribution function code. This code must be sent in the DELINS IDoc in field E1EDP16-ETVTF.

1.2 MESSAGE CONTROL
NACE
Links to all the message control transactions via the application area
1.2.1 Delivery
V/36

Maintain output determination for deliveries (Output determination procedures)
V10000 (Header output) has condition type LAVA (usually with requirement 1
NB: Use V/84 \u2013 V7ALLE \u2013 SHAD for grouped ASNs. I.e. Group deliveries into shipments

VV21
Create output condition records for shipping.
LAVA \u2013 WE (Partner function) - We must add each new partner with VV21
VL71
Reissue output for deliveries
1.2.2 Invoice
V/54
Maintain access sequence for billing documents
VV31
Create condition records for billing documents. (RD00 \u2013 RE Billing party)
VF31
Reissue output for billing documents
1.2.3 Order response
V/30
Sales document output types (BA00)
V/48, V/32, V/43
Maintain access sequence for sales documents
VV11
Create condition records for sales documents. (BA00 \u2013 SP Sold to party)
1.3 IDOC ADMINISTRATION
WE09 / WE02
IDoc lists according to content. View IDocs via specific IDoc number or business application detail
contained within the contents of a segment.
WE05
View IDocs
ABAP Programming Tips
Page 3 of 158

Activity (4)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
mplaskan liked this
lea-com liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->