‎2006 Aug 01 6:29 AM
Hi,
How to use import export statements in selection screen.
My requiremnt is like this.
For one value request i will get a value, with respect to that i have to populate another selection criteria.
Suppose s_vendor = '1234', this what i get from value request. depending on this i have to populate som date into next selection s_date.
how to go with import/export..
‎2006 Aug 01 6:34 AM
<b>ex--</b>
REPORT ZHELP .
TABLES : MARA.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : P_MATNR(10) TYPE C.
SELECTION-SCREEN END OF BLOCK B1.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR TYPE MATNR,
END OF ITAB.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
SELECT MATNR
FROM MARA
INTO TABLE ITAB
UP TO 10 ROWS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'MATERIAL NUMBER'
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'P_MATNR'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = ITAB
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
‎2006 Aug 01 6:39 AM
My requirement is like this.
two selection criterias : 1) vendor selection
2) date selection
when is select a vendor from value request , it will be having a date related to it.
that date has to be appeared in the following date selection.
‎2006 Aug 01 6:43 AM
HI,
Export your vendor information to memory Id. and then on second selection screen in initilization event use IMPORT to get the vendor value.
Here is an example of importing and exporting values.
<b>REPORT ZWA_TEST2 .
data: it_bkpf type table of bkpf with header line.
SELECT * FROM bkpf into table it_bkpf.
EXPORT it_bkpf TO MEMORY ID 'MID'.
refresh it_bkpf.
IMPORT it_bkpf FROM MEMORY ID 'MID'.
LOOP AT It_bkpf.
write:/ it_bkpf-belnr.
ENDLOOP.</b>Regards,
Wasim Ahmed
‎2006 Aug 01 6:48 AM
Hello,
*-------Append field which you want to read from the screen
LV_DYNAME = SY-REPID.
LV_DYNUMB = SY-DYNNR.
LT_DYNPFIELDS-FIELDNAME = 'P_SPRAS'.
APPEND LT_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = LV_DYNAME
DYNUMB = LV_DYNUMB
TABLES
DYNPFIELDS = LT_DYNPFIELDS.
Based on the value of your vendor, select your date.
if you have your data just ,
at selection-screen
p_date = selected_date
Regards,
Naimesh
‎2006 Aug 01 7:21 AM
Is this what you are looking for?
REPORT ztest_sel.
TABLES : mara.
PARAMETERS: p_matnr LIKE mara-matnr.
SELECT-OPTIONS : s_date FOR sy-datum.
AT SELECTION-SCREEN OUTPUT.
IF p_matnr = '000000000000012345'.
s_date-sign = 'I'.
s_date-option = 'EQ'.
s_date-low = '99991231'.
APPEND s_date.
ENDIF.Substitute the p_matnr with the vendor, and you should be able to see the result.
The vendor selection has to be via a parameter only, if possible a parameter with no-extension, so that the user cannot enter a range.
Hope this helps.
Sudha