Download Android App of sapabap-vamsi

sapabap-vamsi : Download Android App for Mobiles

Wednesday, August 10, 2011

ABAP Program

A program which would accept a Material as a Parameter on the selection screen. When the user enters a material number on the selection-screen and presses ENTER, the shortdescription of that particular Material should appear beside the Parameter.


Solution:



REPORT ZMATNR_DESC.
SELECTION-SCREEN BEGIN OF LINE.
*&Text element to Maintain Parameter text similar to Selection Texts
SELECTION-SCREEN COMMENT 1(9) text-001.
*&Input field for MATNR
PARAMETERS: p_matnr TYPE mara-matnr VISIBLE LENGTH 18.
*&Comment where the Material description gets populated on ENTER.
SELECTION-SCREEN COMMENT 40(25) maktx.
SELECTION-SCREEN END OF LINE.
*&This could be done using both the events AT SELECTION-SCREEN OUTPUT as well
*&as AT SELECTION-SCREEN. In either of the cases the description is
*&populated beside the input field
AT SELECTION-SCREEN." OUTPUT.
IF p_matnr IS NOT INITIAL.
SELECT SINGLE maktx
FROM makt
INTO maktx
WHERE matnr = p_matnr
AND spras = sy-langu.
ENDIF.


Please find the below screen-shots for the program flow of the same




On F4 for Input help



The third entry has been chosen and “ENTER”.





No comments:

Post a Comment