2009 Nov 20 7:06 AM
Hi All,
Now I am working in a module pool program,
I want to set a serch help for Region Selection , for that I created an Elementry Serch Help with following fields
BLAND
BEZEI
SPRAS
LAND1 from T005U, it is working but my requirement is that i want to select the items mased on other serch help used for country in the same screen
for example if I select Country India then in region selection serch help must select only reions with country 'IN'.
So please help me to solve
Regards
Nausal
Hi All,
Now I am working in a module pool program,
I want to set a serch help for Region Selection , for that I created an Elementry Serch Help with following fields
BLAND
BEZEI
SPRAS
LAND1 from T005U, it is working but my requirement is that i want to select the items mased on other serch help used for country in the same screen
for example if I select Country India then in region selection serch help must select only reions with country 'IN'.
So please help me to solve
Regards
Nausal
2009 Nov 20 7:13 AM
hi Nausal,
When u do a f4 on the field, on that even,
call this FM F4IF_INT_TABLE_VALUE_REQUEST, and pass the field where country is stored.
you would have to pass some more attributes and you will get the table of regions which is from the particular country
you will get the usage of this FM from .. SDN.
check them out.
regards,
Reji
2009 Nov 20 7:14 AM
Hi,
Use at selection-screen on value request for region.
So, u can select the regions of country and modify the region selection
2009 Nov 20 7:14 AM
Hi,
Try using this 'DYNP_VALUES_READ'
TABLES: MARA,
MAKT.
DATA: BEGIN OF T_MATNR OCCURS 0,
MATNR TYPE VBAP-MATNR,
END OF T_MATNR,
BEGIN OF T_MAKTX OCCURS 0,
MAKTX TYPE MAKT-MAKTX,
END OF T_MAKTX.
DATA: T_DYNPRO TYPE TABLE OF DYNPREAD,
WA_DYNPRO LIKE LINE OF T_DYNPRO,
TEMP TYPE MARA-MATNR.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-T01.
PARAMETERS: P_MATNR TYPE MARA-MATNR,
P_MAKTX TYPE MAKT-MAKTX.
SELECTION-SCREEN END OF BLOCK B1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE T_MATNR
UP TO 10 ROWS.
IF SY-SUBRC EQ 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = T_MATNR
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3 .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MAKTX.
WA_DYNPRO-FIELDNAME = 'P_MATNR'.
APPEND WA_DYNPRO TO T_DYNPRO.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-REPID
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = T_DYNPRO
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 = 10 .
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE T_DYNPRO INTO WA_DYNPRO WITH KEY FIELDNAME = 'P_MATNR'.
TEMP = WA_DYNPRO-FIELDVALUE.
"Again call F4 help on the second field
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |