Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Input help problem

Former Member
0 Likes
669

Current scenario i have an input textbox attached to an input help. A user needs to find a particular table, but do not know the exact name. The user only knows that the table starts with 'PA'. So, we need to filter all the tables that start with 'PA' for e.g. 'PA0001' and return it to the user for selection.

The problem now is that i cannot retrieve the input string given by the user for e.g. 'PA'.

Does anyone knows how to solve this problem?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
647

HI,

Select * from ZTABLE where name CP 'PA%'.

Best regards,

Prashant

5 REPLIES 5
Read only

Former Member
0 Likes
648

HI,

Select * from ZTABLE where name CP 'PA%'.

Best regards,

Prashant

Read only

0 Likes
647

Thanks!

i have this codes in my program too but the problem now is that i could not retrieve what the user has input. My input textbox is always empty even though the user has already input a string.

Read only

Former Member
0 Likes
647

Please paste the code.

Read only

0 Likes
647

This is my codes. The string 'PA' is not hard coded. We need to read what the user input in the textbox. For example it can be PA, PB, PC or any other input.

REPORT ZMEIHUI_METADATA.

&----


*& Global Declaration

&----


DATA: IO_TABLEA(40) TYPE C,

IO_TABLEB(40) TYPE C,

VALUE(40) TYPE C,

VALUE2(100) TYPE C,

PROGNAME TYPE SY-REPID,

DYNNUM TYPE SY-DYNNR.

&----


*& Processing Blocks called by the Runtime environment

&----


START-OF-SELECTION.

CALL SCREEN 8000.

----


  • MODULE STATUS_8000 OUTPUT

----


*

----


MODULE STATUS_8000 OUTPUT.

SET PF-STATUS 'UI'.

SET TITLEBAR 'TITLE'.

ENDMODULE. "STATUS_8000 OUTPUT

----


  • MODULE USER_COMMAND_8000 INPUT

----


*

----


MODULE USER_COMMAND_8000 INPUT.

CASE SY-UCOMM.

WHEN 'BACK'.

LEAVE PROGRAM. "need to change to the previous screen!!!"

WHEN 'EXIT'.

LEAVE PROGRAM.

WHEN 'EXECUTE'.

" PERFORM VALIDATE_REQUIRED_FIELD.

ENDCASE.

ENDMODULE. "USER_COMMAND_8000 INPUT

----


  • MODULE F4_INPUT INPUT

----


MODULE F4_INPUT INPUT.

TYPES: BEGIN OF VALUES,

TABNAME TYPE DD02T-TABNAME,

DDTEXT TYPE DD02T-DDTEXT,

END OF VALUES.

DATA: F4_VALUES TYPE TABLE OF VALUES.

PROGNAME = SY-REPID.

DYNNUM = SY-DYNNR.

VALUE = IO_TABLEA.

CONCATENATE VALUE '%' INTO VALUE2.

SELECT DISTINCT TABNAME DDTEXT FROM DD02T

INTO TABLE F4_VALUES WHERE TABNAME LIKE VALUE2.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = 'IO_TABLEA'

DYNPPROG = PROGNAME

DYNPNR = DYNNUM

DYNPROFIELD = 'IO_TABLEA'

VALUE_ORG = 'S'

TABLES

VALUE_TAB = F4_VALUES.

ENDMODULE. "F4_INPUT INPUT

Read only

Former Member
0 Likes
647

Hi,

Use the FM.

select * from ztable into table i_f4help

where name CP 'PA' .

Call function 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = <Fieldname>(in selection screen)

value_org ='S'

TABLES

value_tab = i_f4help

Populate the values aptly. You will be able to capture the input.

Thanks,

Kasiraman R