2010 Jun 15 5:40 PM
On screen there are 2 parameters:
PARAMETER: p_cat TYPE table1-category DEFAULT 'C'.
PARAMETER: p_code TYPE table2-code.
As you can see p_cat is selected from all values in table1-category, say, select category from table1. But I need only part of the values, say, select category from table1 where OTYPE='D'. How can I do it?
After selecting p_cat, p_code should be selected from select table2-code where category = p_cat. How can I do it?
You may have known that I am very new to SAP and abap. Your help will be highly appreciated!
Edited by: Jackyork on Jun 15, 2010 6:49 PM
2010 Jun 15 7:23 PM
Hi,
answer for your question 1)
Check event *AT SELECTION-SCREEN ON VALUE REQUEST FOR <screen_field>.
check function module F4IF_INT_TABLE_VALUE_REQUEST
Answer to question 2)
Check function module DYNP_VALUES_READ
There are lot of examples available in SDN, please search for it.
On screen there are 2 parameters:
PARAMETER: p_cat TYPE table1-category DEFAULT 'C'.
PARAMETER: p_code TYPE table2-code.
As you can see p_cat is selected from all values in table1-category, say, select category from table1. But I need only part of the values, say, select category from table1 where OTYPE='D'. How can I do it?
After selecting p_cat, p_code should be selected from select table2-code where category = p_cat. How can I do it?
You may have known that I am very new to SAP and abap. Your help will be highly appreciated!
Edited by: Jackyork on Jun 15, 2010 6:49 PM
2010 Jun 15 7:23 PM
Hi,
answer for your question 1)
Check event *AT SELECTION-SCREEN ON VALUE REQUEST FOR <screen_field>.
check function module F4IF_INT_TABLE_VALUE_REQUEST
Answer to question 2)
Check function module DYNP_VALUES_READ
There are lot of examples available in SDN, please search for it.
2010 Jun 15 9:49 PM
2010 Jun 15 9:49 PM
2010 Jun 15 7:26 PM
Use the at selection screen events for your requirements.
select cat
from table1
into some variable
where otype eq 'D'.
If sy-subrc ne 0
message 'Invalid Selection'.
endif.To populate p_code automatically according to p_cat, then you must assign a function code using the user command keyword to make it work.
Regards
Mishra
Edited by: Rob Burbank on Jun 15, 2010 3:39 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |