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

selection screen problem

Former Member
0 Likes
1,068

HALLOW I doing a program that call to function that I build, in the function I import a table that the user have to put otype plvar and objid . I wont to do to this function in alv report with selection screen but I have a problem because for the table <b>z_course_table</b> when I choose course in the slection screen when I check in the debugger in this field Is empty it faild to read the course num.

what I doing wrong thankes

This is my function

CALL FUNCTION 'YHR_GET_EMP_COURSE_SINGLE'

EXPORTING

begda = so_date-low

endda = so_date-high

uname = uname

z_course_table = z_course_table

switch_history = switch_history

TABLES

itab_final = itab_final

it_final = it_final.

And in the function module import

Z_COURSE_TABLE LIKE HROBJECT

SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t02.

<b>SELECT-OPTIONS c_course FOR z_course_table NO INTERVALS.</b>

PARAMETERS uname TYPE sy-uname DEFAULT sy-uname.

PARAMETERS switch AS CHECKBOX.

SELECTION-SCREEN END OF BLOCK b2.

Thankes for your time

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,037

it should be

LECT-OPTIONS c_course FOR z_course_table-<b>course</b> NO INTERVALS.

where course is the coure field in ur ztable

10 REPLIES 10
Read only

Former Member
0 Likes
1,038

it should be

LECT-OPTIONS c_course FOR z_course_table-<b>course</b> NO INTERVALS.

where course is the coure field in ur ztable

Read only

0 Likes
1,037

hi Chandrasekhar

in this table i have otype plvar and objid and i try with z_course_table-objid

and its not work maybe u have suggstion.

if u need more info to help let me now regards

Read only

0 Likes
1,037

if there is any searchhelp for that field only the values will come

or

use DYNP_VALUES_UPDATE FM as suggested by Alavaro

Read only

0 Likes
1,037

hi Chandrasekhar

i wont just the value

regards

Read only

0 Likes
1,037

OH..i guess u want the value to be displayed in debug mode

while debugging check for value C_COURSE-LOW or C_COURSE-HIGH

i guess you are checking only c_course

Read only

Former Member
0 Likes
1,037

You should use <b>DYNP_VALUES_READ</b> to get the values of your MatchCode field.

Greetings,

Blag.

Read only

0 Likes
1,037

hi Alvaro

u can give me exampele how to use it?

how i call it this is function?

regards

Read only

Former Member
0 Likes
1,037

Hi,

Your select-option should be

SELECT-OPTIONS c_course FOR <b>z_course_table-COURSE_NO</b> NO INTERVALS.

IN the INITILIZATION event, fill the values from the table z_course_table to the select-option field

Regards

Sudheer

Read only

Former Member
0 Likes
1,037

Hi Antonio,

Have 3 SELECT-OPTIONS, each for OTYPE, PLVAR and OBJID.

Before Exporting these values, Append them to internal table and pass this table to function module.

SELECT-OPTIONS c_OTYPE FOR z_course_table-OTYPE NO INTERVALS.

SELECT-OPTIONS c_PLVAR FOR z_course_table-PLVAR NO INTERVALS.

SELECT-OPTIONS c_OBJID FOR z_course_table-OBJID NO INTERVALS.

START-OF-SELECTION.

Z_COURSE_TABLE-OTYPE = C_OTYPE.

Z_COURSE_TABLE-PLVAR = C_PLVAR.

Z_COURSE_TABLE-OBJID = C_OBJID.

APPEND Z_COURSE_TABLE.

Thanks,

Vinay

Read only

Former Member
0 Likes
1,037
dyname = sy-repid.
  xdynpfields-fieldname = 'COURSE'.
  APPEND xdynpfields.
  
 
  CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
            dyname               = dyname
            dynumb               = '1000'
            translate_to_upper   = 'X'
       TABLES
            dynpfields           = xdynpfields
       EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            invalid_parameter    = 7
            undefind_error       = 8
            double_conversion    = 9
            stepl_not_found      = 10
            OTHERS               = 11.