2008 Dec 08 10:46 PM
Experts,
I have two selection parameters on Selection_Screen as subscreen, as below:
Custom Selection Screen 1010
selection-screen begin of screen 1010 as subscreen.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-001.
SELECT-OPTIONS :
s_matnr FOR mara-matnr MODIF ID sc1, "Material
s_grid FOR mara-J_3APGNR MODIF ID sc6, "Grid values "pkb001
SELECTION-SCREEN END OF BLOCK b2.
selection-screen end of screen 1010.
Now i want to populate s_grid (Grid value) based on the values enterd for s_matnr (material ).
but when i want use:
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_grid,
I'm not getting the values eneterd in s_matnr..
is the problem beacuse of subcreen?
Answers are highly appriciated.
Thanks.
2008 Dec 09 12:14 AM
I think you are manually providing the value for s_matnr, ifso, then SAP will not able to recognize that value unless an event is trigger. So, press enter after inputting the value, it will take it in s_grid request. Otherwise, just allow user to choose value from F4 for matnr, this will help in suppressing the pressing of enter key.
I think you are manually providing the value for s_matnr, ifso, then SAP will not able to recognize that value unless an event is trigger. So, press enter after inputting the value, it will take it in s_grid request. Otherwise, just allow user to choose value from F4 for matnr, this will help in suppressing the pressing of enter key.
2008 Dec 09 12:14 AM
I think you are manually providing the value for s_matnr, ifso, then SAP will not able to recognize that value unless an event is trigger. So, press enter after inputting the value, it will take it in s_grid request. Otherwise, just allow user to choose value from F4 for matnr, this will help in suppressing the pressing of enter key.
2008 Dec 09 2:35 PM
Amit,
what did you meant by saying "Otherwise, just allow user to choose value from F4 for matnr, this will help in suppressing the pressing of enter key" ?
s_matnr, s_grid both uses F4 to get the values.
but when i press F4 for s_matnr then the values are coming from MARA table.
when i press F4 for s_grid, then the above code i provided should execute...
thanks!
2008 Dec 09 1:15 AM
Hi,
Because the value manully input, so it should use an event to trigger otherwise the value you can not get it. An easy way, after you input the value, press 'Enter' ,then you can get it.
Try it.
Hope it helps.
Regards,
Chris Gu
2008 Dec 09 1:32 AM
2008 Dec 09 2:41 PM
Sreeni,
i cant use 1000 as subscreen, beacuse that is default screen number..
in my case; 1010 is subscreen on screen 100. i had other elements to include using screen painter.
2008 Dec 09 4:14 AM
Hi,
the code have an error!
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_grid, *
Error Description: "ON VALUE-REQUEST FOR" should be followed by <parameter> or <select-option>-LOW / <select-option>-HIGH.
And in AT SELECTION-SCREEN, the s_matnr is not getting the values eneterd. Because the value isn't write the s_matnr. Solution means: After you input the s_matnr, you need enter give system read the value.
Best Regards,
Wind lin
2008 Dec 09 2:43 PM
Wind lin,
in my code I'm using..
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_grid-LOW
thanks.
2008 Dec 09 4:19 AM
Hi,
Use this FM 'DYNP_VALUES_READ' to get the values from the screen.
Example
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_lgort-low.
IF r_werks[] IS INITIAL.
populate lt_dynpread with S_WERKS-LOW and S_WERKS-HIGH
CALL FM 'DYNP_VALUES_READ'
ENDIF.
2008 Dec 09 4:51 AM
Hi Prema,
As you are not hitting enter after you enter the MATNR value there is no PAI triggering so use DYNP_VALUES_READ to get the entered MATNR read by the program and used further in the Program where you can use in the F4 help for grid
call function DYNP_VALUES_READ
Regards
Ramchander Rao.K
2008 Dec 09 2:30 PM
Yes that is correct, Once I hit enter key, then only the value for s_matnr populates, but it is not a good Idea to expect the user to hit the enter key. is there any way i can imitate/simulate "enter" key in the program?
also I'm using the FM:'DYNP_VALUES_READ' but that is also not getting me any value..
below is the code I'm using,
FORM sub_get_grid .
Refresh: t_mara.
data: lin type i.
data: l_dyname type standard table of dynpread,
w_dynpread type dynpread.
clear w_dynpread.
w_dynpread-fieldname = 'S_MATNR'.
append w_dynpread to l_dyname.
clear w_dynpread.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = l_dyname.
*Do not allow to select more than 1 material at a time.
SELECT
MARA~MATNR
INTO TABLE t_mara
FROM MARA
WHERE MARA~MATNR IN s_matnr.
describe table t_mara LINES lin.
If lin > 1.
Refresh: s_matnr.
MESSAGE i000 WITH text-033.
LEAVE LIST-PROCESSING.
* LEAVE TO SCREEN 100.
endif.
ENDFORM.
2008 Dec 09 2:40 PM
Dear Prema,
This link will help you. https://www.sdn.sap.com/irj/scn/advancedsearch?query=atSELECTION-SCREENONVALUE-REQUESTFOR+&cat=sdn_all
Regards,
Flavya
2008 Dec 09 2:42 PM
http://www.sap-img.com/abap/value-request-for-parameter.htm
will help you for your answer
2008 Dec 09 2:59 PM
2008 Dec 09 8:58 PM
thanks all for your help and time.
i got it resolved by using: MATCHCODE OBJECT (which is Elementary srch hlp)
* s_grid FOR mara-J_3APGNR MODIF ID sc6, "Grid values "pkb001 (before)
s_grid for mara-J_3APGNR MATCHCODE OBJECT /AFS/MTX_SIZE_SHLP MODIF ID sc6, (now)
I could reolve it by using thread:
by Girish Kumar Loganathan.
URL: http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |