01-16-2013 11:27 AM
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.
01-16-2013 11:50 AM
Hi,
In your code you need to differentiate the events. You have not closed the event AT SELECTION SCREEN ON VALUE REQUEST FOR with START OF SELECTION.
put this event keyword just above SELECT * FROM RSDCUBET INTO TABLE LT_RSDCUBET WHERE OBJVERS = 'A'.
thanks.
01-16-2013 11:31 AM
HI ,
Set
DYNPROFIELD = 'CUBETXT'
and one more thing out of these TXTLG OBJVERS TXTSH INFOCUBE which value you want to be displayed from the table ?
For TXTLG
set RETFIELD = 'TXTLG'
else if its for TXTSH
set RETFILED = 'TXTSH'
so on..
01-16-2013 11:50 AM
Hi,
In your code you need to differentiate the events. You have not closed the event AT SELECTION SCREEN ON VALUE REQUEST FOR with START OF SELECTION.
put this event keyword just above SELECT * FROM RSDCUBET INTO TABLE LT_RSDCUBET WHERE OBJVERS = 'A'.
thanks.
01-16-2013 11:58 AM
Hi Aswatha,
Thx . It working but one thing can you just let me know of that event "START-OF-SELECTION". It could be the learning for me
Thanks,
Siva
01-16-2013 12:05 PM
Hi,
START-OF-SELECTION is an event which is executed just when you press on execute button.
since you wrote the code in AT SELECTION SCREEN ON VALUE REQUEST FOR event ( an event is closed by another event only in ABAP ) when you press execute button it was skipping all those lines since it is present in the later event.
If you want to read more details on this, go through this link
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db99fa35c111d1829f0000e829fbfe/content.htm
thanks.
01-16-2013 12:08 PM
Take a look at some Abap documentation like Processing Blocks in ABAP Programs, look for "Event Blocks for Selection Screens" and "Event Blocks for Executable Programs (Reports)".
Regards,
Raymond