There are 8 bits in a byte. There is No Shortcut to be A Great ABAP Programmer and It's Applies to All.
Tuesday, January 28, 2014
Monday, January 27, 2014
BASIS - PRD SLOW
Below is some of the tcode i'm used to check the health of the system
SM66 Global Work Process
Overview
Check
SM66, to look all server status. Look for any process which took too long (TIME)
to run. If proses time more than 500ms it can be considered 'slow'.
SM50 Process Over
view – Client Based
To view and kill proves for single server
S37 – Background Job
View and kill active job which taken too long to process,
usually report
SM58 Transactional
RFC
Look for any active RFC connection which might cause the
SLOWNESS.
*will add more
Wednesday, June 26, 2013
Dynamic Error Message usinge Message Class (SE91)
How to assign dynamic error message using Message Class (SE91)
1) Assign message variable , starting with ampersand(&) symbol and combine with number e.g &1 , &2 . Maximum 4 variable can be assigned.
2) Call the message in the ABAP program below is the code snippet.
IF sy-subrc <> 0.
CLEAR: wa_message, tp_msg.
CONCATENATE 'Item No' wa_im_t_eban-bnfpo INTO tp_msg SEPARATED BY SPACE.
wa_message-type = 'E'.
wa_message-id = 'ZMM01'.
wa_message-number = '082'.
wa_message-message_v1 = tp_msg.
APPEND wa_message TO ex_messages.
* MESSAGE e082(ZMM01) .
ENDIF.
CLEAR: wa_message, tp_msg.
CONCATENATE 'Item No' wa_im_t_eban-bnfpo INTO tp_msg SEPARATED BY SPACE.
wa_message-type = 'E'.
wa_message-id = 'ZMM01'.
wa_message-number = '082'.
wa_message-message_v1 = tp_msg.
APPEND wa_message TO ex_messages.
* MESSAGE e082(ZMM01) .
ENDIF.
3) The variable format for append the message is message_v1,message_v2 till message_v4
Wednesday, June 5, 2013
Display error message in report after Selection Screen
Below is the code snippet to display error message, in report after selection of data.
Normal type 'E' report prevent user to back to original selection screen.
IF ta_report[] IS NOT INITIAL.
PERFORM display_report.
ELSE.
MESSAGE s000(zfi01) WITH 'Data Does Not Exists' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.
Normal type 'E' report prevent user to back to original selection screen.
IF ta_report[] IS NOT INITIAL.
PERFORM display_report.
ELSE.
MESSAGE s000(zfi01) WITH 'Data Does Not Exists' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.
Monday, April 29, 2013
Hide Selection Screen - Auto Hide
Below is the code snippet to hide certain selection input or screen using radio button technique.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-101.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 4(30) text-rb1.
SELECTION-SCREEN POSITION 2.
PARAMETERS: r1 RADIOBUTTON GROUP rg1 USER-COMMAND rb_com DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 4(30) text-rb2.
SELECTION-SCREEN POSITION 2.
PARAMETERS: r2 RADIOBUTTON GROUP rg1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK a1.
SELECTION-SCREEN BEGIN OF BLOCK qsel
WITH FRAME TITLE text-s02.
SELECT-OPTIONS sp$00006 FOR lfm1-ekorg MEMORY ID eko MODIF ID sel.
SELECT-OPTIONS sp$00001 FOR lfb1-bukrs MEMORY ID buk MODIF ID sel.
SELECT-OPTIONS sp$00003 FOR lfa1-erdat MODIF ID sel.
SELECT-OPTIONS sp$00004 FOR lfa1-ernam MODIF ID sel.
SELECT-OPTIONS sp$00005 FOR lfa1-ktokk MEMORY ID kgk MODIF ID sel.
SELECT-OPTIONS sp$00002 FOR lfb1-lifnr MEMORY ID lif MODIF ID sel.
SELECTION-SCREEN END OF BLOCK qsel.
SELECTION-SCREEN BEGIN OF BLOCK stdsel WITH FRAME TITLE text-s03.
PARAMETERS %layout TYPE slis_vari MODIF ID lay.
SELECTION-SCREEN END OF BLOCK stdsel.
" To hide the the selection screen AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'SEL' AND r2 EQ 'X'.
screen-active = '0'.
MODIFY SCREEN.
CONTINUE.
ELSEIF screen-group1 = 'LAY' AND r2 EQ 'X'.
screen-active = '0'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 4(30) text-rb1.
SELECTION-SCREEN POSITION 2.
PARAMETERS: r1 RADIOBUTTON GROUP rg1 USER-COMMAND rb_com DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 4(30) text-rb2.
SELECTION-SCREEN POSITION 2.
PARAMETERS: r2 RADIOBUTTON GROUP rg1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK a1.
SELECTION-SCREEN BEGIN OF BLOCK qsel
WITH FRAME TITLE text-s02.
SELECT-OPTIONS sp$00006 FOR lfm1-ekorg MEMORY ID eko MODIF ID sel.
SELECT-OPTIONS sp$00001 FOR lfb1-bukrs MEMORY ID buk MODIF ID sel.
SELECT-OPTIONS sp$00003 FOR lfa1-erdat MODIF ID sel.
SELECT-OPTIONS sp$00004 FOR lfa1-ernam MODIF ID sel.
SELECT-OPTIONS sp$00005 FOR lfa1-ktokk MEMORY ID kgk MODIF ID sel.
SELECT-OPTIONS sp$00002 FOR lfb1-lifnr MEMORY ID lif MODIF ID sel.
SELECTION-SCREEN END OF BLOCK qsel.
SELECTION-SCREEN BEGIN OF BLOCK stdsel WITH FRAME TITLE text-s03.
PARAMETERS %layout TYPE slis_vari MODIF ID lay.
SELECTION-SCREEN END OF BLOCK stdsel.
" To hide the the selection screen AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-group1 = 'SEL' AND r2 EQ 'X'.
screen-active = '0'.
MODIFY SCREEN.
CONTINUE.
ELSEIF screen-group1 = 'LAY' AND r2 EQ 'X'.
screen-active = '0'.
MODIFY SCREEN.
CONTINUE.
ENDIF.
ENDLOOP.
p/s need to put user-command at the radio button default else it wont work automatically.
Friday, April 19, 2013
Transaction Code Tips
I was stumble upon nice article explaining about how the transaction code generate
Below is the summary.
1. Transaction end with number got its own meaning.
00 = MAIN MENU
01 = ADD
02 = MODIFY
03 = DISPLAY
Fore example:
MR01 – ADD AN MM INVOICE
MR02 – MODIFY A MM INVOICE
MR03 – DISPLAY A MM INVOICE
ME00 – PURCHASING MAIN MENU
ME21 – CREATE A PURCHASE ORDER
ME22 – CHANGE A PURCHASE ORDER
ME23 – DISPLAY A PURCHASE ORDER
2. Transaction code starting with certain letter mean is suit for different module.
|
Letter
|
Definition
|
|
F
|
Financial
|
|
FK
|
Financial Vendor Master
|
|
FS
|
Ledger Accounts
|
|
FB
|
Shared Financial
Transactions (Shared between A\P A\R Assets G\L)
|
|
M
|
Material Management
|
|
MK
|
Material Vendor Master
|
|
MB
|
Goods Receipt - Inventory Management
|
|
MR
|
MM Invoice Verification
|
|
ME
|
Purchasing
|
|
ME1
|
Purchase Requisition
|
|
ME2
|
Purchase Order
|
|
MM
|
Material Master
|
|
V
|
Sales & Distribution
|
|
VA
|
Sales Order
|
|
VF
|
Billing
|
|
XK
|
Central Vendor Master
|
|
XD
|
Central Customer Master
|
|
O
|
Usually configuration Transactions (Config
transactions begin with various letters)
|
|
|
Within transactions the following
letters have meaning. These letters also refer to General Ledger account
types and are used in naming system tables.
|
|
A
|
Assets (first letter fo
the German word Anlagengegenstand)
|
|
D
|
Customer/ debit type
transactions (first letter of German word Debitor)
|
|
K
|
Vendor/credit type of
transactions (first letter of German word Kredit)
|
|
M
|
Material (first letter of
German word Material)
|
|
S
|
Ledger (first letter of
the German word Soll)
|
Example:
D, K, M, S can be view in transaction F#01 - Create Financial Custimer, Vendor or Ledger
The F
at the beginning denotes a financial tranaction,
The 1 at the end denotes CREATE.
FD01 is create financial level customer accounts.
FK01 is create financial level vendor accounts
FS01 is create financial ledger accounts.
The 1 at the end denotes CREATE.
FD01 is create financial level customer accounts.
FK01 is create financial level vendor accounts
FS01 is create financial ledger accounts.
This letter can be viewed from system table creation, ecample:
BSIS – Open ledger items
BSAS – Closed ledger items
BSIK – Open vendor items
BSAK – Closed vendor items
BSID – Open customer items
BSAD – Closed customer items
source: http://goo.gl/8bpsY
Subscribe to:
Posts (Atom)





