Skip to Content
0
Jan 16, 2013 at 11:27 AM

Input parameter is getting the value

15 Views

Hi,

I've created a search help for input parameter by using the function module. The FM is returning the tables but when i select the particular field in the search help is getting displayed in input parameter . When i debug the code and see the input parameter is not getting the field. It is taking the field what i've selected 😔 . Please have a look into the below code.

DATA: LT_RSDDIME TYPE TABLE OF RSDDIME ,
WA_RSDDIME TYPE RSDDIME,
LV_DIM(2) TYPE C.

TYPES: BEGIN OF ZST_,
INFO(30) TYPE C,
VER(1) TYPE C,
END OF ZST_.


DATA: LT_RSDCUBET TYPE TABLE OF RSDCUBET,
WA_RSDCUBET TYPE RSDCUBET.

DATA: LT TYPE STANDARD TABLE OF RSDCUBET.



SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS: CUBETXT(60) TYPE C OBLIGATORY.

SELECTION-SCREEN END OF BLOCK B1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR CUBETXT.

SELECT LANGU TXTLG OBJVERS TXTSH INFOCUBE FROM RSDCUBET INTO CORRESPONDING FIELDS OF TABLE LT WHERE OBJVERS = 'A' AND LANGU = 'EN'.

IF SY-SUBRC EQ '0'.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ''
RETFIELD = 'INFOCUBE'
PVALKEY = ''
DYNPPROG = SY-CPROG
DYNPNR = SY-DYNNR
DYNPROFIELD = 'INFOCUBE'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = LT
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3.
ENDIF.

SELECT * FROM RSDCUBET INTO TABLE LT_RSDCUBET WHERE OBJVERS = 'A'.

IF SY-SUBRC EQ '0'.
IF CUBETXT IS NOT INITIAL.
READ TABLE LT_RSDCUBET INTO WA_RSDCUBET WITH KEY INFOCUBE = CUBETXT BINARY SEARCH.
IF SY-SUBRC EQ '0'.
WRITE: 'INFOCUBE TECHNICAL SPECFICATION'.
ULINE.
WRITE: 'Infocube Name :', WA_RSDCUBET-INFOCUBE.
WRITE: /.
WRITE: 'Description:', WA_RSDCUBET-TXTLG.
WRITE: /.
WRITE: 'Version :', WA_RSDCUBET-OBJVERS.
WRITE: /.
WRITE: 'Language :', WA_RSDCUBET-LANGU.

SELECT INFOCUBE
OBJVERS
DIMENSION FROM RSDDIME INTO TABLE LT_ZST
WHERE INFOCUBE = CUBETXT AND OBJVERS ='A'.

LOOP AT LT_ZST INTO WA_ZST.
LV_DIM = SY-TABIX.
ENDLOOP.
WRITE: /.
WRITE: 'Dimension', LV_DIM.

ELSE.
MESSAGE E001.
ENDIF.
ENDIF.
ENDIF.