Dialog Programming: Screen Parameter ID
I have a developed a screen with the following fields:
Material:
Plant:
Sloc:
For the Sloc, I want a picklist to show up for all slocs for the Plant the user entered. Currently I can only get it to display all slocs using the parameter ID LAG.
How can I get this to work? If it involves code, can you please include an example and where I should put it? thx
I have gotten some of it working. The drop down list now appears. My problem now is that when the user makes a selection, it does not populate it back on the screen field. Can u help?
Here is my code:
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1200. "If user clicks save,back,etc
PROCESS ON VALUE-REQUEST.
FIELD DTAB-DES_LGORT module Sloc_Lookup.
MODULE Sloc_Lookup INPUT.
SELECT lgort lgobe
INTO CORRESPONDING FIELDS OF TABLE it001l
FROM t001l
WHERE werks = dtab-werks.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'lgort'
VALUE_ORG = 'S'
DYNPPROG = 'SAPMZQI_SIMP'
DYNPNR = '1200'
DYNPROFIELD = 'DTAB-DES_LGORT '
TABLES
VALUE_TAB = it001l
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
ENDMODULE.
Similar Messages
-
Calling dialog program screen in custom control and using drag n drop
Hi Experts,
SCENARIO:
I have a custom container control. I want to insert a dialog program screen in custom container control in one half and tree nodes in the other half.
Now my dialog screen has a table control. I want that the user can drag n drop the nodes in the cells of my table control.
Please help.I don't think drag n drop works in table control. You may need to change table control to ALV grid control.
a® -
Creating Variant in Dialog Program Screen
Hi All,
Can I create Variant in Dialog Program screen.If yes, how can I do this?
Thanks
Saurabhdfsdf
-
Select option in Dialog program screen
Hi friends,
do we have any way to get a select option displayed in dialog programming ?
or
create a screen field with the properties of a select option in dialog screen ?
or
any standard function module to support this scenario ?
Thanks and Regards
Sakthi.Hi,
i don't know you checked it or not, but i am able to do it, i send the screen shot also to you check it..
it is possible,with some coding also check it once...
REPORT ZTEST_SCREEN .
DATA : BEGIN OF IT_DYNPFIELDS OCCURS 3.
INCLUDE STRUCTURE DYNPREAD.
DATA : END OF IT_DYNPFIELDS.
DATA: TEST(10) TYPE C.
RANGES: R_UNAME FOR SY-UNAME.
DATA: V_USERNAME LIKE SY-UNAME.
DATA : V_PROG LIKE D020S-PROG VALUE 'ZTEST_SCREEN',
V_DNUM LIKE D020S-DNUM VALUE '0100'.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'TEST'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module GET_CURSOR_USERNAME INPUT
* text
MODULE GET_CURSOR_USERNAME INPUT.
REFRESH IT_DYNPFIELDS.
CLEAR IT_DYNPFIELDS.
MOVE 'V_USERNAME' TO IT_DYNPFIELDS-FIELDNAME.
APPEND IT_DYNPFIELDS.
CLEAR IT_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = V_PROG
DYNUMB = V_DNUM
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = IT_DYNPFIELDS
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11.
IF SY-SUBRC = 0.
READ TABLE IT_DYNPFIELDS WITH KEY FIELDNAME = 'V_USERNAME'.
IF SY-SUBRC = 0.
V_USERNAME = IT_DYNPFIELDS-FIELDVALUE.
ENDIF.
ENDIF.
PERFORM GET_MULTIPLE.
ENDMODULE. " GET_CURSOR_USERNAME INPUT
*& Form GET_MULTIPLE
* text
* --> p1 text
* <-- p2 text
FORM GET_MULTIPLE .
* Dynamically holding Field name
FIELD-SYMBOLS: <FST> TYPE STANDARD TABLE.
IF R_UNAME[] IS INITIAL.
IF NOT V_USERNAME IS INITIAL.
R_UNAME-SIGN = 'I'.
R_UNAME-OPTION = 'EQ'.
R_UNAME-LOW = V_USERNAME.
APPEND R_UNAME.
CLEAR R_UNAME.
ENDIF.
ENDIF.
ASSIGN R_UNAME[] TO <FST>.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = 'Select Multiple Value'(059)
TEXT = 'Finish Group'(058)
SIGNED = 'X'
LOWER_CASE = ' '
NO_INTERVAL_CHECK = 'X'
JUST_DISPLAY = ' '
JUST_INCL = 'X'
TABLES
RANGE = <FST>
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
OTHERS = 4.
IF SY-SUBRC = 0.
READ TABLE R_UNAME INDEX 1.
IF SY-SUBRC = 0.
V_USERNAME = R_UNAME-LOW.
ENDIF.
ENDIF.
ENDFORM. " GET_MULTIPLE
Flow loogic....
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
PROCESS ON VALUE-REQUEST.
*- To capture the cursor and for f4
FIELD V_USERNAME MODULE GET_CURSOR_USERNAME.
in screen i have one field v_username
for that field do this
<b>double click on field which you want to make it as select option, it will display the attributes screen, in that click on program attributes button , now go to poss. entries in the dropdown choose 1 show at selection.</b>
Regards
vijay -
Active E-mail address on the Dialog program Screen
Hello all,
I am displaying an E-mail address on the screen of a dialog program. The requirement is to open the Outlook addressing the Mail-id clicked. Is there any event driving this functionality or any FM to explicitly achieve this?
Eg. [url]xyz @ abc. com[url].--> When this is clicked the Outlook mail editor should open. Similar to the Microsoft Word, if an E-mail address is clicked, 'mailto:' command will be executed.
Please help me in this regard.
Thanks,
Vishnu ReddyYou mean a Safari shortcut to her log in page on the web, I assume.
Launch Safari and navigate to her log in page for her email. Then tap the arrow to the left of the URL field and select - Add to Home Screen. Name it as you see fit in the next window and tap the blue Add button. -
Making lable red in Dialog programming screen
Hi all,
I am developing an object using Dialog programmming. I got a requirement to make some of the lables in RED color. I did not find any option for achieving this.
Please help me out in this.
Thanks,
VishnuHi,
You can make it BLUE If it is a lable and for input field you can make it red by setting the attribute BRIGHT or INTESIFIED = 1.
Regards
Ram -
Select-options in Dialog Programming
Hi,
I am designing a custom dialog programming screen.
I want to create a filed on thescreen which can allow the range of values to be entered like select-options in a report.
How do I create a field which can accept range of values in dialog programming?
Thanks,
Ashok.Hi,
In your selection screen program, Use Export command
Export r_Purchase_Order To Memory Id 'PO'.
Export r_Po_Item To Memory Id 'POITEM'.
Export r_Plant To Memory Id 'PLANT'.
Export r_Vendor To Memory Id 'VENDOR'.
Export r_Material To Memory Id 'MATNR'.
Export r_Batch To Memory Id 'BATCH'.
Export r_Arrival_Date To Memory Id 'ADATE'.
Export r_Arrival_Time To Memory Id 'ATIME'.
Export r_Delivery_No To Memory Id 'DEL'.
Export r_Reference_No To Memory Id 'REF'.
Export r_User To Memory Id 'USER'.
Export t_Display_Data To Memory Id 'DISPDAT'.
In your Module pool program, Use Import Command
When c_Ok_0100_Execute.
IMPORT r_Purchase_Order From Memory Id 'PO'.
IMPORT r_Po_Item From Memory Id 'POITEM'.
Import r_Plant From Memory Id 'PLANT'.
Import r_Vendor From Memory Id 'VENDOR'.
Import r_Material From Memory Id 'MATNR'.
Import r_Batch From Memory Id 'BATCH'.
Import r_Arrival_Date From Memory Id 'ADATE'.
Import r_Arrival_Time From Memory Id 'ATIME'.
Import r_Delivery_No From Memory Id 'DEL'.
Import r_Reference_No From Memory Id 'REF'.
Import r_User From Memory Id 'USER'.
Import t_Display_Data From Memory Id 'DISPDAT'.
Thanks -
Problem with spool request generation in Dialog program
Hi,
To give the spool and print functionality in dialog program i have used the function module code like below -
call function 'GET_PRINT_PARAMETERS'
exporting
mode = ' '
in_parameters = ls_pri_params
importing
out_parameters = ls_pri_params
valid = lv_valid
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
IF lv_valid <> space AND sy-subrc = 0.
SUBMIT (sy-repid)
USER SY-UNAME TO SAP-SPOOL
SPOOL PARAMETERS ls_pri_params
WITHOUT SPOOL DYNPRO.
But the problem is, if it is list then we can easily get the print function, since i am using the above code in the dialog program screen 9000, program is giving dump like....
Incorrect program type with SUBMIT.
What happened?
The current ABAP/4 program "SAPMYXXXXXX" had to be terminated because
one of the statements could not be executed.
This is probably due to an error in the ABAP/4 program.
You attempted to start a program not intended for this purpose.
I know that i should not use submit statement for dialog program, but what is the solution for this.
Thanks in advance..Did you check the F1 help of SUBMIT. if not give a try.Submit cannot be used on Module pool programs. it is used for Report(executable ) programs.
-
Select-option field in dialog programming
hi guys,
i need to declare field matnr as select-option range in dialog programming..how can i code it in the module program?This questions has been answered many times (even in february)
- search sdn wiki (2 commented samples at [SELECT-OPTIONS on Dialog programming screen|http://wiki.sdn.sap.com/wiki/display/ABAP/SELECT-OPTIONSonDialogprogrammingscreen] and [Select-Options in Module Pool Programming|http://wiki.sdn.sap.com/wiki/display/ABAP/Select-OptionsinModulePoolProgramming])
- search abap online help ([SELECTION-SCREEN - AS SUBSCREEN |http://help.sap.com/abapdocu_70/en/ABAPSELECTION-SCREEN_SUBSCREEN.htm] with sample at [Selection Screens as Subscreens |http://help.sap.com/abapdocu_70/en/ABENSEL_SCREEN_SUBSCREEN_ABEXA.htm])
Regards,
Raymond -
Set Default Values in Listbox with Dialog Programming
Hi all,
I am stuck with a problem i.e I am working with Dialog Programming Screen
where i have to set default values in some n numbers of Listbox which i have created on Screen.
This default value is needed to be fetched from database table.
I am using single table. Hence no confusion that i have to first fetch data from 1st listbox then corresponding data is fetched into second & so on ..NO NO This is not required.
Simple one screen which will update a table in database, where some fields on the screen needs to be default set as per tables domain default values set while table creation.
Please help me out in this.
Thanks & Regards,
Sandhya.Please search SDN, before you post a new forum from next time... any ways just follow the below code..
u need to use the FM 'VRM_SET_VALUES' to implement list box in module pool. Check the below code. u have to write this code in PBO..
if c = 0.
select land1 landx from t005t into table wi_country.
sort wi_country by land1.
delete adjacent duplicates from wi_country comparing all fields.
loop at wi_country.
wa_ctry-key = wi_country-land1.
wa_ctry-text = wi_country-landx .
append wa_ctry to wi_ctry.
endloop.
call function 'VRM_SET_VALUES'
exporting
id = 'ZCUST_MASTER1-COUNTRY'
values = wi_ctry
exceptions
id_illegal_name = 1
others = 2
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
c = 1.
endif.
Hope this helps u,
Regards,
Rajesh -
How to use a parameter of a report program from selection screen in a dialog program
how to use a parameter value(entered ) of a report program from a selection screen in a dialog program.
I have to fetch the value entered in the parameter of report program and display it in a dialog programHi Aasim,
Just mention like below in your ABAP report.
PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro -
How to use a parameter of a report program in a dialog program
how to use a parameter of a report program in a dialog program.
I have to fetch the value entered in the parameter of report program and display it in a dialog programHi Aasim,
Just mention like below in your ABAP report.
PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro -
Reg- Selection screen in Dialog Programing
Dear Friends,
I have developed one Dialog program. In that i have to select profit center like from and to option. Apart from i want to select more profit ceneter also. Now my problem s i designed form,to and more fielsd also. If i enter more filds it s not coming in to from to option.
Tell any gud function modulr for selectiong from,to and more fields.
Thanks & regards
Prabu KHi,
See below report it might help you.
REPORT selectoptionsrestrict.
Include type pool SSCR
TYPE-POOLS sscr.
TABLES :
marc.
defining the selection-screen
select-options :
s_matnr for marc-matnr,
s_werks for marc-werks.
Define the object to be passed to the RESTRICTION parameter
DATA restrict TYPE sscr_restrict.
Auxiliary objects for filling RESTRICT
DATA : optlist TYPE sscr_opt_list,
*** type sscr_***.
INITIALIZATION.
Restricting the MATNR selection to only EQ and 'BT'.
optlist-name = 'OBJECTKEY1'.
optlist-options-eq = 'X'.
optlist-options-bt = 'X'.
APPEND optlist TO restrict-opt_list_tab.
***-kind = 'S'.
***-name = 'S_MATNR'.
***-sg_main = 'I'.
***-sg_addy = space.
***-op_main = 'OBJECTKEY1'.
APPEND *** TO restrict-***_tab.
Restricting the WERKS selection to CP, GE, LT, NE.
optlist-name = 'OBJECTKEY2'.
optlist-options-cp = 'X'.
optlist-options-ge = 'X'.
optlist-options-lt = 'X'.
optlist-options-ne = 'X'.
APPEND optlist TO restrict-opt_list_tab.
***-kind = 'S'.
***-name = 'S_WERKS'.
***-sg_main = 'I'.
***-sg_addy = space.
***-op_main = 'OBJECTKEY2'.
APPEND *** TO restrict-***_tab.
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
EXCEPTIONS
TOO_LATE = 1
REPEATED = 2
SELOPT_WITHOUT_OPTIONS = 3
SELOPT_WITHOUT_SIGNS = 4
INVALID_SIGN = 5
EMPTY_OPTION_LIST = 6
INVALID_KIND = 7
REPEATED_KIND_A = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks
Mohit -
Selction screen in dialog program
Hi All..
In my requirement, i need a selection screen that has a parameter for the PO number. Based on the valid PO number, the line items of the PO need to be displayed on the screen where the user should be able to split the line items into different batches.
Once batch split is done, need to do a GR for the updated split data. Appreciate your help on how this can be acieved. Can we design a selection screen in dialog program ?
Also how we can provide the split functionality (insertion of new rows for main line items to have the user enter new rows for exisitng line items to enter new batch number and quantity).
Thanks and appreciate your help.<i>Can we design a selection screen in dialog program ?</i>
Yes, you can be defining the selection screen as a subscreen and then embeding in a subscreen area of a dynpro, but it is hardly worth it for just a parameter, it would be a different story if it were a select-option.
You can simply add the parameter to the dynpro using a regular input field.
Regards,
Rich HEilman -
How to pass the value between two screen in dialog programming.
hi everybody,
In case of dialog programming I have two screens 200 & 300.I want to get the value of textfield in screen 200 in scrren 300 in a label or in textfield.
Thanks
byeeAashish,
Welcome to SDN!!!!
SAP does automatic data transfer when u have the variable defined in the Program and same variable(name) being used in any number of screens in the same program.
U donot want to worry abt Data Transfers!!!
If this does not solve ur requirement, let us know.
Thanks
Kam
Maybe you are looking for
-
Can't Upgrade from OS 9.2.2 to OS X 10.3 - Apple Screen with "Beach Ball"
Hey, I am trying to upgrade from OS 9.2.2 to OS X 10.3 Panther. So I purchase Mac OS X 10.3 Panther v.10.3.2 Retail, from eBay, used. I get my software in, and all three install discs are there, including the Xcode disc. So I throw 'Install Disc 1' i
-
Kind of getting fed up now, I either have really slow speeds or inconsistent connection. I am a heavy user, with playing games online and streaming movies and tv, so I pay for unlimited up to 20mb bb. Its not like I expect 20mb bb, but a little bit o
-
Itunes had an error and shutdown while updating my iphone 4. Itune tells me my phone is in recovery mode and I must use restore before im able to use itunes. I cannot do anything on my phone now. It shows icons telling me to connect to itunes. I
-
Bind output of a strored procudure
Hi All, I am trying to call a stored procedure from sql editor using the below syntax. call "sys_bic"."store_proc"("test") store_proc takes a scalar input parameter and returns a table type as out put parameter. Can anyone please let me know how to b
-
Display users with authorization objects assigened to them
Hi, How can I display list of users with company code assigned to them?