Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword or section
Like this
13Activity

Table Of Contents

0 of .
Results for:
No results containing your search query
P. 1
ABAP Program Tips

ABAP Program Tips

Ratings:

4.5

(2)
|Views: 576 |Likes:
Published by Vizhi Arasi
Abap tips document
Abap tips document

More info:

Published by: Vizhi Arasi on Aug 05, 2009
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

02/21/2012

pdf

text

original

 
ABAP Programming Tips Page 1 of 158
ABAP Program Tips
K. Wilson
http://www.sapgenie.com/abap
Table of Contents
CHAPTER 1
 
USEFUL TRANSACTIONS 3
 
1.1
 
EDI SPECIFIC TRANSACTIONS---------------3
 
1.1.1
 
S
CHEDULING AGREEMENTS
......................3
 
1.2
 
MESSAGE CONTROL----------------------------3
 
1.2.1
 
D
ELIVERY
...............................................3
 
1.2.2
 
I
NVOICE
..................................................3
 
1.2.3
 
O
RDER RESPONSE
...................................3
 
1.3
 
IDOC ADMINISTRATION------------------------3
 
1.4
 
IDOC DEVELOPMENT----------------------------4
 
1.5
 
REQUIREMENTS CODING----------------------4
 
1.6
 
SALES-------------------------------------------------4
 
1.7
 
GENERAL--------------------------------------------4
 
1.7.1
 
C
OMMON TABLES
....................................5
 
CHAPTER 2 
 
USEFUL PROGRAMS
 
2.1
 
FUNCTION MODULES---------------------------7
 
2.1.1
 
USEREXIT_KOMKBV1_FILL................7
 
2.1.2
 
MASTER_IDOC_DISTRIBUTE..............7
 
2.1.3
 
IDOC_STATUS_WRITE_TO_DATABASE7
 
2.1.4
 
IDOC_TYPE_COMPLETE_READ.........7
 
2.2
 
PROGRAMS---------------------------------------11
 
2.2.1
 
RHSOBJCH – F
IXES
PD C
ONTROL
T
ABLESMISSING IN TX
SWU3...........................................11
 
2.2.2
 
RV80HGEN.........................................11
 
2.2.3
 
S
CHEDULING OF SYSTEM MAINTENANCE JOBS
....12
 
2.3
 
INCLUDES-----------------------------------------12
 
2.3.1
 
MBDCONWF – ID
OC
D
EFINITIONS
........12
 
2.4
 
FIELDS----------------------------------------------12
 
CHAPTER 3
 
GENERAL PROGRAMMING 14
 
3.1
 
BAPIS-----------------------------------------------14
 
3.2
 
DIALOG PROGRAMMING---------------------14
 
3.2.1
 
P
ROCESS ON VALUE REQUEST
 – F4.........14
 
3.3
 
REPORTS------------------------------------------15
 
3.3.1
 
R
EFRESHING
D
ATA ON REPORTS
.............15
 
3.3.2
 
T
REE
R
EPORTS
.....................................16
 
3.3.3
 
I
NITIALIZING DATE RANGES ON SELECTION
-
OPTIONS
19
 
3.3.4
 
R
EPORT HEADINGS
................................19
 
3.3.5
 
P
OPUP SELECTION
 – G
ET
F
ILENAME
........20
 
3.3.6
 
C
HECKBOXES IN REPORTS
......................20
 
3.3.7
 
L
IST
B
OXES ON
S
ELECTION
S
CREENS
......20
 
3.3.8
 
A
T LINE SELECTION
................................21
 
3.3.9
 
T
ABSTRIPS ON A SELECTION SCREEN
.......21
 
3.3.10
 
D
YNAMIC SELECTION SCREENS
................22
 
3.4
 
FILE PROCESSING------------------------------23
 
3.4.1
 
D
OWNLOADING TO
E
XCEL
.......................23
 
3.4.2
 
FTP
A FILE TO ANOTHER SERVER
............24
 
3.4.3
 
DATASET............................................25
 
3.4.4
 
WS_DOWNLOAD................................26
 
3.4.5
 
GUI_DOWNLOAD
WITH
POPUP
FILENAMEREQUEST
27
 
3.5
 
MACROS--------------------------------------------28
 
3.6
 
SELECT STATEMENTS------------------------29
 
3.6.1
 
J
OINS
...................................................29
 
3.7
 
SAPSCRIPT----------------------------------------30
 
3.7.1
 
C
HANGING THE SUBJECT FOR EMAIL ORDERCONFIRMATIONS
..................................................30
 
3.8
 
GENERAL-------------------------------------------31
 
3.8.1
 
R
ETRIEVING THE EMAIL ADDRESS OF AN
SAP
USER
31
 
3.8.2
 
E
XECUTING A PROGRAM
.........................31
 
3.8.3
 
C
HANGING
\ C
REATING
R
EQUIREMENTS
...32
 
