Sunday, June 26, 2011

Dropdown List Example in ABAP


REPORT  ZDROPDOWNLIST .

typesbegin of t_vbap,
  posnr 
type vbap-posnr,
  
end of t_vbap.

data: it_vbap TYPE STANDARD TABLE OF t_vbap,
      wa_vbap 
like line of it_vbap.

TYPE-POOLS: VRM.
DATA: NAME  TYPE VRM_ID,
      LIST  
TYPE VRM_VALUES,
      
VALUE LIKE LINE OF LIST.
""""""""""""
PARAMETERS: SO_NUM like vbap-vbeln.
""""""""""""

PARAMETERS: P_POSNR(10AS LISTBOX VISIBLE LENGTH 10.

*********************************************************
*AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN OUTPUT.

clear list.
 
SELECT posnr
   
up to 10 rows
   
into CORRESPONDING FIELDS OF TABLE it_vbap
   
from vbap
   
where
   vbeln = SO_NUM.

  
loop at it_vbap into wa_vbap.
    
VALUE-KEY =  wa_vbap-posnr.
    
VALUE-TEXT = wa_vbap-posnr.
    
APPEND VALUE TO LIST.
  
endloop.

  NAME = 
'P_POSNR'.
  
CALL FUNCTION 'VRM_SET_VALUES'
    
EXPORTING
      
ID     = NAME
      VALUES = LIST.


*clear list.
********************************************************
*START-OF-SELECTION.
START-
OF-SELECTION.
  
WRITE: / 'SELECTED VALUE KEY:', SO_NUM.

Dropdown List Example in ABAP


REPORT  ZDROPDOWNLIST .

typesbegin of t_vbap,
  posnr 
type vbap-posnr,
  
end of t_vbap.

data: it_vbap TYPE STANDARD TABLE OF t_vbap,
      wa_vbap 
like line of it_vbap.

TYPE-POOLS: VRM.
DATA: NAME  TYPE VRM_ID,
      LIST  
TYPE VRM_VALUES,
      
VALUE LIKE LINE OF LIST.
""""""""""""
PARAMETERS: SO_NUM like vbap-vbeln.
""""""""""""

PARAMETERS: P_POSNR(10AS LISTBOX VISIBLE LENGTH 10.

*********************************************************
*AT SELECTION-SCREEN OUTPUT.
AT SELECTION-SCREEN OUTPUT.

clear list.
 
SELECT posnr
   
up to 10 rows
   
into CORRESPONDING FIELDS OF TABLE it_vbap
   
from vbap
   
where
   vbeln = SO_NUM.

  
loop at it_vbap into wa_vbap.
    
VALUE-KEY =  wa_vbap-posnr.
    
VALUE-TEXT = wa_vbap-posnr.
    
APPEND VALUE TO LIST.
  
endloop.

  NAME = 
'P_POSNR'.
  
CALL FUNCTION 'VRM_SET_VALUES'
    
EXPORTING
      
ID     = NAME
      VALUES = LIST.


*clear list.
********************************************************
*START-OF-SELECTION.
START-
OF-SELECTION.
  
WRITE: / 'SELECTED VALUE KEY:', SO_NUM.

Monday, June 20, 2011

Double clicking example in abap


REPORT  ZDOUBLECLICK .

START-
OF-SELECTION.
  
WRITE 'Click me'.
 
AT LINE-SELECTION.
  
WRITE 'Hello'

How to Create POP-UP window



REPORT  ZPOPUPWINDOW .

START-
OF-SELECTION.
    
WRITE / 'Click me' HOTSPOT ON.
AT LINE-SELECTION.
  
WINDOW STARTING AT 20 20
          ENDING   
AT 60 30.

  
WRITE / 'hello ' HOTSPOT ON.

Tuesday, June 14, 2011

How to get list of active user logged on to the system with terminal and other details


Use the T-code SE37 and execute the function module TH_DISPLAY_USER_LIST.

Here you wil get the list of active users with information like Client, Terminal, Transaction code the user is working on, number of sessions opened by that user and whether Trace is ON or OFF. 

This information can be used for sort of troubleshooting purpose.
 



Difference between T-Code SE09, SE10 and SE01


SE09 is the transaction code for workbench organizer. Workbench organizer is the set of utilities for development change management. All Development changes are tracked via Workbench organizer.

SE10 is for Customizing organizer. Customizing organizer is the set of tools for customizing change management. All customizing changes are tracked via customizing organizer.

SE01 is the main screen of the Change and transport Organizer. From here the administrator can achieve all tasks related to transport requests - such as create, change, view logs, display client/delivery transports, etc. SE09 and SE10 can also be accessed from here. However, not all developers might be granted access to this transaction.

Drop Down lists in the selection parameters

PROGRAM ztest.   TYPE-POOLS : vrm.   DATA : name TYPE vrm_id,        list TYPE vrm_values,        value LIKE LINE OF list. ...