How to create dynamic screen using module pool programming
Hi,
Could anybody help me how to create dynamic screens?
I am developing a screen with HR Person with assignment info. If PERNR have multiple assignments, i need to show all the details one by one. How to show the details on screen. I need to call one by one assignment information dynamically.
Please suggest me how to do, apart from using table controls.
Thanks,
Kamal
You may have the below options:
1) Table Control
2) Individual fields
3) ALV
4) pop-up screen
Similar Messages
-
Checking Records in multiple screens using module pool programming
Hi,
I created student registration form using module pool programming.In first SCREEN i designed like the Below.
Name: <INPUT/OUTPUT Field>
Emailid: <INPUT/OUTPUT Field>
Password:<INPUT/OUTPUT Field>
CREATE<Push Button> SIGNIN<Push Button> cancel<Push Button>
in screen 1000 I created like the above screen and i wrote the code for it.It's successfully inserted records in ZSTUDENT database.
BUT
when i call the second screen 2000.I design the screen like below.And database table is ZSTU_LOGIN.
username : <INPUT/OUTPUT Field>
password : <INPUT/OUTPUT Field>
LOGIN<push Button> EXIT<Push Button>
AND i created Third screen 3000.Like full of detail of student details like First Name,Last Name,DOB,Education Details,Contact Details etc...
BUT I'm facing the pbm is
whatever the record is stored in table ZSTUDENT-Name & password when i call the screen 2000 that USERNAME & PASSWORD are same
Then go to THIRD screen 3000.BUT i wrote the code for second screen 2000 by using SELECT statement.without my code check it will go to third
screen 3000 By the Statement of Call screen 3000.
PLZ any one help me HOW to CHECK the Exact Record From second Screen 2000 to First Screen 1000.
HOW to Check the code AND can u provide me any code available.
thanks,
AnushaHi vikram,
I wrote the code for screen 2000 like below.
MODULE STATUS_2000 OUTPUT.
* SET PF-STATUS 'xxxxxxxx'.
* SET TITLEBAR 'xxx'.
TABLES : ZSTUDENT_ENTER.
TYPES: BEGIN OF ST_TAB1,
USERNAME TYPE ZSTUDENT_ENTER-USERNAME,
PASSWORD1 TYPE ZSTUDENT_ENTER-PASSWORD1,
END OF ST_TAB1.
DATA : W_TAB1 TYPE ZSTUDENT_ENTER.
DATA : IT_TAB1 TYPE STANDARD TABLE OF ZSTUDENT_ENTER.
DATA : USERNAME TYPE CHAR50,
PASSWORD1 TYPE CHAR25.
ENDMODULE. " STATUS_2000 OUTPUT
*& Module USER_COMMAND_2000 INPUT
* text
MODULE USER_COMMAND_2000 INPUT.
CLEAR W_TAB1.
MOVE-CORRESPONDING W_TAB TO W_TAB1.
IF SY-SUBRC EQ 0.
SELECT SINGLE MAILID PASSWORD
INTO CORRESPONDING FIELDS OF W_TAB
FROM ZSTUDENT_INFO
WHERE USERNAME = W_TAB-MAILID AND
PASSWORD1 = W_TAB-PASSWORD.
CALL SCREEN 2000.
ENDSELECT.
ELSEIF SY-SUBRC NE 0.
MESSAGE 'INVALID USERNAME/PASSWORD'.
ELSEIF SY-UCOMM = 'LOGIN'.
CALL SCREEN 3000.
ENDIF.
ENDMODULE. " USER_COMMAND_2000 INPUT
But i could not found whether code is write or not.
syntax error is USERNAME is Unknown.
could solve me my pbm anybody.....
Thanks,
Anusha -
How to create select-options in module pool program
Hi
i am structed at this point could you please tell me
how to create select-options in module pool programSteps to get SELECT-OPTIONS in module pool programs.
<li>. Start one dialog program with SAPZ_TEST.
<li>. Place the below code in the TOP include of the dialog program.
PROGRAM SAPMZ_TEST.
TABLES mara.
SELECTION-SCREEN BEGIN OF SCREEN 2100 AS SUBSCREEN.
SELECT-OPTIONS: matnr FOR mara-matnr.
SELECTION-SCREEN END OF SCREEN 2100.
<li>. Create one screen 2000 .
<li>. Go to Layout of the screen and Define subscreen area on the screen and Name it as g_subscreen.
<li>. Place the below code in the Flow logic of the screen.
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN g_subscreen INCLUDING 'SAPMZ_TEST' '2100'.
PROCESS AFTER INPUT.
CALL SUBSCREEN g_subscreen.
<li>. Activate all.
<li>. Create Transaction code for the dialog program SAPZ_TEST.
<li>. Execute the transaction code. You will see the select-option like we see on Selection-screen.
I hope that it gets u clear idea.
Thanks
Venkat.O -
How to create Long Text in Module Pool Program
Hi all,
I want to develop a new module pool program and I want to use Long text screen in this program and also want this text will store in table.I never develop such type of module pool before.This long text will like sales order long text.Please let me know the steps how I can develop such type of program and how I save long text huge data in table.
Thanks & Regards
NirmalHai ,
here you have to use custom control, for this
DATA: line(256) TYPE c,
text_tab LIKE STANDARD TABLE OF line,
field LIKE line.
1) Create custom control in your screen
2) CREATE OBJECT: container EXPORTING container_name = 'TEXTEDIT', "--> (this is custom control name in screen)
editor EXPORTING parent = container.
3) CALL METHOD editor->get_text_as_stream "This method reads data from custom control , inserts into itab 'text_tab'
IMPORTING
text = text_tab. "
READ TABLE text_tab INTO line INDEX 1. read the text into wa 'line'
if you want more clarity , see 'ABAPDOCU' >ABAP USER DIALOGS> COMPLEXSCREEN ELEMENTS--> DEMO CUSTOM_CONTROL -
How to create a ListBox in module pool program in 3.1i system ?
Hi All,
How to create a ListBox of type module pool program in 3.1i system ?
when i tried creating, the listbox option is disabled.
Thanks in advance.
Edited by: gulab zehra on Aug 20, 2009 1:26 PMHi,
please go through this...
LIST BOX
Drop down list box can be created in a dialog screen(SE51) as well as selection screen.
In screen painter to create a input/output field into list box we use 'L" as a value for dropdown attribute for the i/o field. In screen painter to determine the type of method that will be used to fill the value list we use the attribute value list. If it is blank, the value list will be filled by the first column of the input help assigned to the screen field. This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system. SAP recommends value list field should be blank.
or
The value can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field. If a function code is attached to the list box the selection of a value triggers a PAI otherwise PAI will not trigger. LIST BOX in SELECTION SCREEN
List Box is created in selection screen using PARAMETERS statement with
AS LISTBOX addition other attributes like VISIBLE LENGTH (width of listbox) can be specified with the declaration. PARAMETERS name AS LISTBOX VISIBLE LENGTH n.
The function module VRM_SET_VALUES is used to fill the value list associated with a List Box .This FM uses types which are declared in type group VRM. So we should declare TYPE-POOLS VRM before using this FM.
Some important types declared in the VRM type group are
VRM_ID
It refers to the name of the input/output field associated with list box
VRM_VALUES
It refers to the internal table consisting of two fields TEXT(80C) and KEY(40)C
that will be used to create the list values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = name of screen element, it is of TYPE VRM_ID
VALUES = internal table containing values, of TYPE VRM_VALUES
Thanks
Ashu Singh -
How to creat select-option on module pool screen???
Hi All,
please tell me how to creat select-option on module pool screen???
Regards
DeepakHi Deepak Kumar Sharma,
There are Two ways to achieve it...
1) How to create a select-options in a module pool screen.
Method 1
a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING <program> <screen>
This call subscreen statement is necessary for transport of values between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
Method 2
a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
struc_tab_and_field-fieldname = con_cust. " 'KUNNR'
struc_tab_and_field-tablename = con_kna1. " 'KNA1'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = ' '
text = g_titl1 " 'Customers'
tab_and_field = struc_tab_and_field
TABLES
RANGE = rng_kunnr
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
IF NOT rng_kunnr[] IS INITIAL.
Read the very first entry of the range table and pass it to
dynpro screen field
READ TABLE rng_kunnr INDEX 1.
IF sy-subrc = 0.
g_cust = rng_kunnr-low.
ENDIF.
You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements.
Also have a look on below threads
how to make select option in module pool
select option in module pool program
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7 -
How to cal selection screen in module pool
Hi abapers,
I have to use selection screen in module pool programme..How to call selection screen in module pool.
Regards,
ramyaYOU HAVE TO DEFINE YOUR SELECTION SCREEN LIKE THIS
SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
NO INTERVALS.
SELECT-OPTIONS SEL1 FOR SY-SUBRC.
PARAMETERS PAR1 LIKE SPFLI-CARRID.
SELECTION-SCREEN COMMENT /10(20) TEXT-COM.
SELECTION-SCREEN END OF BLOCK BL1.
SELECTION-SCREEN END OF SCREEN 123.
SELECTION-SCREEN ULINE.
SELECTION-SCREEN BEGIN OF SCREEN 99.
SELECTION-SCREEN PUSHBUTTON 15(25) PUBU
USER-COMMAND US01.
SELECT-OPTIONS SEL2 FOR SPFLI_WA-CONNID.
PARAMETERS PAR2 TYPE I.
SELECTION-SCREEN END OF SCREEN 99.
THEN YOU HAVE TO CALL THAT
CALL SELECTION-SCREEN scr.
AFTER THAT YOU CAN CALL THE ANOTHER SCREEN..
CALL SCREEN..
REGARDS
SHIBA DUTTA -
How to save a varaints in module pool programming
Hi All,
How to save a varaints in module pool programming.
Thanks in Advance.
GS.Hi,
Forgot my previous reply.
Just now I checked.
Create transaction[say.,zzz_test1] using SE93 [choose the option Program and screen] for your module pool program.
Then use SHDS transaction to create a variant[say zzz_v1] for the transaction you created above.
Then use SE93 [choose the option Transaction with Variant] to create another transaction zzz_test2 by mentioning the module pool program name and zzz_test1 transaction which you created and zzz_v1 variant which you created.
Then if you run the transaction ZZZ_test2,then you can see the variant values.
I created just now all these and it works.
Hope this is clear.
If not,get back. -
How to download and upload a module pool program ?
hi i am a sudent.can anyone suggest me how to download and upload a module pool program?
Moderator message: please search for available information/documentation.
Edited by: Thomas Zloch on May 29, 2011 12:45 PMHi,
You cannot just download and upload module pool programs .
There are 2 different ways.
1. Copy all the includes and and create the same in the target system. You can download and upload the the Screen.
But GUI status you have to manually create.
2. If you have completely saved the module-pool program in one Workbench request(including Z tables u have used) in the original system ,just release the workbench request and copy the data file and co file and upload to the target system ( use CG3Y & CG3Z).
If the workbench is a Local Request save it in a Transport of copies and then move.
Regards
Aromal R -
How to populate list box in module pool program
How to populate list box in module pool program.
Please give me reply as soon as posible
regards,
Venu.hi,
go thrugh the folling code .
TABLES sdyn_conn.
DATA ok_code TYPE sy-ucomm.
Global data
TYPES: BEGIN OF type_carrid,
carrid type spfli-carrid,
carrname type scarr-carrname,
END OF type_carrid.
DATA itab_carrid TYPE STANDARD TABLE OF type_carrid.
*& Processing Blocks called by the Runtime Environment *
Event Block START-OF-SELECTION
START-OF-SELECTION.
CALL SCREEN 100.
Dialog Module PBO
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
ENDMODULE.
Dialog Modules PAI
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'SELECTED'.
MESSAGE i888(sabapdocu) WITH sdyn_conn-carrid.
ENDCASE.
ENDMODULE.
Dialog Module POV
MODULE create_dropdown_box INPUT.
SELECT carrid carrname
FROM scarr
INTO CORRESPONDING FIELDS OF TABLE itab_carrid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CARRID'
value_org = 'S'
TABLES
value_tab = itab_carrid
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDMODULE.
the following code should be included in flow logic of screen
process on value-request.
field scarr-carrname module create_dropdown_box.
in module pool select list box.
hope it is useful.
regards,
sreelakshmi. -
How to provide select-option in module pool programming
Hi all,
How to provide select-option in module pool programming.
If any body knows let me immediately.
Thanks
sudheerHi Sudheer,
Unfortunately there is no standard way of having a select-option in a module pool program.
What you can try is having two fields and creating a range in your program and populating the range at runtime with respective value and trying to simulate some functionality of the select-option.
Hope it helps.
Thanks, Debasish -
Entering values in MARA table using module pool programming
Hi All,
I need a help from you all. I want to enter the values in the MARA table using module pool programming.
Can you please give me the detailed approach and if possible then code also as i am new to ABAP.
Thanks in AdvanceCreate the screen fields with ref to field in MARA table, once data is entered on screen by user then fill appropriate structure of FM BAPI_MATERIAL_SAVEDATA. If call to Fm BAPI_MATERIAL_SAVEDATA is successful then call FM BAPI_TRANSACTION_COMMIT to make changes permanent in database .
-
How to save Custom control records module pool program ?
Hi guru ,
1. How to save Custom control records module pool program ?
I wrote multiple lines of record in custom control
Who to save that records ?
thanking you.
Regards,
Subash.Hi Subasha,
Please check the format below since it is based on a working code
**************data declarations
TYPES: BEGIN OF TY_EDITOR,
EDIT(254) TYPE C,
END OF TY_EDITOR.
data: int_line type table of tline with header line.
data: gw_thead like thead.
data: int_table type standard table of ty_editor.
You should create a text for uniquely identifying the text you are saving each time so that it doesn't get overwritten
For this a key combination must be decidedd to uniquely identify the test..here it is loc_nam
****************fill header..from SO10( t-code )
GW_THEAD-TDNAME = loc_nam. " unique key for the text
GW_THEAD-TDID = 'ST'. " Text ID
GW_THEAD-TDSPRAS = SY-LANGU.
GW_THEAD-TDOBJECT = 'ZXXX'. "name of the text object created
*Read Container and get data to int_table
CALL METHOD EDITOR ->GET_TEXT_AS_R3TABLE
IMPORTING
TABLE = int_table
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
ERROR_DP_CREATE = 3
POTENTIAL_DATA_LOSS = 4
others = 5.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop data from int_table and save to int_line-tdline appending it.
*save the text
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
HEADER = GW_THEAD
TABLES
LINES = InT_LINE
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5.
IF SY-SUBRC 0.
ENDIF.
The code shown above is ok and working fine for save also,hope that the above sample with helps you solve the problem
Please check and revert,
Reward if helpful
Regards
Byju -
Is it possible to print the current screen in Module pool program(Dynpro)?
Is it possible to print the current screen in Module pool program(Dynpro)?
I create a Module pool program , and customer hope can print the screen when they click print button, Is it possible?Does the customer want a screen shot or what? Please elaborate on your requirement.
Maybe you should create a smartform first, which is called when one clicks on print button. But in fact, we need a bit more info than this. -
Uploding sub screens in module pool programs
HI,
Can any one help in uploading sub screens in module pool program .
Regards,
Mahendra.Hi
Debugging of module pool is same as reports, use /h or put breakpoint
but u shud know what u want to check
there are generally two event used in module pool
PBO
This event is used before displaying the screen,It is used to clear fields table, show table control, tabstrip and most important conditionally modify the scrren .
PAI
is used to validate the fields which are entered on the screen with database values and then fetch records from table.
i mean all values to make available in internal table
now u would be sure which part u want to debug.
<REMOVED BY MODERATOR>
Regards,
Chandru
Edited by: Alvaro Tejada Galindo on Feb 19, 2008 6:19 PM
Maybe you are looking for
-
I can't downlaod on the software update. the downlaod and install button won't allow.
-
Location of UWL data in the database
Hi, where exactly in the database does the data of UWLs get stored (table)? I guess I could figure it out by entering some data into a UWL and then searching in the database, but I have some infrastructural problems here. Thanks, Ingmar
-
Why am I getting these errors?? I have restarted my computer, changed security settings, deleted download files, completely restored my phone to factory settings, and reset my router. What else would you have me do, APPLE SUPPORT???!!!!
-
CF return name/value pairs???
How can I get CF to return a name/value pair? (fwiw I'm working through Flash and PHP Bible but trying to substitute CF instead)
-
Hi , I am in the process of configuring business package.I want to enable the employee bank details information iview.I have install the business packages. I have created till the JCO Connections they are working perfectly and i am struck at creation