Application Development 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: 

pop up window with input fields

Former Member
0 Kudos

hi,

i need a popup window with 3 input fields. i only know the popup_to_confirm popup and i didnt find a forum post with the popup i need...

i tried to solve the problem with an additional dynpro, but that makes the whole thing to complicated. i just want the user to enter data in the middle of a procedure.

thx in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

You can find the sample codes for the function module by clicking the where-used list.

Eg:

Report RSSPO430

DATA: BEGIN OF FIELDS OCCURS 1.

INCLUDE STRUCTURE SVAL.

DATA: END OF FIELDS,

RETURNCODE(1) TYPE C,

POPUP_TITLE(30) TYPE C.

POPUP_TITLE = 'Programm holen'(100).

CLEAR FIELDS.

  • FIELDS-TABNAME = 'TRDIR'. "*019d

  • FIELDS-FIELDNAME = 'NAME'. "*019d

fields-tabname = 'TOJTB'. "*019i

fields-fieldname = 'PROGNAME'. "*019i

FIELDS-FIELD_OBL = 'X'. "Muß-Feld

APPEND FIELDS.

CALL FUNCTION 'POPUP_GET_VALUES_USER_CHECKED'

EXPORTING POPUP_TITLE = POPUP_TITLE

PROGRAMNAME = 'RSSPO430'

FORMNAME = 'EXAMPLE_1_EXIT'

IMPORTING RETURNCODE = RETURNCODE

TABLES FIELDS = FIELDS.

Regards,

Venkatesh

9 REPLIES 9

martinj_schmitte
Explorer
0 Kudos

Hi rafe,

please try this one:

CALL FUNCTION 'POPUP_GET_VALUES_USER_CHECKED'

...

...

KR,

Martin

0 Kudos

thank you martin but can you give me an example code please?

edit:

i'm not sure but isn't there a way to work without tables in these popups? i really only need 3 value fields in which the user can type something and thats it...

Edited by: rafe b. on Sep 4, 2008 4:31 PM

Former Member
0 Kudos

Hi ,

Try this FM POPUP_SEEK_IN_TABLE

For this you can accept the values from a database table.

You have to give a dbtable in the exporting parameters.

Or else goto se37 and try with Popup*

You will get many function modules like this.

Regards,

Venkatesh.

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

Use this FM. Even u can get F4 help.

POPUP_GET_VALUES

Here fill the tables parameter FIELDS With table name nad field name.

After calling teh FM read the same table with table and field names to get the value entered by the user.(Field VALUE stores the entered value)

Just execute in SE37. U can understand the functionality.

U can give any number of input fields.

Thanks,

Vinod.

Former Member
0 Kudos

Hi,

You can find the sample codes for the function module by clicking the where-used list.

Eg:

Report RSSPO430

DATA: BEGIN OF FIELDS OCCURS 1.

INCLUDE STRUCTURE SVAL.

DATA: END OF FIELDS,

RETURNCODE(1) TYPE C,

POPUP_TITLE(30) TYPE C.

POPUP_TITLE = 'Programm holen'(100).

CLEAR FIELDS.

  • FIELDS-TABNAME = 'TRDIR'. "*019d

  • FIELDS-FIELDNAME = 'NAME'. "*019d

fields-tabname = 'TOJTB'. "*019i

fields-fieldname = 'PROGNAME'. "*019i

FIELDS-FIELD_OBL = 'X'. "Muß-Feld

APPEND FIELDS.

CALL FUNCTION 'POPUP_GET_VALUES_USER_CHECKED'

EXPORTING POPUP_TITLE = POPUP_TITLE

PROGRAMNAME = 'RSSPO430'

FORMNAME = 'EXAMPLE_1_EXIT'

IMPORTING RETURNCODE = RETURNCODE

TABLES FIELDS = FIELDS.

Regards,

Venkatesh

0 Kudos

im doing it like this and it dumps:

TYPES: BEGIN OF ty_fields,

iedd TYPE d,

budat TYPE d,

conf_text(40) TYPE c,

END OF ty_fields.

DATA: it_fields TYPE TABLE OF ty_fields,

wa_fields LIKE LINE OF it_fields.

CALL FUNCTION 'POPUP_GET_VALUES_USER_CHECKED'

EXPORTING

formname = 'test'

popup_title = 'Aufträge Rückmelden'

programname = 'Doesnt_matter'

  • START_COLUMN = '5'

  • START_ROW = '5'

  • NO_CHECK_FOR_FIXED_VALUES = ' '

  • IMPORTING

  • RETURNCODE =

TABLES

fields = it_fields

EXCEPTIONS

error_in_fields = 1

OTHERS = 2

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

and then it dumps with the message that i used the right field but the field has the wrong lenght... why the wrong lenght? what's wrong

i hope i'm not striking on your nerves and thanks for any further help.

0 Kudos

Hi Rafe,

Here u have to pass the tables parameters fields with reference table and fields so that it takes the length of input field, F4 help etc. U r not populating teh table. Comment the messages after FM call and handle the messages if u require it.

Also you are definig the internal table with your own structure. U have to define it with type sval.

Check below code.


DATA: it_fields TYPE TABLE OF sval,
wa_fields LIKE LINE OF sval.
REFRESH it_fields.
CLEAR wa_fields.
wa_fields-tabname = 'MARA'.
wa_fields-FIELDNAME = 'MATNR'.
APPEND wa_fields  TO it_fields.

wa_fields-tabname = 'MARC'.
wa_fields-FIELDNAME = 'WERKS'.
APPEND wa_fields  TO it_fields.

CALL FUNCTION 'POPUP_GET_VALUES_USER_CHECKED'
EXPORTING
formname = 'test'
popup_title = 'Aufträge Rückmelden'
programname = 'Doesnt_matter'


START_COLUMN = '5' 
START_ROW = '5' 
NO_CHECK_FOR_FIXED_VALUES = ' ' 
IMPORTING 
RETURNCODE = 
TABLES
fields = it_fields
EXCEPTIONS
error_in_fields = 1
OTHERS = 2
.
IF sy-subrc 0.
*MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
*WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

Now it gives u a popup asking for material number and plant.

To get the entered value in popup do like this.

READ TABLE it_fields INTO wa_fields WITH KEY TABNAME = 'MARA' fieldname = 'MATNR'.

wa_fields-value contains the material number entered in the popup.

Similarly for plant.

So pass the table and field names as per ur req.

Thanks,

Vinod.

former_member705122
Active Contributor
0 Kudos

Hi,

Program RSSPO430

Examples of Function Module POPUP_GET_VALUES_USER_CHECKED.

Regards

Adil

Former Member
0 Kudos

Hi,

check FM POPUP_GET_VALUES_DB_CHECKED

Regards,

Kunjal