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(30text-rb1.
SELECTION-SCREEN POSITION 2.
PARAMETERSr1 RADIOBUTTON GROUP rg1 USER-COMMAND rb_com DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 4(30text-rb2.
SELECTION-SCREEN POSITION 2.
PARAMETERSr2 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 acc
ounts.

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





Where is my inactive objects?


A few ways to find or to view inactive object, one way is :


1. Go to SE80
2. In drop down menu, choose Inactive Objects
3. Key in your user ID, and it will list down all in active object