3.8.4
 
D
ISPLAYING
T
RANSACTION
.....................32
 
3.8.5
 
GUI-S
TATUS
.........................................32
 
3.8.6
 
D
OCUMENT
F
LOW
..................................32
 
3.8.7
 
M
AINTAINING
T
RAILING SPACES WHENDOWNLOADING TO
PC..........................................32
 
3.8.8
 
H
IDING
ABAP S
OURCE
C
ODE
.................32
 
3.8.9
 
W
HERE IN
IMG
IS A TABLE CONFIGURED
..33
 
3.8.10
 
E
DITOR
T
IPS
(*EJECT
AND
*$*$)............33
 
3.8.11
 
L
IST OF WAYS TO TRANSPORT VARIANTS
...33
 
3.8.12
 
C
HECKING FOR BACKGROUND PROCESSING
33
 
CHAPTER 4
 
WORKFLOW PROGRAMS 34
 
4.1
 
VIEWING PARTICULAR USERS INBOX---34
 
CHAPTER 5 
 
 ALV GRID CONTROL 37 
 
5.1
 
TOP-OF-PAGE
----------------------------------37
 
CHAPTER 6 
 
OBJECT PROGRAMMING 39
 
 
ABAP Programming Tips Page 2 of 158
6.1
 
SAP DEMO REPORTS-------------------------39
 
6.2
 
TREE REPORTS---------------------------------39
 
6.3
 
ALV GRID CONTROL---------------------------49
 
6.3.1
 
A
DDING CUSTOM BUTTONS ON
ALV
GRIDCONTROLS
..........................................................49
 
6.3.2
 
H
IGHLIGHT LINES
...................................53
 
6.3.3
 
F
IRST LINE VISIBLE
.................................53
 
6.3.4
 
R
EAD ONLY TEXT BOX
............................54
 
6.3.5
 
E
NTERING 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’S STATUS-----------57
 
7.5
 
READING AN IDOC-----------------------------57
 
7.5.1
 
E
XAMPLE
 – O
PEN 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 TODOCUMENTS----------------------------------------------60
 
7.9.1
 
* R
ETURN THE LIST OF
ID
OCS LINKED TO THEDELIVERY
60
 
7.9.2
 
* R
ETURN THE LIST OF
ID
OCS LINKED TO THEINVOICE
60
 
7.9.3
 
V
ERSION
4.6X......................................60
 
7.10
 
EXAMPLES-------------------------------------62
 
7.10.1
 
W
RITE
I
DOC
S
TATUS
..............................62
 
7.10.2
 
BDC P
ROCESSING
& I
DOC STATUS UPDATE
62
 
7.10.3
 
M
AILING IN
SAP....................................64
 
7.10.4
 
P
ROGRAM EXAMPLE
 – R
EPORT TO SHOW
EDI
STATUS
69
 
7.10.5
 
E
XAMPLE UPLOAD FILE TO
ID
OC
..............82
 
7.10.6
 
ID
OC CREATION FROM INBOUND FILE
.......89
 
7.10.7
 
L
IST TRANSACTIONS
.............................100
 
7.10.8
 
R
EPORT WITH JOINS AND MACROS
.........102
 
7.10.9
 
G
RAPHICAL
POPUP
PROGRESS DISPLAY
109
 
7.10.10
 
C
HANGE
ID
OC STATUS TO ERROR STATUSAND SEND TO WORKFLOW
...................................110
 
7.10.11
 
R
EPORT TO DOWNLOAD PROGRAMS
...117
 
7.10.12
 
D
ISPLAY TABLE IN
HTML..................126
 
7.10.13
 
T
REE REPORTS
................................128
 
7.10.14
 
S
HELL
L
IST
R
EPORT OFF A TABLE
- NAST131
 
7.10.15
 
ALV R
EPORT
..................................136
 
7.10.16
 
SAP G
ENERATED REPORT
\ D
IALOG
P
ROGRAM
141
 
7.10.17
 
L
IST 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 3 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. atCust., and Partner descriptions must match ship-to Partner descriptions.) This transaction updates tableT661W. 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. Atimplementation, the only field that needs to be maintained is "Check PO number," which causes SAP tomake 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 thecustomer's quantity for a week or month evenly into the days of the week specified by the distributionfunction 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 1NB: Use V/84 – V7ALLE – SHAD for grouped ASNs. I.e. Group deliveries into shipments
 
VV21
 
Create output condition records for shipping.LAVA – 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 – 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 – SP Sold to party)
1.3 IDOC ADMINISTRATION
WE09 / WE02
 
IDoc lists according to content. View IDocs via specific IDoc number or business application detailcontained within the contents of a segment.
WE05
 
View IDocs

Activity (13)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Pranay Patel liked this
Pranay Patel liked this
Bhalchandra Rupe liked this
chander_reddy liked this
kuskus16 liked this
manojraut 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)//-->