List Box Problem In MODULE POOL PROGRAM(EDIT MODE)
I Have Developed A MODULE POOL PROGRAM ,
It Basically Consists Of CREATE EDIT and DISPLAY Modes.
CREATE MODE:
When I am Creating For Example FORM NO 1,it is having Fields With drop down list box with values
A,B and C. if I Choose A then That form will Get Created With A value and Form 1 will be created.
EDIT MODE:
The same form If u want to edit In EDIT Mode ,it is displaying value A and it Showing the list box in the fillowing Manner.A,B,C,and A.(This is what the problem I am Facing Know).It Is Displaying the value two times.How to Avoid this ,PLs Help me in this regard.
Thaks & Regards,
Anuradha.
Where ever you are populating the List Box, write a REFRESH statement just before that.
Means Refresh the old content and add new content
Similar Messages
-
Problem in Module Pool Program
Hi All,
I got one problem in Module pool program.Im using table control.when selected multiple coloms by table control option left top.
when I want to de-select one by one,unable to de-select. Please suggest me.
thank you,
Anu.Thank You All.
Solved my self.
The coding as below.
PROCESS BEFORE OUTPUT.
CALL SUBSCREEN SUB INCLUDING SY-REPID '110'.
LOOP AT GT_ITAB INTO WA WITH CONTROL VCONTROL.
MODULE SET.
MODULE STATUS_0100.
ENDLOOP.
PROCESS AFTER INPUT.
CALL SUBSCREEN SUB.
LOOP AT GT_ITAB .
CHAIN.
FIELD WA-EBELN.
FIELD WA-EMATN.
FIELD WA-EBELP.
FIELD WA-MATNR.
FIELD WA-MARK.
MODULE MODIFY ON CHAIN-REQUEST.
ENDCHAIN.
ENDLOOP.
MODULE USER_COMMAND_0100.
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'SAVE'.
PERFORM SAVE_VARIANT.
PERFORM VARIANT_EXISTS.
WHEN 'SEL'.
LOOP AT GT_ITAB INTO WA.
WA-MARK = 'X'.
MODIFY GT_ITAB FROM WA .
ENDLOOP.
endmodule.
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'ZTESTING'.
SET TITLEBAR 'ZTEST'.
SET PF-STATUS 'ZTESTING' EXCLUDING IT_EXTAB.
MOVE:WA-EBELN TO EKKO-EBELN,
WA-EBELP TO EKPO-EBELP,
WA-MATNR TO WA-MATNR.
MOVE:WA-EMATN TO WA-EMATN.
MODIFY GT_ITAB FROM WA INDEX VCONTROL-CURRENT_LINE.
VCONTROL-LINES = SY-DBCNT.
ENDMODULE. " STATUS_0100 OUTPUT
MODULE SET OUTPUT.
SET CURSOR FIELD CURSORFIELD OFFSET POS.
ENDMODULE. " SET OUTPUT
Thank You,
Anu. -
Strange problem in module pool programming
Hi all,
we have a module pool program which consists of screen 100 and 200 and 3 sub-screens 201,202 and 203.the problem is when we double click on any field we get a pop up message which should appear only when we press the 'SAVE' button for which ok_code is 'CHNG'.I have debugged the program for screen 100 pbo,pai,200 pbo but the value of ok_code is not equal to 'CHNG' then it takes me to screen 200 and when i double click then popup appears and and in 200 PAI the value of ok_code had already got changed to 'CHNG' without entering the change logic and I have not even pressed the SAVE button which has 'CHNG' code associated with it.Can any one help me solve this problem.I wish I could give a better explanation.
Thanks and Regards,
SangramHi,
This is because the Shortcut key assigned to SAVE button in PF-STATUS is "F2". F2 is for Double Click. Assign some other Function Key to SAVE or any Button. Try to avoid assigning F2 key.
This would solve the problem.
Best regards,
Prashant
PS : Please reward all helpful answers ! -
Problem in Module Pool Programming
hello,
I am using module pool programming.
i want to assign the text to textbox during runtime
thanks!Hi Raghvendra Bhanap,
declare the variable with the same name of text box(In module pool) and in the PAI even write the module by double clicking on that in your program just assign some text to that name then the text automatically come in that text box.
See this example programm.
*In Screen Painter PAI Event.*
moudle assigntext.
In your Program.
Data w_name(40). (*In the module pool also put this name only)
Module assigntext.
w_name = 'Raghvendra Bhanap'.
Endmodule.
Reward if it is useful,
Mahi. -
Function module / table which lists screen numbers in module pool program
Hi everyone,
I wish to make a list of all screen numbers used in my module pool program Is there any FM / table which maps module pool program name with all the screens used in it?
For example, if my module pool is SAPMZPROG and it has screens 9001, 9002 and 9003, then I want to have a report as follows:
Input to the report (selection screen): SAPMZPROG
Output:
9001
9002
9003
Thanks,
ShaileshHello
Try tables D020S, D020T -
Screen problem in Module pool program
Hi all,
I have developed a module pool program, in which i have used simple selection screen and after executing it will call screen 9001 to display the data. everything is goin fine but if i leave my output screen as it is for some time (or even if i lock my system then unlock it) i am getting an error message
"Selection screen ZDEV1110PGM_SF 1000 was not called using CALL SELECTION-SCREEN".
do any one have idea why this is happining without doing anything further to the output.
Regards,
NilanjanaHave you used CALL SCREEN ?
Regards
Abhii -
List box values in module pool
Hi All,
Plz help me out in this regard..
I have designed a screen with 20 list boxes around and i am getting values for list boxes also.the main problem is coming when after selecting values....
that is after selecting values if i press enter on the screen the values are over written by space..
The default value for list boxes are space.
how to over come this problem...Plz help me out
Regards,
SudhaPAI
MODULE user_command_1000 INPUT.
CASE sy-ucomm.
WHEN 'SAVER'.
IF zrule_date_from > zrule_date_to.
MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(001)
'Than RUN_VALIDITY_FROM_DATE'(002).
EXIT.
ENDIF.
IF zrule_date_to < sy-datum.
MESSAGE e000 WITH : 'RUN_VALIDITY_TO_DATE can not be Less'(003)
'Than System Date.'(004).
EXIT.
ENDIF.
wa_rule-zrule_date_from = zrule_date_from.
wa_rule-zrule_date_to = zrule_date_to.
wa_rule-zrule_name = zrule_name.
wa_rule-zrule_id = zrule_id.
wa_rule-zrule_pref = zrule_pref.
ONCATENATE 'Where' rule_for1a operator1a values1a
andor1 rule_for2a operator2a values2a
andor2 rule_for3a operator3a values3a
andor3 rule_for4a operator4a values4a
andor4 rule_for5a operator5a values5a
andor5 rule_for6a operator6a values6a
andor6 rule_for7a operator7a values7a
andor7 rule_for8a operator8a values8a
INTO wa_rule-zrule_clause SEPARATED BY space.
In this code andor6(7,8,etc) has (and or)
and operator8a(7a,6a etc) has (+,- <,>) and when i do enter these two get cleared. why does this happen?
MY PBO code is
MODULE status_1000 OUTPUT.
SET PF-STATUS 'RULE'.
SET TITLEBAR '1000'.
ENDMODULE. " STATUS_1000 OUTPUT
*& Module fill_lists OUTPUT
For Filling List Boxes
MODULE fill_lists OUTPUT.
**********1
name = 'ANDOR1'.
value-key = 1.
value-text = 'AND'.
MOVE value-text TO value-text.
APPEND value TO list.
value-key = 2.
value-text = 'OR'.
MOVE value-text TO value-text.
APPEND value TO list.
PERFORM LIST_BOX.
CLEAR LIST.
**************2
name = 'ANDOR2'.
value-key = 1.
value-text = 'AND'.
MOVE value-text TO value-text.
APPEND value TO list.
value-key = 2.
value-text = 'OR'.
MOVE value-text TO value-text.
APPEND value TO list.
PERFORM LIST_BOX.
CLEAR LIST.
************3
name = 'ANDOR3'.
value-key = 1.
value-text = 'AND'.
MOVE value-text TO value-text.
APPEND value TO list.
value-key = 2.
value-text = 'OR'.
MOVE value-text TO value-text.
APPEND value TO list.
PERFORM LIST_BOX.
CLEAR LIST.
etc. -
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. -
Drop down list in module pool program.
Hi Experts,
Can any one tell me how to maintain values in dropdown list on screen of module pool.
I have ' z' module pool program in which i have screen for z tcode and i want to add new values in drop down list . please tell me where to do modification.
Regards,
Rahul SHi,
Check the below code.
TYPE-POOLS: VRM.
DATA:V_NUM TYPE I.
DATA:NAME TYPE VRM_ID,
LIST TYPE VRM_VALUES,
VALUE LIKE LINE OF LIST.
DATA:I_WORKPATTERN LIKE ZWORKPAT OCCURS 0 WITH HEADER LINE.
DATA:ZPATTXT(60).
MODULE WORKPATTERN_LISTBOX OUTPUT.
NAME = 'P9434-ZWORKPATTERN'. --> Screen Field
IF V_NUM IS INITIAL.
CLEAR I_WORKPATTERN.
REFRESH I_WORKPATTERN.
SELECT *
FROM ZWORKPAT --> List box contents from the z table
INTO TABLE I_WORKPATTERN.
IF NOT I_WORKPATTERN[] IS INITIAL.
LOOP AT I_WORKPATTERN.
VALUE-KEY = I_WORKPATTERN-ZWORKPATTERN.
VALUE-TEXT = I_WORKPATTERN-ZWORKPATTERN.
APPEND VALUE TO LIST.
ENDLOOP.
ENDIF.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = NAME
VALUES = LIST
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2.
IF SY-SUBRC 0.
CLEAR SY-SUBRC.
ENDIF.
V_NUM = V_NUM + 1.
ENDIF.
Regards,
Kumar Bandanadham
Edited by: Velangini Showry Maria Kumar Bandanadham on May 26, 2009 3:53 PM -
Dropdown list in module pool program
Hi,
I need to display a dropdown list for LFA1-LIFNR in my module pool program.
In the screen painter I have added an Input/Output field with name LFA1-LIFNR and corresponding to the Dropdown option I have selected Listbox. When I execute the program empty dropdown list is coming. It is not taking the values of LIFNR from the table LFA1. Please let me know the solution for this.
Thanks,
Neethu.Hello Abaper,
You have very well designed the drop-down box that is to be reflected in your program. The next thing for you to do is use any 1 method for populating the values i.e. using the function module F4IF_INT_TABLE_VALUE_REQUEST or VRM values. I prefer to use the the F4IF_INT_TABLE_VALUE_REQUEST as it is easy to use and understand. If you use the following function module then you need to call in a module under the flow logic of the screen i.e. PROCESS ON VALUE REQUEST.
Let me just illustrate you with the syntax -
Module Pool Code
*internal table declaration
TYPES : BEGIN OF ty_lifnr,
lifnr TYPE lfa1-lifnr,
END OF ty_lifnr.
DATA : itab_lifnr TYPE STANDARD TABLE OF ty_lifnr.
*Dialog Modules for PBO
*Dialog Module for PAI
MODULE cancel INPUT.
LEAVE PROGRAM.
*Dialog Module Process on value reuest
MODULE create_dropdownbox INPUT.
SELECT lifnr
FROM LFA1
INTO CORRESPONDING FIELDS OF TABLE itab_lifnr.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'LIFNR'
value_org = 'S'
TABLES
value_tab = itab_lifnr
EXCEPTIONS
ENDMODULE.
Now for the Flow Logic -
PROCESS BEFORE OUTPUT.
PROCESS AFTER INPUT.
MODULE cancel AT EXIT-COMMAND.
MODULE user_command_0100.
PROCESS ON VALUE REQUEST.
FIELD lfa1-lifnr MODULE create_dropdownbox.
Hope this helps ! Let me know if any other doubts arises. -
Data type selection Problem in ztable to use in the Module Pool Program
Dear Experts,
I have created a z-table which is used in Module Pool Program in which i have to save the information saved by the endusers in z-table. But the problem comming is that the amount of information saved by the endusers is so havey & our table is just limited for the 50 characters which is not sufficiet. So I urge you to please tell me what & which type of data type should I have to use to store maximum amount of information in our zt-able which is available in SAP ECC6.0.
Thanks & Regards,
AkgDear Akg,
u can resolve ur problem in following ways,
1. You can declare the field in a table without an Data element.
i.e. In the length field . using F4 help in length field how many characters u want u enter.
2. In the same u can search for an standard data element and use the same.
3. Creating an custom data element .
Reward if helps to u!!!
Regards,
MNR -
Module pool program, table control edit
Hi,
I am doing module pool programming with table control. I have a table control on my screen which is assigned to scarr table with New, Modify, Save, and Delete buttons. When I click on New and Save, the new record is adding to the table where as for Modify, I selected a row, edited, and clicked on save. Only the internal table is getting modified at the time but not the original table. How to update the table in database? Delete is also not working. Please give some idea on this or links related to table control with sample code.
Thanks in advance.Hi,
modify <table name>.
it will do it
Regards -
Alv list in module pool programming
hai abapers ,
i developed an alv grid display in module pool programming,my prbm is when i click on list button in my prm its displaying list n coming back to main screen if again i click on list button list is diplaying twice like this so on,how many i click on list button its displaying each that many times
thank uIt seems you have coded to create the field catalog also at the click of list display.Field catalog should be created only once.When you click on list display, it should only call the REUSE... fm but not the creation of fieldcatalog also.This will result in creation of a new fieldcatalog in addition to the exixting one.
-
Display the list in module pool program
Hi All,
I want to display the list of material like report after some user command in module pool.
How can I achive the same.
Regards
SagarHi,
If you want to display in ALV, you can use REUSE_ALV_GRID_DISPLAY FM also, which will call standard program from module pool and will display the list.
If you use module pool, it is not mandatory that you have to use only OO ALV.
You can create list output also from module pool. For that in user command you can write like
IF sy-ucomm = '.....'.
leave to list processing and return.
write :/ '..............'.
Endif.
Thanks and regards,
Venkat -
Problem in Select-option in Module Pool Programming
Hi,
I'm making one module pool programming. In that, I've to make select-option. For that I'm using this command --
1) In PBO --
CALL SUBSCREEN sub INCLUDING 'YBOE_PRINT' '5100'.
2) In PAI --
CALL SUBSCREEN sub.
But, Syntax Error is generated as below --
"." or "ID.........FIELD" expected after "SUBSCREEN"
Please suggest.
Thanks.
Kumar Saurav.Hi Ramchander,
Thanks for replying. But, even if I changed Prog_Name with term 'repid', that same error regarding
"." or "ID ... FIELD ..." expected after "SUBSCREEN"
is coming up.
I guess, there is any step missing.
Lemme describe what I'm doing in points --
1) I declared SELECTION-SCREEN with screen no --
SELECTION-SCREEN BEGIN OF SCREEN 5100 AS SUBSCREEN.
PARAMETERS : p_bukrs TYPE ekko-bukrs OBLIGATORY DEFAULT '1000'.
SELECT-OPTIONS: kunnr FOR kna1-kunnr.
select-options: gjahr for bsid-gjahr.
select-options: bank for bsed-bank.
select-options: budat for bsid-budat.
SELECTION-SCREEN END OF SCREEN 5100.
2) Then I made a call in PBO as given above.
3) Finally, a call to that subscreen is made in PAI - again as given above.
When I checked that, this gave the error.
Are you looking any erroneous step ...?
Please guide.
Thanks.
Kumar Saurav.
Maybe you are looking for
-
External Hard Drive No Longer on my Desktop
The external hard drive that I use for Time Machine is no longer on my desktop. In fact, when I open up the Time Machine preferences, it does not show my external drive as available. There is power available to the external hard drive AND it is physi
-
I disabled my IPhone, I plugged it into my computer to restore, followed clicking on "RESTORE." By following that it asked if i wanted to back it up, I selected no... My ITunes is frozen... What do I do???
-
I need a patch files Install Oracle 9i(9.2.0.1) in RHEL3
Hi!!! I need a patches to Install Oracle 9i(9.2.0.1) in RHEL3. I know that they are in metalink, but I don't login to metalink site... *^^* I need some patche files... p3006854_9204_LINUX.zip p3095277_9204_LINUX.zip p3119415_9204_LINUX.zip p2617419_2
-
Help! which Audio Interface to buy?
Hi, I have just got garageband and have fiddled with it for a few months now so Im comfortable with it. I now wnat to connect my Condenser Mic (RODE NT1-A) which will need phantom power and my electric guitar . Everything else will be recorded with t
-
Please Help! My brand new imac randomly disconnects from the internet. We have a BT hub - wi-fi. I have googled this issue and see that it is relatively common and it is incredibly frustrating. sadly, I have been unable to wade through the suggestion