‎2007 Apr 13 9:45 AM
Hi Gurus,
Can anyone explain how to create Screen Dynamically.
ie.,
Screen elements(checkbox, radio button, Text box) should be created based on user action. User action can be captured using pushbutton.
‎2007 Apr 13 9:49 AM
Hi,
Go 2 transaction SE54 and there u can create ur own screen n all the stuff that u want 2 hav on it n later call the screen by
CALL SCREEN STATEMENT.
following are the steps 2 be followed:
The following steps should be followed:
1) Create the main program
2) Create first screen
Define attributes
Define graphical user interface
Assign field attributes via field list
Define flow logic using dialog flow logic syntax
3) Create follow up screens
(Same steps as first screen)
4)* Create ABAP/4 processing logic (modules, sub-routines, etc.)
Choose (create if necessary) the PBO include which will contain the ABAP/4 modules
Write PBO modules (ABAP/4)
Choose (create if necessary) the PAI include which will contain the ABAP/4 modules
Write PAI modules (ABAP/4)
Create any required subroutines (create include programs if necessary)
5)* Define ABAP/4 Global Data
6) Create Menus (if necessary)
7) Create Transaction
if u want 2 create it dynamically use
RS_FUNCTION_TEST
reward if helpful.
regards,
kiran kumar k.
Message was edited by:
kiran kumar
Message was edited by:
kiran kumar
‎2007 Apr 13 9:51 AM
HI Amal
Just look at this Funvtion Module <b>RS_FUNCTION_TEST</b>
Regards Rk
‎2007 Apr 13 9:51 AM
Hi,
Herewith i am sending the DYNAMIC ALV report for your kind reference.
REPORT YMS_DYNAMICALV.
TYPE-POOLS: SLIS.
FIELD-SYMBOLS: <DYN_TABLE> TYPE STANDARD TABLE,
<DYN_WA>.
DATA: ALV_FLDCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_FLDCAT TYPE LVC_T_FCAT.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS: P_FLDS(5) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
START-OF-SELECTION.
build the dynamic internal table
PERFORM BUILD_DYN_ITAB.
write 5 records to the alv grid
DO 5 TIMES.
PERFORM BUILD_REPORT.
ENDDO.
call the alv grid.
PERFORM CALL_ALV.
************************************************************************
Build_dyn_itab
************************************************************************
FORM BUILD_DYN_ITAB.
DATA: NEW_TABLE TYPE REF TO DATA,
NEW_LINE TYPE REF TO DATA,
WA_IT_FLDCAT TYPE LVC_S_FCAT.
Create fields .
DO P_FLDS TIMES.
CLEAR WA_IT_FLDCAT.
WA_IT_FLDCAT-FIELDNAME = SY-INDEX.
WA_IT_FLDCAT-DATATYPE = 'CHAR'.
WA_IT_FLDCAT-INTLEN = 5.
APPEND WA_IT_FLDCAT TO IT_FLDCAT .
ENDDO.
Create dynamic internal table and assign to FS
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_FLDCAT
IMPORTING
EP_TABLE = NEW_TABLE.
ASSIGN NEW_TABLE->* TO <DYN_TABLE>.
Create dynamic work area and assign to FS
CREATE DATA NEW_LINE LIKE LINE OF <DYN_TABLE>.
ASSIGN NEW_LINE->* TO <DYN_WA>.
ENDFORM. "build_dyn_itab
*********************************************************************
Form build_report
*********************************************************************
FORM BUILD_REPORT.
DATA: FIELDNAME(20) TYPE C.
DATA: FIELDVALUE(5) TYPE C.
DATA: INDEX(3) TYPE C.
FIELD-SYMBOLS: <FS1>.
DO P_FLDS TIMES.
INDEX = SY-INDEX.
Set up fieldvalue
CONCATENATE 'FLD' INDEX INTO
FIELDVALUE.
CONDENSE FIELDVALUE NO-GAPS.
<b> assign component index of structure <dyn_wa> to <fs1>.
<fs1> = fieldvalue.</b>
ENDDO.
Append to the dynamic internal table
APPEND <DYN_WA> TO <DYN_TABLE>.
ENDFORM. "build_report
************************************************************************
CALL_ALV
************************************************************************
FORM CALL_ALV.
DATA: WA_CAT LIKE LINE OF ALV_FLDCAT.
DO P_FLDS TIMES.
CLEAR WA_CAT.
WA_CAT-FIELDNAME = SY-INDEX.
WA_CAT-SELTEXT_S = SY-INDEX.
WA_CAT-OUTPUTLEN = '5'.
APPEND WA_CAT TO ALV_FLDCAT.
ENDDO.
Call ABAP List Viewer (ALV)
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IT_FIELDCAT = ALV_FLDCAT
TABLES
T_OUTTAB = <DYN_TABLE>.
ENDFORM. "call_alv
Thanks,
Sankar M
‎2007 Apr 13 9:53 AM
hi
go to transaction se80
create a program
right click on the program and create the screen
go to the layout of the screen
craete pushbuttons,radiobuttons,checkboxes etc..
regards
ravish
<b>*dont forget to reward points if helpful</b>